@j-kyoda/vue-three-vrm 0.6.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +1,24 @@
1
- import { getCurrentInstance as Xe, useTemplateRef as Ye, watch as F, onMounted as $, createElementBlock as De, openBlock as fe, inject as Ce, ref as Z, Fragment as We, createVNode as ee, createBlock as Ze } from "vue";
1
+ import { getCurrentInstance as ze, useTemplateRef as Xe, watch as F, onMounted as $, createElementBlock as De, openBlock as fe, ref as Z, Fragment as Ye, createVNode as ee, createBlock as We } from "vue";
2
2
  import * as N from "three";
3
- import { TrianglesDrawMode as qe, TriangleFanDrawMode as ce, TriangleStripDrawMode as Ie, Loader as Qe, LoaderUtils as X, FileLoader as ve, MeshPhysicalMaterial as O, Vector2 as S, Color as H, LinearSRGBColorSpace as C, SRGBColorSpace as Y, SpotLight as $e, PointLight as Je, DirectionalLight as et, Matrix4 as q, Vector3 as M, Quaternion as Q, InstancedMesh as tt, InstancedBufferAttribute as st, Object3D as ke, TextureLoader as nt, ImageBitmapLoader as it, BufferAttribute as te, InterleavedBuffer as ot, InterleavedBufferAttribute as rt, LinearMipmapLinearFilter as je, NearestMipmapLinearFilter as at, LinearMipmapNearestFilter as ct, NearestMipmapNearestFilter as lt, LinearFilter as le, NearestFilter as Fe, RepeatWrapping as he, MirroredRepeatWrapping as ht, ClampToEdgeWrapping as ut, PointsMaterial as dt, Material as se, LineBasicMaterial as pt, MeshStandardMaterial as He, DoubleSide as ft, MeshBasicMaterial as z, PropertyBinding as mt, BufferGeometry as _t, SkinnedMesh as gt, Mesh as Tt, LineSegments as yt, Line as xt, LineLoop as Et, Points as bt, Group as ne, PerspectiveCamera as Rt, MathUtils as Ue, OrthographicCamera as Mt, Skeleton as wt, AnimationClip as St, Bone as At, InterpolateDiscrete as Lt, InterpolateLinear as Ge, Texture as _e, VectorKeyframeTrack as ge, NumberKeyframeTrack as Te, QuaternionKeyframeTrack as ye, ColorManagement as xe, FrontSide as Pt, Interpolant as Nt, Box3 as Ot, Sphere as Dt, Controls as Ct, MOUSE as G, TOUCH as U, Spherical as Ee, Ray as It, Plane as vt } from "three";
4
- import { VRMHumanBoneName as be, VRMExpressionPresetName as Re, VRMLoaderPlugin as kt, VRMUtils as jt } from "@pixiv/three-vrm";
5
- class Ke {
3
+ import { TrianglesDrawMode as Ze, TriangleFanDrawMode as ce, TriangleStripDrawMode as Ce, Loader as qe, LoaderUtils as X, FileLoader as Ie, MeshPhysicalMaterial as O, Vector2 as S, Color as H, LinearSRGBColorSpace as C, SRGBColorSpace as Y, SpotLight as Qe, PointLight as $e, DirectionalLight as Je, Matrix4 as q, Vector3 as M, Quaternion as Q, InstancedMesh as et, InstancedBufferAttribute as tt, Object3D as ve, TextureLoader as st, ImageBitmapLoader as nt, BufferAttribute as te, InterleavedBuffer as it, InterleavedBufferAttribute as ot, LinearMipmapLinearFilter as ke, NearestMipmapLinearFilter as rt, LinearMipmapNearestFilter as at, NearestMipmapNearestFilter as ct, LinearFilter as le, NearestFilter as je, RepeatWrapping as he, MirroredRepeatWrapping as lt, ClampToEdgeWrapping as ht, PointsMaterial as ut, Material as se, LineBasicMaterial as dt, MeshStandardMaterial as Fe, DoubleSide as pt, MeshBasicMaterial as z, PropertyBinding as ft, BufferGeometry as mt, SkinnedMesh as _t, Mesh as gt, LineSegments as Tt, Line as yt, LineLoop as xt, Points as Et, Group as ne, PerspectiveCamera as bt, MathUtils as He, OrthographicCamera as Rt, Skeleton as Mt, AnimationClip as wt, Bone as St, InterpolateDiscrete as At, InterpolateLinear as Ge, Texture as _e, VectorKeyframeTrack as ge, NumberKeyframeTrack as Te, QuaternionKeyframeTrack as ye, ColorManagement as xe, FrontSide as Lt, Interpolant as Pt, Box3 as Nt, Sphere as Ot, Controls as Dt, MOUSE as U, TOUCH as G, Spherical as Ee, Ray as Ct, Plane as It } from "three";
4
+ import { VRMHumanBoneName as be, VRMExpressionPresetName as Re, VRMLoaderPlugin as vt, VRMUtils as kt } from "@pixiv/three-vrm";
5
+ class Ue {
6
6
  constructor() {
7
- this.status = 0, this.url = null, this.data = null;
8
7
  }
9
- is_loaded() {
10
- return this.status == 2;
8
+ async fetchJSON(e) {
9
+ const t = await fetch(e);
10
+ return t.ok ? await t.json() : null;
11
11
  }
12
- is_failed() {
13
- return this.status == 3;
12
+ async fetchPose(e) {
13
+ const t = await this.fetchJSON(e);
14
+ return t == null ? null : "pose" in t ? t.pose : t;
14
15
  }
15
- async loadUrl(e, t) {
16
- this.url = t, this.data = null, this.status = 1;
17
- const n = await e.get(t);
18
- return n.status != 200 ? (this.status = 3, null) : n.data ? (this.data = n.data, this.status = 2, this.data) : (this.status = 3, null);
19
- }
20
- async loadPose(e, t) {
21
- const n = await this.loadUrl(e, t);
22
- return n == null ? null : "pose" in n ? (this.data = n.pose, this.data) : this.data;
23
- }
24
- async loadExpression(e, t) {
25
- const n = await this.loadUrl(e, t);
26
- return n == null ? null : "expressions" in n ? (this.data = n.expressions, this.data) : this.data;
16
+ async fetchExpression(e) {
17
+ const t = await this.fetchJSON(e);
18
+ return t == null ? null : "expressions" in t ? t.expressions : t;
27
19
  }
28
20
  }
29
- class Ft {
21
+ class jt {
30
22
  constructor() {
31
23
  this.vrm = null;
32
24
  }
@@ -74,9 +66,9 @@ class Ft {
74
66
  z: t.rotation.z
75
67
  } : null;
76
68
  }
77
- setBoneRotate(e, t, n, s) {
69
+ setBoneRotate(e, t, s, n) {
78
70
  const i = this.getBoneNode(e);
79
- i && (i.rotation.x = t, i.rotation.y = n, i.rotation.z = s);
71
+ i && (i.rotation.x = t, i.rotation.y = s, i.rotation.z = n);
80
72
  }
81
73
  getBonePosition(e) {
82
74
  const t = this.getBoneNode(e);
@@ -86,9 +78,9 @@ class Ft {
86
78
  z: t.position.z
87
79
  } : null;
88
80
  }
89
- setBonePosition(e, t, n, s) {
81
+ setBonePosition(e, t, s, n) {
90
82
  const i = this.getBoneNode(e);
91
- i && (i.position.x = t, i.position.y = n, i.position.z = s);
83
+ i && (i.position.x = t, i.position.y = s, i.position.z = n);
92
84
  }
93
85
  getMetaVersion() {
94
86
  return this.vrm ? this.vrm.meta.metaVersion : null;
@@ -120,8 +112,8 @@ class Ft {
120
112
  if (this.vrm) {
121
113
  let e = {};
122
114
  const t = this.getExpressionNames();
123
- for (const n in t)
124
- e[n] = this.getExpression(n);
115
+ for (const s in t)
116
+ e[s] = this.getExpression(s);
125
117
  return e;
126
118
  }
127
119
  return null;
@@ -150,8 +142,8 @@ class Me {
150
142
  */
151
143
  static isColorSpaceAvailable(e) {
152
144
  try {
153
- const t = document.createElement("canvas"), n = window.WebGL2RenderingContext && t.getContext("webgl2");
154
- return n.drawingBufferColorSpace = e, n.drawingBufferColorSpace === e;
145
+ const t = document.createElement("canvas"), s = window.WebGL2RenderingContext && t.getContext("webgl2");
146
+ return s.drawingBufferColorSpace = e, s.drawingBufferColorSpace === e;
155
147
  } catch {
156
148
  return !1;
157
149
  }
@@ -170,13 +162,13 @@ class Me {
170
162
  const t = {
171
163
  1: "WebGL",
172
164
  2: "WebGL 2"
173
- }, n = {
165
+ }, s = {
174
166
  1: window.WebGLRenderingContext,
175
167
  2: window.WebGL2RenderingContext
176
168
  };
177
- let s = 'Your $0 does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">$1</a>';
169
+ let n = 'Your $0 does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">$1</a>';
178
170
  const i = document.createElement("div");
179
- return i.id = "webglmessage", i.style.fontFamily = "monospace", i.style.fontSize = "13px", i.style.fontWeight = "normal", i.style.textAlign = "center", i.style.background = "#fff", i.style.color = "#000", i.style.padding = "1.5em", i.style.width = "400px", i.style.margin = "5em auto 0", n[e] ? s = s.replace("$0", "graphics card") : s = s.replace("$0", "browser"), s = s.replace("$1", t[e]), i.innerHTML = s, i;
171
+ return i.id = "webglmessage", i.style.fontFamily = "monospace", i.style.fontSize = "13px", i.style.fontWeight = "normal", i.style.textAlign = "center", i.style.background = "#fff", i.style.color = "#000", i.style.padding = "1.5em", i.style.width = "400px", i.style.margin = "5em auto 0", s[e] ? n = n.replace("$0", "graphics card") : n = n.replace("$0", "browser"), n = n.replace("$1", t[e]), i.innerHTML = n, i;
180
172
  }
181
173
  // @deprecated, r168
182
174
  static isWebGLAvailable() {
@@ -193,9 +185,9 @@ class Me {
193
185
  }
194
186
  }
195
187
  function we(l, e) {
196
- if (e === qe)
188
+ if (e === Ze)
197
189
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), l;
198
- if (e === ce || e === Ie) {
190
+ if (e === ce || e === Ce) {
199
191
  let t = l.getIndex();
200
192
  if (t === null) {
201
193
  const o = [], r = l.getAttribute("position");
@@ -206,20 +198,20 @@ function we(l, e) {
206
198
  } else
207
199
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), l;
208
200
  }
209
- const n = t.count - 2, s = [];
201
+ const s = t.count - 2, n = [];
210
202
  if (e === ce)
211
- for (let o = 1; o <= n; o++)
212
- s.push(t.getX(0)), s.push(t.getX(o)), s.push(t.getX(o + 1));
203
+ for (let o = 1; o <= s; o++)
204
+ n.push(t.getX(0)), n.push(t.getX(o)), n.push(t.getX(o + 1));
213
205
  else
214
- for (let o = 0; o < n; o++)
215
- o % 2 === 0 ? (s.push(t.getX(o)), s.push(t.getX(o + 1)), s.push(t.getX(o + 2))) : (s.push(t.getX(o + 2)), s.push(t.getX(o + 1)), s.push(t.getX(o)));
216
- s.length / 3 !== n && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
206
+ for (let o = 0; o < s; o++)
207
+ o % 2 === 0 ? (n.push(t.getX(o)), n.push(t.getX(o + 1)), n.push(t.getX(o + 2))) : (n.push(t.getX(o + 2)), n.push(t.getX(o + 1)), n.push(t.getX(o)));
208
+ n.length / 3 !== s && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
217
209
  const i = l.clone();
218
- return i.setIndex(s), i.clearGroups(), i;
210
+ return i.setIndex(n), i.clearGroups(), i;
219
211
  } else
220
212
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), l;
221
213
  }
222
- class ue extends Qe {
214
+ class ue extends qe {
223
215
  /**
224
216
  * Constructs a new glTF loader.
225
217
  *
@@ -227,15 +219,17 @@ class ue extends Qe {
227
219
  */
228
220
  constructor(e) {
229
221
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
222
+ return new Kt(t);
223
+ }), this.register(function(t) {
230
224
  return new Bt(t);
231
225
  }), this.register(function(t) {
232
- return new Vt(t);
226
+ return new $t(t);
233
227
  }), this.register(function(t) {
234
228
  return new Jt(t);
235
229
  }), this.register(function(t) {
236
230
  return new es(t);
237
231
  }), this.register(function(t) {
238
- return new ts(t);
232
+ return new zt(t);
239
233
  }), this.register(function(t) {
240
234
  return new Xt(t);
241
235
  }), this.register(function(t) {
@@ -243,23 +237,21 @@ class ue extends Qe {
243
237
  }), this.register(function(t) {
244
238
  return new Wt(t);
245
239
  }), this.register(function(t) {
246
- return new Zt(t);
240
+ return new Ut(t);
247
241
  }), this.register(function(t) {
248
- return new Kt(t);
242
+ return new Zt(t);
249
243
  }), this.register(function(t) {
250
- return new qt(t);
244
+ return new Vt(t);
251
245
  }), this.register(function(t) {
252
- return new zt(t);
246
+ return new Qt(t);
253
247
  }), this.register(function(t) {
254
- return new $t(t);
248
+ return new qt(t);
255
249
  }), this.register(function(t) {
256
- return new Qt(t);
250
+ return new Ht(t);
257
251
  }), this.register(function(t) {
258
- return new Ut(t);
252
+ return new ts(t);
259
253
  }), this.register(function(t) {
260
254
  return new ss(t);
261
- }), this.register(function(t) {
262
- return new ns(t);
263
255
  });
264
256
  }
265
257
  /**
@@ -271,7 +263,7 @@ class ue extends Qe {
271
263
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
272
264
  * @param {onErrorCallback} onError - Executed when errors occur.
273
265
  */
274
- load(e, t, n, s) {
266
+ load(e, t, s, n) {
275
267
  const i = this;
276
268
  let o;
277
269
  if (this.resourcePath !== "")
@@ -283,17 +275,17 @@ class ue extends Qe {
283
275
  o = X.extractUrlBase(e);
284
276
  this.manager.itemStart(e);
285
277
  const r = function(c) {
286
- s ? s(c) : console.error(c), i.manager.itemError(e), i.manager.itemEnd(e);
287
- }, a = new ve(this.manager);
278
+ n ? n(c) : console.error(c), i.manager.itemError(e), i.manager.itemEnd(e);
279
+ }, a = new Ie(this.manager);
288
280
  a.setPath(this.path), a.setResponseType("arraybuffer"), a.setRequestHeader(this.requestHeader), a.setWithCredentials(this.withCredentials), a.load(e, function(c) {
289
281
  try {
290
- i.parse(c, o, function(h) {
291
- t(h), i.manager.itemEnd(e);
282
+ i.parse(c, o, function(u) {
283
+ t(u), i.manager.itemEnd(e);
292
284
  }, r);
293
- } catch (h) {
294
- r(h);
285
+ } catch (u) {
286
+ r(u);
295
287
  }
296
- }, n, r);
288
+ }, s, r);
297
289
  }
298
290
  /**
299
291
  * Sets the given Draco loader to this loader. Required for decoding assets
@@ -353,17 +345,17 @@ class ue extends Qe {
353
345
  * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished.
354
346
  * @param {onErrorCallback} onError - Executed when errors occur.
355
347
  */
356
- parse(e, t, n, s) {
348
+ parse(e, t, s, n) {
357
349
  let i;
358
350
  const o = {}, r = {}, a = new TextDecoder();
359
351
  if (typeof e == "string")
360
352
  i = JSON.parse(e);
361
353
  else if (e instanceof ArrayBuffer)
362
- if (a.decode(new Uint8Array(e, 0, 4)) === Be) {
354
+ if (a.decode(new Uint8Array(e, 0, 4)) === Ke) {
363
355
  try {
364
- o[y.KHR_BINARY_GLTF] = new is(e);
365
- } catch (u) {
366
- s && s(u);
356
+ o[y.KHR_BINARY_GLTF] = new ns(e);
357
+ } catch (h) {
358
+ n && n(h);
367
359
  return;
368
360
  }
369
361
  i = JSON.parse(o[y.KHR_BINARY_GLTF].content);
@@ -372,10 +364,10 @@ class ue extends Qe {
372
364
  else
373
365
  i = e;
374
366
  if (i.asset === void 0 || i.asset.version[0] < 2) {
375
- s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
367
+ n && n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
376
368
  return;
377
369
  }
378
- const c = new gs(i, {
370
+ const c = new _s(i, {
379
371
  path: t || this.resourcePath || "",
380
372
  crossOrigin: this.crossOrigin,
381
373
  requestHeader: this.requestHeader,
@@ -384,31 +376,31 @@ class ue extends Qe {
384
376
  meshoptDecoder: this.meshoptDecoder
385
377
  });
386
378
  c.fileLoader.setRequestHeader(this.requestHeader);
387
- for (let h = 0; h < this.pluginCallbacks.length; h++) {
388
- const u = this.pluginCallbacks[h](c);
389
- u.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), r[u.name] = u, o[u.name] = !0;
379
+ for (let u = 0; u < this.pluginCallbacks.length; u++) {
380
+ const h = this.pluginCallbacks[u](c);
381
+ h.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), r[h.name] = h, o[h.name] = !0;
390
382
  }
391
383
  if (i.extensionsUsed)
392
- for (let h = 0; h < i.extensionsUsed.length; ++h) {
393
- const u = i.extensionsUsed[h], d = i.extensionsRequired || [];
394
- switch (u) {
384
+ for (let u = 0; u < i.extensionsUsed.length; ++u) {
385
+ const h = i.extensionsUsed[u], d = i.extensionsRequired || [];
386
+ switch (h) {
395
387
  case y.KHR_MATERIALS_UNLIT:
396
- o[u] = new Gt();
388
+ o[h] = new Gt();
397
389
  break;
398
390
  case y.KHR_DRACO_MESH_COMPRESSION:
399
- o[u] = new os(i, this.dracoLoader);
391
+ o[h] = new is(i, this.dracoLoader);
400
392
  break;
401
393
  case y.KHR_TEXTURE_TRANSFORM:
402
- o[u] = new rs();
394
+ o[h] = new os();
403
395
  break;
404
396
  case y.KHR_MESH_QUANTIZATION:
405
- o[u] = new as();
397
+ o[h] = new rs();
406
398
  break;
407
399
  default:
408
- d.indexOf(u) >= 0 && r[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
400
+ d.indexOf(h) >= 0 && r[h] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + h + '".');
409
401
  }
410
402
  }
411
- c.setExtensions(o), c.setPlugins(r), c.parse(n, s);
403
+ c.setExtensions(o), c.setPlugins(r), c.parse(s, n);
412
404
  }
413
405
  /**
414
406
  * Async version of {@link GLTFLoader#parse}.
@@ -419,13 +411,13 @@ class ue extends Qe {
419
411
  * @return {Promise<GLTFLoader~LoadObject>} A Promise that resolves with the loaded glTF when the parsing has been finished.
420
412
  */
421
413
  parseAsync(e, t) {
422
- const n = this;
423
- return new Promise(function(s, i) {
424
- n.parse(e, t, s, i);
414
+ const s = this;
415
+ return new Promise(function(n, i) {
416
+ s.parse(e, t, n, i);
425
417
  });
426
418
  }
427
419
  }
428
- function Ht() {
420
+ function Ft() {
429
421
  let l = {};
430
422
  return {
431
423
  get: function(e) {
@@ -466,49 +458,49 @@ const y = {
466
458
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
467
459
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
468
460
  };
469
- class Ut {
461
+ class Ht {
470
462
  constructor(e) {
471
463
  this.parser = e, this.name = y.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
472
464
  }
473
465
  _markDefs() {
474
466
  const e = this.parser, t = this.parser.json.nodes || [];
475
- for (let n = 0, s = t.length; n < s; n++) {
476
- const i = t[n];
467
+ for (let s = 0, n = t.length; s < n; s++) {
468
+ const i = t[s];
477
469
  i.extensions && i.extensions[this.name] && i.extensions[this.name].light !== void 0 && e._addNodeRef(this.cache, i.extensions[this.name].light);
478
470
  }
479
471
  }
480
472
  _loadLight(e) {
481
- const t = this.parser, n = "light:" + e;
482
- let s = t.cache.get(n);
483
- if (s) return s;
473
+ const t = this.parser, s = "light:" + e;
474
+ let n = t.cache.get(s);
475
+ if (n) return n;
484
476
  const i = t.json, a = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
485
477
  let c;
486
- const h = new H(16777215);
487
- a.color !== void 0 && h.setRGB(a.color[0], a.color[1], a.color[2], C);
488
- const u = a.range !== void 0 ? a.range : 0;
478
+ const u = new H(16777215);
479
+ a.color !== void 0 && u.setRGB(a.color[0], a.color[1], a.color[2], C);
480
+ const h = a.range !== void 0 ? a.range : 0;
489
481
  switch (a.type) {
490
482
  case "directional":
491
- c = new et(h), c.target.position.set(0, 0, -1), c.add(c.target);
483
+ c = new Je(u), c.target.position.set(0, 0, -1), c.add(c.target);
492
484
  break;
493
485
  case "point":
494
- c = new Je(h), c.distance = u;
486
+ c = new $e(u), c.distance = h;
495
487
  break;
496
488
  case "spot":
497
- c = new $e(h), c.distance = u, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, c.angle = a.spot.outerConeAngle, c.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
489
+ c = new Qe(u), c.distance = h, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle !== void 0 ? a.spot.innerConeAngle : 0, a.spot.outerConeAngle = a.spot.outerConeAngle !== void 0 ? a.spot.outerConeAngle : Math.PI / 4, c.angle = a.spot.outerConeAngle, c.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, c.target.position.set(0, 0, -1), c.add(c.target);
498
490
  break;
499
491
  default:
500
492
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + a.type);
501
493
  }
502
- return c.position.set(0, 0, 0), D(c, a), a.intensity !== void 0 && (c.intensity = a.intensity), c.name = t.createUniqueName(a.name || "light_" + e), s = Promise.resolve(c), t.cache.add(n, s), s;
494
+ return c.position.set(0, 0, 0), D(c, a), a.intensity !== void 0 && (c.intensity = a.intensity), c.name = t.createUniqueName(a.name || "light_" + e), n = Promise.resolve(c), t.cache.add(s, n), n;
503
495
  }
504
496
  getDependency(e, t) {
505
497
  if (e === "light")
506
498
  return this._loadLight(t);
507
499
  }
508
500
  createNodeAttachment(e) {
509
- const t = this, n = this.parser, i = n.json.nodes[e], r = (i.extensions && i.extensions[this.name] || {}).light;
501
+ const t = this, s = this.parser, i = s.json.nodes[e], r = (i.extensions && i.extensions[this.name] || {}).light;
510
502
  return r === void 0 ? null : this._loadLight(r).then(function(a) {
511
- return n._getNodeRef(t.cache, r, a);
503
+ return s._getNodeRef(t.cache, r, a);
512
504
  });
513
505
  }
514
506
  }
@@ -519,8 +511,8 @@ class Gt {
519
511
  getMaterialType() {
520
512
  return z;
521
513
  }
522
- extendParams(e, t, n) {
523
- const s = [];
514
+ extendParams(e, t, s) {
515
+ const n = [];
524
516
  e.color = new H(1, 1, 1), e.opacity = 1;
525
517
  const i = t.pbrMetallicRoughness;
526
518
  if (i) {
@@ -528,328 +520,328 @@ class Gt {
528
520
  const o = i.baseColorFactor;
529
521
  e.color.setRGB(o[0], o[1], o[2], C), e.opacity = o[3];
530
522
  }
531
- i.baseColorTexture !== void 0 && s.push(n.assignTexture(e, "map", i.baseColorTexture, Y));
523
+ i.baseColorTexture !== void 0 && n.push(s.assignTexture(e, "map", i.baseColorTexture, Y));
532
524
  }
533
- return Promise.all(s);
525
+ return Promise.all(n);
534
526
  }
535
527
  }
536
- class Kt {
528
+ class Ut {
537
529
  constructor(e) {
538
530
  this.parser = e, this.name = y.KHR_MATERIALS_EMISSIVE_STRENGTH;
539
531
  }
540
532
  extendMaterialParams(e, t) {
541
- const s = this.parser.json.materials[e];
542
- if (!s.extensions || !s.extensions[this.name])
533
+ const n = this.parser.json.materials[e];
534
+ if (!n.extensions || !n.extensions[this.name])
543
535
  return Promise.resolve();
544
- const i = s.extensions[this.name].emissiveStrength;
536
+ const i = n.extensions[this.name].emissiveStrength;
545
537
  return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
546
538
  }
547
539
  }
548
- class Bt {
540
+ class Kt {
549
541
  constructor(e) {
550
542
  this.parser = e, this.name = y.KHR_MATERIALS_CLEARCOAT;
551
543
  }
552
544
  getMaterialType(e) {
553
- const n = this.parser.json.materials[e];
554
- return !n.extensions || !n.extensions[this.name] ? null : O;
545
+ const s = this.parser.json.materials[e];
546
+ return !s.extensions || !s.extensions[this.name] ? null : O;
555
547
  }
556
548
  extendMaterialParams(e, t) {
557
- const n = this.parser, s = n.json.materials[e];
558
- if (!s.extensions || !s.extensions[this.name])
549
+ const s = this.parser, n = s.json.materials[e];
550
+ if (!n.extensions || !n.extensions[this.name])
559
551
  return Promise.resolve();
560
- const i = [], o = s.extensions[this.name];
561
- if (o.clearcoatFactor !== void 0 && (t.clearcoat = o.clearcoatFactor), o.clearcoatTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatMap", o.clearcoatTexture)), o.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = o.clearcoatRoughnessFactor), o.clearcoatRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatRoughnessMap", o.clearcoatRoughnessTexture)), o.clearcoatNormalTexture !== void 0 && (i.push(n.assignTexture(t, "clearcoatNormalMap", o.clearcoatNormalTexture)), o.clearcoatNormalTexture.scale !== void 0)) {
552
+ const i = [], o = n.extensions[this.name];
553
+ if (o.clearcoatFactor !== void 0 && (t.clearcoat = o.clearcoatFactor), o.clearcoatTexture !== void 0 && i.push(s.assignTexture(t, "clearcoatMap", o.clearcoatTexture)), o.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = o.clearcoatRoughnessFactor), o.clearcoatRoughnessTexture !== void 0 && i.push(s.assignTexture(t, "clearcoatRoughnessMap", o.clearcoatRoughnessTexture)), o.clearcoatNormalTexture !== void 0 && (i.push(s.assignTexture(t, "clearcoatNormalMap", o.clearcoatNormalTexture)), o.clearcoatNormalTexture.scale !== void 0)) {
562
554
  const r = o.clearcoatNormalTexture.scale;
563
555
  t.clearcoatNormalScale = new S(r, r);
564
556
  }
565
557
  return Promise.all(i);
566
558
  }
567
559
  }
568
- class Vt {
560
+ class Bt {
569
561
  constructor(e) {
570
562
  this.parser = e, this.name = y.KHR_MATERIALS_DISPERSION;
571
563
  }
572
564
  getMaterialType(e) {
573
- const n = this.parser.json.materials[e];
574
- return !n.extensions || !n.extensions[this.name] ? null : O;
565
+ const s = this.parser.json.materials[e];
566
+ return !s.extensions || !s.extensions[this.name] ? null : O;
575
567
  }
576
568
  extendMaterialParams(e, t) {
577
- const s = this.parser.json.materials[e];
578
- if (!s.extensions || !s.extensions[this.name])
569
+ const n = this.parser.json.materials[e];
570
+ if (!n.extensions || !n.extensions[this.name])
579
571
  return Promise.resolve();
580
- const i = s.extensions[this.name];
572
+ const i = n.extensions[this.name];
581
573
  return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
582
574
  }
583
575
  }
584
- class zt {
576
+ class Vt {
585
577
  constructor(e) {
586
578
  this.parser = e, this.name = y.KHR_MATERIALS_IRIDESCENCE;
587
579
  }
588
580
  getMaterialType(e) {
589
- const n = this.parser.json.materials[e];
590
- return !n.extensions || !n.extensions[this.name] ? null : O;
581
+ const s = this.parser.json.materials[e];
582
+ return !s.extensions || !s.extensions[this.name] ? null : O;
591
583
  }
592
584
  extendMaterialParams(e, t) {
593
- const n = this.parser, s = n.json.materials[e];
594
- if (!s.extensions || !s.extensions[this.name])
585
+ const s = this.parser, n = s.json.materials[e];
586
+ if (!n.extensions || !n.extensions[this.name])
595
587
  return Promise.resolve();
596
- const i = [], o = s.extensions[this.name];
597
- return o.iridescenceFactor !== void 0 && (t.iridescence = o.iridescenceFactor), o.iridescenceTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceMap", o.iridescenceTexture)), o.iridescenceIor !== void 0 && (t.iridescenceIOR = o.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), o.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = o.iridescenceThicknessMinimum), o.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = o.iridescenceThicknessMaximum), o.iridescenceThicknessTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceThicknessMap", o.iridescenceThicknessTexture)), Promise.all(i);
588
+ const i = [], o = n.extensions[this.name];
589
+ return o.iridescenceFactor !== void 0 && (t.iridescence = o.iridescenceFactor), o.iridescenceTexture !== void 0 && i.push(s.assignTexture(t, "iridescenceMap", o.iridescenceTexture)), o.iridescenceIor !== void 0 && (t.iridescenceIOR = o.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), o.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = o.iridescenceThicknessMinimum), o.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = o.iridescenceThicknessMaximum), o.iridescenceThicknessTexture !== void 0 && i.push(s.assignTexture(t, "iridescenceThicknessMap", o.iridescenceThicknessTexture)), Promise.all(i);
598
590
  }
599
591
  }
600
- class Xt {
592
+ class zt {
601
593
  constructor(e) {
602
594
  this.parser = e, this.name = y.KHR_MATERIALS_SHEEN;
603
595
  }
604
596
  getMaterialType(e) {
605
- const n = this.parser.json.materials[e];
606
- return !n.extensions || !n.extensions[this.name] ? null : O;
597
+ const s = this.parser.json.materials[e];
598
+ return !s.extensions || !s.extensions[this.name] ? null : O;
607
599
  }
608
600
  extendMaterialParams(e, t) {
609
- const n = this.parser, s = n.json.materials[e];
610
- if (!s.extensions || !s.extensions[this.name])
601
+ const s = this.parser, n = s.json.materials[e];
602
+ if (!n.extensions || !n.extensions[this.name])
611
603
  return Promise.resolve();
612
604
  const i = [];
613
605
  t.sheenColor = new H(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1;
614
- const o = s.extensions[this.name];
606
+ const o = n.extensions[this.name];
615
607
  if (o.sheenColorFactor !== void 0) {
616
608
  const r = o.sheenColorFactor;
617
609
  t.sheenColor.setRGB(r[0], r[1], r[2], C);
618
610
  }
619
- return o.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", o.sheenColorTexture, Y)), o.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(i);
611
+ return o.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && i.push(s.assignTexture(t, "sheenColorMap", o.sheenColorTexture, Y)), o.sheenRoughnessTexture !== void 0 && i.push(s.assignTexture(t, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(i);
620
612
  }
621
613
  }
622
- class Yt {
614
+ class Xt {
623
615
  constructor(e) {
624
616
  this.parser = e, this.name = y.KHR_MATERIALS_TRANSMISSION;
625
617
  }
626
618
  getMaterialType(e) {
627
- const n = this.parser.json.materials[e];
628
- return !n.extensions || !n.extensions[this.name] ? null : O;
619
+ const s = this.parser.json.materials[e];
620
+ return !s.extensions || !s.extensions[this.name] ? null : O;
629
621
  }
630
622
  extendMaterialParams(e, t) {
631
- const n = this.parser, s = n.json.materials[e];
632
- if (!s.extensions || !s.extensions[this.name])
623
+ const s = this.parser, n = s.json.materials[e];
624
+ if (!n.extensions || !n.extensions[this.name])
633
625
  return Promise.resolve();
634
- const i = [], o = s.extensions[this.name];
635
- return o.transmissionFactor !== void 0 && (t.transmission = o.transmissionFactor), o.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", o.transmissionTexture)), Promise.all(i);
626
+ const i = [], o = n.extensions[this.name];
627
+ return o.transmissionFactor !== void 0 && (t.transmission = o.transmissionFactor), o.transmissionTexture !== void 0 && i.push(s.assignTexture(t, "transmissionMap", o.transmissionTexture)), Promise.all(i);
636
628
  }
637
629
  }
638
- class Wt {
630
+ class Yt {
639
631
  constructor(e) {
640
632
  this.parser = e, this.name = y.KHR_MATERIALS_VOLUME;
641
633
  }
642
634
  getMaterialType(e) {
643
- const n = this.parser.json.materials[e];
644
- return !n.extensions || !n.extensions[this.name] ? null : O;
635
+ const s = this.parser.json.materials[e];
636
+ return !s.extensions || !s.extensions[this.name] ? null : O;
645
637
  }
646
638
  extendMaterialParams(e, t) {
647
- const n = this.parser, s = n.json.materials[e];
648
- if (!s.extensions || !s.extensions[this.name])
639
+ const s = this.parser, n = s.json.materials[e];
640
+ if (!n.extensions || !n.extensions[this.name])
649
641
  return Promise.resolve();
650
- const i = [], o = s.extensions[this.name];
651
- t.thickness = o.thicknessFactor !== void 0 ? o.thicknessFactor : 0, o.thicknessTexture !== void 0 && i.push(n.assignTexture(t, "thicknessMap", o.thicknessTexture)), t.attenuationDistance = o.attenuationDistance || 1 / 0;
642
+ const i = [], o = n.extensions[this.name];
643
+ t.thickness = o.thicknessFactor !== void 0 ? o.thicknessFactor : 0, o.thicknessTexture !== void 0 && i.push(s.assignTexture(t, "thicknessMap", o.thicknessTexture)), t.attenuationDistance = o.attenuationDistance || 1 / 0;
652
644
  const r = o.attenuationColor || [1, 1, 1];
653
645
  return t.attenuationColor = new H().setRGB(r[0], r[1], r[2], C), Promise.all(i);
654
646
  }
655
647
  }
656
- class Zt {
648
+ class Wt {
657
649
  constructor(e) {
658
650
  this.parser = e, this.name = y.KHR_MATERIALS_IOR;
659
651
  }
660
652
  getMaterialType(e) {
661
- const n = this.parser.json.materials[e];
662
- return !n.extensions || !n.extensions[this.name] ? null : O;
653
+ const s = this.parser.json.materials[e];
654
+ return !s.extensions || !s.extensions[this.name] ? null : O;
663
655
  }
664
656
  extendMaterialParams(e, t) {
665
- const s = this.parser.json.materials[e];
666
- if (!s.extensions || !s.extensions[this.name])
657
+ const n = this.parser.json.materials[e];
658
+ if (!n.extensions || !n.extensions[this.name])
667
659
  return Promise.resolve();
668
- const i = s.extensions[this.name];
660
+ const i = n.extensions[this.name];
669
661
  return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
670
662
  }
671
663
  }
672
- class qt {
664
+ class Zt {
673
665
  constructor(e) {
674
666
  this.parser = e, this.name = y.KHR_MATERIALS_SPECULAR;
675
667
  }
676
668
  getMaterialType(e) {
677
- const n = this.parser.json.materials[e];
678
- return !n.extensions || !n.extensions[this.name] ? null : O;
669
+ const s = this.parser.json.materials[e];
670
+ return !s.extensions || !s.extensions[this.name] ? null : O;
679
671
  }
680
672
  extendMaterialParams(e, t) {
681
- const n = this.parser, s = n.json.materials[e];
682
- if (!s.extensions || !s.extensions[this.name])
673
+ const s = this.parser, n = s.json.materials[e];
674
+ if (!n.extensions || !n.extensions[this.name])
683
675
  return Promise.resolve();
684
- const i = [], o = s.extensions[this.name];
685
- t.specularIntensity = o.specularFactor !== void 0 ? o.specularFactor : 1, o.specularTexture !== void 0 && i.push(n.assignTexture(t, "specularIntensityMap", o.specularTexture));
676
+ const i = [], o = n.extensions[this.name];
677
+ t.specularIntensity = o.specularFactor !== void 0 ? o.specularFactor : 1, o.specularTexture !== void 0 && i.push(s.assignTexture(t, "specularIntensityMap", o.specularTexture));
686
678
  const r = o.specularColorFactor || [1, 1, 1];
687
- return t.specularColor = new H().setRGB(r[0], r[1], r[2], C), o.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", o.specularColorTexture, Y)), Promise.all(i);
679
+ return t.specularColor = new H().setRGB(r[0], r[1], r[2], C), o.specularColorTexture !== void 0 && i.push(s.assignTexture(t, "specularColorMap", o.specularColorTexture, Y)), Promise.all(i);
688
680
  }
689
681
  }
690
- class Qt {
682
+ class qt {
691
683
  constructor(e) {
692
684
  this.parser = e, this.name = y.EXT_MATERIALS_BUMP;
693
685
  }
694
686
  getMaterialType(e) {
695
- const n = this.parser.json.materials[e];
696
- return !n.extensions || !n.extensions[this.name] ? null : O;
687
+ const s = this.parser.json.materials[e];
688
+ return !s.extensions || !s.extensions[this.name] ? null : O;
697
689
  }
698
690
  extendMaterialParams(e, t) {
699
- const n = this.parser, s = n.json.materials[e];
700
- if (!s.extensions || !s.extensions[this.name])
691
+ const s = this.parser, n = s.json.materials[e];
692
+ if (!n.extensions || !n.extensions[this.name])
701
693
  return Promise.resolve();
702
- const i = [], o = s.extensions[this.name];
703
- return t.bumpScale = o.bumpFactor !== void 0 ? o.bumpFactor : 1, o.bumpTexture !== void 0 && i.push(n.assignTexture(t, "bumpMap", o.bumpTexture)), Promise.all(i);
694
+ const i = [], o = n.extensions[this.name];
695
+ return t.bumpScale = o.bumpFactor !== void 0 ? o.bumpFactor : 1, o.bumpTexture !== void 0 && i.push(s.assignTexture(t, "bumpMap", o.bumpTexture)), Promise.all(i);
704
696
  }
705
697
  }
706
- class $t {
698
+ class Qt {
707
699
  constructor(e) {
708
700
  this.parser = e, this.name = y.KHR_MATERIALS_ANISOTROPY;
709
701
  }
710
702
  getMaterialType(e) {
711
- const n = this.parser.json.materials[e];
712
- return !n.extensions || !n.extensions[this.name] ? null : O;
703
+ const s = this.parser.json.materials[e];
704
+ return !s.extensions || !s.extensions[this.name] ? null : O;
713
705
  }
714
706
  extendMaterialParams(e, t) {
715
- const n = this.parser, s = n.json.materials[e];
716
- if (!s.extensions || !s.extensions[this.name])
707
+ const s = this.parser, n = s.json.materials[e];
708
+ if (!n.extensions || !n.extensions[this.name])
717
709
  return Promise.resolve();
718
- const i = [], o = s.extensions[this.name];
719
- return o.anisotropyStrength !== void 0 && (t.anisotropy = o.anisotropyStrength), o.anisotropyRotation !== void 0 && (t.anisotropyRotation = o.anisotropyRotation), o.anisotropyTexture !== void 0 && i.push(n.assignTexture(t, "anisotropyMap", o.anisotropyTexture)), Promise.all(i);
710
+ const i = [], o = n.extensions[this.name];
711
+ return o.anisotropyStrength !== void 0 && (t.anisotropy = o.anisotropyStrength), o.anisotropyRotation !== void 0 && (t.anisotropyRotation = o.anisotropyRotation), o.anisotropyTexture !== void 0 && i.push(s.assignTexture(t, "anisotropyMap", o.anisotropyTexture)), Promise.all(i);
720
712
  }
721
713
  }
722
- class Jt {
714
+ class $t {
723
715
  constructor(e) {
724
716
  this.parser = e, this.name = y.KHR_TEXTURE_BASISU;
725
717
  }
726
718
  loadTexture(e) {
727
- const t = this.parser, n = t.json, s = n.textures[e];
728
- if (!s.extensions || !s.extensions[this.name])
719
+ const t = this.parser, s = t.json, n = s.textures[e];
720
+ if (!n.extensions || !n.extensions[this.name])
729
721
  return null;
730
- const i = s.extensions[this.name], o = t.options.ktx2Loader;
722
+ const i = n.extensions[this.name], o = t.options.ktx2Loader;
731
723
  if (!o) {
732
- if (n.extensionsRequired && n.extensionsRequired.indexOf(this.name) >= 0)
724
+ if (s.extensionsRequired && s.extensionsRequired.indexOf(this.name) >= 0)
733
725
  throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
734
726
  return null;
735
727
  }
736
728
  return t.loadTextureImage(e, i.source, o);
737
729
  }
738
730
  }
739
- class es {
731
+ class Jt {
740
732
  constructor(e) {
741
733
  this.parser = e, this.name = y.EXT_TEXTURE_WEBP;
742
734
  }
743
735
  loadTexture(e) {
744
- const t = this.name, n = this.parser, s = n.json, i = s.textures[e];
736
+ const t = this.name, s = this.parser, n = s.json, i = n.textures[e];
745
737
  if (!i.extensions || !i.extensions[t])
746
738
  return null;
747
- const o = i.extensions[t], r = s.images[o.source];
748
- let a = n.textureLoader;
739
+ const o = i.extensions[t], r = n.images[o.source];
740
+ let a = s.textureLoader;
749
741
  if (r.uri) {
750
- const c = n.options.manager.getHandler(r.uri);
742
+ const c = s.options.manager.getHandler(r.uri);
751
743
  c !== null && (a = c);
752
744
  }
753
- return n.loadTextureImage(e, o.source, a);
745
+ return s.loadTextureImage(e, o.source, a);
754
746
  }
755
747
  }
756
- class ts {
748
+ class es {
757
749
  constructor(e) {
758
750
  this.parser = e, this.name = y.EXT_TEXTURE_AVIF;
759
751
  }
760
752
  loadTexture(e) {
761
- const t = this.name, n = this.parser, s = n.json, i = s.textures[e];
753
+ const t = this.name, s = this.parser, n = s.json, i = n.textures[e];
762
754
  if (!i.extensions || !i.extensions[t])
763
755
  return null;
764
- const o = i.extensions[t], r = s.images[o.source];
765
- let a = n.textureLoader;
756
+ const o = i.extensions[t], r = n.images[o.source];
757
+ let a = s.textureLoader;
766
758
  if (r.uri) {
767
- const c = n.options.manager.getHandler(r.uri);
759
+ const c = s.options.manager.getHandler(r.uri);
768
760
  c !== null && (a = c);
769
761
  }
770
- return n.loadTextureImage(e, o.source, a);
762
+ return s.loadTextureImage(e, o.source, a);
771
763
  }
772
764
  }
773
- class ss {
765
+ class ts {
774
766
  constructor(e) {
775
767
  this.name = y.EXT_MESHOPT_COMPRESSION, this.parser = e;
776
768
  }
777
769
  loadBufferView(e) {
778
- const t = this.parser.json, n = t.bufferViews[e];
779
- if (n.extensions && n.extensions[this.name]) {
780
- const s = n.extensions[this.name], i = this.parser.getDependency("buffer", s.buffer), o = this.parser.options.meshoptDecoder;
770
+ const t = this.parser.json, s = t.bufferViews[e];
771
+ if (s.extensions && s.extensions[this.name]) {
772
+ const n = s.extensions[this.name], i = this.parser.getDependency("buffer", n.buffer), o = this.parser.options.meshoptDecoder;
781
773
  if (!o || !o.supported) {
782
774
  if (t.extensionsRequired && t.extensionsRequired.indexOf(this.name) >= 0)
783
775
  throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
784
776
  return null;
785
777
  }
786
778
  return i.then(function(r) {
787
- const a = s.byteOffset || 0, c = s.byteLength || 0, h = s.count, u = s.byteStride, d = new Uint8Array(r, a, c);
788
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(h, u, d, s.mode, s.filter).then(function(p) {
779
+ const a = n.byteOffset || 0, c = n.byteLength || 0, u = n.count, h = n.byteStride, d = new Uint8Array(r, a, c);
780
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(u, h, d, n.mode, n.filter).then(function(p) {
789
781
  return p.buffer;
790
782
  }) : o.ready.then(function() {
791
- const p = new ArrayBuffer(h * u);
792
- return o.decodeGltfBuffer(new Uint8Array(p), h, u, d, s.mode, s.filter), p;
783
+ const p = new ArrayBuffer(u * h);
784
+ return o.decodeGltfBuffer(new Uint8Array(p), u, h, d, n.mode, n.filter), p;
793
785
  });
794
786
  });
795
787
  } else
796
788
  return null;
797
789
  }
798
790
  }
799
- class ns {
791
+ class ss {
800
792
  constructor(e) {
801
793
  this.name = y.EXT_MESH_GPU_INSTANCING, this.parser = e;
802
794
  }
803
795
  createNodeMesh(e) {
804
- const t = this.parser.json, n = t.nodes[e];
805
- if (!n.extensions || !n.extensions[this.name] || n.mesh === void 0)
796
+ const t = this.parser.json, s = t.nodes[e];
797
+ if (!s.extensions || !s.extensions[this.name] || s.mesh === void 0)
806
798
  return null;
807
- const s = t.meshes[n.mesh];
808
- for (const c of s.primitives)
799
+ const n = t.meshes[s.mesh];
800
+ for (const c of n.primitives)
809
801
  if (c.mode !== L.TRIANGLES && c.mode !== L.TRIANGLE_STRIP && c.mode !== L.TRIANGLE_FAN && c.mode !== void 0)
810
802
  return null;
811
- const o = n.extensions[this.name].attributes, r = [], a = {};
803
+ const o = s.extensions[this.name].attributes, r = [], a = {};
812
804
  for (const c in o)
813
- r.push(this.parser.getDependency("accessor", o[c]).then((h) => (a[c] = h, a[c])));
805
+ r.push(this.parser.getDependency("accessor", o[c]).then((u) => (a[c] = u, a[c])));
814
806
  return r.length < 1 ? null : (r.push(this.parser.createNodeMesh(e)), Promise.all(r).then((c) => {
815
- const h = c.pop(), u = h.isGroup ? h.children : [h], d = c[0].count, p = [];
816
- for (const m of u) {
817
- const g = new q(), f = new M(), _ = new Q(), x = new M(1, 1, 1), b = new tt(m.geometry, m.material, d);
807
+ const u = c.pop(), h = u.isGroup ? u.children : [u], d = c[0].count, p = [];
808
+ for (const m of h) {
809
+ const g = new q(), f = new M(), _ = new Q(), x = new M(1, 1, 1), b = new et(m.geometry, m.material, d);
818
810
  for (let T = 0; T < d; T++)
819
811
  a.TRANSLATION && f.fromBufferAttribute(a.TRANSLATION, T), a.ROTATION && _.fromBufferAttribute(a.ROTATION, T), a.SCALE && x.fromBufferAttribute(a.SCALE, T), b.setMatrixAt(T, g.compose(f, _, x));
820
812
  for (const T in a)
821
813
  if (T === "_COLOR_0") {
822
814
  const A = a[T];
823
- b.instanceColor = new st(A.array, A.itemSize, A.normalized);
815
+ b.instanceColor = new tt(A.array, A.itemSize, A.normalized);
824
816
  } else T !== "TRANSLATION" && T !== "ROTATION" && T !== "SCALE" && m.geometry.setAttribute(T, a[T]);
825
- ke.prototype.copy.call(b, m), this.parser.assignFinalMaterial(b), p.push(b);
817
+ ve.prototype.copy.call(b, m), this.parser.assignFinalMaterial(b), p.push(b);
826
818
  }
827
- return h.isGroup ? (h.clear(), h.add(...p), h) : p[0];
819
+ return u.isGroup ? (u.clear(), u.add(...p), u) : p[0];
828
820
  }));
829
821
  }
830
822
  }
831
- const Be = "glTF", V = 12, Se = { JSON: 1313821514, BIN: 5130562 };
832
- class is {
823
+ const Ke = "glTF", V = 12, Se = { JSON: 1313821514, BIN: 5130562 };
824
+ class ns {
833
825
  constructor(e) {
834
826
  this.name = y.KHR_BINARY_GLTF, this.content = null, this.body = null;
835
- const t = new DataView(e, 0, V), n = new TextDecoder();
827
+ const t = new DataView(e, 0, V), s = new TextDecoder();
836
828
  if (this.header = {
837
- magic: n.decode(new Uint8Array(e.slice(0, 4))),
829
+ magic: s.decode(new Uint8Array(e.slice(0, 4))),
838
830
  version: t.getUint32(4, !0),
839
831
  length: t.getUint32(8, !0)
840
- }, this.header.magic !== Be)
832
+ }, this.header.magic !== Ke)
841
833
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
842
834
  if (this.header.version < 2)
843
835
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
844
- const s = this.header.length - V, i = new DataView(e, V);
836
+ const n = this.header.length - V, i = new DataView(e, V);
845
837
  let o = 0;
846
- for (; o < s; ) {
838
+ for (; o < n; ) {
847
839
  const r = i.getUint32(o, !0);
848
840
  o += 4;
849
841
  const a = i.getUint32(o, !0);
850
842
  if (o += 4, a === Se.JSON) {
851
843
  const c = new Uint8Array(e, V + o, r);
852
- this.content = n.decode(c);
844
+ this.content = s.decode(c);
853
845
  } else if (a === Se.BIN) {
854
846
  const c = V + o;
855
847
  this.body = e.slice(c, c + r);
@@ -860,39 +852,39 @@ class is {
860
852
  throw new Error("THREE.GLTFLoader: JSON content not found.");
861
853
  }
862
854
  }
863
- class os {
855
+ class is {
864
856
  constructor(e, t) {
865
857
  if (!t)
866
858
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
867
859
  this.name = y.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
868
860
  }
869
861
  decodePrimitive(e, t) {
870
- const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, r = {}, a = {}, c = {};
871
- for (const h in o) {
872
- const u = de[h] || h.toLowerCase();
873
- r[u] = o[h];
862
+ const s = this.json, n = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, r = {}, a = {}, c = {};
863
+ for (const u in o) {
864
+ const h = de[u] || u.toLowerCase();
865
+ r[h] = o[u];
874
866
  }
875
- for (const h in e.attributes) {
876
- const u = de[h] || h.toLowerCase();
877
- if (o[h] !== void 0) {
878
- const d = n.accessors[e.attributes[h]], p = K[d.componentType];
879
- c[u] = p.name, a[u] = d.normalized === !0;
867
+ for (const u in e.attributes) {
868
+ const h = de[u] || u.toLowerCase();
869
+ if (o[u] !== void 0) {
870
+ const d = s.accessors[e.attributes[u]], p = K[d.componentType];
871
+ c[h] = p.name, a[h] = d.normalized === !0;
880
872
  }
881
873
  }
882
- return t.getDependency("bufferView", i).then(function(h) {
883
- return new Promise(function(u, d) {
884
- s.decodeDracoFile(h, function(p) {
874
+ return t.getDependency("bufferView", i).then(function(u) {
875
+ return new Promise(function(h, d) {
876
+ n.decodeDracoFile(u, function(p) {
885
877
  for (const m in p.attributes) {
886
878
  const g = p.attributes[m], f = a[m];
887
879
  f !== void 0 && (g.normalized = f);
888
880
  }
889
- u(p);
881
+ h(p);
890
882
  }, r, c, C, d);
891
883
  });
892
884
  });
893
885
  }
894
886
  }
895
- class rs {
887
+ class os {
896
888
  constructor() {
897
889
  this.name = y.KHR_TEXTURE_TRANSFORM;
898
890
  }
@@ -900,35 +892,35 @@ class rs {
900
892
  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;
901
893
  }
902
894
  }
903
- class as {
895
+ class rs {
904
896
  constructor() {
905
897
  this.name = y.KHR_MESH_QUANTIZATION;
906
898
  }
907
899
  }
908
- class Ve extends Nt {
909
- constructor(e, t, n, s) {
910
- super(e, t, n, s);
900
+ class Be extends Pt {
901
+ constructor(e, t, s, n) {
902
+ super(e, t, s, n);
911
903
  }
912
904
  copySampleValue_(e) {
913
- const t = this.resultBuffer, n = this.sampleValues, s = this.valueSize, i = e * s * 3 + s;
914
- for (let o = 0; o !== s; o++)
915
- t[o] = n[i + o];
905
+ const t = this.resultBuffer, s = this.sampleValues, n = this.valueSize, i = e * n * 3 + n;
906
+ for (let o = 0; o !== n; o++)
907
+ t[o] = s[i + o];
916
908
  return t;
917
909
  }
918
- interpolate_(e, t, n, s) {
919
- const i = this.resultBuffer, o = this.sampleValues, r = this.valueSize, a = r * 2, c = r * 3, h = s - t, u = (n - t) / h, d = u * u, p = d * u, m = e * c, g = m - c, f = -2 * p + 3 * d, _ = p - d, x = 1 - f, b = _ - d + u;
910
+ interpolate_(e, t, s, n) {
911
+ const i = this.resultBuffer, o = this.sampleValues, r = this.valueSize, a = r * 2, c = r * 3, u = n - t, h = (s - t) / u, d = h * h, p = d * h, m = e * c, g = m - c, f = -2 * p + 3 * d, _ = p - d, x = 1 - f, b = _ - d + h;
920
912
  for (let T = 0; T !== r; T++) {
921
- const A = o[g + T + r], I = o[g + T + a] * h, P = o[m + T + r], B = o[m + T] * h;
913
+ const A = o[g + T + r], I = o[g + T + a] * u, P = o[m + T + r], B = o[m + T] * u;
922
914
  i[T] = x * A + b * I + f * P + _ * B;
923
915
  }
924
916
  return i;
925
917
  }
926
918
  }
927
- const cs = new Q();
928
- class ls extends Ve {
929
- interpolate_(e, t, n, s) {
930
- const i = super.interpolate_(e, t, n, s);
931
- return cs.fromArray(i).normalize().toArray(i), i;
919
+ const as = new Q();
920
+ class cs extends Be {
921
+ interpolate_(e, t, s, n) {
922
+ const i = super.interpolate_(e, t, s, n);
923
+ return as.fromArray(i).normalize().toArray(i), i;
932
924
  }
933
925
  }
934
926
  const L = {
@@ -947,15 +939,15 @@ const L = {
947
939
  5125: Uint32Array,
948
940
  5126: Float32Array
949
941
  }, Ae = {
950
- 9728: Fe,
942
+ 9728: je,
951
943
  9729: le,
952
- 9984: lt,
953
- 9985: ct,
954
- 9986: at,
955
- 9987: je
944
+ 9984: ct,
945
+ 9985: at,
946
+ 9986: rt,
947
+ 9987: ke
956
948
  }, Le = {
957
- 33071: ut,
958
- 33648: ht,
949
+ 33071: ht,
950
+ 33648: lt,
959
951
  10497: he
960
952
  }, ie = {
961
953
  SCALAR: 1,
@@ -981,55 +973,55 @@ const L = {
981
973
  translation: "position",
982
974
  rotation: "quaternion",
983
975
  weights: "morphTargetInfluences"
984
- }, hs = {
976
+ }, ls = {
985
977
  CUBICSPLINE: void 0,
986
978
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
987
979
  // keyframe track will be initialized with a default interpolation type, then modified.
988
980
  LINEAR: Ge,
989
- STEP: Lt
981
+ STEP: At
990
982
  }, oe = {
991
983
  OPAQUE: "OPAQUE",
992
984
  MASK: "MASK",
993
985
  BLEND: "BLEND"
994
986
  };
995
- function us(l) {
996
- return l.DefaultMaterial === void 0 && (l.DefaultMaterial = new He({
987
+ function hs(l) {
988
+ return l.DefaultMaterial === void 0 && (l.DefaultMaterial = new Fe({
997
989
  color: 16777215,
998
990
  emissive: 0,
999
991
  metalness: 1,
1000
992
  roughness: 1,
1001
993
  transparent: !1,
1002
994
  depthTest: !0,
1003
- side: Pt
995
+ side: Lt
1004
996
  })), l.DefaultMaterial;
1005
997
  }
1006
998
  function j(l, e, t) {
1007
- for (const n in t.extensions)
1008
- l[n] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[n] = t.extensions[n]);
999
+ for (const s in t.extensions)
1000
+ l[s] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[s] = t.extensions[s]);
1009
1001
  }
1010
1002
  function D(l, e) {
1011
1003
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(l.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
1012
1004
  }
1013
- function ds(l, e, t) {
1014
- let n = !1, s = !1, i = !1;
1015
- for (let c = 0, h = e.length; c < h; c++) {
1016
- const u = e[c];
1017
- if (u.POSITION !== void 0 && (n = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (i = !0), n && s && i) break;
1005
+ function us(l, e, t) {
1006
+ let s = !1, n = !1, i = !1;
1007
+ for (let c = 0, u = e.length; c < u; c++) {
1008
+ const h = e[c];
1009
+ if (h.POSITION !== void 0 && (s = !0), h.NORMAL !== void 0 && (n = !0), h.COLOR_0 !== void 0 && (i = !0), s && n && i) break;
1018
1010
  }
1019
- if (!n && !s && !i) return Promise.resolve(l);
1011
+ if (!s && !n && !i) return Promise.resolve(l);
1020
1012
  const o = [], r = [], a = [];
1021
- for (let c = 0, h = e.length; c < h; c++) {
1022
- const u = e[c];
1023
- if (n) {
1024
- const d = u.POSITION !== void 0 ? t.getDependency("accessor", u.POSITION) : l.attributes.position;
1013
+ for (let c = 0, u = e.length; c < u; c++) {
1014
+ const h = e[c];
1015
+ if (s) {
1016
+ const d = h.POSITION !== void 0 ? t.getDependency("accessor", h.POSITION) : l.attributes.position;
1025
1017
  o.push(d);
1026
1018
  }
1027
- if (s) {
1028
- const d = u.NORMAL !== void 0 ? t.getDependency("accessor", u.NORMAL) : l.attributes.normal;
1019
+ if (n) {
1020
+ const d = h.NORMAL !== void 0 ? t.getDependency("accessor", h.NORMAL) : l.attributes.normal;
1029
1021
  r.push(d);
1030
1022
  }
1031
1023
  if (i) {
1032
- const d = u.COLOR_0 !== void 0 ? t.getDependency("accessor", u.COLOR_0) : l.attributes.color;
1024
+ const d = h.COLOR_0 !== void 0 ? t.getDependency("accessor", h.COLOR_0) : l.attributes.color;
1033
1025
  a.push(d);
1034
1026
  }
1035
1027
  }
@@ -1038,37 +1030,37 @@ function ds(l, e, t) {
1038
1030
  Promise.all(r),
1039
1031
  Promise.all(a)
1040
1032
  ]).then(function(c) {
1041
- const h = c[0], u = c[1], d = c[2];
1042
- return n && (l.morphAttributes.position = h), s && (l.morphAttributes.normal = u), i && (l.morphAttributes.color = d), l.morphTargetsRelative = !0, l;
1033
+ const u = c[0], h = c[1], d = c[2];
1034
+ return s && (l.morphAttributes.position = u), n && (l.morphAttributes.normal = h), i && (l.morphAttributes.color = d), l.morphTargetsRelative = !0, l;
1043
1035
  });
1044
1036
  }
1045
- function ps(l, e) {
1037
+ function ds(l, e) {
1046
1038
  if (l.updateMorphTargets(), e.weights !== void 0)
1047
- for (let t = 0, n = e.weights.length; t < n; t++)
1039
+ for (let t = 0, s = e.weights.length; t < s; t++)
1048
1040
  l.morphTargetInfluences[t] = e.weights[t];
1049
1041
  if (e.extras && Array.isArray(e.extras.targetNames)) {
1050
1042
  const t = e.extras.targetNames;
1051
1043
  if (l.morphTargetInfluences.length === t.length) {
1052
1044
  l.morphTargetDictionary = {};
1053
- for (let n = 0, s = t.length; n < s; n++)
1054
- l.morphTargetDictionary[t[n]] = n;
1045
+ for (let s = 0, n = t.length; s < n; s++)
1046
+ l.morphTargetDictionary[t[s]] = s;
1055
1047
  } else
1056
1048
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
1057
1049
  }
1058
1050
  }
1059
- function fs(l) {
1051
+ function ps(l) {
1060
1052
  let e;
1061
1053
  const t = l.extensions && l.extensions[y.KHR_DRACO_MESH_COMPRESSION];
1062
1054
  if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + re(t.attributes) : e = l.indices + ":" + re(l.attributes) + ":" + l.mode, l.targets !== void 0)
1063
- for (let n = 0, s = l.targets.length; n < s; n++)
1064
- e += ":" + re(l.targets[n]);
1055
+ for (let s = 0, n = l.targets.length; s < n; s++)
1056
+ e += ":" + re(l.targets[s]);
1065
1057
  return e;
1066
1058
  }
1067
1059
  function re(l) {
1068
1060
  let e = "";
1069
1061
  const t = Object.keys(l).sort();
1070
- for (let n = 0, s = t.length; n < s; n++)
1071
- e += t[n] + ":" + l[t[n]] + ";";
1062
+ for (let s = 0, n = t.length; s < n; s++)
1063
+ e += t[s] + ":" + l[t[s]] + ";";
1072
1064
  return e;
1073
1065
  }
1074
1066
  function pe(l) {
@@ -1085,21 +1077,21 @@ function pe(l) {
1085
1077
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
1086
1078
  }
1087
1079
  }
1088
- function ms(l) {
1080
+ function fs(l) {
1089
1081
  return l.search(/\.jpe?g($|\?)/i) > 0 || l.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : l.search(/\.webp($|\?)/i) > 0 || l.search(/^data\:image\/webp/) === 0 ? "image/webp" : l.search(/\.ktx2($|\?)/i) > 0 || l.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
1090
1082
  }
1091
- const _s = new q();
1092
- class gs {
1083
+ const ms = new q();
1084
+ class _s {
1093
1085
  constructor(e = {}, t = {}) {
1094
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Ht(), 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 = {};
1095
- let n = !1, s = -1, i = !1, o = -1;
1086
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Ft(), 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 = {};
1087
+ let s = !1, n = -1, i = !1, o = -1;
1096
1088
  if (typeof navigator < "u") {
1097
1089
  const r = navigator.userAgent;
1098
- n = /^((?!chrome|android).)*safari/i.test(r) === !0;
1090
+ s = /^((?!chrome|android).)*safari/i.test(r) === !0;
1099
1091
  const a = r.match(/Version\/(\d+)/);
1100
- s = n && a ? parseInt(a[1], 10) : -1, i = r.indexOf("Firefox") > -1, o = i ? r.match(/Firefox\/([0-9]+)\./)[1] : -1;
1092
+ n = s && a ? parseInt(a[1], 10) : -1, i = r.indexOf("Firefox") > -1, o = i ? r.match(/Firefox\/([0-9]+)\./)[1] : -1;
1101
1093
  }
1102
- typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new nt(this.options.manager) : this.textureLoader = new it(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new ve(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1094
+ typeof createImageBitmap > "u" || s && n < 17 || i && o < 98 ? this.textureLoader = new st(this.options.manager) : this.textureLoader = new nt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Ie(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1103
1095
  }
1104
1096
  setExtensions(e) {
1105
1097
  this.extensions = e;
@@ -1108,28 +1100,28 @@ class gs {
1108
1100
  this.plugins = e;
1109
1101
  }
1110
1102
  parse(e, t) {
1111
- const n = this, s = this.json, i = this.extensions;
1103
+ const s = this, n = this.json, i = this.extensions;
1112
1104
  this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(o) {
1113
1105
  return o._markDefs && o._markDefs();
1114
1106
  }), Promise.all(this._invokeAll(function(o) {
1115
1107
  return o.beforeRoot && o.beforeRoot();
1116
1108
  })).then(function() {
1117
1109
  return Promise.all([
1118
- n.getDependencies("scene"),
1119
- n.getDependencies("animation"),
1120
- n.getDependencies("camera")
1110
+ s.getDependencies("scene"),
1111
+ s.getDependencies("animation"),
1112
+ s.getDependencies("camera")
1121
1113
  ]);
1122
1114
  }).then(function(o) {
1123
1115
  const r = {
1124
- scene: o[0][s.scene || 0],
1116
+ scene: o[0][n.scene || 0],
1125
1117
  scenes: o[0],
1126
1118
  animations: o[1],
1127
1119
  cameras: o[2],
1128
- asset: s.asset,
1129
- parser: n,
1120
+ asset: n.asset,
1121
+ parser: s,
1130
1122
  userData: {}
1131
1123
  };
1132
- return j(i, r, s), D(r, s), Promise.all(n._invokeAll(function(a) {
1124
+ return j(i, r, n), D(r, n), Promise.all(s._invokeAll(function(a) {
1133
1125
  return a.afterRoot && a.afterRoot(r);
1134
1126
  })).then(function() {
1135
1127
  for (const a of r.scenes)
@@ -1144,15 +1136,15 @@ class gs {
1144
1136
  * @private
1145
1137
  */
1146
1138
  _markDefs() {
1147
- const e = this.json.nodes || [], t = this.json.skins || [], n = this.json.meshes || [];
1148
- for (let s = 0, i = t.length; s < i; s++) {
1149
- const o = t[s].joints;
1139
+ const e = this.json.nodes || [], t = this.json.skins || [], s = this.json.meshes || [];
1140
+ for (let n = 0, i = t.length; n < i; n++) {
1141
+ const o = t[n].joints;
1150
1142
  for (let r = 0, a = o.length; r < a; r++)
1151
1143
  e[o[r]].isBone = !0;
1152
1144
  }
1153
- for (let s = 0, i = e.length; s < i; s++) {
1154
- const o = e[s];
1155
- o.mesh !== void 0 && (this._addNodeRef(this.meshCache, o.mesh), o.skin !== void 0 && (n[o.mesh].isSkinnedMesh = !0)), o.camera !== void 0 && this._addNodeRef(this.cameraCache, o.camera);
1145
+ for (let n = 0, i = e.length; n < i; n++) {
1146
+ const o = e[n];
1147
+ o.mesh !== void 0 && (this._addNodeRef(this.meshCache, o.mesh), o.skin !== void 0 && (s[o.mesh].isSkinnedMesh = !0)), o.camera !== void 0 && this._addNodeRef(this.cameraCache, o.camera);
1156
1148
  }
1157
1149
  }
1158
1150
  /**
@@ -1180,34 +1172,34 @@ class gs {
1180
1172
  * @param {Object} object
1181
1173
  * @return {Object}
1182
1174
  */
1183
- _getNodeRef(e, t, n) {
1184
- if (e.refs[t] <= 1) return n;
1185
- const s = n.clone(), i = (o, r) => {
1175
+ _getNodeRef(e, t, s) {
1176
+ if (e.refs[t] <= 1) return s;
1177
+ const n = s.clone(), i = (o, r) => {
1186
1178
  const a = this.associations.get(o);
1187
1179
  a != null && this.associations.set(r, a);
1188
- for (const [c, h] of o.children.entries())
1189
- i(h, r.children[c]);
1180
+ for (const [c, u] of o.children.entries())
1181
+ i(u, r.children[c]);
1190
1182
  };
1191
- return i(n, s), s.name += "_instance_" + e.uses[t]++, s;
1183
+ return i(s, n), n.name += "_instance_" + e.uses[t]++, n;
1192
1184
  }
1193
1185
  _invokeOne(e) {
1194
1186
  const t = Object.values(this.plugins);
1195
1187
  t.push(this);
1196
- for (let n = 0; n < t.length; n++) {
1197
- const s = e(t[n]);
1198
- if (s) return s;
1188
+ for (let s = 0; s < t.length; s++) {
1189
+ const n = e(t[s]);
1190
+ if (n) return n;
1199
1191
  }
1200
1192
  return null;
1201
1193
  }
1202
1194
  _invokeAll(e) {
1203
1195
  const t = Object.values(this.plugins);
1204
1196
  t.unshift(this);
1205
- const n = [];
1206
- for (let s = 0; s < t.length; s++) {
1207
- const i = e(t[s]);
1208
- i && n.push(i);
1197
+ const s = [];
1198
+ for (let n = 0; n < t.length; n++) {
1199
+ const i = e(t[n]);
1200
+ i && s.push(i);
1209
1201
  }
1210
- return n;
1202
+ return s;
1211
1203
  }
1212
1204
  /**
1213
1205
  * Requests the specified dependency asynchronously, with caching.
@@ -1218,65 +1210,65 @@ class gs {
1218
1210
  * @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
1219
1211
  */
1220
1212
  getDependency(e, t) {
1221
- const n = e + ":" + t;
1222
- let s = this.cache.get(n);
1223
- if (!s) {
1213
+ const s = e + ":" + t;
1214
+ let n = this.cache.get(s);
1215
+ if (!n) {
1224
1216
  switch (e) {
1225
1217
  case "scene":
1226
- s = this.loadScene(t);
1218
+ n = this.loadScene(t);
1227
1219
  break;
1228
1220
  case "node":
1229
- s = this._invokeOne(function(i) {
1221
+ n = this._invokeOne(function(i) {
1230
1222
  return i.loadNode && i.loadNode(t);
1231
1223
  });
1232
1224
  break;
1233
1225
  case "mesh":
1234
- s = this._invokeOne(function(i) {
1226
+ n = this._invokeOne(function(i) {
1235
1227
  return i.loadMesh && i.loadMesh(t);
1236
1228
  });
1237
1229
  break;
1238
1230
  case "accessor":
1239
- s = this.loadAccessor(t);
1231
+ n = this.loadAccessor(t);
1240
1232
  break;
1241
1233
  case "bufferView":
1242
- s = this._invokeOne(function(i) {
1234
+ n = this._invokeOne(function(i) {
1243
1235
  return i.loadBufferView && i.loadBufferView(t);
1244
1236
  });
1245
1237
  break;
1246
1238
  case "buffer":
1247
- s = this.loadBuffer(t);
1239
+ n = this.loadBuffer(t);
1248
1240
  break;
1249
1241
  case "material":
1250
- s = this._invokeOne(function(i) {
1242
+ n = this._invokeOne(function(i) {
1251
1243
  return i.loadMaterial && i.loadMaterial(t);
1252
1244
  });
1253
1245
  break;
1254
1246
  case "texture":
1255
- s = this._invokeOne(function(i) {
1247
+ n = this._invokeOne(function(i) {
1256
1248
  return i.loadTexture && i.loadTexture(t);
1257
1249
  });
1258
1250
  break;
1259
1251
  case "skin":
1260
- s = this.loadSkin(t);
1252
+ n = this.loadSkin(t);
1261
1253
  break;
1262
1254
  case "animation":
1263
- s = this._invokeOne(function(i) {
1255
+ n = this._invokeOne(function(i) {
1264
1256
  return i.loadAnimation && i.loadAnimation(t);
1265
1257
  });
1266
1258
  break;
1267
1259
  case "camera":
1268
- s = this.loadCamera(t);
1260
+ n = this.loadCamera(t);
1269
1261
  break;
1270
1262
  default:
1271
- if (s = this._invokeOne(function(i) {
1263
+ if (n = this._invokeOne(function(i) {
1272
1264
  return i != this && i.getDependency && i.getDependency(e, t);
1273
- }), !s)
1265
+ }), !n)
1274
1266
  throw new Error("Unknown type: " + e);
1275
1267
  break;
1276
1268
  }
1277
- this.cache.add(n, s);
1269
+ this.cache.add(s, n);
1278
1270
  }
1279
- return s;
1271
+ return n;
1280
1272
  }
1281
1273
  /**
1282
1274
  * Requests all dependencies of the specified type asynchronously, with caching.
@@ -1288,9 +1280,9 @@ class gs {
1288
1280
  getDependencies(e) {
1289
1281
  let t = this.cache.get(e);
1290
1282
  if (!t) {
1291
- const n = this, s = this.json[e + (e === "mesh" ? "es" : "s")] || [];
1292
- t = Promise.all(s.map(function(i, o) {
1293
- return n.getDependency(e, o);
1283
+ const s = this, n = this.json[e + (e === "mesh" ? "es" : "s")] || [];
1284
+ t = Promise.all(n.map(function(i, o) {
1285
+ return s.getDependency(e, o);
1294
1286
  })), this.cache.add(e, t);
1295
1287
  }
1296
1288
  return t;
@@ -1303,14 +1295,14 @@ class gs {
1303
1295
  * @return {Promise<ArrayBuffer>}
1304
1296
  */
1305
1297
  loadBuffer(e) {
1306
- const t = this.json.buffers[e], n = this.fileLoader;
1298
+ const t = this.json.buffers[e], s = this.fileLoader;
1307
1299
  if (t.type && t.type !== "arraybuffer")
1308
1300
  throw new Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
1309
1301
  if (t.uri === void 0 && e === 0)
1310
1302
  return Promise.resolve(this.extensions[y.KHR_BINARY_GLTF].body);
1311
- const s = this.options;
1303
+ const n = this.options;
1312
1304
  return new Promise(function(i, o) {
1313
- n.load(X.resolveURL(t.uri, s.path), i, void 0, function() {
1305
+ s.load(X.resolveURL(t.uri, n.path), i, void 0, function() {
1314
1306
  o(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
1315
1307
  });
1316
1308
  });
@@ -1324,9 +1316,9 @@ class gs {
1324
1316
  */
1325
1317
  loadBufferView(e) {
1326
1318
  const t = this.json.bufferViews[e];
1327
- return this.getDependency("buffer", t.buffer).then(function(n) {
1328
- const s = t.byteLength || 0, i = t.byteOffset || 0;
1329
- return n.slice(i, i + s);
1319
+ return this.getDependency("buffer", t.buffer).then(function(s) {
1320
+ const n = t.byteLength || 0, i = t.byteOffset || 0;
1321
+ return s.slice(i, i + n);
1330
1322
  });
1331
1323
  }
1332
1324
  /**
@@ -1337,23 +1329,23 @@ class gs {
1337
1329
  * @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
1338
1330
  */
1339
1331
  loadAccessor(e) {
1340
- const t = this, n = this.json, s = this.json.accessors[e];
1341
- if (s.bufferView === void 0 && s.sparse === void 0) {
1342
- const o = ie[s.type], r = K[s.componentType], a = s.normalized === !0, c = new r(s.count * o);
1332
+ const t = this, s = this.json, n = this.json.accessors[e];
1333
+ if (n.bufferView === void 0 && n.sparse === void 0) {
1334
+ const o = ie[n.type], r = K[n.componentType], a = n.normalized === !0, c = new r(n.count * o);
1343
1335
  return Promise.resolve(new te(c, o, a));
1344
1336
  }
1345
1337
  const i = [];
1346
- return s.bufferView !== void 0 ? i.push(this.getDependency("bufferView", s.bufferView)) : i.push(null), s.sparse !== void 0 && (i.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(i).then(function(o) {
1347
- const r = o[0], a = ie[s.type], c = K[s.componentType], h = c.BYTES_PER_ELEMENT, u = h * a, d = s.byteOffset || 0, p = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, m = s.normalized === !0;
1338
+ return n.bufferView !== void 0 ? i.push(this.getDependency("bufferView", n.bufferView)) : i.push(null), n.sparse !== void 0 && (i.push(this.getDependency("bufferView", n.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", n.sparse.values.bufferView))), Promise.all(i).then(function(o) {
1339
+ const r = o[0], a = ie[n.type], c = K[n.componentType], u = c.BYTES_PER_ELEMENT, h = u * a, d = n.byteOffset || 0, p = n.bufferView !== void 0 ? s.bufferViews[n.bufferView].byteStride : void 0, m = n.normalized === !0;
1348
1340
  let g, f;
1349
- if (p && p !== u) {
1350
- const _ = Math.floor(d / p), x = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + _ + ":" + s.count;
1341
+ if (p && p !== h) {
1342
+ const _ = Math.floor(d / p), x = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + _ + ":" + n.count;
1351
1343
  let b = t.cache.get(x);
1352
- b || (g = new c(r, _ * p, s.count * p / h), b = new ot(g, p / h), t.cache.add(x, b)), f = new rt(b, a, d % p / h, m);
1344
+ b || (g = new c(r, _ * p, n.count * p / u), b = new it(g, p / u), t.cache.add(x, b)), f = new ot(b, a, d % p / u, m);
1353
1345
  } else
1354
- r === null ? g = new c(s.count * a) : g = new c(r, d, s.count * a), f = new te(g, a, m);
1355
- if (s.sparse !== void 0) {
1356
- const _ = ie.SCALAR, x = K[s.sparse.indices.componentType], b = s.sparse.indices.byteOffset || 0, T = s.sparse.values.byteOffset || 0, A = new x(o[1], b, s.sparse.count * _), I = new c(o[2], T, s.sparse.count * a);
1346
+ r === null ? g = new c(n.count * a) : g = new c(r, d, n.count * a), f = new te(g, a, m);
1347
+ if (n.sparse !== void 0) {
1348
+ const _ = ie.SCALAR, x = K[n.sparse.indices.componentType], b = n.sparse.indices.byteOffset || 0, T = n.sparse.values.byteOffset || 0, A = new x(o[1], b, n.sparse.count * _), I = new c(o[2], T, n.sparse.count * a);
1357
1349
  r !== null && (f = new te(f.array.slice(), f.itemSize, f.normalized)), f.normalized = !1;
1358
1350
  for (let P = 0, B = A.length; P < B; P++) {
1359
1351
  const v = A[P];
@@ -1372,55 +1364,55 @@ class gs {
1372
1364
  * @return {Promise<THREE.Texture|null>}
1373
1365
  */
1374
1366
  loadTexture(e) {
1375
- const t = this.json, n = this.options, i = t.textures[e].source, o = t.images[i];
1367
+ const t = this.json, s = this.options, i = t.textures[e].source, o = t.images[i];
1376
1368
  let r = this.textureLoader;
1377
1369
  if (o.uri) {
1378
- const a = n.manager.getHandler(o.uri);
1370
+ const a = s.manager.getHandler(o.uri);
1379
1371
  a !== null && (r = a);
1380
1372
  }
1381
1373
  return this.loadTextureImage(e, i, r);
1382
1374
  }
1383
- loadTextureImage(e, t, n) {
1384
- const s = this, i = this.json, o = i.textures[e], r = i.images[t], a = (r.uri || r.bufferView) + ":" + o.sampler;
1375
+ loadTextureImage(e, t, s) {
1376
+ const n = this, i = this.json, o = i.textures[e], r = i.images[t], a = (r.uri || r.bufferView) + ":" + o.sampler;
1385
1377
  if (this.textureCache[a])
1386
1378
  return this.textureCache[a];
1387
- const c = this.loadImageSource(t, n).then(function(h) {
1388
- h.flipY = !1, h.name = o.name || r.name || "", h.name === "" && typeof r.uri == "string" && r.uri.startsWith("data:image/") === !1 && (h.name = r.uri);
1379
+ const c = this.loadImageSource(t, s).then(function(u) {
1380
+ u.flipY = !1, u.name = o.name || r.name || "", u.name === "" && typeof r.uri == "string" && r.uri.startsWith("data:image/") === !1 && (u.name = r.uri);
1389
1381
  const d = (i.samplers || {})[o.sampler] || {};
1390
- return h.magFilter = Ae[d.magFilter] || le, h.minFilter = Ae[d.minFilter] || je, h.wrapS = Le[d.wrapS] || he, h.wrapT = Le[d.wrapT] || he, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Fe && h.minFilter !== le, s.associations.set(h, { textures: e }), h;
1382
+ return u.magFilter = Ae[d.magFilter] || le, u.minFilter = Ae[d.minFilter] || ke, u.wrapS = Le[d.wrapS] || he, u.wrapT = Le[d.wrapT] || he, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== je && u.minFilter !== le, n.associations.set(u, { textures: e }), u;
1391
1383
  }).catch(function() {
1392
1384
  return null;
1393
1385
  });
1394
1386
  return this.textureCache[a] = c, c;
1395
1387
  }
1396
1388
  loadImageSource(e, t) {
1397
- const n = this, s = this.json, i = this.options;
1389
+ const s = this, n = this.json, i = this.options;
1398
1390
  if (this.sourceCache[e] !== void 0)
1399
- return this.sourceCache[e].then((u) => u.clone());
1400
- const o = s.images[e], r = self.URL || self.webkitURL;
1391
+ return this.sourceCache[e].then((h) => h.clone());
1392
+ const o = n.images[e], r = self.URL || self.webkitURL;
1401
1393
  let a = o.uri || "", c = !1;
1402
1394
  if (o.bufferView !== void 0)
1403
- a = n.getDependency("bufferView", o.bufferView).then(function(u) {
1395
+ a = s.getDependency("bufferView", o.bufferView).then(function(h) {
1404
1396
  c = !0;
1405
- const d = new Blob([u], { type: o.mimeType });
1397
+ const d = new Blob([h], { type: o.mimeType });
1406
1398
  return a = r.createObjectURL(d), a;
1407
1399
  });
1408
1400
  else if (o.uri === void 0)
1409
1401
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
1410
- const h = Promise.resolve(a).then(function(u) {
1402
+ const u = Promise.resolve(a).then(function(h) {
1411
1403
  return new Promise(function(d, p) {
1412
1404
  let m = d;
1413
1405
  t.isImageBitmapLoader === !0 && (m = function(g) {
1414
1406
  const f = new _e(g);
1415
1407
  f.needsUpdate = !0, d(f);
1416
- }), t.load(X.resolveURL(u, i.path), m, void 0, p);
1408
+ }), t.load(X.resolveURL(h, i.path), m, void 0, p);
1417
1409
  });
1418
- }).then(function(u) {
1419
- return c === !0 && r.revokeObjectURL(a), D(u, o), u.userData.mimeType = o.mimeType || ms(o.uri), u;
1420
- }).catch(function(u) {
1421
- throw console.error("THREE.GLTFLoader: Couldn't load texture", a), u;
1410
+ }).then(function(h) {
1411
+ return c === !0 && r.revokeObjectURL(a), D(h, o), h.userData.mimeType = o.mimeType || fs(o.uri), h;
1412
+ }).catch(function(h) {
1413
+ throw console.error("THREE.GLTFLoader: Couldn't load texture", a), h;
1422
1414
  });
1423
- return this.sourceCache[e] = h, h;
1415
+ return this.sourceCache[e] = u, u;
1424
1416
  }
1425
1417
  /**
1426
1418
  * Asynchronously assigns a texture to the given material parameters.
@@ -1432,18 +1424,18 @@ class gs {
1432
1424
  * @param {string} [colorSpace]
1433
1425
  * @return {Promise<Texture>}
1434
1426
  */
1435
- assignTexture(e, t, n, s) {
1427
+ assignTexture(e, t, s, n) {
1436
1428
  const i = this;
1437
- return this.getDependency("texture", n.index).then(function(o) {
1429
+ return this.getDependency("texture", s.index).then(function(o) {
1438
1430
  if (!o) return null;
1439
- if (n.texCoord !== void 0 && n.texCoord > 0 && (o = o.clone(), o.channel = n.texCoord), i.extensions[y.KHR_TEXTURE_TRANSFORM]) {
1440
- const r = n.extensions !== void 0 ? n.extensions[y.KHR_TEXTURE_TRANSFORM] : void 0;
1431
+ if (s.texCoord !== void 0 && s.texCoord > 0 && (o = o.clone(), o.channel = s.texCoord), i.extensions[y.KHR_TEXTURE_TRANSFORM]) {
1432
+ const r = s.extensions !== void 0 ? s.extensions[y.KHR_TEXTURE_TRANSFORM] : void 0;
1441
1433
  if (r) {
1442
1434
  const a = i.associations.get(o);
1443
1435
  o = i.extensions[y.KHR_TEXTURE_TRANSFORM].extendTexture(o, r), i.associations.set(o, a);
1444
1436
  }
1445
1437
  }
1446
- return s !== void 0 && (o.colorSpace = s), e[t] = o, o;
1438
+ return n !== void 0 && (o.colorSpace = n), e[t] = o, o;
1447
1439
  });
1448
1440
  }
1449
1441
  /**
@@ -1458,27 +1450,27 @@ class gs {
1458
1450
  */
1459
1451
  assignFinalMaterial(e) {
1460
1452
  const t = e.geometry;
1461
- let n = e.material;
1462
- const s = t.attributes.tangent === void 0, i = t.attributes.color !== void 0, o = t.attributes.normal === void 0;
1453
+ let s = e.material;
1454
+ const n = t.attributes.tangent === void 0, i = t.attributes.color !== void 0, o = t.attributes.normal === void 0;
1463
1455
  if (e.isPoints) {
1464
- const r = "PointsMaterial:" + n.uuid;
1456
+ const r = "PointsMaterial:" + s.uuid;
1465
1457
  let a = this.cache.get(r);
1466
- a || (a = new dt(), se.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, a.sizeAttenuation = !1, this.cache.add(r, a)), n = a;
1458
+ a || (a = new ut(), se.prototype.copy.call(a, s), a.color.copy(s.color), a.map = s.map, a.sizeAttenuation = !1, this.cache.add(r, a)), s = a;
1467
1459
  } else if (e.isLine) {
1468
- const r = "LineBasicMaterial:" + n.uuid;
1460
+ const r = "LineBasicMaterial:" + s.uuid;
1469
1461
  let a = this.cache.get(r);
1470
- a || (a = new pt(), se.prototype.copy.call(a, n), a.color.copy(n.color), a.map = n.map, this.cache.add(r, a)), n = a;
1462
+ a || (a = new dt(), se.prototype.copy.call(a, s), a.color.copy(s.color), a.map = s.map, this.cache.add(r, a)), s = a;
1471
1463
  }
1472
- if (s || i || o) {
1473
- let r = "ClonedMaterial:" + n.uuid + ":";
1474
- s && (r += "derivative-tangents:"), i && (r += "vertex-colors:"), o && (r += "flat-shading:");
1464
+ if (n || i || o) {
1465
+ let r = "ClonedMaterial:" + s.uuid + ":";
1466
+ n && (r += "derivative-tangents:"), i && (r += "vertex-colors:"), o && (r += "flat-shading:");
1475
1467
  let a = this.cache.get(r);
1476
- a || (a = n.clone(), i && (a.vertexColors = !0), o && (a.flatShading = !0), s && (a.normalScale && (a.normalScale.y *= -1), a.clearcoatNormalScale && (a.clearcoatNormalScale.y *= -1)), this.cache.add(r, a), this.associations.set(a, this.associations.get(n))), n = a;
1468
+ a || (a = s.clone(), i && (a.vertexColors = !0), o && (a.flatShading = !0), n && (a.normalScale && (a.normalScale.y *= -1), a.clearcoatNormalScale && (a.clearcoatNormalScale.y *= -1)), this.cache.add(r, a), this.associations.set(a, this.associations.get(s))), s = a;
1477
1469
  }
1478
- e.material = n;
1470
+ e.material = s;
1479
1471
  }
1480
1472
  getMaterialType() {
1481
- return He;
1473
+ return Fe;
1482
1474
  }
1483
1475
  /**
1484
1476
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1488,37 +1480,37 @@ class gs {
1488
1480
  * @return {Promise<Material>}
1489
1481
  */
1490
1482
  loadMaterial(e) {
1491
- const t = this, n = this.json, s = this.extensions, i = n.materials[e];
1483
+ const t = this, s = this.json, n = this.extensions, i = s.materials[e];
1492
1484
  let o;
1493
1485
  const r = {}, a = i.extensions || {}, c = [];
1494
1486
  if (a[y.KHR_MATERIALS_UNLIT]) {
1495
- const u = s[y.KHR_MATERIALS_UNLIT];
1496
- o = u.getMaterialType(), c.push(u.extendParams(r, i, t));
1487
+ const h = n[y.KHR_MATERIALS_UNLIT];
1488
+ o = h.getMaterialType(), c.push(h.extendParams(r, i, t));
1497
1489
  } else {
1498
- const u = i.pbrMetallicRoughness || {};
1499
- if (r.color = new H(1, 1, 1), r.opacity = 1, Array.isArray(u.baseColorFactor)) {
1500
- const d = u.baseColorFactor;
1490
+ const h = i.pbrMetallicRoughness || {};
1491
+ if (r.color = new H(1, 1, 1), r.opacity = 1, Array.isArray(h.baseColorFactor)) {
1492
+ const d = h.baseColorFactor;
1501
1493
  r.color.setRGB(d[0], d[1], d[2], C), r.opacity = d[3];
1502
1494
  }
1503
- u.baseColorTexture !== void 0 && c.push(t.assignTexture(r, "map", u.baseColorTexture, Y)), r.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, r.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(r, "metalnessMap", u.metallicRoughnessTexture)), c.push(t.assignTexture(r, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(d) {
1495
+ h.baseColorTexture !== void 0 && c.push(t.assignTexture(r, "map", h.baseColorTexture, Y)), r.metalness = h.metallicFactor !== void 0 ? h.metallicFactor : 1, r.roughness = h.roughnessFactor !== void 0 ? h.roughnessFactor : 1, h.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(r, "metalnessMap", h.metallicRoughnessTexture)), c.push(t.assignTexture(r, "roughnessMap", h.metallicRoughnessTexture))), o = this._invokeOne(function(d) {
1504
1496
  return d.getMaterialType && d.getMaterialType(e);
1505
1497
  }), c.push(Promise.all(this._invokeAll(function(d) {
1506
1498
  return d.extendMaterialParams && d.extendMaterialParams(e, r);
1507
1499
  })));
1508
1500
  }
1509
- i.doubleSided === !0 && (r.side = ft);
1510
- const h = i.alphaMode || oe.OPAQUE;
1511
- if (h === oe.BLEND ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, h === oe.MASK && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== z && (c.push(t.assignTexture(r, "normalMap", i.normalTexture)), r.normalScale = new S(1, 1), i.normalTexture.scale !== void 0)) {
1512
- const u = i.normalTexture.scale;
1513
- r.normalScale.set(u, u);
1501
+ i.doubleSided === !0 && (r.side = pt);
1502
+ const u = i.alphaMode || oe.OPAQUE;
1503
+ if (u === oe.BLEND ? (r.transparent = !0, r.depthWrite = !1) : (r.transparent = !1, u === oe.MASK && (r.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== z && (c.push(t.assignTexture(r, "normalMap", i.normalTexture)), r.normalScale = new S(1, 1), i.normalTexture.scale !== void 0)) {
1504
+ const h = i.normalTexture.scale;
1505
+ r.normalScale.set(h, h);
1514
1506
  }
1515
1507
  if (i.occlusionTexture !== void 0 && o !== z && (c.push(t.assignTexture(r, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (r.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== z) {
1516
- const u = i.emissiveFactor;
1517
- r.emissive = new H().setRGB(u[0], u[1], u[2], C);
1508
+ const h = i.emissiveFactor;
1509
+ r.emissive = new H().setRGB(h[0], h[1], h[2], C);
1518
1510
  }
1519
1511
  return i.emissiveTexture !== void 0 && o !== z && c.push(t.assignTexture(r, "emissiveMap", i.emissiveTexture, Y)), Promise.all(c).then(function() {
1520
- const u = new o(r);
1521
- return i.name && (u.name = i.name), D(u, i), t.associations.set(u, { materials: e }), i.extensions && j(s, u, i), u;
1512
+ const h = new o(r);
1513
+ return i.name && (h.name = i.name), D(h, i), t.associations.set(h, { materials: e }), i.extensions && j(n, h, i), h;
1522
1514
  });
1523
1515
  }
1524
1516
  /**
@@ -1529,7 +1521,7 @@ class gs {
1529
1521
  * @return {string}
1530
1522
  */
1531
1523
  createUniqueName(e) {
1532
- const t = mt.sanitizeNodeName(e || "");
1524
+ const t = ft.sanitizeNodeName(e || "");
1533
1525
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
1534
1526
  }
1535
1527
  /**
@@ -1542,20 +1534,20 @@ class gs {
1542
1534
  * @return {Promise<Array<BufferGeometry>>}
1543
1535
  */
1544
1536
  loadGeometries(e) {
1545
- const t = this, n = this.extensions, s = this.primitiveCache;
1537
+ const t = this, s = this.extensions, n = this.primitiveCache;
1546
1538
  function i(r) {
1547
- return n[y.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, t).then(function(a) {
1539
+ return s[y.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r, t).then(function(a) {
1548
1540
  return Pe(a, r, t);
1549
1541
  });
1550
1542
  }
1551
1543
  const o = [];
1552
1544
  for (let r = 0, a = e.length; r < a; r++) {
1553
- const c = e[r], h = fs(c), u = s[h];
1554
- if (u)
1555
- o.push(u.promise);
1545
+ const c = e[r], u = ps(c), h = n[u];
1546
+ if (h)
1547
+ o.push(h.promise);
1556
1548
  else {
1557
1549
  let d;
1558
- c.extensions && c.extensions[y.KHR_DRACO_MESH_COMPRESSION] ? d = i(c) : d = Pe(new _t(), c, t), s[h] = { primitive: c, promise: d }, o.push(d);
1550
+ c.extensions && c.extensions[y.KHR_DRACO_MESH_COMPRESSION] ? d = i(c) : d = Pe(new mt(), c, t), n[u] = { primitive: c, promise: d }, o.push(d);
1559
1551
  }
1560
1552
  }
1561
1553
  return Promise.all(o);
@@ -1568,42 +1560,42 @@ class gs {
1568
1560
  * @return {Promise<Group|Mesh|SkinnedMesh|Line|Points>}
1569
1561
  */
1570
1562
  loadMesh(e) {
1571
- const t = this, n = this.json, s = this.extensions, i = n.meshes[e], o = i.primitives, r = [];
1563
+ const t = this, s = this.json, n = this.extensions, i = s.meshes[e], o = i.primitives, r = [];
1572
1564
  for (let a = 0, c = o.length; a < c; a++) {
1573
- const h = o[a].material === void 0 ? us(this.cache) : this.getDependency("material", o[a].material);
1574
- r.push(h);
1565
+ const u = o[a].material === void 0 ? hs(this.cache) : this.getDependency("material", o[a].material);
1566
+ r.push(u);
1575
1567
  }
1576
1568
  return r.push(t.loadGeometries(o)), Promise.all(r).then(function(a) {
1577
- const c = a.slice(0, a.length - 1), h = a[a.length - 1], u = [];
1578
- for (let p = 0, m = h.length; p < m; p++) {
1579
- const g = h[p], f = o[p];
1569
+ const c = a.slice(0, a.length - 1), u = a[a.length - 1], h = [];
1570
+ for (let p = 0, m = u.length; p < m; p++) {
1571
+ const g = u[p], f = o[p];
1580
1572
  let _;
1581
1573
  const x = c[p];
1582
1574
  if (f.mode === L.TRIANGLES || f.mode === L.TRIANGLE_STRIP || f.mode === L.TRIANGLE_FAN || f.mode === void 0)
1583
- _ = i.isSkinnedMesh === !0 ? new gt(g, x) : new Tt(g, x), _.isSkinnedMesh === !0 && _.normalizeSkinWeights(), f.mode === L.TRIANGLE_STRIP ? _.geometry = we(_.geometry, Ie) : f.mode === L.TRIANGLE_FAN && (_.geometry = we(_.geometry, ce));
1575
+ _ = i.isSkinnedMesh === !0 ? new _t(g, x) : new gt(g, x), _.isSkinnedMesh === !0 && _.normalizeSkinWeights(), f.mode === L.TRIANGLE_STRIP ? _.geometry = we(_.geometry, Ce) : f.mode === L.TRIANGLE_FAN && (_.geometry = we(_.geometry, ce));
1584
1576
  else if (f.mode === L.LINES)
1585
- _ = new yt(g, x);
1577
+ _ = new Tt(g, x);
1586
1578
  else if (f.mode === L.LINE_STRIP)
1587
- _ = new xt(g, x);
1579
+ _ = new yt(g, x);
1588
1580
  else if (f.mode === L.LINE_LOOP)
1589
- _ = new Et(g, x);
1581
+ _ = new xt(g, x);
1590
1582
  else if (f.mode === L.POINTS)
1591
- _ = new bt(g, x);
1583
+ _ = new Et(g, x);
1592
1584
  else
1593
1585
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + f.mode);
1594
- Object.keys(_.geometry.morphAttributes).length > 0 && ps(_, i), _.name = t.createUniqueName(i.name || "mesh_" + e), D(_, i), f.extensions && j(s, _, f), t.assignFinalMaterial(_), u.push(_);
1586
+ Object.keys(_.geometry.morphAttributes).length > 0 && ds(_, i), _.name = t.createUniqueName(i.name || "mesh_" + e), D(_, i), f.extensions && j(n, _, f), t.assignFinalMaterial(_), h.push(_);
1595
1587
  }
1596
- for (let p = 0, m = u.length; p < m; p++)
1597
- t.associations.set(u[p], {
1588
+ for (let p = 0, m = h.length; p < m; p++)
1589
+ t.associations.set(h[p], {
1598
1590
  meshes: e,
1599
1591
  primitives: p
1600
1592
  });
1601
- if (u.length === 1)
1602
- return i.extensions && j(s, u[0], i), u[0];
1593
+ if (h.length === 1)
1594
+ return i.extensions && j(n, h[0], i), h[0];
1603
1595
  const d = new ne();
1604
- i.extensions && j(s, d, i), t.associations.set(d, { meshes: e });
1605
- for (let p = 0, m = u.length; p < m; p++)
1606
- d.add(u[p]);
1596
+ i.extensions && j(n, d, i), t.associations.set(d, { meshes: e });
1597
+ for (let p = 0, m = h.length; p < m; p++)
1598
+ d.add(h[p]);
1607
1599
  return d;
1608
1600
  });
1609
1601
  }
@@ -1616,12 +1608,12 @@ class gs {
1616
1608
  */
1617
1609
  loadCamera(e) {
1618
1610
  let t;
1619
- const n = this.json.cameras[e], s = n[n.type];
1620
- if (!s) {
1611
+ const s = this.json.cameras[e], n = s[s.type];
1612
+ if (!n) {
1621
1613
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1622
1614
  return;
1623
1615
  }
1624
- return n.type === "perspective" ? t = new Rt(Ue.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new Mt(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), D(t, n), Promise.resolve(t);
1616
+ return s.type === "perspective" ? t = new bt(He.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : s.type === "orthographic" && (t = new Rt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), s.name && (t.name = this.createUniqueName(s.name)), D(t, s), Promise.resolve(t);
1625
1617
  }
1626
1618
  /**
1627
1619
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1631,21 +1623,21 @@ class gs {
1631
1623
  * @return {Promise<Skeleton>}
1632
1624
  */
1633
1625
  loadSkin(e) {
1634
- const t = this.json.skins[e], n = [];
1635
- for (let s = 0, i = t.joints.length; s < i; s++)
1636
- n.push(this._loadNodeShallow(t.joints[s]));
1637
- return t.inverseBindMatrices !== void 0 ? n.push(this.getDependency("accessor", t.inverseBindMatrices)) : n.push(null), Promise.all(n).then(function(s) {
1638
- const i = s.pop(), o = s, r = [], a = [];
1639
- for (let c = 0, h = o.length; c < h; c++) {
1640
- const u = o[c];
1641
- if (u) {
1642
- r.push(u);
1626
+ const t = this.json.skins[e], s = [];
1627
+ for (let n = 0, i = t.joints.length; n < i; n++)
1628
+ s.push(this._loadNodeShallow(t.joints[n]));
1629
+ return t.inverseBindMatrices !== void 0 ? s.push(this.getDependency("accessor", t.inverseBindMatrices)) : s.push(null), Promise.all(s).then(function(n) {
1630
+ const i = n.pop(), o = n, r = [], a = [];
1631
+ for (let c = 0, u = o.length; c < u; c++) {
1632
+ const h = o[c];
1633
+ if (h) {
1634
+ r.push(h);
1643
1635
  const d = new q();
1644
1636
  i !== null && d.fromArray(i.array, c * 16), a.push(d);
1645
1637
  } else
1646
1638
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[c]);
1647
1639
  }
1648
- return new wt(r, a);
1640
+ return new Mt(r, a);
1649
1641
  });
1650
1642
  }
1651
1643
  /**
@@ -1656,39 +1648,39 @@ class gs {
1656
1648
  * @return {Promise<AnimationClip>}
1657
1649
  */
1658
1650
  loadAnimation(e) {
1659
- const t = this.json, n = this, s = t.animations[e], i = s.name ? s.name : "animation_" + e, o = [], r = [], a = [], c = [], h = [];
1660
- for (let u = 0, d = s.channels.length; u < d; u++) {
1661
- const p = s.channels[u], m = s.samplers[p.sampler], g = p.target, f = g.node, _ = s.parameters !== void 0 ? s.parameters[m.input] : m.input, x = s.parameters !== void 0 ? s.parameters[m.output] : m.output;
1662
- g.node !== void 0 && (o.push(this.getDependency("node", f)), r.push(this.getDependency("accessor", _)), a.push(this.getDependency("accessor", x)), c.push(m), h.push(g));
1651
+ const t = this.json, s = this, n = t.animations[e], i = n.name ? n.name : "animation_" + e, o = [], r = [], a = [], c = [], u = [];
1652
+ for (let h = 0, d = n.channels.length; h < d; h++) {
1653
+ const p = n.channels[h], m = n.samplers[p.sampler], g = p.target, f = g.node, _ = n.parameters !== void 0 ? n.parameters[m.input] : m.input, x = n.parameters !== void 0 ? n.parameters[m.output] : m.output;
1654
+ g.node !== void 0 && (o.push(this.getDependency("node", f)), r.push(this.getDependency("accessor", _)), a.push(this.getDependency("accessor", x)), c.push(m), u.push(g));
1663
1655
  }
1664
1656
  return Promise.all([
1665
1657
  Promise.all(o),
1666
1658
  Promise.all(r),
1667
1659
  Promise.all(a),
1668
1660
  Promise.all(c),
1669
- Promise.all(h)
1670
- ]).then(function(u) {
1671
- const d = u[0], p = u[1], m = u[2], g = u[3], f = u[4], _ = [];
1661
+ Promise.all(u)
1662
+ ]).then(function(h) {
1663
+ const d = h[0], p = h[1], m = h[2], g = h[3], f = h[4], _ = [];
1672
1664
  for (let x = 0, b = d.length; x < b; x++) {
1673
1665
  const T = d[x], A = p[x], I = m[x], P = g[x], B = f[x];
1674
1666
  if (T === void 0) continue;
1675
1667
  T.updateMatrix && T.updateMatrix();
1676
- const v = n._createAnimationTracks(T, A, I, P, B);
1668
+ const v = s._createAnimationTracks(T, A, I, P, B);
1677
1669
  if (v)
1678
1670
  for (let J = 0; J < v.length; J++)
1679
1671
  _.push(v[J]);
1680
1672
  }
1681
- return new St(i, void 0, _);
1673
+ return new wt(i, void 0, _);
1682
1674
  });
1683
1675
  }
1684
1676
  createNodeMesh(e) {
1685
- const t = this.json, n = this, s = t.nodes[e];
1686
- return s.mesh === void 0 ? null : n.getDependency("mesh", s.mesh).then(function(i) {
1687
- const o = n._getNodeRef(n.meshCache, s.mesh, i);
1688
- return s.weights !== void 0 && o.traverse(function(r) {
1677
+ const t = this.json, s = this, n = t.nodes[e];
1678
+ return n.mesh === void 0 ? null : s.getDependency("mesh", n.mesh).then(function(i) {
1679
+ const o = s._getNodeRef(s.meshCache, n.mesh, i);
1680
+ return n.weights !== void 0 && o.traverse(function(r) {
1689
1681
  if (r.isMesh)
1690
- for (let a = 0, c = s.weights.length; a < c; a++)
1691
- r.morphTargetInfluences[a] = s.weights[a];
1682
+ for (let a = 0, c = n.weights.length; a < c; a++)
1683
+ r.morphTargetInfluences[a] = n.weights[a];
1692
1684
  }), o;
1693
1685
  });
1694
1686
  }
@@ -1700,56 +1692,56 @@ class gs {
1700
1692
  * @return {Promise<Object3D>}
1701
1693
  */
1702
1694
  loadNode(e) {
1703
- const t = this.json, n = this, s = t.nodes[e], i = n._loadNodeShallow(e), o = [], r = s.children || [];
1704
- for (let c = 0, h = r.length; c < h; c++)
1705
- o.push(n.getDependency("node", r[c]));
1706
- const a = s.skin === void 0 ? Promise.resolve(null) : n.getDependency("skin", s.skin);
1695
+ const t = this.json, s = this, n = t.nodes[e], i = s._loadNodeShallow(e), o = [], r = n.children || [];
1696
+ for (let c = 0, u = r.length; c < u; c++)
1697
+ o.push(s.getDependency("node", r[c]));
1698
+ const a = n.skin === void 0 ? Promise.resolve(null) : s.getDependency("skin", n.skin);
1707
1699
  return Promise.all([
1708
1700
  i,
1709
1701
  Promise.all(o),
1710
1702
  a
1711
1703
  ]).then(function(c) {
1712
- const h = c[0], u = c[1], d = c[2];
1713
- d !== null && h.traverse(function(p) {
1714
- p.isSkinnedMesh && p.bind(d, _s);
1704
+ const u = c[0], h = c[1], d = c[2];
1705
+ d !== null && u.traverse(function(p) {
1706
+ p.isSkinnedMesh && p.bind(d, ms);
1715
1707
  });
1716
- for (let p = 0, m = u.length; p < m; p++)
1717
- h.add(u[p]);
1718
- return h;
1708
+ for (let p = 0, m = h.length; p < m; p++)
1709
+ u.add(h[p]);
1710
+ return u;
1719
1711
  });
1720
1712
  }
1721
1713
  // ._loadNodeShallow() parses a single node.
1722
1714
  // skin and child nodes are created and added in .loadNode() (no '_' prefix).
1723
1715
  _loadNodeShallow(e) {
1724
- const t = this.json, n = this.extensions, s = this;
1716
+ const t = this.json, s = this.extensions, n = this;
1725
1717
  if (this.nodeCache[e] !== void 0)
1726
1718
  return this.nodeCache[e];
1727
- const i = t.nodes[e], o = i.name ? s.createUniqueName(i.name) : "", r = [], a = s._invokeOne(function(c) {
1719
+ const i = t.nodes[e], o = i.name ? n.createUniqueName(i.name) : "", r = [], a = n._invokeOne(function(c) {
1728
1720
  return c.createNodeMesh && c.createNodeMesh(e);
1729
1721
  });
1730
- return a && r.push(a), i.camera !== void 0 && r.push(s.getDependency("camera", i.camera).then(function(c) {
1731
- return s._getNodeRef(s.cameraCache, i.camera, c);
1732
- })), s._invokeAll(function(c) {
1722
+ return a && r.push(a), i.camera !== void 0 && r.push(n.getDependency("camera", i.camera).then(function(c) {
1723
+ return n._getNodeRef(n.cameraCache, i.camera, c);
1724
+ })), n._invokeAll(function(c) {
1733
1725
  return c.createNodeAttachment && c.createNodeAttachment(e);
1734
1726
  }).forEach(function(c) {
1735
1727
  r.push(c);
1736
1728
  }), this.nodeCache[e] = Promise.all(r).then(function(c) {
1737
- let h;
1738
- if (i.isBone === !0 ? h = new At() : c.length > 1 ? h = new ne() : c.length === 1 ? h = c[0] : h = new ke(), h !== c[0])
1739
- for (let u = 0, d = c.length; u < d; u++)
1740
- h.add(c[u]);
1741
- if (i.name && (h.userData.name = i.name, h.name = o), D(h, i), i.extensions && j(n, h, i), i.matrix !== void 0) {
1742
- const u = new q();
1743
- u.fromArray(i.matrix), h.applyMatrix4(u);
1729
+ let u;
1730
+ if (i.isBone === !0 ? u = new St() : c.length > 1 ? u = new ne() : c.length === 1 ? u = c[0] : u = new ve(), u !== c[0])
1731
+ for (let h = 0, d = c.length; h < d; h++)
1732
+ u.add(c[h]);
1733
+ if (i.name && (u.userData.name = i.name, u.name = o), D(u, i), i.extensions && j(s, u, i), i.matrix !== void 0) {
1734
+ const h = new q();
1735
+ h.fromArray(i.matrix), u.applyMatrix4(h);
1744
1736
  } else
1745
- 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);
1746
- if (!s.associations.has(h))
1747
- s.associations.set(h, {});
1748
- else if (i.mesh !== void 0 && s.meshCache.refs[i.mesh] > 1) {
1749
- const u = s.associations.get(h);
1750
- s.associations.set(h, { ...u });
1737
+ i.translation !== void 0 && u.position.fromArray(i.translation), i.rotation !== void 0 && u.quaternion.fromArray(i.rotation), i.scale !== void 0 && u.scale.fromArray(i.scale);
1738
+ if (!n.associations.has(u))
1739
+ n.associations.set(u, {});
1740
+ else if (i.mesh !== void 0 && n.meshCache.refs[i.mesh] > 1) {
1741
+ const h = n.associations.get(u);
1742
+ n.associations.set(u, { ...h });
1751
1743
  }
1752
- return s.associations.get(h).nodes = e, h;
1744
+ return n.associations.get(u).nodes = e, u;
1753
1745
  }), this.nodeCache[e];
1754
1746
  }
1755
1747
  /**
@@ -1760,27 +1752,27 @@ class gs {
1760
1752
  * @return {Promise<Group>}
1761
1753
  */
1762
1754
  loadScene(e) {
1763
- const t = this.extensions, n = this.json.scenes[e], s = this, i = new ne();
1764
- n.name && (i.name = s.createUniqueName(n.name)), D(i, n), n.extensions && j(t, i, n);
1765
- const o = n.nodes || [], r = [];
1755
+ const t = this.extensions, s = this.json.scenes[e], n = this, i = new ne();
1756
+ s.name && (i.name = n.createUniqueName(s.name)), D(i, s), s.extensions && j(t, i, s);
1757
+ const o = s.nodes || [], r = [];
1766
1758
  for (let a = 0, c = o.length; a < c; a++)
1767
- r.push(s.getDependency("node", o[a]));
1759
+ r.push(n.getDependency("node", o[a]));
1768
1760
  return Promise.all(r).then(function(a) {
1769
- for (let h = 0, u = a.length; h < u; h++)
1770
- i.add(a[h]);
1771
- const c = (h) => {
1772
- const u = /* @__PURE__ */ new Map();
1773
- for (const [d, p] of s.associations)
1774
- (d instanceof se || d instanceof _e) && u.set(d, p);
1775
- return h.traverse((d) => {
1776
- const p = s.associations.get(d);
1777
- p != null && u.set(d, p);
1778
- }), u;
1761
+ for (let u = 0, h = a.length; u < h; u++)
1762
+ i.add(a[u]);
1763
+ const c = (u) => {
1764
+ const h = /* @__PURE__ */ new Map();
1765
+ for (const [d, p] of n.associations)
1766
+ (d instanceof se || d instanceof _e) && h.set(d, p);
1767
+ return u.traverse((d) => {
1768
+ const p = n.associations.get(d);
1769
+ p != null && h.set(d, p);
1770
+ }), h;
1779
1771
  };
1780
- return s.associations = c(i), i;
1772
+ return n.associations = c(i), i;
1781
1773
  });
1782
1774
  }
1783
- _createAnimationTracks(e, t, n, s, i) {
1775
+ _createAnimationTracks(e, t, s, n, i) {
1784
1776
  const o = [], r = e.name ? e.name : e.uuid, a = [];
1785
1777
  k[i.path] === k.weights ? e.traverse(function(d) {
1786
1778
  d.morphTargetInfluences && a.push(d.name ? d.name : d.uuid);
@@ -1798,7 +1790,7 @@ class gs {
1798
1790
  c = ge;
1799
1791
  break;
1800
1792
  default:
1801
- switch (n.itemSize) {
1793
+ switch (s.itemSize) {
1802
1794
  case 1:
1803
1795
  c = Te;
1804
1796
  break;
@@ -1810,46 +1802,46 @@ class gs {
1810
1802
  }
1811
1803
  break;
1812
1804
  }
1813
- const h = s.interpolation !== void 0 ? hs[s.interpolation] : Ge, u = this._getArrayFromAccessor(n);
1805
+ const u = n.interpolation !== void 0 ? ls[n.interpolation] : Ge, h = this._getArrayFromAccessor(s);
1814
1806
  for (let d = 0, p = a.length; d < p; d++) {
1815
1807
  const m = new c(
1816
1808
  a[d] + "." + k[i.path],
1817
1809
  t.array,
1818
- u,
1819
- h
1810
+ h,
1811
+ u
1820
1812
  );
1821
- s.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(m), o.push(m);
1813
+ n.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(m), o.push(m);
1822
1814
  }
1823
1815
  return o;
1824
1816
  }
1825
1817
  _getArrayFromAccessor(e) {
1826
1818
  let t = e.array;
1827
1819
  if (e.normalized) {
1828
- const n = pe(t.constructor), s = new Float32Array(t.length);
1820
+ const s = pe(t.constructor), n = new Float32Array(t.length);
1829
1821
  for (let i = 0, o = t.length; i < o; i++)
1830
- s[i] = t[i] * n;
1831
- t = s;
1822
+ n[i] = t[i] * s;
1823
+ t = n;
1832
1824
  }
1833
1825
  return t;
1834
1826
  }
1835
1827
  _createCubicSplineTrackInterpolant(e) {
1836
- e.createInterpolant = function(n) {
1837
- const s = this instanceof ye ? ls : Ve;
1838
- return new s(this.times, this.values, this.getValueSize() / 3, n);
1828
+ e.createInterpolant = function(s) {
1829
+ const n = this instanceof ye ? cs : Be;
1830
+ return new n(this.times, this.values, this.getValueSize() / 3, s);
1839
1831
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1840
1832
  }
1841
1833
  }
1842
- function Ts(l, e, t) {
1843
- const n = e.attributes, s = new Ot();
1844
- if (n.POSITION !== void 0) {
1845
- const r = t.json.accessors[n.POSITION], a = r.min, c = r.max;
1834
+ function gs(l, e, t) {
1835
+ const s = e.attributes, n = new Nt();
1836
+ if (s.POSITION !== void 0) {
1837
+ const r = t.json.accessors[s.POSITION], a = r.min, c = r.max;
1846
1838
  if (a !== void 0 && c !== void 0) {
1847
- if (s.set(
1839
+ if (n.set(
1848
1840
  new M(a[0], a[1], a[2]),
1849
1841
  new M(c[0], c[1], c[2])
1850
1842
  ), r.normalized) {
1851
- const h = pe(K[r.componentType]);
1852
- s.min.multiplyScalar(h), s.max.multiplyScalar(h);
1843
+ const u = pe(K[r.componentType]);
1844
+ n.min.multiplyScalar(u), n.max.multiplyScalar(u);
1853
1845
  }
1854
1846
  } else {
1855
1847
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -1860,10 +1852,10 @@ function Ts(l, e, t) {
1860
1852
  const i = e.targets;
1861
1853
  if (i !== void 0) {
1862
1854
  const r = new M(), a = new M();
1863
- for (let c = 0, h = i.length; c < h; c++) {
1864
- const u = i[c];
1865
- if (u.POSITION !== void 0) {
1866
- const d = t.json.accessors[u.POSITION], p = d.min, m = d.max;
1855
+ for (let c = 0, u = i.length; c < u; c++) {
1856
+ const h = i[c];
1857
+ if (h.POSITION !== void 0) {
1858
+ const d = t.json.accessors[h.POSITION], p = d.min, m = d.max;
1867
1859
  if (p !== void 0 && m !== void 0) {
1868
1860
  if (a.setX(Math.max(Math.abs(p[0]), Math.abs(m[0]))), a.setY(Math.max(Math.abs(p[1]), Math.abs(m[1]))), a.setZ(Math.max(Math.abs(p[2]), Math.abs(m[2]))), d.normalized) {
1869
1861
  const g = pe(K[d.componentType]);
@@ -1874,34 +1866,34 @@ function Ts(l, e, t) {
1874
1866
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
1875
1867
  }
1876
1868
  }
1877
- s.expandByVector(r);
1869
+ n.expandByVector(r);
1878
1870
  }
1879
- l.boundingBox = s;
1880
- const o = new Dt();
1881
- s.getCenter(o.center), o.radius = s.min.distanceTo(s.max) / 2, l.boundingSphere = o;
1871
+ l.boundingBox = n;
1872
+ const o = new Ot();
1873
+ n.getCenter(o.center), o.radius = n.min.distanceTo(n.max) / 2, l.boundingSphere = o;
1882
1874
  }
1883
1875
  function Pe(l, e, t) {
1884
- const n = e.attributes, s = [];
1876
+ const s = e.attributes, n = [];
1885
1877
  function i(o, r) {
1886
1878
  return t.getDependency("accessor", o).then(function(a) {
1887
1879
  l.setAttribute(r, a);
1888
1880
  });
1889
1881
  }
1890
- for (const o in n) {
1882
+ for (const o in s) {
1891
1883
  const r = de[o] || o.toLowerCase();
1892
- r in l.attributes || s.push(i(n[o], r));
1884
+ r in l.attributes || n.push(i(s[o], r));
1893
1885
  }
1894
1886
  if (e.indices !== void 0 && !l.index) {
1895
1887
  const o = t.getDependency("accessor", e.indices).then(function(r) {
1896
1888
  l.setIndex(r);
1897
1889
  });
1898
- s.push(o);
1890
+ n.push(o);
1899
1891
  }
1900
- return xe.workingColorSpace !== C && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${xe.workingColorSpace}" not supported.`), D(l, e), Ts(l, e, t), Promise.all(s).then(function() {
1901
- return e.targets !== void 0 ? ds(l, e.targets, t) : l;
1892
+ return xe.workingColorSpace !== C && "COLOR_0" in s && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${xe.workingColorSpace}" not supported.`), D(l, e), gs(l, e, t), Promise.all(n).then(function() {
1893
+ return e.targets !== void 0 ? us(l, e.targets, t) : l;
1902
1894
  });
1903
1895
  }
1904
- const Ne = { type: "change" }, me = { type: "start" }, ze = { type: "end" }, W = new It(), Oe = new vt(), ys = Math.cos(70 * Ue.DEG2RAD), R = new M(), w = 2 * Math.PI, E = {
1896
+ const Ne = { type: "change" }, me = { type: "start" }, Ve = { type: "end" }, W = new Ct(), Oe = new It(), Ts = Math.cos(70 * He.DEG2RAD), R = new M(), w = 2 * Math.PI, E = {
1905
1897
  NONE: -1,
1906
1898
  ROTATE: 0,
1907
1899
  DOLLY: 1,
@@ -1911,7 +1903,7 @@ const Ne = { type: "change" }, me = { type: "start" }, ze = { type: "end" }, W =
1911
1903
  TOUCH_DOLLY_PAN: 5,
1912
1904
  TOUCH_DOLLY_ROTATE: 6
1913
1905
  }, ae = 1e-6;
1914
- class xs extends Ct {
1906
+ class ys extends Dt {
1915
1907
  /**
1916
1908
  * Constructs a new controls instance.
1917
1909
  *
@@ -1919,7 +1911,7 @@ class xs extends Ct {
1919
1911
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
1920
1912
  */
1921
1913
  constructor(e, t = null) {
1922
- super(e, t), this.state = E.NONE, this.target = new M(), this.cursor = new M(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: G.ROTATE, MIDDLE: G.DOLLY, RIGHT: G.PAN }, this.touches = { ONE: U.ROTATE, TWO: U.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new M(), this._lastQuaternion = new Q(), this._lastTargetPosition = new M(), this._quat = new Q().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ee(), this._sphericalDelta = new Ee(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new S(), this._rotateEnd = new S(), this._rotateDelta = new S(), this._panStart = new S(), this._panEnd = new S(), this._panDelta = new S(), this._dollyStart = new S(), this._dollyEnd = new S(), this._dollyDelta = new S(), this._dollyDirection = new M(), this._mouse = new S(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = bs.bind(this), this._onPointerDown = Es.bind(this), this._onPointerUp = Rs.bind(this), this._onContextMenu = Ns.bind(this), this._onMouseWheel = Ss.bind(this), this._onKeyDown = As.bind(this), this._onTouchStart = Ls.bind(this), this._onTouchMove = Ps.bind(this), this._onMouseDown = Ms.bind(this), this._onMouseMove = ws.bind(this), this._interceptControlDown = Os.bind(this), this._interceptControlUp = Ds.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
1914
+ super(e, t), this.state = E.NONE, this.target = new M(), this.cursor = new M(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: U.ROTATE, MIDDLE: U.DOLLY, RIGHT: U.PAN }, this.touches = { ONE: G.ROTATE, TWO: G.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new M(), this._lastQuaternion = new Q(), this._lastTargetPosition = new M(), this._quat = new Q().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ee(), this._sphericalDelta = new Ee(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new S(), this._rotateEnd = new S(), this._rotateDelta = new S(), this._panStart = new S(), this._panEnd = new S(), this._panDelta = new S(), this._dollyStart = new S(), this._dollyEnd = new S(), this._dollyDelta = new S(), this._dollyDirection = new M(), this._mouse = new S(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Es.bind(this), this._onPointerDown = xs.bind(this), this._onPointerUp = bs.bind(this), this._onContextMenu = Ps.bind(this), this._onMouseWheel = ws.bind(this), this._onKeyDown = Ss.bind(this), this._onTouchStart = As.bind(this), this._onTouchMove = Ls.bind(this), this._onMouseDown = Rs.bind(this), this._onMouseMove = Ms.bind(this), this._interceptControlDown = Ns.bind(this), this._interceptControlUp = Os.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
1923
1915
  }
1924
1916
  connect(e) {
1925
1917
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -1985,8 +1977,8 @@ class xs extends Ct {
1985
1977
  update(e = null) {
1986
1978
  const t = this.object.position;
1987
1979
  R.copy(t).sub(this.target), R.applyQuaternion(this._quat), this._spherical.setFromVector3(R), this.autoRotate && this.state === E.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
1988
- let n = this.minAzimuthAngle, s = this.maxAzimuthAngle;
1989
- isFinite(n) && isFinite(s) && (n < -Math.PI ? n += w : n > Math.PI && (n -= w), s < -Math.PI ? s += w : s > Math.PI && (s -= w), n <= s ? this._spherical.theta = Math.max(n, Math.min(s, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (n + s) / 2 ? Math.max(n, this._spherical.theta) : Math.min(s, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
1980
+ let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
1981
+ isFinite(s) && isFinite(n) && (s < -Math.PI ? s += w : s > Math.PI && (s -= w), n < -Math.PI ? n += w : n > Math.PI && (n -= w), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
1990
1982
  let i = !1;
1991
1983
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
1992
1984
  this._spherical.radius = this._clampDistance(this._spherical.radius);
@@ -2010,7 +2002,7 @@ class xs extends Ct {
2010
2002
  c.unproject(this.object), this.object.position.sub(c).add(r), this.object.updateMatrixWorld(), o = R.length();
2011
2003
  } else
2012
2004
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
2013
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (W.origin.copy(this.object.position), W.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(W.direction)) < ys ? this.object.lookAt(this.target) : (Oe.setFromNormalAndCoplanarPoint(this.object.up, this.target), W.intersectPlane(Oe, this.target))));
2005
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (W.origin.copy(this.object.position), W.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(W.direction)) < Ts ? this.object.lookAt(this.target) : (Oe.setFromNormalAndCoplanarPoint(this.object.up, this.target), W.intersectPlane(Oe, this.target))));
2014
2006
  } else if (this.object.isOrthographicCamera) {
2015
2007
  const o = this.object.zoom;
2016
2008
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
@@ -2038,13 +2030,13 @@ class xs extends Ct {
2038
2030
  }
2039
2031
  // deltaX and deltaY are in pixels; right and down are positive
2040
2032
  _pan(e, t) {
2041
- const n = this.domElement;
2033
+ const s = this.domElement;
2042
2034
  if (this.object.isPerspectiveCamera) {
2043
- const s = this.object.position;
2044
- R.copy(s).sub(this.target);
2035
+ const n = this.object.position;
2036
+ R.copy(n).sub(this.target);
2045
2037
  let i = R.length();
2046
- i *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * i / n.clientHeight, this.object.matrix), this._panUp(2 * t * i / n.clientHeight, this.object.matrix);
2047
- } else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / n.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / n.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
2038
+ i *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * i / s.clientHeight, this.object.matrix), this._panUp(2 * t * i / s.clientHeight, this.object.matrix);
2039
+ } else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / s.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
2048
2040
  }
2049
2041
  _dollyOut(e) {
2050
2042
  this.object.isPerspectiveCamera || this.object.isOrthographicCamera ? this._scale /= e : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), this.enableZoom = !1);
@@ -2056,8 +2048,8 @@ class xs extends Ct {
2056
2048
  if (!this.zoomToCursor)
2057
2049
  return;
2058
2050
  this._performCursorZoom = !0;
2059
- const n = this.domElement.getBoundingClientRect(), s = e - n.left, i = t - n.top, o = n.width, r = n.height;
2060
- this._mouse.x = s / o * 2 - 1, this._mouse.y = -(i / r) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
2051
+ const s = this.domElement.getBoundingClientRect(), n = e - s.left, i = t - s.top, o = s.width, r = s.height;
2052
+ this._mouse.x = n / o * 2 - 1, this._mouse.y = -(i / r) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
2061
2053
  }
2062
2054
  _clampDistance(e) {
2063
2055
  return Math.max(this.minDistance, Math.min(this.maxDistance, e));
@@ -2110,20 +2102,20 @@ class xs extends Ct {
2110
2102
  if (this._pointers.length === 1)
2111
2103
  this._rotateStart.set(e.pageX, e.pageY);
2112
2104
  else {
2113
- const t = this._getSecondPointerPosition(e), n = 0.5 * (e.pageX + t.x), s = 0.5 * (e.pageY + t.y);
2114
- this._rotateStart.set(n, s);
2105
+ const t = this._getSecondPointerPosition(e), s = 0.5 * (e.pageX + t.x), n = 0.5 * (e.pageY + t.y);
2106
+ this._rotateStart.set(s, n);
2115
2107
  }
2116
2108
  }
2117
2109
  _handleTouchStartPan(e) {
2118
2110
  if (this._pointers.length === 1)
2119
2111
  this._panStart.set(e.pageX, e.pageY);
2120
2112
  else {
2121
- const t = this._getSecondPointerPosition(e), n = 0.5 * (e.pageX + t.x), s = 0.5 * (e.pageY + t.y);
2122
- this._panStart.set(n, s);
2113
+ const t = this._getSecondPointerPosition(e), s = 0.5 * (e.pageX + t.x), n = 0.5 * (e.pageY + t.y);
2114
+ this._panStart.set(s, n);
2123
2115
  }
2124
2116
  }
2125
2117
  _handleTouchStartDolly(e) {
2126
- const t = this._getSecondPointerPosition(e), n = e.pageX - t.x, s = e.pageY - t.y, i = Math.sqrt(n * n + s * s);
2118
+ const t = this._getSecondPointerPosition(e), s = e.pageX - t.x, n = e.pageY - t.y, i = Math.sqrt(s * s + n * n);
2127
2119
  this._dollyStart.set(0, i);
2128
2120
  }
2129
2121
  _handleTouchStartDollyPan(e) {
@@ -2136,8 +2128,8 @@ class xs extends Ct {
2136
2128
  if (this._pointers.length == 1)
2137
2129
  this._rotateEnd.set(e.pageX, e.pageY);
2138
2130
  else {
2139
- const n = this._getSecondPointerPosition(e), s = 0.5 * (e.pageX + n.x), i = 0.5 * (e.pageY + n.y);
2140
- this._rotateEnd.set(s, i);
2131
+ const s = this._getSecondPointerPosition(e), n = 0.5 * (e.pageX + s.x), i = 0.5 * (e.pageY + s.y);
2132
+ this._rotateEnd.set(n, i);
2141
2133
  }
2142
2134
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
2143
2135
  const t = this.domElement;
@@ -2147,13 +2139,13 @@ class xs extends Ct {
2147
2139
  if (this._pointers.length === 1)
2148
2140
  this._panEnd.set(e.pageX, e.pageY);
2149
2141
  else {
2150
- const t = this._getSecondPointerPosition(e), n = 0.5 * (e.pageX + t.x), s = 0.5 * (e.pageY + t.y);
2151
- this._panEnd.set(n, s);
2142
+ const t = this._getSecondPointerPosition(e), s = 0.5 * (e.pageX + t.x), n = 0.5 * (e.pageY + t.y);
2143
+ this._panEnd.set(s, n);
2152
2144
  }
2153
2145
  this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
2154
2146
  }
2155
2147
  _handleTouchMoveDolly(e) {
2156
- const t = this._getSecondPointerPosition(e), n = e.pageX - t.x, s = e.pageY - t.y, i = Math.sqrt(n * n + s * s);
2148
+ const t = this._getSecondPointerPosition(e), s = e.pageX - t.x, n = e.pageY - t.y, i = Math.sqrt(s * s + n * n);
2157
2149
  this._dollyEnd.set(0, i), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
2158
2150
  const o = (e.pageX + t.x) * 0.5, r = (e.pageY + t.y) * 0.5;
2159
2151
  this._updateZoomParameters(o, r);
@@ -2191,32 +2183,32 @@ class xs extends Ct {
2191
2183
  }
2192
2184
  //
2193
2185
  _customWheelEvent(e) {
2194
- const t = e.deltaMode, n = {
2186
+ const t = e.deltaMode, s = {
2195
2187
  clientX: e.clientX,
2196
2188
  clientY: e.clientY,
2197
2189
  deltaY: e.deltaY
2198
2190
  };
2199
2191
  switch (t) {
2200
2192
  case 1:
2201
- n.deltaY *= 16;
2193
+ s.deltaY *= 16;
2202
2194
  break;
2203
2195
  case 2:
2204
- n.deltaY *= 100;
2196
+ s.deltaY *= 100;
2205
2197
  break;
2206
2198
  }
2207
- return e.ctrlKey && !this._controlActive && (n.deltaY *= 10), n;
2199
+ return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
2208
2200
  }
2209
2201
  }
2210
- function Es(l) {
2202
+ function xs(l) {
2211
2203
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(l.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(l) && (this._addPointer(l), l.pointerType === "touch" ? this._onTouchStart(l) : this._onMouseDown(l)));
2212
2204
  }
2213
- function bs(l) {
2205
+ function Es(l) {
2214
2206
  this.enabled !== !1 && (l.pointerType === "touch" ? this._onTouchMove(l) : this._onMouseMove(l));
2215
2207
  }
2216
- function Rs(l) {
2208
+ function bs(l) {
2217
2209
  switch (this._removePointer(l), this._pointers.length) {
2218
2210
  case 0:
2219
- this.domElement.releasePointerCapture(l.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(ze), this.state = E.NONE;
2211
+ this.domElement.releasePointerCapture(l.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ve), this.state = E.NONE;
2220
2212
  break;
2221
2213
  case 1:
2222
2214
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -2224,7 +2216,7 @@ function Rs(l) {
2224
2216
  break;
2225
2217
  }
2226
2218
  }
2227
- function Ms(l) {
2219
+ function Rs(l) {
2228
2220
  let e;
2229
2221
  switch (l.button) {
2230
2222
  case 0:
@@ -2240,11 +2232,11 @@ function Ms(l) {
2240
2232
  e = -1;
2241
2233
  }
2242
2234
  switch (e) {
2243
- case G.DOLLY:
2235
+ case U.DOLLY:
2244
2236
  if (this.enableZoom === !1) return;
2245
2237
  this._handleMouseDownDolly(l), this.state = E.DOLLY;
2246
2238
  break;
2247
- case G.ROTATE:
2239
+ case U.ROTATE:
2248
2240
  if (l.ctrlKey || l.metaKey || l.shiftKey) {
2249
2241
  if (this.enablePan === !1) return;
2250
2242
  this._handleMouseDownPan(l), this.state = E.PAN;
@@ -2253,7 +2245,7 @@ function Ms(l) {
2253
2245
  this._handleMouseDownRotate(l), this.state = E.ROTATE;
2254
2246
  }
2255
2247
  break;
2256
- case G.PAN:
2248
+ case U.PAN:
2257
2249
  if (l.ctrlKey || l.metaKey || l.shiftKey) {
2258
2250
  if (this.enableRotate === !1) return;
2259
2251
  this._handleMouseDownRotate(l), this.state = E.ROTATE;
@@ -2267,7 +2259,7 @@ function Ms(l) {
2267
2259
  }
2268
2260
  this.state !== E.NONE && this.dispatchEvent(me);
2269
2261
  }
2270
- function ws(l) {
2262
+ function Ms(l) {
2271
2263
  switch (this.state) {
2272
2264
  case E.ROTATE:
2273
2265
  if (this.enableRotate === !1) return;
@@ -2283,21 +2275,21 @@ function ws(l) {
2283
2275
  break;
2284
2276
  }
2285
2277
  }
2286
- function Ss(l) {
2287
- this.enabled === !1 || this.enableZoom === !1 || this.state !== E.NONE || (l.preventDefault(), this.dispatchEvent(me), this._handleMouseWheel(this._customWheelEvent(l)), this.dispatchEvent(ze));
2278
+ function ws(l) {
2279
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== E.NONE || (l.preventDefault(), this.dispatchEvent(me), this._handleMouseWheel(this._customWheelEvent(l)), this.dispatchEvent(Ve));
2288
2280
  }
2289
- function As(l) {
2281
+ function Ss(l) {
2290
2282
  this.enabled !== !1 && this._handleKeyDown(l);
2291
2283
  }
2292
- function Ls(l) {
2284
+ function As(l) {
2293
2285
  switch (this._trackPointer(l), this._pointers.length) {
2294
2286
  case 1:
2295
2287
  switch (this.touches.ONE) {
2296
- case U.ROTATE:
2288
+ case G.ROTATE:
2297
2289
  if (this.enableRotate === !1) return;
2298
2290
  this._handleTouchStartRotate(l), this.state = E.TOUCH_ROTATE;
2299
2291
  break;
2300
- case U.PAN:
2292
+ case G.PAN:
2301
2293
  if (this.enablePan === !1) return;
2302
2294
  this._handleTouchStartPan(l), this.state = E.TOUCH_PAN;
2303
2295
  break;
@@ -2307,11 +2299,11 @@ function Ls(l) {
2307
2299
  break;
2308
2300
  case 2:
2309
2301
  switch (this.touches.TWO) {
2310
- case U.DOLLY_PAN:
2302
+ case G.DOLLY_PAN:
2311
2303
  if (this.enableZoom === !1 && this.enablePan === !1) return;
2312
2304
  this._handleTouchStartDollyPan(l), this.state = E.TOUCH_DOLLY_PAN;
2313
2305
  break;
2314
- case U.DOLLY_ROTATE:
2306
+ case G.DOLLY_ROTATE:
2315
2307
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
2316
2308
  this._handleTouchStartDollyRotate(l), this.state = E.TOUCH_DOLLY_ROTATE;
2317
2309
  break;
@@ -2324,7 +2316,7 @@ function Ls(l) {
2324
2316
  }
2325
2317
  this.state !== E.NONE && this.dispatchEvent(me);
2326
2318
  }
2327
- function Ps(l) {
2319
+ function Ls(l) {
2328
2320
  switch (this._trackPointer(l), this.state) {
2329
2321
  case E.TOUCH_ROTATE:
2330
2322
  if (this.enableRotate === !1) return;
@@ -2346,21 +2338,21 @@ function Ps(l) {
2346
2338
  this.state = E.NONE;
2347
2339
  }
2348
2340
  }
2349
- function Ns(l) {
2341
+ function Ps(l) {
2350
2342
  this.enabled !== !1 && l.preventDefault();
2351
2343
  }
2352
- function Os(l) {
2344
+ function Ns(l) {
2353
2345
  l.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2354
2346
  }
2355
- function Ds(l) {
2347
+ function Os(l) {
2356
2348
  l.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
2357
2349
  }
2358
- const Cs = (l, e) => {
2350
+ const Ds = (l, e) => {
2359
2351
  const t = l.__vccOpts || l;
2360
- for (const [n, s] of e)
2361
- t[n] = s;
2352
+ for (const [s, n] of e)
2353
+ t[s] = n;
2362
2354
  return t;
2363
- }, Is = {
2355
+ }, Cs = {
2364
2356
  __name: "ThreeFrame",
2365
2357
  props: {
2366
2358
  animation: {
@@ -2386,25 +2378,25 @@ const Cs = (l, e) => {
2386
2378
  },
2387
2379
  emits: ["init", "animate"],
2388
2380
  setup(l, { emit: e }) {
2389
- const t = e, n = l, s = "dom" + Xe().uid, i = Ye(s);
2390
- let o = null, r = null, a = null, c = null, h = null;
2391
- const u = () => {
2381
+ const t = e, s = l, n = "dom" + ze().uid, i = Xe(n);
2382
+ let o = null, r = null, a = null, c = null, u = null;
2383
+ const h = () => {
2392
2384
  t("animate", {
2393
2385
  GLTFLoader: ue,
2394
2386
  THREE: N,
2395
2387
  VRMExpressionPresetName: Re,
2396
2388
  VRMHumanBoneName: be,
2397
2389
  camera: a,
2398
- controls: h,
2390
+ controls: u,
2399
2391
  renderer: c,
2400
2392
  scene: r
2401
- }), o != null && (cancelAnimationFrame(o), o = null), n.animation && (o = requestAnimationFrame(u)), c.render(r, a);
2393
+ }), o != null && (cancelAnimationFrame(o), o = null), s.animation && (o = requestAnimationFrame(h)), c.render(r, a);
2402
2394
  }, d = () => {
2403
- o != null && (cancelAnimationFrame(o), o = null), o = requestAnimationFrame(u);
2395
+ o != null && (cancelAnimationFrame(o), o = null), o = requestAnimationFrame(h);
2404
2396
  }, p = () => {
2405
2397
  o != null && (cancelAnimationFrame(o), o = null);
2406
2398
  };
2407
- F(() => n.animation, (g) => {
2399
+ F(() => s.animation, (g) => {
2408
2400
  g == !0 ? d() : p();
2409
2401
  });
2410
2402
  const m = () => {
@@ -2417,15 +2409,15 @@ const Cs = (l, e) => {
2417
2409
  f / _,
2418
2410
  0.1,
2419
2411
  1e3
2420
- ), a.position.set(0, 1.25, 1), n.useOrbitControls && (h = new xs(a, g), h.screenSpacePanning = !0, h.target.set(0, 1.25, 0), h.update()), n.useGridHelper) {
2412
+ ), a.position.set(0, 1.25, 1), s.useOrbitControls && (u = new ys(a, g), u.screenSpacePanning = !0, u.target.set(0, 1.25, 0), u.update()), s.useGridHelper) {
2421
2413
  const T = new N.GridHelper(10, 10);
2422
2414
  r.add(T), T.visible = !0;
2423
2415
  }
2424
- if (n.useAxesHelper) {
2416
+ if (s.useAxesHelper) {
2425
2417
  const T = new N.AxesHelper(5);
2426
2418
  r.add(T);
2427
2419
  }
2428
- if (n.useDefaultLight) {
2420
+ if (s.useDefaultLight) {
2429
2421
  const T = new N.DirectionalLight(16777215);
2430
2422
  T.intensity = 3, T.position.set(1, 1, 1).normalize(), r.add(T);
2431
2423
  const A = new N.AmbientLight(4210752);
@@ -2437,7 +2429,7 @@ const Cs = (l, e) => {
2437
2429
  VRMExpressionPresetName: Re,
2438
2430
  VRMHumanBoneName: be,
2439
2431
  camera: a,
2440
- controls: h,
2432
+ controls: u,
2441
2433
  renderer: c,
2442
2434
  scene: r
2443
2435
  });
@@ -2454,11 +2446,11 @@ const Cs = (l, e) => {
2454
2446
  };
2455
2447
  window.addEventListener("resize", g), m();
2456
2448
  }), (g, f) => (fe(), De("div", {
2457
- ref: s,
2449
+ ref: n,
2458
2450
  class: "box"
2459
2451
  }));
2460
2452
  }
2461
- }, Ks = /* @__PURE__ */ Cs(Is, [["__scopeId", "data-v-e91ca0ac"]]), vs = {
2453
+ }, Us = /* @__PURE__ */ Ds(Cs, [["__scopeId", "data-v-e91ca0ac"]]), Is = {
2462
2454
  __name: "VroidExpression",
2463
2455
  props: {
2464
2456
  command: {
@@ -2477,27 +2469,27 @@ const Cs = (l, e) => {
2477
2469
  },
2478
2470
  emits: ["loading", "loaded"],
2479
2471
  setup(l, { emit: e }) {
2480
- const t = Ce("axios"), n = e, s = l, i = async (r) => {
2481
- if (!r)
2472
+ const t = e, s = l, n = async (o) => {
2473
+ if (!o)
2482
2474
  return;
2483
- n("loading", s.name, s.command);
2484
- const c = await new Ke().loadExpression(t, r);
2485
- let h = !1;
2486
- c && (h = !0), n("loaded", s.name, s.command, h, c);
2487
- }, o = (r) => {
2488
- n("loading", s.name, s.command);
2489
- let a = !1;
2490
- r && (a = !0), n("loaded", s.name, s.command, a, r);
2475
+ t("loading", s.name, s.command);
2476
+ const a = await new Ue().fetchExpression(o);
2477
+ let c = !1;
2478
+ a && (c = !0), t("loaded", s.name, s.command, c, a);
2479
+ }, i = (o) => {
2480
+ t("loading", s.name, s.command);
2481
+ let r = !1;
2482
+ o && (r = !0), t("loaded", s.name, s.command, r, o);
2491
2483
  };
2492
2484
  return $(async () => {
2493
- s.data != null ? o(s.data) : i(s.url);
2485
+ s.data != null ? i(s.data) : n(s.url);
2494
2486
  }), F(() => s.data, () => {
2495
- s.data != null && o(s.data);
2487
+ s.data != null && i(s.data);
2496
2488
  }), F(() => s.url, () => {
2497
- s.url && i(s.url);
2498
- }), (r, a) => null;
2489
+ s.url && n(s.url);
2490
+ }), (o, r) => null;
2499
2491
  }
2500
- }, ks = {
2492
+ }, vs = {
2501
2493
  __name: "VroidPose",
2502
2494
  props: {
2503
2495
  command: {
@@ -2516,27 +2508,27 @@ const Cs = (l, e) => {
2516
2508
  },
2517
2509
  emits: ["loading", "loaded"],
2518
2510
  setup(l, { emit: e }) {
2519
- const t = Ce("axios"), n = e, s = l, i = async (r) => {
2520
- if (!r)
2511
+ const t = e, s = l, n = async (o) => {
2512
+ if (!o)
2521
2513
  return;
2522
- n("loading", s.name, s.command);
2523
- const c = await new Ke().loadPose(t, r);
2524
- let h = !1;
2525
- c && (h = !0), n("loaded", s.name, s.command, h, c);
2526
- }, o = (r) => {
2527
- n("loading", s.name, s.command);
2528
- let a = !1;
2529
- r && (a = !0), n("loaded", s.name, s.command, a, r);
2514
+ t("loading", s.name, s.command);
2515
+ const a = await new Ue().fetchPose(o);
2516
+ let c = !1;
2517
+ a && (c = !0), t("loaded", s.name, s.command, c, a);
2518
+ }, i = (o) => {
2519
+ t("loading", s.name, s.command);
2520
+ let r = !1;
2521
+ o && (r = !0), t("loaded", s.name, s.command, r, o);
2530
2522
  };
2531
2523
  return $(async () => {
2532
- s.data != null ? o(s.data) : i(s.url);
2524
+ s.data != null ? i(s.data) : n(s.url);
2533
2525
  }), F(() => s.data, () => {
2534
- s.data != null && o(s.data);
2526
+ s.data != null && i(s.data);
2535
2527
  }), F(() => s.url, () => {
2536
- s.url && i(s.url);
2537
- }), (r, a) => null;
2528
+ s.url && n(s.url);
2529
+ }), (o, r) => null;
2538
2530
  }
2539
- }, js = {
2531
+ }, ks = {
2540
2532
  __name: "VroidVrm",
2541
2533
  props: {
2542
2534
  url: {
@@ -2555,33 +2547,33 @@ const Cs = (l, e) => {
2555
2547
  },
2556
2548
  emits: ["loading", "loaded"],
2557
2549
  setup(l, { emit: e }) {
2558
- const t = e, n = l, s = async (r) => {
2550
+ const t = e, s = l, n = async (r) => {
2559
2551
  const a = new ue();
2560
- return a.register((c) => new kt(c)), await a.loadAsync(r).then((c) => {
2561
- const h = c.userData.vrm;
2562
- return jt.rotateVRM0(h), h;
2552
+ return a.register((c) => new vt(c)), await a.loadAsync(r).then((c) => {
2553
+ const u = c.userData.vrm;
2554
+ return kt.rotateVRM0(u), u;
2563
2555
  });
2564
2556
  }, i = async (r) => {
2565
2557
  if (!r)
2566
2558
  return;
2567
- t("loading", n.name, n.command);
2568
- const a = await s(r);
2559
+ t("loading", s.name, s.command);
2560
+ const a = await n(r);
2569
2561
  let c = !1;
2570
- a && (c = !0), t("loaded", n.name, n.command, c, a);
2562
+ a && (c = !0), t("loaded", s.name, s.command, c, a);
2571
2563
  }, o = (r) => {
2572
- t("loading", n.name, n.command);
2564
+ t("loading", s.name, s.command);
2573
2565
  let a = !1;
2574
- r && (a = !0), t("loaded", n.name, n.command, a, r);
2566
+ r && (a = !0), t("loaded", s.name, s.command, a, r);
2575
2567
  };
2576
2568
  return $(async () => {
2577
- n.data != null ? o(n.data) : i(n.url);
2578
- }), F(() => n.data, () => {
2579
- n.data != null && o(n.data);
2580
- }), F(() => n.url, () => {
2581
- n.url && i(n.url);
2569
+ s.data != null ? o(s.data) : i(s.url);
2570
+ }), F(() => s.data, () => {
2571
+ s.data != null && o(s.data);
2572
+ }), F(() => s.url, () => {
2573
+ s.url && i(s.url);
2582
2574
  }), (r, a) => null;
2583
2575
  }
2584
- }, Fs = {
2576
+ }, js = {
2585
2577
  __name: "VroidModel",
2586
2578
  props: {
2587
2579
  name: {
@@ -2620,55 +2612,55 @@ const Cs = (l, e) => {
2620
2612
  },
2621
2613
  emits: ["loading", "loaded"],
2622
2614
  setup(l, { emit: e }) {
2623
- const t = e, n = l, s = {}, i = {}, o = Z(null), r = Z(null), a = Z(null), c = (u, d) => {
2624
- const p = Object.keys(s).length;
2625
- s[u] = d;
2626
- const m = Object.keys(s).length;
2627
- p == 0 && m && t("loading", n.name);
2628
- }, h = (u, d, p, m) => {
2629
- const g = Object.keys(s).length;
2630
- p && (d == "load_expression" && (o.value = m), d == "load_pose" && (r.value = m), d == "load_vrm" && (a.value = m), i[u] = d), delete s[u];
2631
- const f = Object.keys(s).length;
2615
+ const t = e, s = l, n = {}, i = {}, o = Z(null), r = Z(null), a = Z(null), c = (h, d) => {
2616
+ const p = Object.keys(n).length;
2617
+ n[h] = d;
2618
+ const m = Object.keys(n).length;
2619
+ p == 0 && m && t("loading", s.name);
2620
+ }, u = (h, d, p, m) => {
2621
+ const g = Object.keys(n).length;
2622
+ p && (d == "load_expression" && (o.value = m), d == "load_pose" && (r.value = m), d == "load_vrm" && (a.value = m), i[h] = d), delete n[h];
2623
+ const f = Object.keys(n).length;
2632
2624
  if (g && f == 0) {
2633
2625
  const _ = {};
2634
2626
  for (const b in i) {
2635
2627
  const T = i[b];
2636
2628
  T == "load_expression" && (_.expression = o.value), T == "load_pose" && (_.pose = r.value), T == "load_vrm" && (_.vrm = a.value);
2637
2629
  }
2638
- t("loaded", n.name, _);
2630
+ t("loaded", s.name, _);
2639
2631
  const x = Object.keys(i);
2640
2632
  for (const b of x)
2641
2633
  delete i[b];
2642
2634
  }
2643
2635
  };
2644
- return (u, d) => (fe(), De(We, null, [
2645
- ee(vs, {
2636
+ return (h, d) => (fe(), De(Ye, null, [
2637
+ ee(Is, {
2646
2638
  command: "load_expression",
2647
- name: n.expression_name,
2648
- url: n.expression_url,
2649
- data: n.expression_data,
2639
+ name: s.expression_name,
2640
+ url: s.expression_url,
2641
+ data: s.expression_data,
2650
2642
  onLoading: c,
2651
- onLoaded: h
2643
+ onLoaded: u
2652
2644
  }, null, 8, ["name", "url", "data"]),
2653
- ee(ks, {
2645
+ ee(vs, {
2654
2646
  command: "load_pose",
2655
- name: n.pose_name,
2656
- url: n.pose_url,
2657
- data: n.pose_data,
2647
+ name: s.pose_name,
2648
+ url: s.pose_url,
2649
+ data: s.pose_data,
2658
2650
  onLoading: c,
2659
- onLoaded: h
2651
+ onLoaded: u
2660
2652
  }, null, 8, ["name", "url", "data"]),
2661
- ee(js, {
2653
+ ee(ks, {
2662
2654
  command: "load_vrm",
2663
- name: n.vrm_name,
2664
- url: n.vrm_url,
2665
- data: n.vrm_data,
2655
+ name: s.vrm_name,
2656
+ url: s.vrm_url,
2657
+ data: s.vrm_data,
2666
2658
  onLoading: c,
2667
- onLoaded: h
2659
+ onLoaded: u
2668
2660
  }, null, 8, ["name", "url", "data"])
2669
2661
  ], 64));
2670
2662
  }
2671
- }, Bs = {
2663
+ }, Ks = {
2672
2664
  __name: "VroidControl",
2673
2665
  props: {
2674
2666
  model_name: {
@@ -2714,14 +2706,14 @@ const Cs = (l, e) => {
2714
2706
  },
2715
2707
  emits: ["loading", "loaded"],
2716
2708
  setup(l, { emit: e }) {
2717
- const t = e, n = Z(null);
2718
- n.value = new Ft();
2719
- const s = (o) => {
2709
+ const t = e, s = Z(null);
2710
+ s.value = new jt();
2711
+ const n = (o) => {
2720
2712
  t("loading", o);
2721
2713
  }, i = (o, r) => {
2722
- "vrm" in r && n.value.setModel(r.vrm), "pose" in r && (n.value.setPose(r.pose), n.value.updatePose()), "expression" in r && (n.value.importExpression(r.expression), n.value.updateExpression()), t("loaded", o, n.value);
2714
+ "vrm" in r && s.value.setModel(r.vrm), "pose" in r && (s.value.setPose(r.pose), s.value.updatePose()), "expression" in r && (s.value.importExpression(r.expression), s.value.updateExpression()), t("loaded", o, s.value);
2723
2715
  };
2724
- return (o, r) => (fe(), Ze(Fs, {
2716
+ return (o, r) => (fe(), We(js, {
2725
2717
  name: l.model_name,
2726
2718
  expression_name: l.expression_name,
2727
2719
  expression_url: l.expression_url,
@@ -2732,18 +2724,18 @@ const Cs = (l, e) => {
2732
2724
  vrm_name: l.vrm_name,
2733
2725
  vrm_url: l.vrm_url,
2734
2726
  vrm_data: l.vrm_data,
2735
- onLoading: s,
2727
+ onLoading: n,
2736
2728
  onLoaded: i
2737
2729
  }, null, 8, ["name", "expression_name", "expression_url", "expression_data", "pose_name", "pose_url", "pose_data", "vrm_name", "vrm_url", "vrm_data"]));
2738
2730
  }
2739
2731
  };
2740
2732
  export {
2741
- Ke as ResourceLoader,
2742
- Ks as ThreeFrame,
2743
- Ft as VrmModel,
2744
- Bs as VroidControl,
2745
- vs as VroidExpression,
2746
- Fs as VroidModel,
2747
- ks as VroidPose,
2748
- js as VroidVrm
2733
+ Ue as ResourceLoader,
2734
+ Us as ThreeFrame,
2735
+ jt as VrmModel,
2736
+ Ks as VroidControl,
2737
+ Is as VroidExpression,
2738
+ js as VroidModel,
2739
+ vs as VroidPose,
2740
+ ks as VroidVrm
2749
2741
  };