@quick-threejs/reactive 0.1.34 → 0.1.36

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,10 +1,15 @@
1
- var $e = Object.defineProperty;
2
- var qe = (o, e, t) => e in o ? $e(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var _ = (o, e, t) => qe(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { s as z, C as Ye, P as Qe, a as Me, f as Je, m as $, b as Ie, J as j, K as Ze, i as L, F as et, S as tt, c as se, W as _e, U as Oe, d as Ne, e as st, L as nt, R as rt, g as it, h as Pe, A as X, D as W, j as Re, Q as ot } from "./app.module-WohiJuEI.mjs";
5
- import { k as en, o as tn, n as sn, l as nn } from "./app.module-WohiJuEI.mjs";
6
- import { TrianglesDrawMode as at, TriangleFanDrawMode as ue, TriangleStripDrawMode as De, Loader as ke, FileLoader as q, SRGBColorSpace as N, LinearSRGBColorSpace as S, BufferGeometry as Fe, BufferAttribute as K, Color as P, ColorManagement as he, LoaderUtils as V, SpotLight as ct, PointLight as lt, DirectionalLight as ut, MeshBasicMaterial as B, MeshPhysicalMaterial as v, Vector2 as He, Matrix4 as Y, 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 de, LinearMipmapLinearFilter as je, RepeatWrapping as fe, NearestFilter as Ke, PointsMaterial as gt, Material as ne, 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 Lt, Group as re, PerspectiveCamera as bt, MathUtils as St, OrthographicCamera as vt, 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 Ee, VectorKeyframeTrack as we, NumberKeyframeTrack as xe, QuaternionKeyframeTrack as ye, Box3 as Ut, Sphere as Gt, Interpolant as Bt, LoadingManager as jt, AudioLoader as Kt } from "three";
7
- class Te {
1
+ var qe = Object.defineProperty;
2
+ var Ye = (o, e, t) => e in o ? qe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
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 {
8
13
  constructor() {
9
14
  /**
10
15
  * @description The app worker logic location.
@@ -102,15 +107,6 @@ class Te {
102
107
  * @default undefined
103
108
  */
104
109
  _(this, "withMiniCamera");
105
- /**
106
- * Display the camera helper.
107
- *
108
- * @remark __Deactivated if the value is `false` or `undefined`__
109
- * @remark __This property depends on {@link RegisterPropsBlueprint.enableDebug enableDebug}__
110
- *
111
- * @default undefined
112
- */
113
- _(this, "withCameraHelper");
114
110
  /**
115
111
  * @description Handler called when the app is ready.
116
112
  *
@@ -119,7 +115,7 @@ class Te {
119
115
  _(this, "onReady");
120
116
  }
121
117
  }
122
- class Ys {
118
+ class Qs {
123
119
  constructor() {
124
120
  /** @description Handler triggered when the app is ready. */
125
121
  _(this, "onReady");
@@ -128,7 +124,7 @@ class Ys {
128
124
  function Le(o, e) {
129
125
  if (e === at)
130
126
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), o;
131
- if (e === ue || e === De) {
127
+ if (e === le || e === ke) {
132
128
  let t = o.getIndex();
133
129
  if (t === null) {
134
130
  const r = [], a = o.getAttribute("position");
@@ -140,7 +136,7 @@ function Le(o, e) {
140
136
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), o;
141
137
  }
142
138
  const n = t.count - 2, s = [];
143
- if (e === ue)
139
+ if (e === le)
144
140
  for (let r = 1; r <= n; r++)
145
141
  s.push(t.getX(0)), s.push(t.getX(r)), s.push(t.getX(r + 1));
146
142
  else
@@ -153,7 +149,7 @@ function Le(o, e) {
153
149
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), o;
154
150
  }
155
151
  const ie = /* @__PURE__ */ new WeakMap();
156
- class Vt extends ke {
152
+ class zt extends Fe {
157
153
  constructor(e) {
158
154
  super(e), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
159
155
  position: "POSITION",
@@ -177,7 +173,7 @@ class Vt extends ke {
177
173
  return this.workerLimit = e, this;
178
174
  }
179
175
  load(e, t, n, s) {
180
- const i = new q(this.manager);
176
+ const i = new Y(this.manager);
181
177
  i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (r) => {
182
178
  this.parse(r, t, s);
183
179
  }, n, s);
@@ -186,7 +182,7 @@ class Vt extends ke {
186
182
  }) {
187
183
  this.decodeDracoFile(e, t, null, null, N, n).catch(n);
188
184
  }
189
- decodeDracoFile(e, t, n, s, i = S, r = () => {
185
+ decodeDracoFile(e, t, n, s, i = v, r = () => {
190
186
  }) {
191
187
  const a = {
192
188
  attributeIDs: n || this.defaultAttributeIDs,
@@ -208,8 +204,8 @@ class Vt extends ke {
208
204
  );
209
205
  }
210
206
  let s;
211
- const i = this.workerNextTaskID++, r = e.byteLength, a = this._getWorker(i, r).then((c) => (s = c, new Promise((l, h) => {
212
- s._callbacks[i] = { resolve: l, reject: h }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
207
+ const i = this.workerNextTaskID++, r = e.byteLength, a = this._getWorker(i, r).then((c) => (s = c, new Promise((u, h) => {
208
+ s._callbacks[i] = { resolve: u, reject: h }, s.postMessage({ type: "decode", id: i, taskConfig: t, buffer: e }, [e]);
213
209
  }))).then((c) => this._createGeometry(c.geometry));
214
210
  return a.catch(() => !0).then(() => {
215
211
  s && i && this._releaseTask(s, i);
@@ -219,7 +215,7 @@ class Vt extends ke {
219
215
  }), a;
220
216
  }
221
217
  _createGeometry(e) {
222
- const t = new Fe();
218
+ const t = new He();
223
219
  e.index && t.setIndex(new K(e.index.array, 1));
224
220
  for (let n = 0; n < e.attributes.length; n++) {
225
221
  const s = e.attributes[n], i = s.name, r = s.array, a = s.itemSize, c = new K(r, a);
@@ -234,7 +230,7 @@ class Vt extends ke {
234
230
  n.fromBufferAttribute(e, s), he.toWorkingColorSpace(n, N), e.setXYZ(s, n.r, n.g, n.b);
235
231
  }
236
232
  _loadLibrary(e, t) {
237
- const n = new q(this.manager);
233
+ const n = new Y(this.manager);
238
234
  return n.setPath(this.decoderPath), n.setResponseType(t), n.setWithCredentials(this.withCredentials), new Promise((s, i) => {
239
235
  n.load(e, s, void 0, i);
240
236
  });
@@ -248,7 +244,7 @@ class Vt extends ke {
248
244
  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) => {
249
245
  const s = n[0];
250
246
  e || (this.decoderConfig.wasmBinary = n[1]);
251
- const i = zt.toString(), r = [
247
+ const i = Xt.toString(), r = [
252
248
  "/* draco decoder */",
253
249
  s,
254
250
  "",
@@ -296,36 +292,36 @@ class Vt extends ke {
296
292
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
297
293
  }
298
294
  }
299
- function zt() {
295
+ function Xt() {
300
296
  let o, e;
301
297
  onmessage = function(r) {
302
298
  const a = r.data;
303
299
  switch (a.type) {
304
300
  case "init":
305
301
  o = a.decoderConfig, e = new Promise(function(h) {
306
- o.onModuleLoaded = function(u) {
307
- h({ draco: u });
302
+ o.onModuleLoaded = function(l) {
303
+ h({ draco: l });
308
304
  }, DracoDecoderModule(o);
309
305
  });
310
306
  break;
311
307
  case "decode":
312
- const c = a.buffer, l = a.taskConfig;
308
+ const c = a.buffer, u = a.taskConfig;
313
309
  e.then((h) => {
314
- const u = h.draco, d = new u.Decoder();
310
+ const l = h.draco, d = new l.Decoder();
315
311
  try {
316
- const f = t(u, d, new Int8Array(c), l), p = f.attributes.map((A) => A.array.buffer);
312
+ const f = t(l, d, new Int8Array(c), u), p = f.attributes.map((A) => A.array.buffer);
317
313
  f.index && p.push(f.index.array.buffer), self.postMessage({ type: "decode", id: a.id, geometry: f }, p);
318
314
  } catch (f) {
319
315
  console.error(f), self.postMessage({ type: "error", id: a.id, error: f.message });
320
316
  } finally {
321
- u.destroy(d);
317
+ l.destroy(d);
322
318
  }
323
319
  });
324
320
  break;
325
321
  }
326
322
  };
327
- function t(r, a, c, l) {
328
- const h = l.attributeIDs, u = l.attributeTypes;
323
+ function t(r, a, c, u) {
324
+ const h = u.attributeIDs, l = u.attributeTypes;
329
325
  let d, f;
330
326
  const p = a.GetEncodedGeometryType(c);
331
327
  if (p === r.TRIANGULAR_MESH)
@@ -338,31 +334,31 @@ function zt() {
338
334
  throw new Error("THREE.DRACOLoader: Decoding failed: " + f.error_msg());
339
335
  const A = { index: null, attributes: [] };
340
336
  for (const m in h) {
341
- const g = self[u[m]];
337
+ const g = self[l[m]];
342
338
  let R, w;
343
- if (l.useUniqueIDs)
339
+ if (u.useUniqueIDs)
344
340
  w = h[m], R = a.GetAttributeByUniqueId(d, w);
345
341
  else {
346
342
  if (w = a.GetAttributeId(d, r[h[m]]), w === -1) continue;
347
343
  R = a.GetAttribute(d, w);
348
344
  }
349
345
  const E = s(r, a, d, m, g, R);
350
- m === "color" && (E.vertexColorSpace = l.vertexColorSpace), A.attributes.push(E);
346
+ m === "color" && (E.vertexColorSpace = u.vertexColorSpace), A.attributes.push(E);
351
347
  }
352
348
  return p === r.TRIANGULAR_MESH && (A.index = n(r, a, d)), r.destroy(d), A;
353
349
  }
354
350
  function n(r, a, c) {
355
- const h = c.num_faces() * 3, u = h * 4, d = r._malloc(u);
356
- a.GetTrianglesUInt32Array(c, u, d);
351
+ const h = c.num_faces() * 3, l = h * 4, d = r._malloc(l);
352
+ a.GetTrianglesUInt32Array(c, l, d);
357
353
  const f = new Uint32Array(r.HEAPF32.buffer, d, h).slice();
358
354
  return r._free(d), { array: f, itemSize: 1 };
359
355
  }
360
- function s(r, a, c, l, h, u) {
361
- const d = u.num_components(), p = c.num_points() * d, A = p * h.BYTES_PER_ELEMENT, m = i(r, h), g = r._malloc(A);
362
- a.GetAttributeDataArrayForAllPoints(c, u, m, A, g);
356
+ function s(r, a, c, u, h, l) {
357
+ const d = l.num_components(), p = c.num_points() * d, A = p * h.BYTES_PER_ELEMENT, m = i(r, h), g = r._malloc(A);
358
+ a.GetAttributeDataArrayForAllPoints(c, l, m, A, g);
363
359
  const R = new h(r.HEAPF32.buffer, g, p).slice();
364
360
  return r._free(g), {
365
- name: l,
361
+ name: u,
366
362
  array: R,
367
363
  itemSize: d
368
364
  };
@@ -386,42 +382,42 @@ function zt() {
386
382
  }
387
383
  }
388
384
  }
389
- class Xt extends ke {
385
+ class Wt extends Fe {
390
386
  constructor(e) {
391
387
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
392
- return new Qt(t);
393
- }), this.register(function(t) {
394
388
  return new Jt(t);
395
389
  }), this.register(function(t) {
396
- return new as(t);
390
+ return new Zt(t);
397
391
  }), this.register(function(t) {
398
392
  return new cs(t);
399
393
  }), this.register(function(t) {
400
- return new ls(t);
394
+ return new us(t);
401
395
  }), this.register(function(t) {
402
- return new es(t);
396
+ return new ls(t);
403
397
  }), this.register(function(t) {
404
398
  return new ts(t);
405
399
  }), this.register(function(t) {
406
400
  return new ss(t);
407
401
  }), this.register(function(t) {
408
402
  return new ns(t);
409
- }), this.register(function(t) {
410
- return new Yt(t);
411
403
  }), this.register(function(t) {
412
404
  return new rs(t);
413
405
  }), this.register(function(t) {
414
- return new Zt(t);
415
- }), this.register(function(t) {
416
- return new os(t);
406
+ return new Qt(t);
417
407
  }), this.register(function(t) {
418
408
  return new is(t);
419
409
  }), this.register(function(t) {
420
- return new $t(t);
410
+ return new es(t);
421
411
  }), this.register(function(t) {
422
- return new us(t);
412
+ return new as(t);
413
+ }), this.register(function(t) {
414
+ return new os(t);
415
+ }), this.register(function(t) {
416
+ return new qt(t);
423
417
  }), this.register(function(t) {
424
418
  return new hs(t);
419
+ }), this.register(function(t) {
420
+ return new ds(t);
425
421
  });
426
422
  }
427
423
  load(e, t, n, s) {
@@ -430,17 +426,17 @@ class Xt extends ke {
430
426
  if (this.resourcePath !== "")
431
427
  r = this.resourcePath;
432
428
  else if (this.path !== "") {
433
- const l = V.extractUrlBase(e);
434
- r = V.resolveURL(l, this.path);
429
+ const u = V.extractUrlBase(e);
430
+ r = V.resolveURL(u, this.path);
435
431
  } else
436
432
  r = V.extractUrlBase(e);
437
433
  this.manager.itemStart(e);
438
- const a = function(l) {
439
- s ? s(l) : console.error(l), i.manager.itemError(e), i.manager.itemEnd(e);
440
- }, c = new q(this.manager);
441
- c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(l) {
434
+ const a = function(u) {
435
+ s ? s(u) : console.error(u), i.manager.itemError(e), i.manager.itemEnd(e);
436
+ }, c = new Y(this.manager);
437
+ c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(u) {
442
438
  try {
443
- i.parse(l, r, function(h) {
439
+ i.parse(u, r, function(h) {
444
440
  t(h), i.manager.itemEnd(e);
445
441
  }, a);
446
442
  } catch (h) {
@@ -469,11 +465,11 @@ class Xt extends ke {
469
465
  if (typeof e == "string")
470
466
  i = JSON.parse(e);
471
467
  else if (e instanceof ArrayBuffer)
472
- if (c.decode(new Uint8Array(e, 0, 4)) === Xe) {
468
+ if (c.decode(new Uint8Array(e, 0, 4)) === We) {
473
469
  try {
474
- r[T.KHR_BINARY_GLTF] = new ds(e);
475
- } catch (u) {
476
- s && s(u);
470
+ r[T.KHR_BINARY_GLTF] = new fs(e);
471
+ } catch (l) {
472
+ s && s(l);
477
473
  return;
478
474
  }
479
475
  i = JSON.parse(r[T.KHR_BINARY_GLTF].content);
@@ -485,7 +481,7 @@ class Xt extends ke {
485
481
  s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
486
482
  return;
487
483
  }
488
- const l = new Ls(i, {
484
+ const u = new Ls(i, {
489
485
  path: t || this.resourcePath || "",
490
486
  crossOrigin: this.crossOrigin,
491
487
  requestHeader: this.requestHeader,
@@ -493,32 +489,32 @@ class Xt extends ke {
493
489
  ktx2Loader: this.ktx2Loader,
494
490
  meshoptDecoder: this.meshoptDecoder
495
491
  });
496
- l.fileLoader.setRequestHeader(this.requestHeader);
492
+ u.fileLoader.setRequestHeader(this.requestHeader);
497
493
  for (let h = 0; h < this.pluginCallbacks.length; h++) {
498
- const u = this.pluginCallbacks[h](l);
499
- u.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[u.name] = u, r[u.name] = !0;
494
+ const l = this.pluginCallbacks[h](u);
495
+ l.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), a[l.name] = l, r[l.name] = !0;
500
496
  }
501
497
  if (i.extensionsUsed)
502
498
  for (let h = 0; h < i.extensionsUsed.length; ++h) {
503
- const u = i.extensionsUsed[h], d = i.extensionsRequired || [];
504
- switch (u) {
499
+ const l = i.extensionsUsed[h], d = i.extensionsRequired || [];
500
+ switch (l) {
505
501
  case T.KHR_MATERIALS_UNLIT:
506
- r[u] = new qt();
502
+ r[l] = new Yt();
507
503
  break;
508
504
  case T.KHR_DRACO_MESH_COMPRESSION:
509
- r[u] = new fs(i, this.dracoLoader);
505
+ r[l] = new ps(i, this.dracoLoader);
510
506
  break;
511
507
  case T.KHR_TEXTURE_TRANSFORM:
512
- r[u] = new ps();
508
+ r[l] = new ms();
513
509
  break;
514
510
  case T.KHR_MESH_QUANTIZATION:
515
- r[u] = new ms();
511
+ r[l] = new gs();
516
512
  break;
517
513
  default:
518
- d.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
514
+ d.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
519
515
  }
520
516
  }
521
- l.setExtensions(r), l.setPlugins(a), l.parse(n, s);
517
+ u.setExtensions(r), u.setPlugins(a), u.parse(n, s);
522
518
  }
523
519
  parseAsync(e, t) {
524
520
  const n = this;
@@ -527,7 +523,7 @@ class Xt extends ke {
527
523
  });
528
524
  }
529
525
  }
530
- function Wt() {
526
+ function $t() {
531
527
  let o = {};
532
528
  return {
533
529
  get: function(e) {
@@ -568,7 +564,7 @@ const T = {
568
564
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
569
565
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
570
566
  };
571
- class $t {
567
+ class qt {
572
568
  constructor(e) {
573
569
  this.parser = e, this.name = T.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
574
570
  }
@@ -584,24 +580,24 @@ class $t {
584
580
  let s = t.cache.get(n);
585
581
  if (s) return s;
586
582
  const i = t.json, c = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
587
- let l;
583
+ let u;
588
584
  const h = new P(16777215);
589
- c.color !== void 0 && h.setRGB(c.color[0], c.color[1], c.color[2], S);
590
- const u = c.range !== void 0 ? c.range : 0;
585
+ c.color !== void 0 && h.setRGB(c.color[0], c.color[1], c.color[2], v);
586
+ const l = c.range !== void 0 ? c.range : 0;
591
587
  switch (c.type) {
592
588
  case "directional":
593
- l = new ut(h), l.target.position.set(0, 0, -1), l.add(l.target);
589
+ u = new lt(h), u.target.position.set(0, 0, -1), u.add(u.target);
594
590
  break;
595
591
  case "point":
596
- l = new lt(h), l.distance = u;
592
+ u = new ut(h), u.distance = l;
597
593
  break;
598
594
  case "spot":
599
- l = new ct(h), l.distance = u, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, l.angle = c.spot.outerConeAngle, l.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, l.target.position.set(0, 0, -1), l.add(l.target);
595
+ u = new ct(h), u.distance = l, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, u.angle = c.spot.outerConeAngle, u.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, u.target.position.set(0, 0, -1), u.add(u.target);
600
596
  break;
601
597
  default:
602
598
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
603
599
  }
604
- return l.position.set(0, 0, 0), l.decay = 2, C(l, c), c.intensity !== void 0 && (l.intensity = c.intensity), l.name = t.createUniqueName(c.name || "light_" + e), s = Promise.resolve(l), t.cache.add(n, s), s;
600
+ return u.position.set(0, 0, 0), u.decay = 2, C(u, c), c.intensity !== void 0 && (u.intensity = c.intensity), u.name = t.createUniqueName(c.name || "light_" + e), s = Promise.resolve(u), t.cache.add(n, s), s;
605
601
  }
606
602
  getDependency(e, t) {
607
603
  if (e === "light")
@@ -614,7 +610,7 @@ class $t {
614
610
  });
615
611
  }
616
612
  }
617
- class qt {
613
+ class Yt {
618
614
  constructor() {
619
615
  this.name = T.KHR_MATERIALS_UNLIT;
620
616
  }
@@ -628,14 +624,14 @@ class qt {
628
624
  if (i) {
629
625
  if (Array.isArray(i.baseColorFactor)) {
630
626
  const r = i.baseColorFactor;
631
- e.color.setRGB(r[0], r[1], r[2], S), e.opacity = r[3];
627
+ e.color.setRGB(r[0], r[1], r[2], v), e.opacity = r[3];
632
628
  }
633
629
  i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, N));
634
630
  }
635
631
  return Promise.all(s);
636
632
  }
637
633
  }
638
- class Yt {
634
+ class Qt {
639
635
  constructor(e) {
640
636
  this.parser = e, this.name = T.KHR_MATERIALS_EMISSIVE_STRENGTH;
641
637
  }
@@ -647,13 +643,13 @@ class Yt {
647
643
  return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
648
644
  }
649
645
  }
650
- class Qt {
646
+ class Jt {
651
647
  constructor(e) {
652
648
  this.parser = e, this.name = T.KHR_MATERIALS_CLEARCOAT;
653
649
  }
654
650
  getMaterialType(e) {
655
651
  const n = this.parser.json.materials[e];
656
- return !n.extensions || !n.extensions[this.name] ? null : v;
652
+ return !n.extensions || !n.extensions[this.name] ? null : S;
657
653
  }
658
654
  extendMaterialParams(e, t) {
659
655
  const n = this.parser, s = n.json.materials[e];
@@ -662,18 +658,18 @@ class Qt {
662
658
  const i = [], r = s.extensions[this.name];
663
659
  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)) {
664
660
  const a = r.clearcoatNormalTexture.scale;
665
- t.clearcoatNormalScale = new He(a, a);
661
+ t.clearcoatNormalScale = new Ue(a, a);
666
662
  }
667
663
  return Promise.all(i);
668
664
  }
669
665
  }
670
- class Jt {
666
+ class Zt {
671
667
  constructor(e) {
672
668
  this.parser = e, this.name = T.KHR_MATERIALS_DISPERSION;
673
669
  }
674
670
  getMaterialType(e) {
675
671
  const n = this.parser.json.materials[e];
676
- return !n.extensions || !n.extensions[this.name] ? null : v;
672
+ return !n.extensions || !n.extensions[this.name] ? null : S;
677
673
  }
678
674
  extendMaterialParams(e, t) {
679
675
  const s = this.parser.json.materials[e];
@@ -683,13 +679,13 @@ class Jt {
683
679
  return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
684
680
  }
685
681
  }
686
- class Zt {
682
+ class es {
687
683
  constructor(e) {
688
684
  this.parser = e, this.name = T.KHR_MATERIALS_IRIDESCENCE;
689
685
  }
690
686
  getMaterialType(e) {
691
687
  const n = this.parser.json.materials[e];
692
- return !n.extensions || !n.extensions[this.name] ? null : v;
688
+ return !n.extensions || !n.extensions[this.name] ? null : S;
693
689
  }
694
690
  extendMaterialParams(e, t) {
695
691
  const n = this.parser, s = n.json.materials[e];
@@ -699,13 +695,13 @@ class Zt {
699
695
  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);
700
696
  }
701
697
  }
702
- class es {
698
+ class ts {
703
699
  constructor(e) {
704
700
  this.parser = e, this.name = T.KHR_MATERIALS_SHEEN;
705
701
  }
706
702
  getMaterialType(e) {
707
703
  const n = this.parser.json.materials[e];
708
- return !n.extensions || !n.extensions[this.name] ? null : v;
704
+ return !n.extensions || !n.extensions[this.name] ? null : S;
709
705
  }
710
706
  extendMaterialParams(e, t) {
711
707
  const n = this.parser, s = n.json.materials[e];
@@ -716,18 +712,18 @@ class es {
716
712
  const r = s.extensions[this.name];
717
713
  if (r.sheenColorFactor !== void 0) {
718
714
  const a = r.sheenColorFactor;
719
- t.sheenColor.setRGB(a[0], a[1], a[2], S);
715
+ t.sheenColor.setRGB(a[0], a[1], a[2], v);
720
716
  }
721
717
  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);
722
718
  }
723
719
  }
724
- class ts {
720
+ class ss {
725
721
  constructor(e) {
726
722
  this.parser = e, this.name = T.KHR_MATERIALS_TRANSMISSION;
727
723
  }
728
724
  getMaterialType(e) {
729
725
  const n = this.parser.json.materials[e];
730
- return !n.extensions || !n.extensions[this.name] ? null : v;
726
+ return !n.extensions || !n.extensions[this.name] ? null : S;
731
727
  }
732
728
  extendMaterialParams(e, t) {
733
729
  const n = this.parser, s = n.json.materials[e];
@@ -737,13 +733,13 @@ class ts {
737
733
  return r.transmissionFactor !== void 0 && (t.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", r.transmissionTexture)), Promise.all(i);
738
734
  }
739
735
  }
740
- class ss {
736
+ class ns {
741
737
  constructor(e) {
742
738
  this.parser = e, this.name = T.KHR_MATERIALS_VOLUME;
743
739
  }
744
740
  getMaterialType(e) {
745
741
  const n = this.parser.json.materials[e];
746
- return !n.extensions || !n.extensions[this.name] ? null : v;
742
+ return !n.extensions || !n.extensions[this.name] ? null : S;
747
743
  }
748
744
  extendMaterialParams(e, t) {
749
745
  const n = this.parser, s = n.json.materials[e];
@@ -752,16 +748,16 @@ class ss {
752
748
  const i = [], r = s.extensions[this.name];
753
749
  t.thickness = r.thicknessFactor !== void 0 ? r.thicknessFactor : 0, r.thicknessTexture !== void 0 && i.push(n.assignTexture(t, "thicknessMap", r.thicknessTexture)), t.attenuationDistance = r.attenuationDistance || 1 / 0;
754
750
  const a = r.attenuationColor || [1, 1, 1];
755
- return t.attenuationColor = new P().setRGB(a[0], a[1], a[2], S), Promise.all(i);
751
+ return t.attenuationColor = new P().setRGB(a[0], a[1], a[2], v), Promise.all(i);
756
752
  }
757
753
  }
758
- class ns {
754
+ class rs {
759
755
  constructor(e) {
760
756
  this.parser = e, this.name = T.KHR_MATERIALS_IOR;
761
757
  }
762
758
  getMaterialType(e) {
763
759
  const n = this.parser.json.materials[e];
764
- return !n.extensions || !n.extensions[this.name] ? null : v;
760
+ return !n.extensions || !n.extensions[this.name] ? null : S;
765
761
  }
766
762
  extendMaterialParams(e, t) {
767
763
  const s = this.parser.json.materials[e];
@@ -771,13 +767,13 @@ class ns {
771
767
  return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
772
768
  }
773
769
  }
774
- class rs {
770
+ class is {
775
771
  constructor(e) {
776
772
  this.parser = e, this.name = T.KHR_MATERIALS_SPECULAR;
777
773
  }
778
774
  getMaterialType(e) {
779
775
  const n = this.parser.json.materials[e];
780
- return !n.extensions || !n.extensions[this.name] ? null : v;
776
+ return !n.extensions || !n.extensions[this.name] ? null : S;
781
777
  }
782
778
  extendMaterialParams(e, t) {
783
779
  const n = this.parser, s = n.json.materials[e];
@@ -786,16 +782,16 @@ class rs {
786
782
  const i = [], r = s.extensions[this.name];
787
783
  t.specularIntensity = r.specularFactor !== void 0 ? r.specularFactor : 1, r.specularTexture !== void 0 && i.push(n.assignTexture(t, "specularIntensityMap", r.specularTexture));
788
784
  const a = r.specularColorFactor || [1, 1, 1];
789
- return t.specularColor = new P().setRGB(a[0], a[1], a[2], S), r.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", r.specularColorTexture, N)), Promise.all(i);
785
+ 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);
790
786
  }
791
787
  }
792
- class is {
788
+ class os {
793
789
  constructor(e) {
794
790
  this.parser = e, this.name = T.EXT_MATERIALS_BUMP;
795
791
  }
796
792
  getMaterialType(e) {
797
793
  const n = this.parser.json.materials[e];
798
- return !n.extensions || !n.extensions[this.name] ? null : v;
794
+ return !n.extensions || !n.extensions[this.name] ? null : S;
799
795
  }
800
796
  extendMaterialParams(e, t) {
801
797
  const n = this.parser, s = n.json.materials[e];
@@ -805,13 +801,13 @@ class is {
805
801
  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);
806
802
  }
807
803
  }
808
- class os {
804
+ class as {
809
805
  constructor(e) {
810
806
  this.parser = e, this.name = T.KHR_MATERIALS_ANISOTROPY;
811
807
  }
812
808
  getMaterialType(e) {
813
809
  const n = this.parser.json.materials[e];
814
- return !n.extensions || !n.extensions[this.name] ? null : v;
810
+ return !n.extensions || !n.extensions[this.name] ? null : S;
815
811
  }
816
812
  extendMaterialParams(e, t) {
817
813
  const n = this.parser, s = n.json.materials[e];
@@ -821,7 +817,7 @@ class os {
821
817
  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);
822
818
  }
823
819
  }
824
- class as {
820
+ class cs {
825
821
  constructor(e) {
826
822
  this.parser = e, this.name = T.KHR_TEXTURE_BASISU;
827
823
  }
@@ -838,7 +834,7 @@ class as {
838
834
  return t.loadTextureImage(e, i.source, r);
839
835
  }
840
836
  }
841
- class cs {
837
+ class us {
842
838
  constructor(e) {
843
839
  this.parser = e, this.name = T.EXT_TEXTURE_WEBP, this.isSupported = null;
844
840
  }
@@ -849,11 +845,11 @@ class cs {
849
845
  const r = i.extensions[t], a = s.images[r.source];
850
846
  let c = n.textureLoader;
851
847
  if (a.uri) {
852
- const l = n.options.manager.getHandler(a.uri);
853
- l !== null && (c = l);
848
+ const u = n.options.manager.getHandler(a.uri);
849
+ u !== null && (c = u);
854
850
  }
855
- return this.detectSupport().then(function(l) {
856
- if (l) return n.loadTextureImage(e, r.source, c);
851
+ return this.detectSupport().then(function(u) {
852
+ if (u) return n.loadTextureImage(e, r.source, c);
857
853
  if (s.extensionsRequired && s.extensionsRequired.indexOf(t) >= 0)
858
854
  throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
859
855
  return n.loadTexture(e);
@@ -879,11 +875,11 @@ class ls {
879
875
  const r = i.extensions[t], a = s.images[r.source];
880
876
  let c = n.textureLoader;
881
877
  if (a.uri) {
882
- const l = n.options.manager.getHandler(a.uri);
883
- l !== null && (c = l);
878
+ const u = n.options.manager.getHandler(a.uri);
879
+ u !== null && (c = u);
884
880
  }
885
- return this.detectSupport().then(function(l) {
886
- if (l) return n.loadTextureImage(e, r.source, c);
881
+ return this.detectSupport().then(function(u) {
882
+ if (u) return n.loadTextureImage(e, r.source, c);
887
883
  if (s.extensionsRequired && s.extensionsRequired.indexOf(t) >= 0)
888
884
  throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
889
885
  return n.loadTexture(e);
@@ -898,7 +894,7 @@ class ls {
898
894
  })), this.isSupported;
899
895
  }
900
896
  }
901
- class us {
897
+ class hs {
902
898
  constructor(e) {
903
899
  this.name = T.EXT_MESHOPT_COMPRESSION, this.parser = e;
904
900
  }
@@ -912,19 +908,19 @@ class us {
912
908
  return null;
913
909
  }
914
910
  return i.then(function(a) {
915
- const c = s.byteOffset || 0, l = s.byteLength || 0, h = s.count, u = s.byteStride, d = new Uint8Array(a, c, l);
916
- return r.decodeGltfBufferAsync ? r.decodeGltfBufferAsync(h, u, d, s.mode, s.filter).then(function(f) {
911
+ const c = s.byteOffset || 0, u = s.byteLength || 0, h = s.count, l = s.byteStride, d = new Uint8Array(a, c, u);
912
+ return r.decodeGltfBufferAsync ? r.decodeGltfBufferAsync(h, l, d, s.mode, s.filter).then(function(f) {
917
913
  return f.buffer;
918
914
  }) : r.ready.then(function() {
919
- const f = new ArrayBuffer(h * u);
920
- return r.decodeGltfBuffer(new Uint8Array(f), h, u, d, s.mode, s.filter), f;
915
+ const f = new ArrayBuffer(h * l);
916
+ return r.decodeGltfBuffer(new Uint8Array(f), h, l, d, s.mode, s.filter), f;
921
917
  });
922
918
  });
923
919
  } else
924
920
  return null;
925
921
  }
926
922
  }
927
- class hs {
923
+ class ds {
928
924
  constructor(e) {
929
925
  this.name = T.EXT_MESH_GPU_INSTANCING, this.parser = e;
930
926
  }
@@ -933,31 +929,31 @@ class hs {
933
929
  if (!n.extensions || !n.extensions[this.name] || n.mesh === void 0)
934
930
  return null;
935
931
  const s = t.meshes[n.mesh];
936
- for (const l of s.primitives)
937
- if (l.mode !== x.TRIANGLES && l.mode !== x.TRIANGLE_STRIP && l.mode !== x.TRIANGLE_FAN && l.mode !== void 0)
932
+ for (const u of s.primitives)
933
+ if (u.mode !== x.TRIANGLES && u.mode !== x.TRIANGLE_STRIP && u.mode !== x.TRIANGLE_FAN && u.mode !== void 0)
938
934
  return null;
939
935
  const r = n.extensions[this.name].attributes, a = [], c = {};
940
- for (const l in r)
941
- a.push(this.parser.getDependency("accessor", r[l]).then((h) => (c[l] = h, c[l])));
942
- return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((l) => {
943
- const h = l.pop(), u = h.isGroup ? h.children : [h], d = l[0].count, f = [];
944
- for (const p of u) {
945
- const A = new Y(), m = new F(), g = new Ue(), R = new F(1, 1, 1), w = new ht(p.geometry, p.material, d);
936
+ for (const u in r)
937
+ a.push(this.parser.getDependency("accessor", r[u]).then((h) => (c[u] = h, c[u])));
938
+ return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((u) => {
939
+ const h = u.pop(), l = h.isGroup ? h.children : [h], d = u[0].count, f = [];
940
+ 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);
946
942
  for (let E = 0; E < d; E++)
947
943
  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));
948
944
  for (const E in c)
949
945
  if (E === "_COLOR_0") {
950
- const b = c[E];
951
- w.instanceColor = new dt(b.array, b.itemSize, b.normalized);
946
+ const L = c[E];
947
+ w.instanceColor = new dt(L.array, L.itemSize, L.normalized);
952
948
  } else E !== "TRANSLATION" && E !== "ROTATION" && E !== "SCALE" && p.geometry.setAttribute(E, c[E]);
953
- Ge.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
949
+ Be.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
954
950
  }
955
951
  return h.isGroup ? (h.clear(), h.add(...f), h) : f[0];
956
952
  }));
957
953
  }
958
954
  }
959
- const Xe = "glTF", G = 12, be = { JSON: 1313821514, BIN: 5130562 };
960
- class ds {
955
+ const We = "glTF", G = 12, ve = { JSON: 1313821514, BIN: 5130562 };
956
+ class fs {
961
957
  constructor(e) {
962
958
  this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
963
959
  const t = new DataView(e, 0, G), n = new TextDecoder();
@@ -965,7 +961,7 @@ class ds {
965
961
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
966
962
  version: t.getUint32(4, !0),
967
963
  length: t.getUint32(8, !0)
968
- }, this.header.magic !== Xe)
964
+ }, this.header.magic !== We)
969
965
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
970
966
  if (this.header.version < 2)
971
967
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -975,12 +971,12 @@ class ds {
975
971
  const a = i.getUint32(r, !0);
976
972
  r += 4;
977
973
  const c = i.getUint32(r, !0);
978
- if (r += 4, c === be.JSON) {
979
- const l = new Uint8Array(e, G + r, a);
980
- this.content = n.decode(l);
981
- } else if (c === be.BIN) {
982
- const l = G + r;
983
- this.body = e.slice(l, l + a);
974
+ if (r += 4, c === ve.JSON) {
975
+ const u = new Uint8Array(e, G + r, a);
976
+ this.content = n.decode(u);
977
+ } else if (c === ve.BIN) {
978
+ const u = G + r;
979
+ this.body = e.slice(u, u + a);
984
980
  }
985
981
  r += a;
986
982
  }
@@ -988,39 +984,39 @@ class ds {
988
984
  throw new Error("THREE.GLTFLoader: JSON content not found.");
989
985
  }
990
986
  }
991
- class fs {
987
+ class ps {
992
988
  constructor(e, t) {
993
989
  if (!t)
994
990
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
995
991
  this.name = T.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
996
992
  }
997
993
  decodePrimitive(e, t) {
998
- const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, r = e.extensions[this.name].attributes, a = {}, c = {}, l = {};
994
+ const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, r = e.extensions[this.name].attributes, a = {}, c = {}, u = {};
999
995
  for (const h in r) {
1000
- const u = pe[h] || h.toLowerCase();
1001
- a[u] = r[h];
996
+ const l = pe[h] || h.toLowerCase();
997
+ a[l] = r[h];
1002
998
  }
1003
999
  for (const h in e.attributes) {
1004
- const u = pe[h] || h.toLowerCase();
1000
+ const l = pe[h] || h.toLowerCase();
1005
1001
  if (r[h] !== void 0) {
1006
1002
  const d = n.accessors[e.attributes[h]], f = H[d.componentType];
1007
- l[u] = f.name, c[u] = d.normalized === !0;
1003
+ u[l] = f.name, c[l] = d.normalized === !0;
1008
1004
  }
1009
1005
  }
1010
1006
  return t.getDependency("bufferView", i).then(function(h) {
1011
- return new Promise(function(u, d) {
1007
+ return new Promise(function(l, d) {
1012
1008
  s.decodeDracoFile(h, function(f) {
1013
1009
  for (const p in f.attributes) {
1014
1010
  const A = f.attributes[p], m = c[p];
1015
1011
  m !== void 0 && (A.normalized = m);
1016
1012
  }
1017
- u(f);
1018
- }, a, l, S, d);
1013
+ l(f);
1014
+ }, a, u, v, d);
1019
1015
  });
1020
1016
  });
1021
1017
  }
1022
1018
  }
1023
- class ps {
1019
+ class ms {
1024
1020
  constructor() {
1025
1021
  this.name = T.KHR_TEXTURE_TRANSFORM;
1026
1022
  }
@@ -1028,12 +1024,12 @@ class ps {
1028
1024
  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;
1029
1025
  }
1030
1026
  }
1031
- class ms {
1027
+ class gs {
1032
1028
  constructor() {
1033
1029
  this.name = T.KHR_MESH_QUANTIZATION;
1034
1030
  }
1035
1031
  }
1036
- class We extends Bt {
1032
+ class $e extends Bt {
1037
1033
  constructor(e, t, n, s) {
1038
1034
  super(e, t, n, s);
1039
1035
  }
@@ -1044,19 +1040,19 @@ class We extends Bt {
1044
1040
  return t;
1045
1041
  }
1046
1042
  interpolate_(e, t, n, s) {
1047
- const i = this.resultBuffer, r = this.sampleValues, a = this.valueSize, c = a * 2, l = a * 3, h = s - t, u = (n - t) / h, d = u * u, f = d * u, p = e * l, A = p - l, m = -2 * f + 3 * d, g = f - d, R = 1 - m, w = g - d + u;
1043
+ 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;
1048
1044
  for (let E = 0; E !== a; E++) {
1049
- const b = r[A + E + a], M = r[A + E + c] * h, y = r[p + E + a], U = r[p + E] * h;
1050
- i[E] = R * b + w * M + m * y + g * U;
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;
1051
1047
  }
1052
1048
  return i;
1053
1049
  }
1054
1050
  }
1055
- const gs = new Ue();
1056
- class As extends We {
1051
+ const As = new Ge();
1052
+ class Ts extends $e {
1057
1053
  interpolate_(e, t, n, s) {
1058
1054
  const i = super.interpolate_(e, t, n, s);
1059
- return gs.fromArray(i).normalize().toArray(i), i;
1055
+ return As.fromArray(i).normalize().toArray(i), i;
1060
1056
  }
1061
1057
  }
1062
1058
  const x = {
@@ -1087,13 +1083,13 @@ const x = {
1087
1083
  5125: Uint32Array,
1088
1084
  5126: Float32Array
1089
1085
  }, Se = {
1090
- 9728: Ke,
1086
+ 9728: Ve,
1091
1087
  9729: de,
1092
1088
  9984: Ot,
1093
1089
  9985: Nt,
1094
1090
  9986: Pt,
1095
- 9987: je
1096
- }, ve = {
1091
+ 9987: Ke
1092
+ }, Ce = {
1097
1093
  33071: Dt,
1098
1094
  33648: kt,
1099
1095
  10497: fe
@@ -1121,19 +1117,19 @@ const x = {
1121
1117
  translation: "position",
1122
1118
  rotation: "quaternion",
1123
1119
  weights: "morphTargetInfluences"
1124
- }, Ts = {
1120
+ }, _s = {
1125
1121
  CUBICSPLINE: void 0,
1126
1122
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
1127
1123
  // keyframe track will be initialized with a default interpolation type, then modified.
1128
- LINEAR: ze,
1124
+ LINEAR: Xe,
1129
1125
  STEP: Ft
1130
1126
  }, ae = {
1131
1127
  OPAQUE: "OPAQUE",
1132
1128
  MASK: "MASK",
1133
1129
  BLEND: "BLEND"
1134
1130
  };
1135
- function _s(o) {
1136
- return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new Ve({
1131
+ function Rs(o) {
1132
+ return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new ze({
1137
1133
  color: 16777215,
1138
1134
  emissive: 0,
1139
1135
  metalness: 1,
@@ -1150,26 +1146,26 @@ function D(o, e, t) {
1150
1146
  function C(o, e) {
1151
1147
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(o.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
1152
1148
  }
1153
- function Rs(o, e, t) {
1149
+ function Es(o, e, t) {
1154
1150
  let n = !1, s = !1, i = !1;
1155
- for (let l = 0, h = e.length; l < h; l++) {
1156
- const u = e[l];
1157
- if (u.POSITION !== void 0 && (n = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
1151
+ for (let u = 0, h = e.length; u < h; u++) {
1152
+ const l = e[u];
1153
+ if (l.POSITION !== void 0 && (n = !0), l.NORMAL !== void 0 && (s = !0), l.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
1158
1154
  }
1159
1155
  if (!n && !s && !i) return Promise.resolve(o);
1160
1156
  const r = [], a = [], c = [];
1161
- for (let l = 0, h = e.length; l < h; l++) {
1162
- const u = e[l];
1157
+ for (let u = 0, h = e.length; u < h; u++) {
1158
+ const l = e[u];
1163
1159
  if (n) {
1164
- const d = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : o.attributes.position;
1160
+ const d = l.POSITION !== void 0 ? t.getDependency("accessor", l.POSITION) : o.attributes.position;
1165
1161
  r.push(d);
1166
1162
  }
1167
1163
  if (s) {
1168
- const d = u.NORMAL !== void 0 ? t.getDependency("accessor", u.NORMAL) : o.attributes.normal;
1164
+ const d = l.NORMAL !== void 0 ? t.getDependency("accessor", l.NORMAL) : o.attributes.normal;
1169
1165
  a.push(d);
1170
1166
  }
1171
1167
  if (i) {
1172
- const d = u.COLOR_0 !== void 0 ? t.getDependency("accessor", u.COLOR_0) : o.attributes.color;
1168
+ const d = l.COLOR_0 !== void 0 ? t.getDependency("accessor", l.COLOR_0) : o.attributes.color;
1173
1169
  c.push(d);
1174
1170
  }
1175
1171
  }
@@ -1177,12 +1173,12 @@ function Rs(o, e, t) {
1177
1173
  Promise.all(r),
1178
1174
  Promise.all(a),
1179
1175
  Promise.all(c)
1180
- ]).then(function(l) {
1181
- const h = l[0], u = l[1], d = l[2];
1182
- return n && (o.morphAttributes.position = h), s && (o.morphAttributes.normal = u), i && (o.morphAttributes.color = d), o.morphTargetsRelative = !0, o;
1176
+ ]).then(function(u) {
1177
+ const h = u[0], l = u[1], d = u[2];
1178
+ return n && (o.morphAttributes.position = h), s && (o.morphAttributes.normal = l), i && (o.morphAttributes.color = d), o.morphTargetsRelative = !0, o;
1183
1179
  });
1184
1180
  }
1185
- function Es(o, e) {
1181
+ function ws(o, e) {
1186
1182
  if (o.updateMorphTargets(), e.weights !== void 0)
1187
1183
  for (let t = 0, n = e.weights.length; t < n; t++)
1188
1184
  o.morphTargetInfluences[t] = e.weights[t];
@@ -1196,7 +1192,7 @@ function Es(o, e) {
1196
1192
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
1197
1193
  }
1198
1194
  }
1199
- function ws(o) {
1195
+ function xs(o) {
1200
1196
  let e;
1201
1197
  const t = o.extensions && o.extensions[T.KHR_DRACO_MESH_COMPRESSION];
1202
1198
  if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ce(t.attributes) : e = o.indices + ":" + ce(o.attributes) + ":" + o.mode, o.targets !== void 0)
@@ -1225,13 +1221,13 @@ function me(o) {
1225
1221
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
1226
1222
  }
1227
1223
  }
1228
- function xs(o) {
1224
+ function ys(o) {
1229
1225
  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";
1230
1226
  }
1231
- const ys = new Y();
1227
+ const bs = new Q();
1232
1228
  class Ls {
1233
1229
  constructor(e = {}, t = {}) {
1234
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Wt(), 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 = {};
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 = {};
1235
1231
  let n = !1, s = -1, i = !1, r = -1;
1236
1232
  if (typeof navigator < "u") {
1237
1233
  const a = navigator.userAgent;
@@ -1239,7 +1235,7 @@ class Ls {
1239
1235
  const c = a.match(/Version\/(\d+)/);
1240
1236
  s = n && c ? parseInt(c[1], 10) : -1, i = a.indexOf("Firefox") > -1, r = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
1241
1237
  }
1242
- 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 q(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
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);
1243
1239
  }
1244
1240
  setExtensions(e) {
1245
1241
  this.extensions = e;
@@ -1321,8 +1317,8 @@ class Ls {
1321
1317
  const s = n.clone(), i = (r, a) => {
1322
1318
  const c = this.associations.get(r);
1323
1319
  c != null && this.associations.set(a, c);
1324
- for (const [l, h] of r.children.entries())
1325
- i(h, a.children[l]);
1320
+ for (const [u, h] of r.children.entries())
1321
+ i(h, a.children[u]);
1326
1322
  };
1327
1323
  return i(n, s), s.name += "_instance_" + e.uses[t]++, s;
1328
1324
  }
@@ -1465,24 +1461,24 @@ class Ls {
1465
1461
  loadAccessor(e) {
1466
1462
  const t = this, n = this.json, s = this.json.accessors[e];
1467
1463
  if (s.bufferView === void 0 && s.sparse === void 0) {
1468
- const r = oe[s.type], a = H[s.componentType], c = s.normalized === !0, l = new a(s.count * r);
1469
- return Promise.resolve(new K(l, r, c));
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));
1470
1466
  }
1471
1467
  const i = [];
1472
1468
  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) {
1473
- const a = r[0], c = oe[s.type], l = H[s.componentType], h = l.BYTES_PER_ELEMENT, u = h * c, d = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
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;
1474
1470
  let A, m;
1475
- if (f && f !== u) {
1471
+ if (f && f !== l) {
1476
1472
  const g = Math.floor(d / f), R = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
1477
1473
  let w = t.cache.get(R);
1478
- w || (A = new l(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);
1474
+ 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);
1479
1475
  } else
1480
- a === null ? A = new l(s.count * c) : A = new l(a, d, s.count * c), m = new K(A, c, p);
1476
+ a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new K(A, c, p);
1481
1477
  if (s.sparse !== void 0) {
1482
- const g = oe.SCALAR, R = H[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, E = s.sparse.values.byteOffset || 0, b = new R(r[1], w, s.sparse.count * g), M = new l(r[2], E, s.sparse.count * c);
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);
1483
1479
  a !== null && (m = new K(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1484
- for (let y = 0, U = b.length; y < U; y++) {
1485
- const I = b[y];
1480
+ for (let y = 0, U = L.length; y < U; y++) {
1481
+ const I = L[y];
1486
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.");
1487
1483
  }
1488
1484
  m.normalized = p;
@@ -1508,41 +1504,41 @@ class Ls {
1508
1504
  const s = this, i = this.json, r = i.textures[e], a = i.images[t], c = (a.uri || a.bufferView) + ":" + r.sampler;
1509
1505
  if (this.textureCache[c])
1510
1506
  return this.textureCache[c];
1511
- const l = this.loadImageSource(t, n).then(function(h) {
1507
+ const u = this.loadImageSource(t, n).then(function(h) {
1512
1508
  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);
1513
1509
  const d = (i.samplers || {})[r.sampler] || {};
1514
- return h.magFilter = Se[d.magFilter] || de, h.minFilter = Se[d.minFilter] || je, h.wrapS = ve[d.wrapS] || fe, h.wrapT = ve[d.wrapT] || fe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ke && h.minFilter !== de, s.associations.set(h, { textures: e }), h;
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;
1515
1511
  }).catch(function() {
1516
1512
  return null;
1517
1513
  });
1518
- return this.textureCache[c] = l, l;
1514
+ return this.textureCache[c] = u, u;
1519
1515
  }
1520
1516
  loadImageSource(e, t) {
1521
1517
  const n = this, s = this.json, i = this.options;
1522
1518
  if (this.sourceCache[e] !== void 0)
1523
- return this.sourceCache[e].then((u) => u.clone());
1519
+ return this.sourceCache[e].then((l) => l.clone());
1524
1520
  const r = s.images[e], a = self.URL || self.webkitURL;
1525
- let c = r.uri || "", l = !1;
1521
+ let c = r.uri || "", u = !1;
1526
1522
  if (r.bufferView !== void 0)
1527
- c = n.getDependency("bufferView", r.bufferView).then(function(u) {
1528
- l = !0;
1529
- const d = new Blob([u], { type: r.mimeType });
1523
+ c = n.getDependency("bufferView", r.bufferView).then(function(l) {
1524
+ u = !0;
1525
+ const d = new Blob([l], { type: r.mimeType });
1530
1526
  return c = a.createObjectURL(d), c;
1531
1527
  });
1532
1528
  else if (r.uri === void 0)
1533
1529
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
1534
- const h = Promise.resolve(c).then(function(u) {
1530
+ const h = Promise.resolve(c).then(function(l) {
1535
1531
  return new Promise(function(d, f) {
1536
1532
  let p = d;
1537
1533
  t.isImageBitmapLoader === !0 && (p = function(A) {
1538
- const m = new Ee(A);
1534
+ const m = new we(A);
1539
1535
  m.needsUpdate = !0, d(m);
1540
- }), t.load(V.resolveURL(u, i.path), p, void 0, f);
1536
+ }), t.load(V.resolveURL(l, i.path), p, void 0, f);
1541
1537
  });
1542
- }).then(function(u) {
1543
- return l === !0 && a.revokeObjectURL(c), C(u, r), u.userData.mimeType = r.mimeType || xs(r.uri), u;
1544
- }).catch(function(u) {
1545
- throw console.error("THREE.GLTFLoader: Couldn't load texture", c), u;
1538
+ }).then(function(l) {
1539
+ return u === !0 && a.revokeObjectURL(c), C(l, r), l.userData.mimeType = r.mimeType || ys(r.uri), l;
1540
+ }).catch(function(l) {
1541
+ throw console.error("THREE.GLTFLoader: Couldn't load texture", c), l;
1546
1542
  });
1547
1543
  return this.sourceCache[e] = h, h;
1548
1544
  }
@@ -1599,7 +1595,7 @@ class Ls {
1599
1595
  e.material = n;
1600
1596
  }
1601
1597
  getMaterialType() {
1602
- return Ve;
1598
+ return ze;
1603
1599
  }
1604
1600
  /**
1605
1601
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1609,35 +1605,35 @@ class Ls {
1609
1605
  loadMaterial(e) {
1610
1606
  const t = this, n = this.json, s = this.extensions, i = n.materials[e];
1611
1607
  let r;
1612
- const a = {}, c = i.extensions || {}, l = [];
1608
+ const a = {}, c = i.extensions || {}, u = [];
1613
1609
  if (c[T.KHR_MATERIALS_UNLIT]) {
1614
- const u = s[T.KHR_MATERIALS_UNLIT];
1615
- r = u.getMaterialType(), l.push(u.extendParams(a, i, t));
1610
+ const l = s[T.KHR_MATERIALS_UNLIT];
1611
+ r = l.getMaterialType(), u.push(l.extendParams(a, i, t));
1616
1612
  } else {
1617
- const u = i.pbrMetallicRoughness || {};
1618
- if (a.color = new P(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
1619
- const d = u.baseColorFactor;
1620
- a.color.setRGB(d[0], d[1], d[2], S), a.opacity = d[3];
1613
+ const l = i.pbrMetallicRoughness || {};
1614
+ if (a.color = new P(1, 1, 1), a.opacity = 1, Array.isArray(l.baseColorFactor)) {
1615
+ const d = l.baseColorFactor;
1616
+ a.color.setRGB(d[0], d[1], d[2], v), a.opacity = d[3];
1621
1617
  }
1622
- u.baseColorTexture !== void 0 && l.push(t.assignTexture(a, "map", u.baseColorTexture, N)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (l.push(t.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), l.push(t.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), r = this._invokeOne(function(d) {
1618
+ l.baseColorTexture !== void 0 && u.push(t.assignTexture(a, "map", l.baseColorTexture, N)), a.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, a.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (u.push(t.assignTexture(a, "metalnessMap", l.metallicRoughnessTexture)), u.push(t.assignTexture(a, "roughnessMap", l.metallicRoughnessTexture))), r = this._invokeOne(function(d) {
1623
1619
  return d.getMaterialType && d.getMaterialType(e);
1624
- }), l.push(Promise.all(this._invokeAll(function(d) {
1620
+ }), u.push(Promise.all(this._invokeAll(function(d) {
1625
1621
  return d.extendMaterialParams && d.extendMaterialParams(e, a);
1626
1622
  })));
1627
1623
  }
1628
1624
  i.doubleSided === !0 && (a.side = Tt);
1629
1625
  const h = i.alphaMode || ae.OPAQUE;
1630
- 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 && (l.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new He(1, 1), i.normalTexture.scale !== void 0)) {
1631
- const u = i.normalTexture.scale;
1632
- a.normalScale.set(u, u);
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)) {
1627
+ const l = i.normalTexture.scale;
1628
+ a.normalScale.set(l, l);
1633
1629
  }
1634
- if (i.occlusionTexture !== void 0 && r !== B && (l.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== B) {
1635
- const u = i.emissiveFactor;
1636
- a.emissive = new P().setRGB(u[0], u[1], u[2], S);
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) {
1631
+ const l = i.emissiveFactor;
1632
+ a.emissive = new P().setRGB(l[0], l[1], l[2], v);
1637
1633
  }
1638
- return i.emissiveTexture !== void 0 && r !== B && l.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, N)), Promise.all(l).then(function() {
1639
- const u = new r(a);
1640
- return i.name && (u.name = i.name), C(u, i), t.associations.set(u, { materials: e }), i.extensions && D(s, u, i), u;
1634
+ return i.emissiveTexture !== void 0 && r !== B && u.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, N)), Promise.all(u).then(function() {
1635
+ const l = new r(a);
1636
+ return i.name && (l.name = i.name), C(l, i), t.associations.set(l, { materials: e }), i.extensions && D(s, l, i), l;
1641
1637
  });
1642
1638
  }
1643
1639
  /**
@@ -1662,17 +1658,17 @@ class Ls {
1662
1658
  const t = this, n = this.extensions, s = this.primitiveCache;
1663
1659
  function i(a) {
1664
1660
  return n[T.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, t).then(function(c) {
1665
- return Ce(c, a, t);
1661
+ return Me(c, a, t);
1666
1662
  });
1667
1663
  }
1668
1664
  const r = [];
1669
1665
  for (let a = 0, c = e.length; a < c; a++) {
1670
- const l = e[a], h = ws(l), u = s[h];
1671
- if (u)
1672
- r.push(u.promise);
1666
+ const u = e[a], h = xs(u), l = s[h];
1667
+ if (l)
1668
+ r.push(l.promise);
1673
1669
  else {
1674
1670
  let d;
1675
- l.extensions && l.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(l) : d = Ce(new Fe(), l, t), s[h] = { primitive: l, promise: d }, r.push(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);
1676
1672
  }
1677
1673
  }
1678
1674
  return Promise.all(r);
@@ -1684,18 +1680,18 @@ class Ls {
1684
1680
  */
1685
1681
  loadMesh(e) {
1686
1682
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], r = i.primitives, a = [];
1687
- for (let c = 0, l = r.length; c < l; c++) {
1688
- const h = r[c].material === void 0 ? _s(this.cache) : this.getDependency("material", r[c].material);
1683
+ 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);
1689
1685
  a.push(h);
1690
1686
  }
1691
1687
  return a.push(t.loadGeometries(r)), Promise.all(a).then(function(c) {
1692
- const l = c.slice(0, c.length - 1), h = c[c.length - 1], u = [];
1688
+ const u = c.slice(0, c.length - 1), h = c[c.length - 1], l = [];
1693
1689
  for (let f = 0, p = h.length; f < p; f++) {
1694
1690
  const A = h[f], m = r[f];
1695
1691
  let g;
1696
- const R = l[f];
1692
+ const R = u[f];
1697
1693
  if (m.mode === x.TRIANGLES || m.mode === x.TRIANGLE_STRIP || m.mode === x.TRIANGLE_FAN || m.mode === void 0)
1698
- 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, ue));
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));
1699
1695
  else if (m.mode === x.LINES)
1700
1696
  g = new wt(A, R);
1701
1697
  else if (m.mode === x.LINE_STRIP)
@@ -1703,22 +1699,22 @@ class Ls {
1703
1699
  else if (m.mode === x.LINE_LOOP)
1704
1700
  g = new yt(A, R);
1705
1701
  else if (m.mode === x.POINTS)
1706
- g = new Lt(A, R);
1702
+ g = new bt(A, R);
1707
1703
  else
1708
1704
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
1709
- Object.keys(g.geometry.morphAttributes).length > 0 && Es(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), C(g, i), m.extensions && D(s, g, m), t.assignFinalMaterial(g), u.push(g);
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);
1710
1706
  }
1711
- for (let f = 0, p = u.length; f < p; f++)
1712
- t.associations.set(u[f], {
1707
+ for (let f = 0, p = l.length; f < p; f++)
1708
+ t.associations.set(l[f], {
1713
1709
  meshes: e,
1714
1710
  primitives: f
1715
1711
  });
1716
- if (u.length === 1)
1717
- return i.extensions && D(s, u[0], i), u[0];
1712
+ if (l.length === 1)
1713
+ return i.extensions && D(s, l[0], i), l[0];
1718
1714
  const d = new re();
1719
1715
  i.extensions && D(s, d, i), t.associations.set(d, { meshes: e });
1720
- for (let f = 0, p = u.length; f < p; f++)
1721
- d.add(u[f]);
1716
+ for (let f = 0, p = l.length; f < p; f++)
1717
+ d.add(l[f]);
1722
1718
  return d;
1723
1719
  });
1724
1720
  }
@@ -1734,7 +1730,7 @@ class Ls {
1734
1730
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1735
1731
  return;
1736
1732
  }
1737
- return n.type === "perspective" ? t = new bt(St.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new vt(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), C(t, n), Promise.resolve(t);
1733
+ return n.type === "perspective" ? t = new Lt(vt.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new St(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), C(t, n), Promise.resolve(t);
1738
1734
  }
1739
1735
  /**
1740
1736
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1747,14 +1743,14 @@ class Ls {
1747
1743
  n.push(this._loadNodeShallow(t.joints[s]));
1748
1744
  return t.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(s) {
1749
1745
  const i = s.pop(), r = s, a = [], c = [];
1750
- for (let l = 0, h = r.length; l < h; l++) {
1751
- const u = r[l];
1752
- if (u) {
1753
- a.push(u);
1754
- const d = new Y();
1755
- i !== null && d.fromArray(i.array, l * 16), c.push(d);
1746
+ for (let u = 0, h = r.length; u < h; u++) {
1747
+ const l = r[u];
1748
+ if (l) {
1749
+ a.push(l);
1750
+ const d = new Q();
1751
+ i !== null && d.fromArray(i.array, u * 16), c.push(d);
1756
1752
  } else
1757
- console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[l]);
1753
+ console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[u]);
1758
1754
  }
1759
1755
  return new Ct(a, c);
1760
1756
  });
@@ -1765,24 +1761,24 @@ class Ls {
1765
1761
  * @return {Promise<AnimationClip>}
1766
1762
  */
1767
1763
  loadAnimation(e) {
1768
- const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, r = [], a = [], c = [], l = [], h = [];
1769
- for (let u = 0, d = s.channels.length; u < d; u++) {
1770
- const f = s.channels[u], p = s.samplers[f.sampler], A = f.target, m = A.node, g = s.parameters !== void 0 ? s.parameters[p.input] : p.input, R = s.parameters !== void 0 ? s.parameters[p.output] : p.output;
1771
- A.node !== void 0 && (r.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), c.push(this.getDependency("accessor", R)), l.push(p), h.push(A));
1764
+ const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, r = [], a = [], c = [], u = [], h = [];
1765
+ for (let l = 0, d = s.channels.length; l < d; l++) {
1766
+ const f = s.channels[l], p = s.samplers[f.sampler], A = f.target, m = A.node, g = s.parameters !== void 0 ? s.parameters[p.input] : p.input, R = s.parameters !== void 0 ? s.parameters[p.output] : p.output;
1767
+ A.node !== void 0 && (r.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", g)), c.push(this.getDependency("accessor", R)), u.push(p), h.push(A));
1772
1768
  }
1773
1769
  return Promise.all([
1774
1770
  Promise.all(r),
1775
1771
  Promise.all(a),
1776
1772
  Promise.all(c),
1777
- Promise.all(l),
1773
+ Promise.all(u),
1778
1774
  Promise.all(h)
1779
- ]).then(function(u) {
1780
- const d = u[0], f = u[1], p = u[2], A = u[3], m = u[4], g = [];
1775
+ ]).then(function(l) {
1776
+ const d = l[0], f = l[1], p = l[2], A = l[3], m = l[4], g = [];
1781
1777
  for (let R = 0, w = d.length; R < w; R++) {
1782
- const E = d[R], b = f[R], M = p[R], y = A[R], U = m[R];
1778
+ const E = d[R], L = f[R], M = p[R], y = A[R], U = m[R];
1783
1779
  if (E === void 0) continue;
1784
1780
  E.updateMatrix && E.updateMatrix();
1785
- const I = n._createAnimationTracks(E, b, M, y, U);
1781
+ const I = n._createAnimationTracks(E, L, M, y, U);
1786
1782
  if (I)
1787
1783
  for (let te = 0; te < I.length; te++)
1788
1784
  g.push(I[te]);
@@ -1796,7 +1792,7 @@ class Ls {
1796
1792
  const r = n._getNodeRef(n.meshCache, s.mesh, i);
1797
1793
  return s.weights !== void 0 && r.traverse(function(a) {
1798
1794
  if (a.isMesh)
1799
- for (let c = 0, l = s.weights.length; c < l; c++)
1795
+ for (let c = 0, u = s.weights.length; c < u; c++)
1800
1796
  a.morphTargetInfluences[c] = s.weights[c];
1801
1797
  }), r;
1802
1798
  });
@@ -1808,20 +1804,20 @@ class Ls {
1808
1804
  */
1809
1805
  loadNode(e) {
1810
1806
  const t = this.json, n = this, s = t.nodes[e], i = n._loadNodeShallow(e), r = [], a = s.children || [];
1811
- for (let l = 0, h = a.length; l < h; l++)
1812
- r.push(n.getDependency("node", a[l]));
1807
+ for (let u = 0, h = a.length; u < h; u++)
1808
+ r.push(n.getDependency("node", a[u]));
1813
1809
  const c = s.skin === void 0 ? Promise.resolve(null) : n.getDependency("skin", s.skin);
1814
1810
  return Promise.all([
1815
1811
  i,
1816
1812
  Promise.all(r),
1817
1813
  c
1818
- ]).then(function(l) {
1819
- const h = l[0], u = l[1], d = l[2];
1814
+ ]).then(function(u) {
1815
+ const h = u[0], l = u[1], d = u[2];
1820
1816
  d !== null && h.traverse(function(f) {
1821
- f.isSkinnedMesh && f.bind(d, ys);
1817
+ f.isSkinnedMesh && f.bind(d, bs);
1822
1818
  });
1823
- for (let f = 0, p = u.length; f < p; f++)
1824
- h.add(u[f]);
1819
+ for (let f = 0, p = l.length; f < p; f++)
1820
+ h.add(l[f]);
1825
1821
  return h;
1826
1822
  });
1827
1823
  }
@@ -1831,23 +1827,23 @@ class Ls {
1831
1827
  const t = this.json, n = this.extensions, s = this;
1832
1828
  if (this.nodeCache[e] !== void 0)
1833
1829
  return this.nodeCache[e];
1834
- const i = t.nodes[e], r = i.name ? s.createUniqueName(i.name) : "", a = [], c = s._invokeOne(function(l) {
1835
- return l.createNodeMesh && l.createNodeMesh(e);
1830
+ const i = t.nodes[e], r = i.name ? s.createUniqueName(i.name) : "", a = [], c = s._invokeOne(function(u) {
1831
+ return u.createNodeMesh && u.createNodeMesh(e);
1836
1832
  });
1837
- return c && a.push(c), i.camera !== void 0 && a.push(s.getDependency("camera", i.camera).then(function(l) {
1838
- return s._getNodeRef(s.cameraCache, i.camera, l);
1839
- })), s._invokeAll(function(l) {
1840
- return l.createNodeAttachment && l.createNodeAttachment(e);
1841
- }).forEach(function(l) {
1842
- a.push(l);
1843
- }), this.nodeCache[e] = Promise.all(a).then(function(l) {
1833
+ return c && a.push(c), i.camera !== void 0 && a.push(s.getDependency("camera", i.camera).then(function(u) {
1834
+ return s._getNodeRef(s.cameraCache, i.camera, u);
1835
+ })), s._invokeAll(function(u) {
1836
+ return u.createNodeAttachment && u.createNodeAttachment(e);
1837
+ }).forEach(function(u) {
1838
+ a.push(u);
1839
+ }), this.nodeCache[e] = Promise.all(a).then(function(u) {
1844
1840
  let h;
1845
- if (i.isBone === !0 ? h = new It() : l.length > 1 ? h = new re() : l.length === 1 ? h = l[0] : h = new Ge(), h !== l[0])
1846
- for (let u = 0, d = l.length; u < d; u++)
1847
- h.add(l[u]);
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])
1842
+ for (let l = 0, d = u.length; l < d; l++)
1843
+ h.add(u[l]);
1848
1844
  if (i.name && (h.userData.name = i.name, h.name = r), C(h, i), i.extensions && D(n, h, i), i.matrix !== void 0) {
1849
- const u = new Y();
1850
- u.fromArray(i.matrix), h.applyMatrix4(u);
1845
+ const l = new Q();
1846
+ l.fromArray(i.matrix), h.applyMatrix4(l);
1851
1847
  } else
1852
1848
  i.translation !== void 0 && h.position.fromArray(i.translation), i.rotation !== void 0 && h.quaternion.fromArray(i.rotation), i.scale !== void 0 && h.scale.fromArray(i.scale);
1853
1849
  return s.associations.has(h) || s.associations.set(h, {}), s.associations.get(h).nodes = e, h;
@@ -1862,21 +1858,21 @@ class Ls {
1862
1858
  const t = this.extensions, n = this.json.scenes[e], s = this, i = new re();
1863
1859
  n.name && (i.name = s.createUniqueName(n.name)), C(i, n), n.extensions && D(t, i, n);
1864
1860
  const r = n.nodes || [], a = [];
1865
- for (let c = 0, l = r.length; c < l; c++)
1861
+ for (let c = 0, u = r.length; c < u; c++)
1866
1862
  a.push(s.getDependency("node", r[c]));
1867
1863
  return Promise.all(a).then(function(c) {
1868
- for (let h = 0, u = c.length; h < u; h++)
1864
+ for (let h = 0, l = c.length; h < l; h++)
1869
1865
  i.add(c[h]);
1870
- const l = (h) => {
1871
- const u = /* @__PURE__ */ new Map();
1866
+ const u = (h) => {
1867
+ const l = /* @__PURE__ */ new Map();
1872
1868
  for (const [d, f] of s.associations)
1873
- (d instanceof ne || d instanceof Ee) && u.set(d, f);
1869
+ (d instanceof ne || d instanceof we) && l.set(d, f);
1874
1870
  return h.traverse((d) => {
1875
1871
  const f = s.associations.get(d);
1876
- f != null && u.set(d, f);
1877
- }), u;
1872
+ f != null && l.set(d, f);
1873
+ }), l;
1878
1874
  };
1879
- return s.associations = l(i), i;
1875
+ return s.associations = u(i), i;
1880
1876
  });
1881
1877
  }
1882
1878
  _createAnimationTracks(e, t, n, s, i) {
@@ -1884,37 +1880,37 @@ class Ls {
1884
1880
  O[i.path] === O.weights ? e.traverse(function(d) {
1885
1881
  d.morphTargetInfluences && c.push(d.name ? d.name : d.uuid);
1886
1882
  }) : c.push(a);
1887
- let l;
1883
+ let u;
1888
1884
  switch (O[i.path]) {
1889
1885
  case O.weights:
1890
- l = xe;
1886
+ u = ye;
1891
1887
  break;
1892
1888
  case O.rotation:
1893
- l = ye;
1889
+ u = be;
1894
1890
  break;
1895
1891
  case O.position:
1896
1892
  case O.scale:
1897
- l = we;
1893
+ u = xe;
1898
1894
  break;
1899
1895
  default:
1900
1896
  switch (n.itemSize) {
1901
1897
  case 1:
1902
- l = xe;
1898
+ u = ye;
1903
1899
  break;
1904
1900
  case 2:
1905
1901
  case 3:
1906
1902
  default:
1907
- l = we;
1903
+ u = xe;
1908
1904
  break;
1909
1905
  }
1910
1906
  break;
1911
1907
  }
1912
- const h = s.interpolation !== void 0 ? Ts[s.interpolation] : ze, u = this._getArrayFromAccessor(n);
1908
+ const h = s.interpolation !== void 0 ? _s[s.interpolation] : Xe, l = this._getArrayFromAccessor(n);
1913
1909
  for (let d = 0, f = c.length; d < f; d++) {
1914
- const p = new l(
1910
+ const p = new u(
1915
1911
  c[d] + "." + O[i.path],
1916
1912
  t.array,
1917
- u,
1913
+ l,
1918
1914
  h
1919
1915
  );
1920
1916
  s.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(p), r.push(p);
@@ -1933,19 +1929,19 @@ class Ls {
1933
1929
  }
1934
1930
  _createCubicSplineTrackInterpolant(e) {
1935
1931
  e.createInterpolant = function(n) {
1936
- const s = this instanceof ye ? As : We;
1932
+ const s = this instanceof be ? Ts : $e;
1937
1933
  return new s(this.times, this.values, this.getValueSize() / 3, n);
1938
1934
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1939
1935
  }
1940
1936
  }
1941
- function bs(o, e, t) {
1937
+ function vs(o, e, t) {
1942
1938
  const n = e.attributes, s = new Ut();
1943
1939
  if (n.POSITION !== void 0) {
1944
- const a = t.json.accessors[n.POSITION], c = a.min, l = a.max;
1945
- if (c !== void 0 && l !== void 0) {
1940
+ const a = t.json.accessors[n.POSITION], c = a.min, u = a.max;
1941
+ if (c !== void 0 && u !== void 0) {
1946
1942
  if (s.set(
1947
1943
  new F(c[0], c[1], c[2]),
1948
- new F(l[0], l[1], l[2])
1944
+ new F(u[0], u[1], u[2])
1949
1945
  ), a.normalized) {
1950
1946
  const h = me(H[a.componentType]);
1951
1947
  s.min.multiplyScalar(h), s.max.multiplyScalar(h);
@@ -1959,10 +1955,10 @@ function bs(o, e, t) {
1959
1955
  const i = e.targets;
1960
1956
  if (i !== void 0) {
1961
1957
  const a = new F(), c = new F();
1962
- for (let l = 0, h = i.length; l < h; l++) {
1963
- const u = i[l];
1964
- if (u.POSITION !== void 0) {
1965
- const d = t.json.accessors[u.POSITION], f = d.min, p = d.max;
1958
+ for (let u = 0, h = i.length; u < h; u++) {
1959
+ const l = i[u];
1960
+ if (l.POSITION !== void 0) {
1961
+ const d = t.json.accessors[l.POSITION], f = d.min, p = d.max;
1966
1962
  if (f !== void 0 && p !== void 0) {
1967
1963
  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) {
1968
1964
  const A = me(H[d.componentType]);
@@ -1979,7 +1975,7 @@ function bs(o, e, t) {
1979
1975
  const r = new Gt();
1980
1976
  s.getCenter(r.center), r.radius = s.min.distanceTo(s.max) / 2, o.boundingSphere = r;
1981
1977
  }
1982
- function Ce(o, e, t) {
1978
+ function Me(o, e, t) {
1983
1979
  const n = e.attributes, s = [];
1984
1980
  function i(r, a) {
1985
1981
  return t.getDependency("accessor", r).then(function(c) {
@@ -1996,18 +1992,18 @@ function Ce(o, e, t) {
1996
1992
  });
1997
1993
  s.push(r);
1998
1994
  }
1999
- return he.workingColorSpace !== S && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${he.workingColorSpace}" not supported.`), C(o, e), bs(o, e, t), Promise.all(s).then(function() {
2000
- return e.targets !== void 0 ? Rs(o, e.targets, t) : o;
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;
2001
1997
  });
2002
1998
  }
2003
- var Ss = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Cs = (o, e, t, n) => {
2004
- for (var s = n > 1 ? void 0 : n ? vs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
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--)
2005
2001
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2006
2002
  return n && s && Ss(e, t, s), s;
2007
2003
  };
2008
- let Q = class {
2004
+ let J = class {
2009
2005
  constructor() {
2010
- _(this, "workerPool", Ye(void 0, !0));
2006
+ _(this, "workerPool", Je(void 0, !0));
2011
2007
  _(this, "canvas");
2012
2008
  _(this, "offscreenCanvas");
2013
2009
  _(this, "worker");
@@ -2016,64 +2012,34 @@ let Q = class {
2016
2012
  init(o) {
2017
2013
  this.worker = o.worker, this.thread = o.thread;
2018
2014
  }
2019
- };
2020
- Q = Cs([
2021
- z()
2022
- ], Q);
2023
- var Ms = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Os = (o, e, t, n) => {
2024
- for (var s = n > 1 ? void 0 : n ? Is(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2025
- (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2026
- return n && s && Ms(e, t, s), s;
2027
- }, Ns = (o, e) => (t, n) => e(t, n, o);
2028
- let ge = class extends Qe {
2029
- constructor(e) {
2030
- super();
2031
- _(this, "canvas");
2032
- this._service = e;
2033
- }
2034
- init(e) {
2035
- this.canvas = e;
2036
- for (const t of Me) {
2037
- const n = t.startsWith("mouse") || t.startsWith("pointer") || t.startsWith("touch") ? this.mouseEventHandler : t.startsWith("key") ? this.keyEventHandler : t === "resize" ? this.uiEventHandler : t === "wheel" ? this.wheelEventHandler : this.preventDefaultHandler;
2038
- this[`${t}$`] = Je(
2039
- t === "resize" ? window : e,
2040
- t
2041
- ).pipe(
2042
- // @ts-ignore
2043
- $(n.bind(this)),
2044
- Ie((s) => !(t === "keydown" && !s))
2045
- ), this[`${t}$`].subscribe((s) => {
2046
- var i, r;
2047
- (r = (i = this._service.thread) == null ? void 0 : i[t]) == null || r.call(i, s);
2048
- });
2049
- }
2050
- }
2051
- preventDefaultHandler(e) {
2052
- return e.preventDefault(), {
2053
- type: e.type
2015
+ preventDefaultHandler(o) {
2016
+ return o.preventDefault(), {
2017
+ type: o.type
2054
2018
  };
2055
2019
  }
2056
2020
  getScreenSizes() {
2021
+ var o, e;
2057
2022
  return {
2058
- width: this.canvas.width,
2059
- height: this.canvas.height,
2023
+ width: (o = this.canvas) == null ? void 0 : o.width,
2024
+ height: (e = this.canvas) == null ? void 0 : e.height,
2060
2025
  windowWidth: (window == null ? void 0 : window.innerWidth) ?? 0,
2061
2026
  windowHeight: (window == null ? void 0 : window.innerHeight) ?? 0
2062
2027
  };
2063
2028
  }
2064
- uiEventHandler(e) {
2065
- const t = this.canvas.getBoundingClientRect();
2029
+ uiEventHandler(o) {
2030
+ var t;
2031
+ const e = (t = this.canvas) == null ? void 0 : t.getBoundingClientRect();
2066
2032
  return {
2067
2033
  ...this.getScreenSizes(),
2068
- type: e.type,
2069
- top: t.top,
2070
- left: t.left
2034
+ type: o.type,
2035
+ top: e == null ? void 0 : e.top,
2036
+ left: e == null ? void 0 : e.left
2071
2037
  };
2072
2038
  }
2073
- mouseEventHandler(e) {
2039
+ mouseEventHandler(o) {
2074
2040
  return {
2075
2041
  ...this.getScreenSizes(),
2076
- ...j(e, [
2042
+ ...j(o, [
2077
2043
  "ctrlKey",
2078
2044
  "metaKey",
2079
2045
  "shiftKey",
@@ -2086,41 +2052,70 @@ let ge = class extends Qe {
2086
2052
  ])
2087
2053
  };
2088
2054
  }
2089
- touchEventHandler(e) {
2090
- const t = [], n = { type: e.type, touches: t };
2091
- for (let s = 0; s < e.touches.length; ++s) {
2092
- const i = e.touches[s];
2093
- t.push({
2094
- pageX: (i == null ? void 0 : i.pageX) ?? 0,
2095
- pageY: (i == null ? void 0 : i.pageY) ?? 0
2055
+ touchEventHandler(o) {
2056
+ const e = [], t = { type: o.type, touches: e };
2057
+ for (let n = 0; n < o.touches.length; ++n) {
2058
+ const s = o.touches[n];
2059
+ e.push({
2060
+ pageX: (s == null ? void 0 : s.pageX) ?? 0,
2061
+ pageY: (s == null ? void 0 : s.pageY) ?? 0
2096
2062
  });
2097
2063
  }
2098
- return { ...this.getScreenSizes(), ...n };
2064
+ return { ...this.getScreenSizes(), ...t };
2099
2065
  }
2100
- wheelEventHandler(e) {
2101
- return e.preventDefault(), {
2066
+ wheelEventHandler(o) {
2067
+ return o.preventDefault(), {
2102
2068
  ...this.getScreenSizes(),
2103
- ...j(e, ["deltaX", "deltaY"])
2069
+ ...j(o, ["deltaX", "deltaY"])
2104
2070
  };
2105
2071
  }
2106
- keyEventHandler(e) {
2107
- if (Ze.includes(e.code))
2108
- return e.preventDefault(), {
2072
+ keyEventHandler(o) {
2073
+ if (Ze.includes(o.code))
2074
+ return o.preventDefault(), {
2109
2075
  ...this.getScreenSizes(),
2110
- ...j(e, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2076
+ ...j(o, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2111
2077
  };
2112
2078
  }
2113
2079
  };
2114
- ge = Os([
2115
- z(),
2116
- Ns(0, L(Q))
2080
+ J = Ms([
2081
+ z(X.ContainerScoped)
2082
+ ], 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--)
2085
+ (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 {
2089
+ constructor(o) {
2090
+ super(), this._service = o;
2091
+ }
2092
+ init() {
2093
+ for (const o of Oe) {
2094
+ 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(
2096
+ o === "resize" ? window : this._service.canvas,
2097
+ o
2098
+ ).pipe(
2099
+ // @ts-ignore
2100
+ q(e.bind(this)),
2101
+ Ne((t) => !(o === "keydown" && !t))
2102
+ ), this[`${o}$`].subscribe((t) => {
2103
+ var n, s;
2104
+ (s = (n = this._service.thread) == null ? void 0 : n[o]) == null || s.call(n, t);
2105
+ });
2106
+ }
2107
+ }
2108
+ };
2109
+ ge = Ns([
2110
+ Vt(),
2111
+ Ps(0, b(J))
2117
2112
  ], ge);
2118
- var Ps = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, ks = (o, e, t, n) => {
2119
- for (var s = n > 1 ? void 0 : n ? Ds(e, t) : e, i = o.length - 1, r; i >= 0; i--)
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--)
2120
2115
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2121
- return n && s && Ps(e, t, s), s;
2116
+ return n && s && Ds(e, t, s), s;
2122
2117
  };
2123
- let J = class {
2118
+ let Z = class {
2124
2119
  constructor() {
2125
2120
  _(this, "loadingManager", new jt());
2126
2121
  _(this, "loaders", {});
@@ -2143,7 +2138,7 @@ let J = class {
2143
2138
  };
2144
2139
  }
2145
2140
  _initLoaders() {
2146
- this.loaders.dracoLoader = new Vt(this.loadingManager), this.loaders.audioLoader = new Kt(this.loadingManager), this.loaders.fontLoader = new et(this.loadingManager), this.loaders.gltfLoader = new Xt(this.loadingManager), this.loaders.imageLoader = new Be(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
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;
2147
2142
  }
2148
2143
  _initSources(o) {
2149
2144
  this.sources = o, this.toLoadCount = this.sources.length, this.loadedCount = 0;
@@ -2165,7 +2160,7 @@ let J = class {
2165
2160
  }) {
2166
2161
  e && (this.loadedResources[o.name] = e, this.loadedCount = n, this.toLoadCount = t);
2167
2162
  }
2168
- load(o) {
2163
+ launchLoad(o) {
2169
2164
  var t, n, s, i, r;
2170
2165
  const e = this.sources[0];
2171
2166
  if (e) {
@@ -2193,19 +2188,19 @@ let J = class {
2193
2188
  }
2194
2189
  }
2195
2190
  };
2196
- J = ks([
2197
- z()
2198
- ], J);
2199
- var Fs = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, Us = (o, e, t, n) => {
2200
- for (var s = n > 1 ? void 0 : n ? Hs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2191
+ Z = Fs([
2192
+ z(X.ContainerScoped)
2193
+ ], 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--)
2201
2196
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2202
- return n && s && Fs(e, t, s), s;
2203
- }, Gs = (o, e) => (t, n) => e(t, n, o);
2204
- let Z = class {
2197
+ return n && s && Hs(e, t, s), s;
2198
+ }, Bs = (o, e) => (t, n) => e(t, n, o);
2199
+ let ee = class {
2205
2200
  constructor(o) {
2206
- _(this, "load$$", new tt());
2201
+ _(this, "load$$", new nt());
2207
2202
  _(this, "load$", this.load$$.pipe(
2208
- $((o) => ({
2203
+ q((o) => ({
2209
2204
  ...o,
2210
2205
  loadedCount: o.resource ? this._service.loadedCount + 1 : this._service.loadedCount,
2211
2206
  toLoadCount: this._service.toLoadCount
@@ -2213,12 +2208,12 @@ let Z = class {
2213
2208
  se()
2214
2209
  ));
2215
2210
  _(this, "serializedLoad$", this.load$.pipe(
2216
- $((o) => {
2211
+ q((o) => {
2217
2212
  var t, n, s;
2218
2213
  let e = o.resource;
2219
2214
  if ((t = o == null ? void 0 : o.resource) != null && t.parser) {
2220
2215
  const i = o.resource, r = i.scenes.map(
2221
- (a) => _e(a)
2216
+ (a) => Re(a)
2222
2217
  );
2223
2218
  e = {
2224
2219
  animations: (o == null ? void 0 : o.resource).animations.map(
@@ -2226,7 +2221,7 @@ let Z = class {
2226
2221
  (a) => a.toJSON()
2227
2222
  ),
2228
2223
  cameras: i.cameras.map(
2229
- (a) => _e(a)
2224
+ (a) => Re(a)
2230
2225
  ),
2231
2226
  parser: { json: i.parser.json },
2232
2227
  scene: r == null ? void 0 : r[0],
@@ -2274,7 +2269,7 @@ let Z = class {
2274
2269
  "width"
2275
2270
  ]),
2276
2271
  buffered: o.resource.buffered.length,
2277
- error: o.resource.error ? Oe(o.resource.error, []) : {},
2272
+ error: o.resource.error ? Pe(o.resource.error, []) : {},
2278
2273
  played: o.resource.played.length,
2279
2274
  seekable: o.resource.seekable.length,
2280
2275
  textTracks: o.resource.textTracks.length
@@ -2286,8 +2281,8 @@ let Z = class {
2286
2281
  se()
2287
2282
  ));
2288
2283
  _(this, "loadCompleted$", this.load$.pipe(
2289
- Ie((o) => o.toLoadCount === o.loadedCount),
2290
- $(
2284
+ Ne((o) => o.toLoadCount === o.loadedCount),
2285
+ q(
2291
2286
  () => j(this._service, [
2292
2287
  "loadedCount",
2293
2288
  "loadedResources",
@@ -2299,16 +2294,16 @@ let Z = class {
2299
2294
  this._service = o;
2300
2295
  }
2301
2296
  };
2302
- Z = Us([
2303
- z(),
2304
- Gs(0, L(J))
2305
- ], Z);
2306
- var Bs = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ks = (o, e, t, n) => {
2307
- for (var s = n > 1 ? void 0 : n ? js(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2297
+ ee = Gs([
2298
+ z(X.ContainerScoped),
2299
+ Bs(0, b(Z))
2300
+ ], 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--)
2308
2303
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2309
- return n && s && Bs(e, t, s), s;
2310
- }, le = (o, e) => (t, n) => e(t, n, o);
2311
- let ee = class {
2304
+ return n && s && js(e, t, s), s;
2305
+ }, ue = (o, e) => (t, n) => e(t, n, o);
2306
+ let Ae = class {
2312
2307
  constructor(o, e, t) {
2313
2308
  _(this, "_subscriptions", []);
2314
2309
  this._controller = o, this._service = e, this._props = t, this._subscriptions.push(
@@ -2317,17 +2312,16 @@ let ee = class {
2317
2312
  )
2318
2313
  );
2319
2314
  }
2320
- _listenToLoad(o, e) {
2321
- this._controller.load$$.next({
2322
- source: o,
2323
- resource: e
2324
- });
2325
- }
2326
2315
  init(o = []) {
2327
2316
  this._service.init(o), this._service.setDracoDecoder(), [void 0, !0].includes(this._props.loadResourcesOnInit) && this.load();
2328
2317
  }
2329
2318
  load() {
2330
- this._service.load(this._listenToLoad.bind(this));
2319
+ this._service.launchLoad(
2320
+ (o, e) => this._controller.load$$.next({
2321
+ source: o,
2322
+ resource: e
2323
+ })
2324
+ );
2331
2325
  }
2332
2326
  getLoadedResources() {
2333
2327
  return this._service.loadedResources;
@@ -2354,26 +2348,26 @@ let ee = class {
2354
2348
  this._service.setDracoDecoder(o);
2355
2349
  }
2356
2350
  dispose() {
2357
- this._controller.load$$.complete();
2351
+ this._subscriptions.forEach((o) => o.unsubscribe()), this._controller.load$$.complete();
2358
2352
  }
2359
2353
  };
2360
- ee = Ks([
2361
- z(),
2362
- le(0, L(Z)),
2363
- le(1, L(J)),
2364
- le(2, L(Te))
2365
- ], ee);
2366
- Ne.resolve(ee);
2367
- var Vs = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, Xs = (o, e, t, n) => {
2368
- for (var s = n > 1 ? void 0 : n ? zs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
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--)
2369
2362
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2370
- return n && s && Vs(e, t, s), s;
2363
+ return n && s && zs(e, t, s), s;
2371
2364
  }, k = (o, e) => (t, n) => e(t, n, o);
2372
- let Ae = class extends rt {
2365
+ let Te = class extends rt {
2373
2366
  constructor(e, t, n, s, i, r) {
2374
2367
  super();
2375
- _(this, "initialized", !1);
2376
- this._service = e, this._controller = t, this._loaderController = n, this.props = s, this.loader = i, this.container = r, this.props.initOnConstruct && this.init();
2368
+ _(this, "_subscriptions", []);
2369
+ _(this, "_initialized", !1);
2370
+ this._service = e, this._controller = t, this._loaderController = n, this.container = s, this.props = i, this.loader = r, this.props.initOnConstruct && this.init();
2377
2371
  }
2378
2372
  async _initCanvas() {
2379
2373
  try {
@@ -2395,12 +2389,14 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2395
2389
  thread: this._service.thread
2396
2390
  });
2397
2391
  }
2398
- async _initController() {
2392
+ async _initEvents() {
2399
2393
  var e, t;
2400
2394
  if (!this._service.canvas)
2401
2395
  throw new Error("Canvas element is not initialized.");
2402
- this._controller.init(this._service.canvas), !(!this._service.thread || !this._service.worker) && this.props.fullScreen && ((t = (e = this._service.thread) == null ? void 0 : e.resize) == null || t.call(e, {
2403
- ...this._controller.uiEventHandler({
2396
+ if (!this._service.thread || !this._service.worker)
2397
+ throw new Error("Worker-thread is not initialized.");
2398
+ this._controller.init(), this.props.fullScreen && ((t = (e = this._service.thread) == null ? void 0 : e.resize) == null || t.call(e, {
2399
+ ...this._service.uiEventHandler({
2404
2400
  type: "resize"
2405
2401
  })
2406
2402
  }));
@@ -2413,7 +2409,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2413
2409
  payload: {
2414
2410
  path: this.props.location,
2415
2411
  subject: {
2416
- ...Oe(this.props, [
2412
+ ...Pe(this.props, [
2417
2413
  "canvas",
2418
2414
  "location",
2419
2415
  "onReady",
@@ -2429,7 +2425,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2429
2425
  this._service.worker = e.worker, this._service.thread = e.thread;
2430
2426
  }
2431
2427
  async _initObservableProxyEvents() {
2432
- Me.forEach(
2428
+ Oe.forEach(
2433
2429
  (e) => this[`${e}$`] = () => {
2434
2430
  var t;
2435
2431
  return (t = this._controller) == null ? void 0 : t[`${e}$`];
@@ -2437,21 +2433,23 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2437
2433
  );
2438
2434
  }
2439
2435
  async _initLoader() {
2440
- this.loader.init(this.props.loaderDataSources), this._loaderController.serializedLoad$.subscribe((e) => {
2441
- var t, n;
2442
- if (e.resource instanceof ArrayBuffer)
2443
- return (t = this._service.worker) == null ? void 0 : t.postMessage(e.resource, [
2444
- e.resource
2445
- ]);
2446
- (n = this._service.worker) == null || n.postMessage({
2447
- token: it,
2448
- payload: e
2449
- });
2450
- });
2436
+ this.loader.init(this.props.loaderDataSources), this._subscriptions.push(
2437
+ this._loaderController.serializedLoad$.subscribe((e) => {
2438
+ var t, n;
2439
+ if (e.resource instanceof ArrayBuffer)
2440
+ return (t = this._service.worker) == null ? void 0 : t.postMessage(e.resource, [
2441
+ e.resource
2442
+ ]);
2443
+ (n = this._service.worker) == null || n.postMessage({
2444
+ token: it,
2445
+ payload: e
2446
+ });
2447
+ })
2448
+ );
2451
2449
  }
2452
2450
  async init() {
2453
2451
  var e, t;
2454
- this.initialized || (await this._initCanvas(), await this._initWorkerThread(), await this._initService(), await this._initController(), await this._initObservableProxyEvents(), await this._initLoader(), (t = (e = this.props).onReady) == null || t.call(e, { module: this, container: this.container }));
2452
+ this._initialized || (this._initialized = !0, await this._initCanvas(), await this._initWorkerThread(), await this._initService(), await this._initObservableProxyEvents(), await this._initLoader(), await this._initEvents(), (t = (e = this.props).onReady) == null || t.call(e, { module: this, container: this.container }));
2455
2453
  }
2456
2454
  getCanvas() {
2457
2455
  return this._service.canvas;
@@ -2469,49 +2467,49 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2469
2467
  return this._service.workerPool;
2470
2468
  }
2471
2469
  isInitialized() {
2472
- return this.initialized;
2470
+ return this._initialized;
2473
2471
  }
2474
2472
  async dispose() {
2475
- var e, t, n;
2476
- await this._service.workerPool.terminateAll(), (t = (e = this._service.offscreenCanvas) == null ? void 0 : e.getContext("2d")) == null || t.closePath(), ((n = this._service.canvas) == null ? void 0 : n.dataset.reactive) === "true" && (document.body.removeChild(this._service.canvas), this._service.canvas.remove(), this._service.canvas = void 0), this.initialized = !1;
2473
+ var e;
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;
2477
2475
  }
2478
2476
  };
2479
- Ae = Xs([
2480
- st(nt.ContainerScoped),
2481
- k(0, L(Q)),
2482
- k(1, L(ge)),
2483
- k(2, L(Z)),
2484
- k(3, L(Te)),
2485
- k(4, L(ee)),
2486
- k(5, L(Pe))
2487
- ], Ae);
2488
- const Qs = (o) => {
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) => {
2489
2487
  if (typeof (o == null ? void 0 : o.location) != "string" && !((o == null ? void 0 : o.location) instanceof URL))
2490
2488
  throw new Error(
2491
2489
  "Invalid register props detected. location path is required"
2492
2490
  );
2493
- const e = Ne.createChildContainer();
2494
- o.initOnConstruct = X(o.initOnConstruct) || !W(o.initOnConstruct) ? !0 : o.initOnConstruct, o.defaultCamera = o != null && o.defaultCamera && o.defaultCamera in Re ? o.defaultCamera : Re.PERSPECTIVE, o.withMiniCamera = X(o.withMiniCamera) || !W(o.withMiniCamera) ? !1 : o.withMiniCamera, o.startTimer = X(o.startTimer) || !W(o.startTimer) ? !0 : o.startTimer, o.fullScreen = X(o.fullScreen) || !W(o.fullScreen) ? !0 : o.fullScreen, o.onReady = ot(o.onReady) ? o.onReady : void 0, e.register(Pe, { useValue: e }), e.register(Te, { useValue: o });
2495
- const t = e.resolve(Ae);
2496
- return t.initialized = !0, {
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);
2494
+ return {
2497
2495
  container: e,
2498
2496
  module: t
2499
2497
  };
2500
2498
  };
2501
2499
  export {
2502
- en as AppModule,
2503
- tn as AppProxyEventHandlersBlueprint,
2504
- Pe as CONTAINER_TOKEN,
2505
- Re as DefaultCameraType,
2500
+ tn as AppModule,
2501
+ sn as AppProxyEventHandlersBlueprint,
2502
+ De as CONTAINER_TOKEN,
2503
+ Ee as DefaultCameraType,
2506
2504
  Ze as KEYBOARD_EVENT_CODES,
2507
2505
  it as LOADER_SERIALIZED_LOAD_TOKEN,
2508
- Ys as LaunchAppProps,
2509
- Me as PROXY_EVENT_LISTENERS,
2510
- Qe as ProxyEventHandlersBlueprint,
2511
- sn as ProxyEventObservablesBlueprint,
2512
- nn as ProxyEventSubjectsBlueprint,
2513
- Ae as RegisterModule,
2514
- Te as RegisterPropsBlueprint,
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,
2515
2513
  rt as RegisterProxyEventHandlersBlueprint,
2516
- Qs as register
2514
+ Js as register
2517
2515
  };