ss-component-new 1.3.615 → 1.3.616

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{array-CKTk7Sq_.js → array-B7zhh661.js} +2 -2
  2. package/dist/{iconfont-DZGSkx-_.js → iconfont-BnmSp7qc.js} +396 -247
  3. package/dist/{index-Cn33Gz2z.js → index-B8KEncMz.js} +21 -15
  4. package/dist/{index-obXIOkF7.js → index-BB-4cx6M.js} +1 -1
  5. package/dist/{index-DAs4L0hx.js → index-BcmwtTXG.js} +1 -1
  6. package/dist/{index-t9LvhXac.js → index-CZGJIvyy.js} +1 -1
  7. package/dist/{index-tniD_xHN.js → index-Cm8PZAB-.js} +2 -2
  8. package/dist/{index-BJFXtH-X.js → index-D6d2WMUQ.js} +1 -1
  9. package/dist/{index-DjSJhlad.js → index-DCQMsqSL.js} +3 -3
  10. package/dist/{index-Dd-8nw2f.js → index-DLGS4MnS.js} +2 -2
  11. package/dist/{index--FPbFJB2.js → index-DRpUuthr.js} +1 -1
  12. package/dist/{index-BmaW6Me9.js → index-SQa7vB3n.js} +1 -1
  13. package/dist/{index-gXFBfuoD.js → index-ai2FZBc1.js} +2 -2
  14. package/dist/{index-cYgzND1g.js → index-v9NjEtsA.js} +5062 -5011
  15. package/dist/{main-DgwLoFSd.js → main-DaQzJVV5.js} +2 -2
  16. package/dist/ss-component.css +1 -1
  17. package/dist/ss-component.js +5 -5
  18. package/dist/ss-component2.js +8 -8
  19. package/dist/{threeModel-Df46gQvy.js → threeModel-DgRu_LfA.js} +1 -1
  20. package/dist/{threePreview-C4Ra7sjU.js → threePreview-CVO6XMIe.js} +555 -555
  21. package/dist/threeSceneView-DkImpdm3.js +1291 -0
  22. package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-7gyDxeiN.js} +201 -201
  23. package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-7_x3jeap.js} +20 -20
  24. package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-BBXv1FPJ.js} +1 -1
  25. package/dist/urdfTree-D0Iom75E.js +254 -0
  26. package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-DEEMKY1v.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/threeSceneView-tLPMhgrS.js +0 -1291
  29. package/dist/urdfTree-Bu7OVUsr.js +0 -404
@@ -1,15 +1,15 @@
1
- import { ref as S, shallowRef as S0, defineComponent as L0, watch as e0, onMounted as Z0, nextTick as z0, onBeforeUnmount as Q0, resolveComponent as J0, createElementBlock as u0, openBlock as a0, createElementVNode as v, withDirectives as Y0, createCommentVNode as l0, createVNode as q, unref as B, renderSlot as h0, toDisplayString as g0, withCtx as K0, createBlock as X0, vShow as $0 } from "vue";
2
- import { ak as ee, al as t0, am as v0, R as T0, an as J, U as X, ao as D, ap as R0, C as x, aq as M, c as U, ar as ae, j as be, D as ie, n as $, V as C, as as He, at as M0, au as re, av as D0, aw as fe, ax as ce, a1 as Y, ay as te, az as O0, aA as de, aB as ne, aC as oe, aD as d0, aE as E0, aF as n0, aG as ke, aH as se, _ as ue, aI as b0, a2 as le, t as G0, l as he, aJ as Q, aK as ge, u as U0, aL as _e, h as x0, aM as Ae, w as pe, aN as me, $ as je, s as i0, P as Ie, o as ye, aO as Fe, aP as we, aQ as Ne, aR as ve, aS as Te, aT as q0, aU as Re, aV as _0, aW as A0, aX as p0, aY as m0, aZ as o0, a4 as Me, a_ as De, B as B0, a$ as Oe, k as Ee } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
1
+ import { ref as S, shallowRef as L0, defineComponent as Z0, watch as e0, onMounted as z0, nextTick as Q0, onBeforeUnmount as J0, resolveComponent as Y0, createElementBlock as l0, openBlock as a0, createElementVNode as v, withDirectives as K0, createCommentVNode as h0, createVNode as q, unref as B, renderSlot as g0, toDisplayString as _0, withCtx as X0, createBlock as $0, vShow as ee } from "vue";
2
+ import { ak as ae, al as t0, am as T0, R as R0, an as Q, U as X, ao as D, ap as M0, C as x, aq as M, c as U, ar as be, j as ie, D as He, n as $, V as C, as as re, at as D0, au as fe, av as O0, aw as ce, ax as te, a1 as J, ay as de, az as E0, aA as ne, aB as oe, aC as ke, aD as d0, aE as G0, aF as n0, aG as se, aH as ue, _ as le, aI as b0, a2 as he, t as U0, l as ge, aJ as z, aK as _e, u as x0, aL as Ae, h as q0, aM as pe, w as me, aN as je, $ as Ie, s as i0, P as ye, o as Fe, aO as we, aP as Ne, aQ as ve, aR as Te, aS as Re, aT as B0, aU as Me, aV as A0, aW as p0, aX as m0, aY as j0, aZ as o0, a4 as De, a_ as Oe, B as V0, a$ as Ee, k as Ge } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
3
3
  import "./index-D8UY4uNQ.js";
4
- import { u as Ge, C as Ue } from "./iconfont-DZGSkx-_.js";
5
- import { M as xe, O as qe, S as Be } from "./MTLLoader-BL2uYkTJ.js";
4
+ import { u as Ue, a as xe, b as qe, C as Be } from "./iconfont-BnmSp7qc.js";
5
+ import { M as Ve, O as Pe, S as We } from "./MTLLoader-BL2uYkTJ.js";
6
6
  import { T as W } from "./svgIcon-4u4PW7Is.js";
7
- import { E as j0 } from "./request-B1c8BUkR.js";
8
- import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- function I0(k, e) {
10
- if (e === ee)
7
+ import { E as I0 } from "./request-B1c8BUkR.js";
8
+ import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ function y0(k, e) {
10
+ if (e === ae)
11
11
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), k;
12
- if (e === t0 || e === v0) {
12
+ if (e === t0 || e === T0) {
13
13
  let a = k.getIndex();
14
14
  if (a === null) {
15
15
  const i = [], c = k.getAttribute("position");
@@ -20,20 +20,20 @@ function I0(k, e) {
20
20
  } else
21
21
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), k;
22
22
  }
23
- const H = a.count - 2, b = [];
23
+ const r = a.count - 2, b = [];
24
24
  if (e === t0)
25
- for (let i = 1; i <= H; i++)
25
+ for (let i = 1; i <= r; i++)
26
26
  b.push(a.getX(0)), b.push(a.getX(i)), b.push(a.getX(i + 1));
27
27
  else
28
- for (let i = 0; i < H; i++)
28
+ for (let i = 0; i < r; i++)
29
29
  i % 2 === 0 ? (b.push(a.getX(i)), b.push(a.getX(i + 1)), b.push(a.getX(i + 2))) : (b.push(a.getX(i + 2)), b.push(a.getX(i + 1)), b.push(a.getX(i)));
30
- b.length / 3 !== H && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
31
- const r = k.clone();
32
- return r.setIndex(b), r.clearGroups(), r;
30
+ b.length / 3 !== r && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
31
+ const H = k.clone();
32
+ return H.setIndex(b), H.clearGroups(), H;
33
33
  } else
34
34
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), k;
35
35
  }
36
- class Pe extends T0 {
36
+ class Se extends R0 {
37
37
  /**
38
38
  * Constructs a new glTF loader.
39
39
  *
@@ -41,39 +41,39 @@ class Pe extends T0 {
41
41
  */
42
42
  constructor(e) {
43
43
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(a) {
44
- return new Ze(a);
44
+ return new Je(a);
45
45
  }), this.register(function(a) {
46
- return new ze(a);
46
+ return new Ye(a);
47
47
  }), this.register(function(a) {
48
- return new b2(a);
48
+ return new r2(a);
49
49
  }), this.register(function(a) {
50
- return new i2(a);
50
+ return new f2(a);
51
51
  }), this.register(function(a) {
52
- return new H2(a);
52
+ return new c2(a);
53
53
  }), this.register(function(a) {
54
- return new Je(a);
54
+ return new Xe(a);
55
55
  }), this.register(function(a) {
56
- return new Ye(a);
56
+ return new $e(a);
57
57
  }), this.register(function(a) {
58
- return new Ke(a);
58
+ return new e2(a);
59
59
  }), this.register(function(a) {
60
- return new Xe(a);
60
+ return new a2(a);
61
61
  }), this.register(function(a) {
62
- return new Le(a);
62
+ return new Qe(a);
63
63
  }), this.register(function(a) {
64
- return new $e(a);
64
+ return new b2(a);
65
65
  }), this.register(function(a) {
66
- return new Qe(a);
66
+ return new Ke(a);
67
67
  }), this.register(function(a) {
68
- return new a2(a);
68
+ return new H2(a);
69
69
  }), this.register(function(a) {
70
- return new e2(a);
70
+ return new i2(a);
71
71
  }), this.register(function(a) {
72
- return new Ce(a);
72
+ return new Ze(a);
73
73
  }), this.register(function(a) {
74
- return new r2(a);
74
+ return new t2(a);
75
75
  }), this.register(function(a) {
76
- return new f2(a);
76
+ return new d2(a);
77
77
  });
78
78
  }
79
79
  /**
@@ -85,29 +85,29 @@ class Pe extends T0 {
85
85
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
86
86
  * @param {onErrorCallback} onError - Executed when errors occur.
87
87
  */
88
- load(e, a, H, b) {
89
- const r = this;
88
+ load(e, a, r, b) {
89
+ const H = this;
90
90
  let i;
91
91
  if (this.resourcePath !== "")
92
92
  i = this.resourcePath;
93
93
  else if (this.path !== "") {
94
- const t = J.extractUrlBase(e);
95
- i = J.resolveURL(t, this.path);
94
+ const t = Q.extractUrlBase(e);
95
+ i = Q.resolveURL(t, this.path);
96
96
  } else
97
- i = J.extractUrlBase(e);
97
+ i = Q.extractUrlBase(e);
98
98
  this.manager.itemStart(e);
99
99
  const c = function(t) {
100
- b ? b(t) : console.error(t), r.manager.itemError(e), r.manager.itemEnd(e);
100
+ b ? b(t) : console.error(t), H.manager.itemError(e), H.manager.itemEnd(e);
101
101
  }, f = new X(this.manager);
102
102
  f.setPath(this.path), f.setResponseType("arraybuffer"), f.setRequestHeader(this.requestHeader), f.setWithCredentials(this.withCredentials), f.load(e, function(t) {
103
103
  try {
104
- r.parse(t, i, function(n) {
105
- a(n), r.manager.itemEnd(e);
104
+ H.parse(t, i, function(n) {
105
+ a(n), H.manager.itemEnd(e);
106
106
  }, c);
107
107
  } catch (n) {
108
108
  c(n);
109
109
  }
110
- }, H, c);
110
+ }, r, c);
111
111
  }
112
112
  /**
113
113
  * Sets the given Draco loader to this loader. Required for decoding assets
@@ -167,29 +167,29 @@ class Pe extends T0 {
167
167
  * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished.
168
168
  * @param {onErrorCallback} onError - Executed when errors occur.
169
169
  */
170
- parse(e, a, H, b) {
171
- let r;
170
+ parse(e, a, r, b) {
171
+ let H;
172
172
  const i = {}, c = {}, f = new TextDecoder();
173
173
  if (typeof e == "string")
174
- r = JSON.parse(e);
174
+ H = JSON.parse(e);
175
175
  else if (e instanceof ArrayBuffer)
176
- if (f.decode(new Uint8Array(e, 0, 4)) === V0) {
176
+ if (f.decode(new Uint8Array(e, 0, 4)) === P0) {
177
177
  try {
178
- i[p.KHR_BINARY_GLTF] = new c2(e);
178
+ i[p.KHR_BINARY_GLTF] = new n2(e);
179
179
  } catch (d) {
180
180
  b && b(d);
181
181
  return;
182
182
  }
183
- r = JSON.parse(i[p.KHR_BINARY_GLTF].content);
183
+ H = JSON.parse(i[p.KHR_BINARY_GLTF].content);
184
184
  } else
185
- r = JSON.parse(f.decode(e));
185
+ H = JSON.parse(f.decode(e));
186
186
  else
187
- r = e;
188
- if (r.asset === void 0 || r.asset.version[0] < 2) {
187
+ H = e;
188
+ if (H.asset === void 0 || H.asset.version[0] < 2) {
189
189
  b && b(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
190
190
  return;
191
191
  }
192
- const t = new p2(r, {
192
+ const t = new I2(H, {
193
193
  path: a || this.resourcePath || "",
194
194
  crossOrigin: this.crossOrigin,
195
195
  requestHeader: this.requestHeader,
@@ -202,27 +202,27 @@ class Pe extends T0 {
202
202
  const d = this.pluginCallbacks[n](t);
203
203
  d.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), c[d.name] = d, i[d.name] = !0;
204
204
  }
205
- if (r.extensionsUsed)
206
- for (let n = 0; n < r.extensionsUsed.length; ++n) {
207
- const d = r.extensionsUsed[n], o = r.extensionsRequired || [];
205
+ if (H.extensionsUsed)
206
+ for (let n = 0; n < H.extensionsUsed.length; ++n) {
207
+ const d = H.extensionsUsed[n], o = H.extensionsRequired || [];
208
208
  switch (d) {
209
209
  case p.KHR_MATERIALS_UNLIT:
210
- i[d] = new Se();
210
+ i[d] = new ze();
211
211
  break;
212
212
  case p.KHR_DRACO_MESH_COMPRESSION:
213
- i[d] = new t2(r, this.dracoLoader);
213
+ i[d] = new o2(H, this.dracoLoader);
214
214
  break;
215
215
  case p.KHR_TEXTURE_TRANSFORM:
216
- i[d] = new d2();
216
+ i[d] = new k2();
217
217
  break;
218
218
  case p.KHR_MESH_QUANTIZATION:
219
- i[d] = new n2();
219
+ i[d] = new s2();
220
220
  break;
221
221
  default:
222
222
  o.indexOf(d) >= 0 && c[d] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + d + '".');
223
223
  }
224
224
  }
225
- t.setExtensions(i), t.setPlugins(c), t.parse(H, b);
225
+ t.setExtensions(i), t.setPlugins(c), t.parse(r, b);
226
226
  }
227
227
  /**
228
228
  * Async version of {@link GLTFLoader#parse}.
@@ -233,13 +233,13 @@ class Pe extends T0 {
233
233
  * @return {Promise<GLTFLoader~LoadObject>} A Promise that resolves with the loaded glTF when the parsing has been finished.
234
234
  */
235
235
  parseAsync(e, a) {
236
- const H = this;
237
- return new Promise(function(b, r) {
238
- H.parse(e, a, b, r);
236
+ const r = this;
237
+ return new Promise(function(b, H) {
238
+ r.parse(e, a, b, H);
239
239
  });
240
240
  }
241
241
  }
242
- function We() {
242
+ function Le() {
243
243
  let k = {};
244
244
  return {
245
245
  get: function(e) {
@@ -280,74 +280,74 @@ const p = {
280
280
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
281
281
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
282
282
  };
283
- class Ce {
283
+ class Ze {
284
284
  constructor(e) {
285
285
  this.parser = e, this.name = p.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
286
286
  }
287
287
  _markDefs() {
288
288
  const e = this.parser, a = this.parser.json.nodes || [];
289
- for (let H = 0, b = a.length; H < b; H++) {
290
- const r = a[H];
291
- r.extensions && r.extensions[this.name] && r.extensions[this.name].light !== void 0 && e._addNodeRef(this.cache, r.extensions[this.name].light);
289
+ for (let r = 0, b = a.length; r < b; r++) {
290
+ const H = a[r];
291
+ H.extensions && H.extensions[this.name] && H.extensions[this.name].light !== void 0 && e._addNodeRef(this.cache, H.extensions[this.name].light);
292
292
  }
293
293
  }
294
294
  _loadLight(e) {
295
- const a = this.parser, H = "light:" + e;
296
- let b = a.cache.get(H);
295
+ const a = this.parser, r = "light:" + e;
296
+ let b = a.cache.get(r);
297
297
  if (b) return b;
298
- const r = a.json, f = ((r.extensions && r.extensions[this.name] || {}).lights || [])[e];
298
+ const H = a.json, f = ((H.extensions && H.extensions[this.name] || {}).lights || [])[e];
299
299
  let t;
300
300
  const n = new x(16777215);
301
301
  f.color !== void 0 && n.setRGB(f.color[0], f.color[1], f.color[2], M);
302
302
  const d = f.range !== void 0 ? f.range : 0;
303
303
  switch (f.type) {
304
304
  case "directional":
305
- t = new ie(n), t.target.position.set(0, 0, -1), t.add(t.target);
305
+ t = new He(n), t.target.position.set(0, 0, -1), t.add(t.target);
306
306
  break;
307
307
  case "point":
308
- t = new be(n), t.distance = d;
308
+ t = new ie(n), t.distance = d;
309
309
  break;
310
310
  case "spot":
311
- t = new ae(n), t.distance = d, f.spot = f.spot || {}, f.spot.innerConeAngle = f.spot.innerConeAngle !== void 0 ? f.spot.innerConeAngle : 0, f.spot.outerConeAngle = f.spot.outerConeAngle !== void 0 ? f.spot.outerConeAngle : Math.PI / 4, t.angle = f.spot.outerConeAngle, t.penumbra = 1 - f.spot.innerConeAngle / f.spot.outerConeAngle, t.target.position.set(0, 0, -1), t.add(t.target);
311
+ t = new be(n), t.distance = d, f.spot = f.spot || {}, f.spot.innerConeAngle = f.spot.innerConeAngle !== void 0 ? f.spot.innerConeAngle : 0, f.spot.outerConeAngle = f.spot.outerConeAngle !== void 0 ? f.spot.outerConeAngle : Math.PI / 4, t.angle = f.spot.outerConeAngle, t.penumbra = 1 - f.spot.innerConeAngle / f.spot.outerConeAngle, t.target.position.set(0, 0, -1), t.add(t.target);
312
312
  break;
313
313
  default:
314
314
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + f.type);
315
315
  }
316
- return t.position.set(0, 0, 0), O(t, f), f.intensity !== void 0 && (t.intensity = f.intensity), t.name = a.createUniqueName(f.name || "light_" + e), b = Promise.resolve(t), a.cache.add(H, b), b;
316
+ return t.position.set(0, 0, 0), E(t, f), f.intensity !== void 0 && (t.intensity = f.intensity), t.name = a.createUniqueName(f.name || "light_" + e), b = Promise.resolve(t), a.cache.add(r, b), b;
317
317
  }
318
318
  getDependency(e, a) {
319
319
  if (e === "light")
320
320
  return this._loadLight(a);
321
321
  }
322
322
  createNodeAttachment(e) {
323
- const a = this, H = this.parser, r = H.json.nodes[e], c = (r.extensions && r.extensions[this.name] || {}).light;
323
+ const a = this, r = this.parser, H = r.json.nodes[e], c = (H.extensions && H.extensions[this.name] || {}).light;
324
324
  return c === void 0 ? null : this._loadLight(c).then(function(f) {
325
- return H._getNodeRef(a.cache, c, f);
325
+ return r._getNodeRef(a.cache, c, f);
326
326
  });
327
327
  }
328
328
  }
329
- class Se {
329
+ class ze {
330
330
  constructor() {
331
331
  this.name = p.KHR_MATERIALS_UNLIT;
332
332
  }
333
333
  getMaterialType() {
334
- return Q;
334
+ return z;
335
335
  }
336
- extendParams(e, a, H) {
336
+ extendParams(e, a, r) {
337
337
  const b = [];
338
338
  e.color = new x(1, 1, 1), e.opacity = 1;
339
- const r = a.pbrMetallicRoughness;
340
- if (r) {
341
- if (Array.isArray(r.baseColorFactor)) {
342
- const i = r.baseColorFactor;
339
+ const H = a.pbrMetallicRoughness;
340
+ if (H) {
341
+ if (Array.isArray(H.baseColorFactor)) {
342
+ const i = H.baseColorFactor;
343
343
  e.color.setRGB(i[0], i[1], i[2], M), e.opacity = i[3];
344
344
  }
345
- r.baseColorTexture !== void 0 && b.push(H.assignTexture(e, "map", r.baseColorTexture, U));
345
+ H.baseColorTexture !== void 0 && b.push(r.assignTexture(e, "map", H.baseColorTexture, U));
346
346
  }
347
347
  return Promise.all(b);
348
348
  }
349
349
  }
350
- class Le {
350
+ class Qe {
351
351
  constructor(e) {
352
352
  this.parser = e, this.name = p.KHR_MATERIALS_EMISSIVE_STRENGTH;
353
353
  }
@@ -355,249 +355,249 @@ class Le {
355
355
  const b = this.parser.json.materials[e];
356
356
  if (!b.extensions || !b.extensions[this.name])
357
357
  return Promise.resolve();
358
- const r = b.extensions[this.name].emissiveStrength;
359
- return r !== void 0 && (a.emissiveIntensity = r), Promise.resolve();
358
+ const H = b.extensions[this.name].emissiveStrength;
359
+ return H !== void 0 && (a.emissiveIntensity = H), Promise.resolve();
360
360
  }
361
361
  }
362
- class Ze {
362
+ class Je {
363
363
  constructor(e) {
364
364
  this.parser = e, this.name = p.KHR_MATERIALS_CLEARCOAT;
365
365
  }
366
366
  getMaterialType(e) {
367
- const H = this.parser.json.materials[e];
368
- return !H.extensions || !H.extensions[this.name] ? null : D;
367
+ const r = this.parser.json.materials[e];
368
+ return !r.extensions || !r.extensions[this.name] ? null : D;
369
369
  }
370
370
  extendMaterialParams(e, a) {
371
- const H = this.parser, b = H.json.materials[e];
371
+ const r = this.parser, b = r.json.materials[e];
372
372
  if (!b.extensions || !b.extensions[this.name])
373
373
  return Promise.resolve();
374
- const r = [], i = b.extensions[this.name];
375
- if (i.clearcoatFactor !== void 0 && (a.clearcoat = i.clearcoatFactor), i.clearcoatTexture !== void 0 && r.push(H.assignTexture(a, "clearcoatMap", i.clearcoatTexture)), i.clearcoatRoughnessFactor !== void 0 && (a.clearcoatRoughness = i.clearcoatRoughnessFactor), i.clearcoatRoughnessTexture !== void 0 && r.push(H.assignTexture(a, "clearcoatRoughnessMap", i.clearcoatRoughnessTexture)), i.clearcoatNormalTexture !== void 0 && (r.push(H.assignTexture(a, "clearcoatNormalMap", i.clearcoatNormalTexture)), i.clearcoatNormalTexture.scale !== void 0)) {
374
+ const H = [], i = b.extensions[this.name];
375
+ if (i.clearcoatFactor !== void 0 && (a.clearcoat = i.clearcoatFactor), i.clearcoatTexture !== void 0 && H.push(r.assignTexture(a, "clearcoatMap", i.clearcoatTexture)), i.clearcoatRoughnessFactor !== void 0 && (a.clearcoatRoughness = i.clearcoatRoughnessFactor), i.clearcoatRoughnessTexture !== void 0 && H.push(r.assignTexture(a, "clearcoatRoughnessMap", i.clearcoatRoughnessTexture)), i.clearcoatNormalTexture !== void 0 && (H.push(r.assignTexture(a, "clearcoatNormalMap", i.clearcoatNormalTexture)), i.clearcoatNormalTexture.scale !== void 0)) {
376
376
  const c = i.clearcoatNormalTexture.scale;
377
- a.clearcoatNormalScale = new R0(c, c);
377
+ a.clearcoatNormalScale = new M0(c, c);
378
378
  }
379
- return Promise.all(r);
379
+ return Promise.all(H);
380
380
  }
381
381
  }
382
- class ze {
382
+ class Ye {
383
383
  constructor(e) {
384
384
  this.parser = e, this.name = p.KHR_MATERIALS_DISPERSION;
385
385
  }
386
386
  getMaterialType(e) {
387
- const H = this.parser.json.materials[e];
388
- return !H.extensions || !H.extensions[this.name] ? null : D;
387
+ const r = this.parser.json.materials[e];
388
+ return !r.extensions || !r.extensions[this.name] ? null : D;
389
389
  }
390
390
  extendMaterialParams(e, a) {
391
391
  const b = this.parser.json.materials[e];
392
392
  if (!b.extensions || !b.extensions[this.name])
393
393
  return Promise.resolve();
394
- const r = b.extensions[this.name];
395
- return a.dispersion = r.dispersion !== void 0 ? r.dispersion : 0, Promise.resolve();
394
+ const H = b.extensions[this.name];
395
+ return a.dispersion = H.dispersion !== void 0 ? H.dispersion : 0, Promise.resolve();
396
396
  }
397
397
  }
398
- class Qe {
398
+ class Ke {
399
399
  constructor(e) {
400
400
  this.parser = e, this.name = p.KHR_MATERIALS_IRIDESCENCE;
401
401
  }
402
402
  getMaterialType(e) {
403
- const H = this.parser.json.materials[e];
404
- return !H.extensions || !H.extensions[this.name] ? null : D;
403
+ const r = this.parser.json.materials[e];
404
+ return !r.extensions || !r.extensions[this.name] ? null : D;
405
405
  }
406
406
  extendMaterialParams(e, a) {
407
- const H = this.parser, b = H.json.materials[e];
407
+ const r = this.parser, b = r.json.materials[e];
408
408
  if (!b.extensions || !b.extensions[this.name])
409
409
  return Promise.resolve();
410
- const r = [], i = b.extensions[this.name];
411
- return i.iridescenceFactor !== void 0 && (a.iridescence = i.iridescenceFactor), i.iridescenceTexture !== void 0 && r.push(H.assignTexture(a, "iridescenceMap", i.iridescenceTexture)), i.iridescenceIor !== void 0 && (a.iridescenceIOR = i.iridescenceIor), a.iridescenceThicknessRange === void 0 && (a.iridescenceThicknessRange = [100, 400]), i.iridescenceThicknessMinimum !== void 0 && (a.iridescenceThicknessRange[0] = i.iridescenceThicknessMinimum), i.iridescenceThicknessMaximum !== void 0 && (a.iridescenceThicknessRange[1] = i.iridescenceThicknessMaximum), i.iridescenceThicknessTexture !== void 0 && r.push(H.assignTexture(a, "iridescenceThicknessMap", i.iridescenceThicknessTexture)), Promise.all(r);
410
+ const H = [], i = b.extensions[this.name];
411
+ return i.iridescenceFactor !== void 0 && (a.iridescence = i.iridescenceFactor), i.iridescenceTexture !== void 0 && H.push(r.assignTexture(a, "iridescenceMap", i.iridescenceTexture)), i.iridescenceIor !== void 0 && (a.iridescenceIOR = i.iridescenceIor), a.iridescenceThicknessRange === void 0 && (a.iridescenceThicknessRange = [100, 400]), i.iridescenceThicknessMinimum !== void 0 && (a.iridescenceThicknessRange[0] = i.iridescenceThicknessMinimum), i.iridescenceThicknessMaximum !== void 0 && (a.iridescenceThicknessRange[1] = i.iridescenceThicknessMaximum), i.iridescenceThicknessTexture !== void 0 && H.push(r.assignTexture(a, "iridescenceThicknessMap", i.iridescenceThicknessTexture)), Promise.all(H);
412
412
  }
413
413
  }
414
- class Je {
414
+ class Xe {
415
415
  constructor(e) {
416
416
  this.parser = e, this.name = p.KHR_MATERIALS_SHEEN;
417
417
  }
418
418
  getMaterialType(e) {
419
- const H = this.parser.json.materials[e];
420
- return !H.extensions || !H.extensions[this.name] ? null : D;
419
+ const r = this.parser.json.materials[e];
420
+ return !r.extensions || !r.extensions[this.name] ? null : D;
421
421
  }
422
422
  extendMaterialParams(e, a) {
423
- const H = this.parser, b = H.json.materials[e];
423
+ const r = this.parser, b = r.json.materials[e];
424
424
  if (!b.extensions || !b.extensions[this.name])
425
425
  return Promise.resolve();
426
- const r = [];
426
+ const H = [];
427
427
  a.sheenColor = new x(0, 0, 0), a.sheenRoughness = 0, a.sheen = 1;
428
428
  const i = b.extensions[this.name];
429
429
  if (i.sheenColorFactor !== void 0) {
430
430
  const c = i.sheenColorFactor;
431
431
  a.sheenColor.setRGB(c[0], c[1], c[2], M);
432
432
  }
433
- return i.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = i.sheenRoughnessFactor), i.sheenColorTexture !== void 0 && r.push(H.assignTexture(a, "sheenColorMap", i.sheenColorTexture, U)), i.sheenRoughnessTexture !== void 0 && r.push(H.assignTexture(a, "sheenRoughnessMap", i.sheenRoughnessTexture)), Promise.all(r);
433
+ return i.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = i.sheenRoughnessFactor), i.sheenColorTexture !== void 0 && H.push(r.assignTexture(a, "sheenColorMap", i.sheenColorTexture, U)), i.sheenRoughnessTexture !== void 0 && H.push(r.assignTexture(a, "sheenRoughnessMap", i.sheenRoughnessTexture)), Promise.all(H);
434
434
  }
435
435
  }
436
- class Ye {
436
+ class $e {
437
437
  constructor(e) {
438
438
  this.parser = e, this.name = p.KHR_MATERIALS_TRANSMISSION;
439
439
  }
440
440
  getMaterialType(e) {
441
- const H = this.parser.json.materials[e];
442
- return !H.extensions || !H.extensions[this.name] ? null : D;
441
+ const r = this.parser.json.materials[e];
442
+ return !r.extensions || !r.extensions[this.name] ? null : D;
443
443
  }
444
444
  extendMaterialParams(e, a) {
445
- const H = this.parser, b = H.json.materials[e];
445
+ const r = this.parser, b = r.json.materials[e];
446
446
  if (!b.extensions || !b.extensions[this.name])
447
447
  return Promise.resolve();
448
- const r = [], i = b.extensions[this.name];
449
- return i.transmissionFactor !== void 0 && (a.transmission = i.transmissionFactor), i.transmissionTexture !== void 0 && r.push(H.assignTexture(a, "transmissionMap", i.transmissionTexture)), Promise.all(r);
448
+ const H = [], i = b.extensions[this.name];
449
+ return i.transmissionFactor !== void 0 && (a.transmission = i.transmissionFactor), i.transmissionTexture !== void 0 && H.push(r.assignTexture(a, "transmissionMap", i.transmissionTexture)), Promise.all(H);
450
450
  }
451
451
  }
452
- class Ke {
452
+ class e2 {
453
453
  constructor(e) {
454
454
  this.parser = e, this.name = p.KHR_MATERIALS_VOLUME;
455
455
  }
456
456
  getMaterialType(e) {
457
- const H = this.parser.json.materials[e];
458
- return !H.extensions || !H.extensions[this.name] ? null : D;
457
+ const r = this.parser.json.materials[e];
458
+ return !r.extensions || !r.extensions[this.name] ? null : D;
459
459
  }
460
460
  extendMaterialParams(e, a) {
461
- const H = this.parser, b = H.json.materials[e];
461
+ const r = this.parser, b = r.json.materials[e];
462
462
  if (!b.extensions || !b.extensions[this.name])
463
463
  return Promise.resolve();
464
- const r = [], i = b.extensions[this.name];
465
- a.thickness = i.thicknessFactor !== void 0 ? i.thicknessFactor : 0, i.thicknessTexture !== void 0 && r.push(H.assignTexture(a, "thicknessMap", i.thicknessTexture)), a.attenuationDistance = i.attenuationDistance || 1 / 0;
464
+ const H = [], i = b.extensions[this.name];
465
+ a.thickness = i.thicknessFactor !== void 0 ? i.thicknessFactor : 0, i.thicknessTexture !== void 0 && H.push(r.assignTexture(a, "thicknessMap", i.thicknessTexture)), a.attenuationDistance = i.attenuationDistance || 1 / 0;
466
466
  const c = i.attenuationColor || [1, 1, 1];
467
- return a.attenuationColor = new x().setRGB(c[0], c[1], c[2], M), Promise.all(r);
467
+ return a.attenuationColor = new x().setRGB(c[0], c[1], c[2], M), Promise.all(H);
468
468
  }
469
469
  }
470
- class Xe {
470
+ class a2 {
471
471
  constructor(e) {
472
472
  this.parser = e, this.name = p.KHR_MATERIALS_IOR;
473
473
  }
474
474
  getMaterialType(e) {
475
- const H = this.parser.json.materials[e];
476
- return !H.extensions || !H.extensions[this.name] ? null : D;
475
+ const r = this.parser.json.materials[e];
476
+ return !r.extensions || !r.extensions[this.name] ? null : D;
477
477
  }
478
478
  extendMaterialParams(e, a) {
479
479
  const b = this.parser.json.materials[e];
480
480
  if (!b.extensions || !b.extensions[this.name])
481
481
  return Promise.resolve();
482
- const r = b.extensions[this.name];
483
- return a.ior = r.ior !== void 0 ? r.ior : 1.5, Promise.resolve();
482
+ const H = b.extensions[this.name];
483
+ return a.ior = H.ior !== void 0 ? H.ior : 1.5, Promise.resolve();
484
484
  }
485
485
  }
486
- class $e {
486
+ class b2 {
487
487
  constructor(e) {
488
488
  this.parser = e, this.name = p.KHR_MATERIALS_SPECULAR;
489
489
  }
490
490
  getMaterialType(e) {
491
- const H = this.parser.json.materials[e];
492
- return !H.extensions || !H.extensions[this.name] ? null : D;
491
+ const r = this.parser.json.materials[e];
492
+ return !r.extensions || !r.extensions[this.name] ? null : D;
493
493
  }
494
494
  extendMaterialParams(e, a) {
495
- const H = this.parser, b = H.json.materials[e];
495
+ const r = this.parser, b = r.json.materials[e];
496
496
  if (!b.extensions || !b.extensions[this.name])
497
497
  return Promise.resolve();
498
- const r = [], i = b.extensions[this.name];
499
- a.specularIntensity = i.specularFactor !== void 0 ? i.specularFactor : 1, i.specularTexture !== void 0 && r.push(H.assignTexture(a, "specularIntensityMap", i.specularTexture));
498
+ const H = [], i = b.extensions[this.name];
499
+ a.specularIntensity = i.specularFactor !== void 0 ? i.specularFactor : 1, i.specularTexture !== void 0 && H.push(r.assignTexture(a, "specularIntensityMap", i.specularTexture));
500
500
  const c = i.specularColorFactor || [1, 1, 1];
501
- return a.specularColor = new x().setRGB(c[0], c[1], c[2], M), i.specularColorTexture !== void 0 && r.push(H.assignTexture(a, "specularColorMap", i.specularColorTexture, U)), Promise.all(r);
501
+ return a.specularColor = new x().setRGB(c[0], c[1], c[2], M), i.specularColorTexture !== void 0 && H.push(r.assignTexture(a, "specularColorMap", i.specularColorTexture, U)), Promise.all(H);
502
502
  }
503
503
  }
504
- class e2 {
504
+ class i2 {
505
505
  constructor(e) {
506
506
  this.parser = e, this.name = p.EXT_MATERIALS_BUMP;
507
507
  }
508
508
  getMaterialType(e) {
509
- const H = this.parser.json.materials[e];
510
- return !H.extensions || !H.extensions[this.name] ? null : D;
509
+ const r = this.parser.json.materials[e];
510
+ return !r.extensions || !r.extensions[this.name] ? null : D;
511
511
  }
512
512
  extendMaterialParams(e, a) {
513
- const H = this.parser, b = H.json.materials[e];
513
+ const r = this.parser, b = r.json.materials[e];
514
514
  if (!b.extensions || !b.extensions[this.name])
515
515
  return Promise.resolve();
516
- const r = [], i = b.extensions[this.name];
517
- return a.bumpScale = i.bumpFactor !== void 0 ? i.bumpFactor : 1, i.bumpTexture !== void 0 && r.push(H.assignTexture(a, "bumpMap", i.bumpTexture)), Promise.all(r);
516
+ const H = [], i = b.extensions[this.name];
517
+ return a.bumpScale = i.bumpFactor !== void 0 ? i.bumpFactor : 1, i.bumpTexture !== void 0 && H.push(r.assignTexture(a, "bumpMap", i.bumpTexture)), Promise.all(H);
518
518
  }
519
519
  }
520
- class a2 {
520
+ class H2 {
521
521
  constructor(e) {
522
522
  this.parser = e, this.name = p.KHR_MATERIALS_ANISOTROPY;
523
523
  }
524
524
  getMaterialType(e) {
525
- const H = this.parser.json.materials[e];
526
- return !H.extensions || !H.extensions[this.name] ? null : D;
525
+ const r = this.parser.json.materials[e];
526
+ return !r.extensions || !r.extensions[this.name] ? null : D;
527
527
  }
528
528
  extendMaterialParams(e, a) {
529
- const H = this.parser, b = H.json.materials[e];
529
+ const r = this.parser, b = r.json.materials[e];
530
530
  if (!b.extensions || !b.extensions[this.name])
531
531
  return Promise.resolve();
532
- const r = [], i = b.extensions[this.name];
533
- return i.anisotropyStrength !== void 0 && (a.anisotropy = i.anisotropyStrength), i.anisotropyRotation !== void 0 && (a.anisotropyRotation = i.anisotropyRotation), i.anisotropyTexture !== void 0 && r.push(H.assignTexture(a, "anisotropyMap", i.anisotropyTexture)), Promise.all(r);
532
+ const H = [], i = b.extensions[this.name];
533
+ return i.anisotropyStrength !== void 0 && (a.anisotropy = i.anisotropyStrength), i.anisotropyRotation !== void 0 && (a.anisotropyRotation = i.anisotropyRotation), i.anisotropyTexture !== void 0 && H.push(r.assignTexture(a, "anisotropyMap", i.anisotropyTexture)), Promise.all(H);
534
534
  }
535
535
  }
536
- class b2 {
536
+ class r2 {
537
537
  constructor(e) {
538
538
  this.parser = e, this.name = p.KHR_TEXTURE_BASISU;
539
539
  }
540
540
  loadTexture(e) {
541
- const a = this.parser, H = a.json, b = H.textures[e];
541
+ const a = this.parser, r = a.json, b = r.textures[e];
542
542
  if (!b.extensions || !b.extensions[this.name])
543
543
  return null;
544
- const r = b.extensions[this.name], i = a.options.ktx2Loader;
544
+ const H = b.extensions[this.name], i = a.options.ktx2Loader;
545
545
  if (!i) {
546
- if (H.extensionsRequired && H.extensionsRequired.indexOf(this.name) >= 0)
546
+ if (r.extensionsRequired && r.extensionsRequired.indexOf(this.name) >= 0)
547
547
  throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
548
548
  return null;
549
549
  }
550
- return a.loadTextureImage(e, r.source, i);
550
+ return a.loadTextureImage(e, H.source, i);
551
551
  }
552
552
  }
553
- class i2 {
553
+ class f2 {
554
554
  constructor(e) {
555
555
  this.parser = e, this.name = p.EXT_TEXTURE_WEBP;
556
556
  }
557
557
  loadTexture(e) {
558
- const a = this.name, H = this.parser, b = H.json, r = b.textures[e];
559
- if (!r.extensions || !r.extensions[a])
558
+ const a = this.name, r = this.parser, b = r.json, H = b.textures[e];
559
+ if (!H.extensions || !H.extensions[a])
560
560
  return null;
561
- const i = r.extensions[a], c = b.images[i.source];
562
- let f = H.textureLoader;
561
+ const i = H.extensions[a], c = b.images[i.source];
562
+ let f = r.textureLoader;
563
563
  if (c.uri) {
564
- const t = H.options.manager.getHandler(c.uri);
564
+ const t = r.options.manager.getHandler(c.uri);
565
565
  t !== null && (f = t);
566
566
  }
567
- return H.loadTextureImage(e, i.source, f);
567
+ return r.loadTextureImage(e, i.source, f);
568
568
  }
569
569
  }
570
- class H2 {
570
+ class c2 {
571
571
  constructor(e) {
572
572
  this.parser = e, this.name = p.EXT_TEXTURE_AVIF;
573
573
  }
574
574
  loadTexture(e) {
575
- const a = this.name, H = this.parser, b = H.json, r = b.textures[e];
576
- if (!r.extensions || !r.extensions[a])
575
+ const a = this.name, r = this.parser, b = r.json, H = b.textures[e];
576
+ if (!H.extensions || !H.extensions[a])
577
577
  return null;
578
- const i = r.extensions[a], c = b.images[i.source];
579
- let f = H.textureLoader;
578
+ const i = H.extensions[a], c = b.images[i.source];
579
+ let f = r.textureLoader;
580
580
  if (c.uri) {
581
- const t = H.options.manager.getHandler(c.uri);
581
+ const t = r.options.manager.getHandler(c.uri);
582
582
  t !== null && (f = t);
583
583
  }
584
- return H.loadTextureImage(e, i.source, f);
584
+ return r.loadTextureImage(e, i.source, f);
585
585
  }
586
586
  }
587
- class r2 {
587
+ class t2 {
588
588
  constructor(e) {
589
589
  this.name = p.EXT_MESHOPT_COMPRESSION, this.parser = e;
590
590
  }
591
591
  loadBufferView(e) {
592
- const a = this.parser.json, H = a.bufferViews[e];
593
- if (H.extensions && H.extensions[this.name]) {
594
- const b = H.extensions[this.name], r = this.parser.getDependency("buffer", b.buffer), i = this.parser.options.meshoptDecoder;
592
+ const a = this.parser.json, r = a.bufferViews[e];
593
+ if (r.extensions && r.extensions[this.name]) {
594
+ const b = r.extensions[this.name], H = this.parser.getDependency("buffer", b.buffer), i = this.parser.options.meshoptDecoder;
595
595
  if (!i || !i.supported) {
596
596
  if (a.extensionsRequired && a.extensionsRequired.indexOf(this.name) >= 0)
597
597
  throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
598
598
  return null;
599
599
  }
600
- return r.then(function(c) {
600
+ return H.then(function(c) {
601
601
  const f = b.byteOffset || 0, t = b.byteLength || 0, n = b.count, d = b.byteStride, o = new Uint8Array(c, f, t);
602
602
  return i.decodeGltfBufferAsync ? i.decodeGltfBufferAsync(n, d, o, b.mode, b.filter).then(function(s) {
603
603
  return s.buffer;
@@ -610,62 +610,62 @@ class r2 {
610
610
  return null;
611
611
  }
612
612
  }
613
- class f2 {
613
+ class d2 {
614
614
  constructor(e) {
615
615
  this.name = p.EXT_MESH_GPU_INSTANCING, this.parser = e;
616
616
  }
617
617
  createNodeMesh(e) {
618
- const a = this.parser.json, H = a.nodes[e];
619
- if (!H.extensions || !H.extensions[this.name] || H.mesh === void 0)
618
+ const a = this.parser.json, r = a.nodes[e];
619
+ if (!r.extensions || !r.extensions[this.name] || r.mesh === void 0)
620
620
  return null;
621
- const b = a.meshes[H.mesh];
621
+ const b = a.meshes[r.mesh];
622
622
  for (const t of b.primitives)
623
623
  if (t.mode !== w.TRIANGLES && t.mode !== w.TRIANGLE_STRIP && t.mode !== w.TRIANGLE_FAN && t.mode !== void 0)
624
624
  return null;
625
- const i = H.extensions[this.name].attributes, c = [], f = {};
625
+ const i = r.extensions[this.name].attributes, c = [], f = {};
626
626
  for (const t in i)
627
627
  c.push(this.parser.getDependency("accessor", i[t]).then((n) => (f[t] = n, f[t])));
628
628
  return c.length < 1 ? null : (c.push(this.parser.createNodeMesh(e)), Promise.all(c).then((t) => {
629
629
  const n = t.pop(), d = n.isGroup ? n.children : [n], o = t[0].count, s = [];
630
630
  for (const l of d) {
631
- const h = new $(), u = new C(), g = new M0(), _ = new C(1, 1, 1), m = new He(l.geometry, l.material, o);
631
+ const h = new $(), u = new C(), g = new D0(), _ = new C(1, 1, 1), m = new re(l.geometry, l.material, o);
632
632
  for (let A = 0; A < o; A++)
633
633
  f.TRANSLATION && u.fromBufferAttribute(f.TRANSLATION, A), f.ROTATION && g.fromBufferAttribute(f.ROTATION, A), f.SCALE && _.fromBufferAttribute(f.SCALE, A), m.setMatrixAt(A, h.compose(u, g, _));
634
634
  for (const A in f)
635
635
  if (A === "_COLOR_0") {
636
636
  const I = f[A];
637
- m.instanceColor = new re(I.array, I.itemSize, I.normalized);
637
+ m.instanceColor = new fe(I.array, I.itemSize, I.normalized);
638
638
  } else A !== "TRANSLATION" && A !== "ROTATION" && A !== "SCALE" && l.geometry.setAttribute(A, f[A]);
639
- D0.prototype.copy.call(m, l), this.parser.assignFinalMaterial(m), s.push(m);
639
+ O0.prototype.copy.call(m, l), this.parser.assignFinalMaterial(m), s.push(m);
640
640
  }
641
641
  return n.isGroup ? (n.clear(), n.add(...s), n) : s[0];
642
642
  }));
643
643
  }
644
644
  }
645
- const V0 = "glTF", z = 12, y0 = { JSON: 1313821514, BIN: 5130562 };
646
- class c2 {
645
+ const P0 = "glTF", Z = 12, F0 = { JSON: 1313821514, BIN: 5130562 };
646
+ class n2 {
647
647
  constructor(e) {
648
648
  this.name = p.KHR_BINARY_GLTF, this.content = null, this.body = null;
649
- const a = new DataView(e, 0, z), H = new TextDecoder();
649
+ const a = new DataView(e, 0, Z), r = new TextDecoder();
650
650
  if (this.header = {
651
- magic: H.decode(new Uint8Array(e.slice(0, 4))),
651
+ magic: r.decode(new Uint8Array(e.slice(0, 4))),
652
652
  version: a.getUint32(4, !0),
653
653
  length: a.getUint32(8, !0)
654
- }, this.header.magic !== V0)
654
+ }, this.header.magic !== P0)
655
655
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
656
656
  if (this.header.version < 2)
657
657
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
658
- const b = this.header.length - z, r = new DataView(e, z);
658
+ const b = this.header.length - Z, H = new DataView(e, Z);
659
659
  let i = 0;
660
660
  for (; i < b; ) {
661
- const c = r.getUint32(i, !0);
661
+ const c = H.getUint32(i, !0);
662
662
  i += 4;
663
- const f = r.getUint32(i, !0);
664
- if (i += 4, f === y0.JSON) {
665
- const t = new Uint8Array(e, z + i, c);
666
- this.content = H.decode(t);
667
- } else if (f === y0.BIN) {
668
- const t = z + i;
663
+ const f = H.getUint32(i, !0);
664
+ if (i += 4, f === F0.JSON) {
665
+ const t = new Uint8Array(e, Z + i, c);
666
+ this.content = r.decode(t);
667
+ } else if (f === F0.BIN) {
668
+ const t = Z + i;
669
669
  this.body = e.slice(t, t + c);
670
670
  }
671
671
  i += c;
@@ -674,14 +674,14 @@ class c2 {
674
674
  throw new Error("THREE.GLTFLoader: JSON content not found.");
675
675
  }
676
676
  }
677
- class t2 {
677
+ class o2 {
678
678
  constructor(e, a) {
679
679
  if (!a)
680
680
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
681
681
  this.name = p.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = a, this.dracoLoader.preload();
682
682
  }
683
683
  decodePrimitive(e, a) {
684
- const H = this.json, b = this.dracoLoader, r = e.extensions[this.name].bufferView, i = e.extensions[this.name].attributes, c = {}, f = {}, t = {};
684
+ const r = this.json, b = this.dracoLoader, H = e.extensions[this.name].bufferView, i = e.extensions[this.name].attributes, c = {}, f = {}, t = {};
685
685
  for (const n in i) {
686
686
  const d = k0[n] || n.toLowerCase();
687
687
  c[d] = i[n];
@@ -689,11 +689,11 @@ class t2 {
689
689
  for (const n in e.attributes) {
690
690
  const d = k0[n] || n.toLowerCase();
691
691
  if (i[n] !== void 0) {
692
- const o = H.accessors[e.attributes[n]], s = L[o.componentType];
692
+ const o = r.accessors[e.attributes[n]], s = L[o.componentType];
693
693
  t[d] = s.name, f[d] = o.normalized === !0;
694
694
  }
695
695
  }
696
- return a.getDependency("bufferView", r).then(function(n) {
696
+ return a.getDependency("bufferView", H).then(function(n) {
697
697
  return new Promise(function(d, o) {
698
698
  b.decodeDracoFile(n, function(s) {
699
699
  for (const l in s.attributes) {
@@ -706,7 +706,7 @@ class t2 {
706
706
  });
707
707
  }
708
708
  }
709
- class d2 {
709
+ class k2 {
710
710
  constructor() {
711
711
  this.name = p.KHR_TEXTURE_TRANSFORM;
712
712
  }
@@ -714,35 +714,35 @@ class d2 {
714
714
  return (a.texCoord === void 0 || a.texCoord === e.channel) && a.offset === void 0 && a.rotation === void 0 && a.scale === void 0 || (e = e.clone(), a.texCoord !== void 0 && (e.channel = a.texCoord), a.offset !== void 0 && e.offset.fromArray(a.offset), a.rotation !== void 0 && (e.rotation = a.rotation), a.scale !== void 0 && e.repeat.fromArray(a.scale), e.needsUpdate = !0), e;
715
715
  }
716
716
  }
717
- class n2 {
717
+ class s2 {
718
718
  constructor() {
719
719
  this.name = p.KHR_MESH_QUANTIZATION;
720
720
  }
721
721
  }
722
- class P0 extends De {
723
- constructor(e, a, H, b) {
724
- super(e, a, H, b);
722
+ class W0 extends Oe {
723
+ constructor(e, a, r, b) {
724
+ super(e, a, r, b);
725
725
  }
726
726
  copySampleValue_(e) {
727
- const a = this.resultBuffer, H = this.sampleValues, b = this.valueSize, r = e * b * 3 + b;
727
+ const a = this.resultBuffer, r = this.sampleValues, b = this.valueSize, H = e * b * 3 + b;
728
728
  for (let i = 0; i !== b; i++)
729
- a[i] = H[r + i];
729
+ a[i] = r[H + i];
730
730
  return a;
731
731
  }
732
- interpolate_(e, a, H, b) {
733
- const r = this.resultBuffer, i = this.sampleValues, c = this.valueSize, f = c * 2, t = c * 3, n = b - a, d = (H - a) / n, o = d * d, s = o * d, l = e * t, h = l - t, u = -2 * s + 3 * o, g = s - o, _ = 1 - u, m = g - o + d;
732
+ interpolate_(e, a, r, b) {
733
+ const H = this.resultBuffer, i = this.sampleValues, c = this.valueSize, f = c * 2, t = c * 3, n = b - a, d = (r - a) / n, o = d * d, s = o * d, l = e * t, h = l - t, u = -2 * s + 3 * o, g = s - o, _ = 1 - u, m = g - o + d;
734
734
  for (let A = 0; A !== c; A++) {
735
- const I = i[h + A + c], F = i[h + A + f] * n, y = i[l + A + c], E = i[l + A] * n;
736
- r[A] = _ * I + m * F + u * y + g * E;
735
+ const I = i[h + A + c], F = i[h + A + f] * n, y = i[l + A + c], O = i[l + A] * n;
736
+ H[A] = _ * I + m * F + u * y + g * O;
737
737
  }
738
- return r;
738
+ return H;
739
739
  }
740
740
  }
741
- const o2 = new M0();
742
- class k2 extends P0 {
743
- interpolate_(e, a, H, b) {
744
- const r = super.interpolate_(e, a, H, b);
745
- return o2.fromArray(r).normalize().toArray(r), r;
741
+ const u2 = new D0();
742
+ class l2 extends W0 {
743
+ interpolate_(e, a, r, b) {
744
+ const H = super.interpolate_(e, a, r, b);
745
+ return u2.fromArray(H).normalize().toArray(H), H;
746
746
  }
747
747
  }
748
748
  const w = {
@@ -760,16 +760,16 @@ const w = {
760
760
  5123: Uint16Array,
761
761
  5125: Uint32Array,
762
762
  5126: Float32Array
763
- }, F0 = {
764
- 9728: E0,
765
- 9729: d0,
766
- 9984: oe,
767
- 9985: ne,
768
- 9986: de,
769
- 9987: O0
770
763
  }, w0 = {
771
- 33071: se,
772
- 33648: ke,
764
+ 9728: G0,
765
+ 9729: d0,
766
+ 9984: ke,
767
+ 9985: oe,
768
+ 9986: ne,
769
+ 9987: E0
770
+ }, N0 = {
771
+ 33071: ue,
772
+ 33648: se,
773
773
  10497: n0
774
774
  }, H0 = {
775
775
  SCALAR: 1,
@@ -795,46 +795,46 @@ const w = {
795
795
  translation: "position",
796
796
  rotation: "quaternion",
797
797
  weights: "morphTargetInfluences"
798
- }, s2 = {
798
+ }, h2 = {
799
799
  CUBICSPLINE: void 0,
800
800
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
801
801
  // keyframe track will be initialized with a default interpolation type, then modified.
802
- LINEAR: q0,
803
- STEP: Te
802
+ LINEAR: B0,
803
+ STEP: Re
804
804
  }, r0 = {
805
805
  OPAQUE: "OPAQUE",
806
806
  MASK: "MASK",
807
807
  BLEND: "BLEND"
808
808
  };
809
- function u2(k) {
810
- return k.DefaultMaterial === void 0 && (k.DefaultMaterial = new G0({
809
+ function g2(k) {
810
+ return k.DefaultMaterial === void 0 && (k.DefaultMaterial = new U0({
811
811
  color: 16777215,
812
812
  emissive: 0,
813
813
  metalness: 1,
814
814
  roughness: 1,
815
815
  transparent: !1,
816
816
  depthTest: !0,
817
- side: Me
817
+ side: De
818
818
  })), k.DefaultMaterial;
819
819
  }
820
820
  function V(k, e, a) {
821
- for (const H in a.extensions)
822
- k[H] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[H] = a.extensions[H]);
821
+ for (const r in a.extensions)
822
+ k[r] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[r] = a.extensions[r]);
823
823
  }
824
- function O(k, e) {
824
+ function E(k, e) {
825
825
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(k.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
826
826
  }
827
- function l2(k, e, a) {
828
- let H = !1, b = !1, r = !1;
827
+ function _2(k, e, a) {
828
+ let r = !1, b = !1, H = !1;
829
829
  for (let t = 0, n = e.length; t < n; t++) {
830
830
  const d = e[t];
831
- if (d.POSITION !== void 0 && (H = !0), d.NORMAL !== void 0 && (b = !0), d.COLOR_0 !== void 0 && (r = !0), H && b && r) break;
831
+ if (d.POSITION !== void 0 && (r = !0), d.NORMAL !== void 0 && (b = !0), d.COLOR_0 !== void 0 && (H = !0), r && b && H) break;
832
832
  }
833
- if (!H && !b && !r) return Promise.resolve(k);
833
+ if (!r && !b && !H) return Promise.resolve(k);
834
834
  const i = [], c = [], f = [];
835
835
  for (let t = 0, n = e.length; t < n; t++) {
836
836
  const d = e[t];
837
- if (H) {
837
+ if (r) {
838
838
  const o = d.POSITION !== void 0 ? a.getDependency("accessor", d.POSITION) : k.attributes.position;
839
839
  i.push(o);
840
840
  }
@@ -842,7 +842,7 @@ function l2(k, e, a) {
842
842
  const o = d.NORMAL !== void 0 ? a.getDependency("accessor", d.NORMAL) : k.attributes.normal;
843
843
  c.push(o);
844
844
  }
845
- if (r) {
845
+ if (H) {
846
846
  const o = d.COLOR_0 !== void 0 ? a.getDependency("accessor", d.COLOR_0) : k.attributes.color;
847
847
  f.push(o);
848
848
  }
@@ -853,36 +853,36 @@ function l2(k, e, a) {
853
853
  Promise.all(f)
854
854
  ]).then(function(t) {
855
855
  const n = t[0], d = t[1], o = t[2];
856
- return H && (k.morphAttributes.position = n), b && (k.morphAttributes.normal = d), r && (k.morphAttributes.color = o), k.morphTargetsRelative = !0, k;
856
+ return r && (k.morphAttributes.position = n), b && (k.morphAttributes.normal = d), H && (k.morphAttributes.color = o), k.morphTargetsRelative = !0, k;
857
857
  });
858
858
  }
859
- function h2(k, e) {
859
+ function A2(k, e) {
860
860
  if (k.updateMorphTargets(), e.weights !== void 0)
861
- for (let a = 0, H = e.weights.length; a < H; a++)
861
+ for (let a = 0, r = e.weights.length; a < r; a++)
862
862
  k.morphTargetInfluences[a] = e.weights[a];
863
863
  if (e.extras && Array.isArray(e.extras.targetNames)) {
864
864
  const a = e.extras.targetNames;
865
865
  if (k.morphTargetInfluences.length === a.length) {
866
866
  k.morphTargetDictionary = {};
867
- for (let H = 0, b = a.length; H < b; H++)
868
- k.morphTargetDictionary[a[H]] = H;
867
+ for (let r = 0, b = a.length; r < b; r++)
868
+ k.morphTargetDictionary[a[r]] = r;
869
869
  } else
870
870
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
871
871
  }
872
872
  }
873
- function g2(k) {
873
+ function p2(k) {
874
874
  let e;
875
875
  const a = k.extensions && k.extensions[p.KHR_DRACO_MESH_COMPRESSION];
876
876
  if (a ? e = "draco:" + a.bufferView + ":" + a.indices + ":" + f0(a.attributes) : e = k.indices + ":" + f0(k.attributes) + ":" + k.mode, k.targets !== void 0)
877
- for (let H = 0, b = k.targets.length; H < b; H++)
878
- e += ":" + f0(k.targets[H]);
877
+ for (let r = 0, b = k.targets.length; r < b; r++)
878
+ e += ":" + f0(k.targets[r]);
879
879
  return e;
880
880
  }
881
881
  function f0(k) {
882
882
  let e = "";
883
883
  const a = Object.keys(k).sort();
884
- for (let H = 0, b = a.length; H < b; H++)
885
- e += a[H] + ":" + k[a[H]] + ";";
884
+ for (let r = 0, b = a.length; r < b; r++)
885
+ e += a[r] + ":" + k[a[r]] + ";";
886
886
  return e;
887
887
  }
888
888
  function s0(k) {
@@ -899,21 +899,21 @@ function s0(k) {
899
899
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
900
900
  }
901
901
  }
902
- function _2(k) {
902
+ function m2(k) {
903
903
  return k.search(/\.jpe?g($|\?)/i) > 0 || k.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : k.search(/\.webp($|\?)/i) > 0 || k.search(/^data\:image\/webp/) === 0 ? "image/webp" : k.search(/\.ktx2($|\?)/i) > 0 || k.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
904
904
  }
905
- const A2 = new $();
906
- class p2 {
905
+ const j2 = new $();
906
+ class I2 {
907
907
  constructor(e = {}, a = {}) {
908
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new We(), 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 = {};
909
- let H = !1, b = -1, r = !1, i = -1;
908
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new Le(), 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 = {};
909
+ let r = !1, b = -1, H = !1, i = -1;
910
910
  if (typeof navigator < "u") {
911
911
  const c = navigator.userAgent;
912
- H = /^((?!chrome|android).)*safari/i.test(c) === !0;
912
+ r = /^((?!chrome|android).)*safari/i.test(c) === !0;
913
913
  const f = c.match(/Version\/(\d+)/);
914
- b = H && f ? parseInt(f[1], 10) : -1, r = c.indexOf("Firefox") > -1, i = r ? c.match(/Firefox\/([0-9]+)\./)[1] : -1;
914
+ b = r && f ? parseInt(f[1], 10) : -1, H = c.indexOf("Firefox") > -1, i = H ? c.match(/Firefox\/([0-9]+)\./)[1] : -1;
915
915
  }
916
- typeof createImageBitmap > "u" || H && b < 17 || r && i < 98 ? this.textureLoader = new fe(this.options.manager) : this.textureLoader = new ce(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new X(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
916
+ typeof createImageBitmap > "u" || r && b < 17 || H && i < 98 ? this.textureLoader = new ce(this.options.manager) : this.textureLoader = new te(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new X(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
917
917
  }
918
918
  setExtensions(e) {
919
919
  this.extensions = e;
@@ -922,16 +922,16 @@ class p2 {
922
922
  this.plugins = e;
923
923
  }
924
924
  parse(e, a) {
925
- const H = this, b = this.json, r = this.extensions;
925
+ const r = this, b = this.json, H = this.extensions;
926
926
  this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(i) {
927
927
  return i._markDefs && i._markDefs();
928
928
  }), Promise.all(this._invokeAll(function(i) {
929
929
  return i.beforeRoot && i.beforeRoot();
930
930
  })).then(function() {
931
931
  return Promise.all([
932
- H.getDependencies("scene"),
933
- H.getDependencies("animation"),
934
- H.getDependencies("camera")
932
+ r.getDependencies("scene"),
933
+ r.getDependencies("animation"),
934
+ r.getDependencies("camera")
935
935
  ]);
936
936
  }).then(function(i) {
937
937
  const c = {
@@ -940,10 +940,10 @@ class p2 {
940
940
  animations: i[1],
941
941
  cameras: i[2],
942
942
  asset: b.asset,
943
- parser: H,
943
+ parser: r,
944
944
  userData: {}
945
945
  };
946
- return V(r, c, b), O(c, b), Promise.all(H._invokeAll(function(f) {
946
+ return V(H, c, b), E(c, b), Promise.all(r._invokeAll(function(f) {
947
947
  return f.afterRoot && f.afterRoot(c);
948
948
  })).then(function() {
949
949
  for (const f of c.scenes)
@@ -958,15 +958,15 @@ class p2 {
958
958
  * @private
959
959
  */
960
960
  _markDefs() {
961
- const e = this.json.nodes || [], a = this.json.skins || [], H = this.json.meshes || [];
962
- for (let b = 0, r = a.length; b < r; b++) {
961
+ const e = this.json.nodes || [], a = this.json.skins || [], r = this.json.meshes || [];
962
+ for (let b = 0, H = a.length; b < H; b++) {
963
963
  const i = a[b].joints;
964
964
  for (let c = 0, f = i.length; c < f; c++)
965
965
  e[i[c]].isBone = !0;
966
966
  }
967
- for (let b = 0, r = e.length; b < r; b++) {
967
+ for (let b = 0, H = e.length; b < H; b++) {
968
968
  const i = e[b];
969
- i.mesh !== void 0 && (this._addNodeRef(this.meshCache, i.mesh), i.skin !== void 0 && (H[i.mesh].isSkinnedMesh = !0)), i.camera !== void 0 && this._addNodeRef(this.cameraCache, i.camera);
969
+ i.mesh !== void 0 && (this._addNodeRef(this.meshCache, i.mesh), i.skin !== void 0 && (r[i.mesh].isSkinnedMesh = !0)), i.camera !== void 0 && this._addNodeRef(this.cameraCache, i.camera);
970
970
  }
971
971
  }
972
972
  /**
@@ -994,21 +994,21 @@ class p2 {
994
994
  * @param {Object} object
995
995
  * @return {Object}
996
996
  */
997
- _getNodeRef(e, a, H) {
998
- if (e.refs[a] <= 1) return H;
999
- const b = H.clone(), r = (i, c) => {
997
+ _getNodeRef(e, a, r) {
998
+ if (e.refs[a] <= 1) return r;
999
+ const b = r.clone(), H = (i, c) => {
1000
1000
  const f = this.associations.get(i);
1001
1001
  f != null && this.associations.set(c, f);
1002
1002
  for (const [t, n] of i.children.entries())
1003
- r(n, c.children[t]);
1003
+ H(n, c.children[t]);
1004
1004
  };
1005
- return r(H, b), b.name += "_instance_" + e.uses[a]++, b;
1005
+ return H(r, b), b.name += "_instance_" + e.uses[a]++, b;
1006
1006
  }
1007
1007
  _invokeOne(e) {
1008
1008
  const a = Object.values(this.plugins);
1009
1009
  a.push(this);
1010
- for (let H = 0; H < a.length; H++) {
1011
- const b = e(a[H]);
1010
+ for (let r = 0; r < a.length; r++) {
1011
+ const b = e(a[r]);
1012
1012
  if (b) return b;
1013
1013
  }
1014
1014
  return null;
@@ -1016,12 +1016,12 @@ class p2 {
1016
1016
  _invokeAll(e) {
1017
1017
  const a = Object.values(this.plugins);
1018
1018
  a.unshift(this);
1019
- const H = [];
1019
+ const r = [];
1020
1020
  for (let b = 0; b < a.length; b++) {
1021
- const r = e(a[b]);
1022
- r && H.push(r);
1021
+ const H = e(a[b]);
1022
+ H && r.push(H);
1023
1023
  }
1024
- return H;
1024
+ return r;
1025
1025
  }
1026
1026
  /**
1027
1027
  * Requests the specified dependency asynchronously, with caching.
@@ -1032,63 +1032,63 @@ class p2 {
1032
1032
  * @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
1033
1033
  */
1034
1034
  getDependency(e, a) {
1035
- const H = e + ":" + a;
1036
- let b = this.cache.get(H);
1035
+ const r = e + ":" + a;
1036
+ let b = this.cache.get(r);
1037
1037
  if (!b) {
1038
1038
  switch (e) {
1039
1039
  case "scene":
1040
1040
  b = this.loadScene(a);
1041
1041
  break;
1042
1042
  case "node":
1043
- b = this._invokeOne(function(r) {
1044
- return r.loadNode && r.loadNode(a);
1043
+ b = this._invokeOne(function(H) {
1044
+ return H.loadNode && H.loadNode(a);
1045
1045
  });
1046
1046
  break;
1047
1047
  case "mesh":
1048
- b = this._invokeOne(function(r) {
1049
- return r.loadMesh && r.loadMesh(a);
1048
+ b = this._invokeOne(function(H) {
1049
+ return H.loadMesh && H.loadMesh(a);
1050
1050
  });
1051
1051
  break;
1052
1052
  case "accessor":
1053
1053
  b = this.loadAccessor(a);
1054
1054
  break;
1055
1055
  case "bufferView":
1056
- b = this._invokeOne(function(r) {
1057
- return r.loadBufferView && r.loadBufferView(a);
1056
+ b = this._invokeOne(function(H) {
1057
+ return H.loadBufferView && H.loadBufferView(a);
1058
1058
  });
1059
1059
  break;
1060
1060
  case "buffer":
1061
1061
  b = this.loadBuffer(a);
1062
1062
  break;
1063
1063
  case "material":
1064
- b = this._invokeOne(function(r) {
1065
- return r.loadMaterial && r.loadMaterial(a);
1064
+ b = this._invokeOne(function(H) {
1065
+ return H.loadMaterial && H.loadMaterial(a);
1066
1066
  });
1067
1067
  break;
1068
1068
  case "texture":
1069
- b = this._invokeOne(function(r) {
1070
- return r.loadTexture && r.loadTexture(a);
1069
+ b = this._invokeOne(function(H) {
1070
+ return H.loadTexture && H.loadTexture(a);
1071
1071
  });
1072
1072
  break;
1073
1073
  case "skin":
1074
1074
  b = this.loadSkin(a);
1075
1075
  break;
1076
1076
  case "animation":
1077
- b = this._invokeOne(function(r) {
1078
- return r.loadAnimation && r.loadAnimation(a);
1077
+ b = this._invokeOne(function(H) {
1078
+ return H.loadAnimation && H.loadAnimation(a);
1079
1079
  });
1080
1080
  break;
1081
1081
  case "camera":
1082
1082
  b = this.loadCamera(a);
1083
1083
  break;
1084
1084
  default:
1085
- if (b = this._invokeOne(function(r) {
1086
- return r != this && r.getDependency && r.getDependency(e, a);
1085
+ if (b = this._invokeOne(function(H) {
1086
+ return H != this && H.getDependency && H.getDependency(e, a);
1087
1087
  }), !b)
1088
1088
  throw new Error("Unknown type: " + e);
1089
1089
  break;
1090
1090
  }
1091
- this.cache.add(H, b);
1091
+ this.cache.add(r, b);
1092
1092
  }
1093
1093
  return b;
1094
1094
  }
@@ -1102,9 +1102,9 @@ class p2 {
1102
1102
  getDependencies(e) {
1103
1103
  let a = this.cache.get(e);
1104
1104
  if (!a) {
1105
- const H = this, b = this.json[e + (e === "mesh" ? "es" : "s")] || [];
1106
- a = Promise.all(b.map(function(r, i) {
1107
- return H.getDependency(e, i);
1105
+ const r = this, b = this.json[e + (e === "mesh" ? "es" : "s")] || [];
1106
+ a = Promise.all(b.map(function(H, i) {
1107
+ return r.getDependency(e, i);
1108
1108
  })), this.cache.add(e, a);
1109
1109
  }
1110
1110
  return a;
@@ -1117,14 +1117,14 @@ class p2 {
1117
1117
  * @return {Promise<ArrayBuffer>}
1118
1118
  */
1119
1119
  loadBuffer(e) {
1120
- const a = this.json.buffers[e], H = this.fileLoader;
1120
+ const a = this.json.buffers[e], r = this.fileLoader;
1121
1121
  if (a.type && a.type !== "arraybuffer")
1122
1122
  throw new Error("THREE.GLTFLoader: " + a.type + " buffer type is not supported.");
1123
1123
  if (a.uri === void 0 && e === 0)
1124
1124
  return Promise.resolve(this.extensions[p.KHR_BINARY_GLTF].body);
1125
1125
  const b = this.options;
1126
- return new Promise(function(r, i) {
1127
- H.load(J.resolveURL(a.uri, b.path), r, void 0, function() {
1126
+ return new Promise(function(H, i) {
1127
+ r.load(Q.resolveURL(a.uri, b.path), H, void 0, function() {
1128
1128
  i(new Error('THREE.GLTFLoader: Failed to load buffer "' + a.uri + '".'));
1129
1129
  });
1130
1130
  });
@@ -1138,9 +1138,9 @@ class p2 {
1138
1138
  */
1139
1139
  loadBufferView(e) {
1140
1140
  const a = this.json.bufferViews[e];
1141
- return this.getDependency("buffer", a.buffer).then(function(H) {
1142
- const b = a.byteLength || 0, r = a.byteOffset || 0;
1143
- return H.slice(r, r + b);
1141
+ return this.getDependency("buffer", a.buffer).then(function(r) {
1142
+ const b = a.byteLength || 0, H = a.byteOffset || 0;
1143
+ return r.slice(H, H + b);
1144
1144
  });
1145
1145
  }
1146
1146
  /**
@@ -1151,25 +1151,25 @@ class p2 {
1151
1151
  * @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
1152
1152
  */
1153
1153
  loadAccessor(e) {
1154
- const a = this, H = this.json, b = this.json.accessors[e];
1154
+ const a = this, r = this.json, b = this.json.accessors[e];
1155
1155
  if (b.bufferView === void 0 && b.sparse === void 0) {
1156
1156
  const i = H0[b.type], c = L[b.componentType], f = b.normalized === !0, t = new c(b.count * i);
1157
- return Promise.resolve(new Y(t, i, f));
1157
+ return Promise.resolve(new J(t, i, f));
1158
1158
  }
1159
- const r = [];
1160
- return b.bufferView !== void 0 ? r.push(this.getDependency("bufferView", b.bufferView)) : r.push(null), b.sparse !== void 0 && (r.push(this.getDependency("bufferView", b.sparse.indices.bufferView)), r.push(this.getDependency("bufferView", b.sparse.values.bufferView))), Promise.all(r).then(function(i) {
1161
- const c = i[0], f = H0[b.type], t = L[b.componentType], n = t.BYTES_PER_ELEMENT, d = n * f, o = b.byteOffset || 0, s = b.bufferView !== void 0 ? H.bufferViews[b.bufferView].byteStride : void 0, l = b.normalized === !0;
1159
+ const H = [];
1160
+ return b.bufferView !== void 0 ? H.push(this.getDependency("bufferView", b.bufferView)) : H.push(null), b.sparse !== void 0 && (H.push(this.getDependency("bufferView", b.sparse.indices.bufferView)), H.push(this.getDependency("bufferView", b.sparse.values.bufferView))), Promise.all(H).then(function(i) {
1161
+ const c = i[0], f = H0[b.type], t = L[b.componentType], n = t.BYTES_PER_ELEMENT, d = n * f, o = b.byteOffset || 0, s = b.bufferView !== void 0 ? r.bufferViews[b.bufferView].byteStride : void 0, l = b.normalized === !0;
1162
1162
  let h, u;
1163
1163
  if (s && s !== d) {
1164
1164
  const g = Math.floor(o / s), _ = "InterleavedBuffer:" + b.bufferView + ":" + b.componentType + ":" + g + ":" + b.count;
1165
1165
  let m = a.cache.get(_);
1166
- m || (h = new t(c, g * s, b.count * s / n), m = new te(h, s / n), a.cache.add(_, m)), u = new Re(m, f, o % s / n, l);
1166
+ m || (h = new t(c, g * s, b.count * s / n), m = new de(h, s / n), a.cache.add(_, m)), u = new Me(m, f, o % s / n, l);
1167
1167
  } else
1168
- c === null ? h = new t(b.count * f) : h = new t(c, o, b.count * f), u = new Y(h, f, l);
1168
+ c === null ? h = new t(b.count * f) : h = new t(c, o, b.count * f), u = new J(h, f, l);
1169
1169
  if (b.sparse !== void 0) {
1170
1170
  const g = H0.SCALAR, _ = L[b.sparse.indices.componentType], m = b.sparse.indices.byteOffset || 0, A = b.sparse.values.byteOffset || 0, I = new _(i[1], m, b.sparse.count * g), F = new t(i[2], A, b.sparse.count * f);
1171
- c !== null && (u = new Y(u.array.slice(), u.itemSize, u.normalized)), u.normalized = !1;
1172
- for (let y = 0, E = I.length; y < E; y++) {
1171
+ c !== null && (u = new J(u.array.slice(), u.itemSize, u.normalized)), u.normalized = !1;
1172
+ for (let y = 0, O = I.length; y < O; y++) {
1173
1173
  const N = I[y];
1174
1174
  if (u.setX(N, F[y * f]), f >= 2 && u.setY(N, F[y * f + 1]), f >= 3 && u.setZ(N, F[y * f + 2]), f >= 4 && u.setW(N, F[y * f + 3]), f >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1175
1175
  }
@@ -1186,35 +1186,35 @@ class p2 {
1186
1186
  * @return {Promise<THREE.Texture|null>}
1187
1187
  */
1188
1188
  loadTexture(e) {
1189
- const a = this.json, H = this.options, r = a.textures[e].source, i = a.images[r];
1189
+ const a = this.json, r = this.options, H = a.textures[e].source, i = a.images[H];
1190
1190
  let c = this.textureLoader;
1191
1191
  if (i.uri) {
1192
- const f = H.manager.getHandler(i.uri);
1192
+ const f = r.manager.getHandler(i.uri);
1193
1193
  f !== null && (c = f);
1194
1194
  }
1195
- return this.loadTextureImage(e, r, c);
1195
+ return this.loadTextureImage(e, H, c);
1196
1196
  }
1197
- loadTextureImage(e, a, H) {
1198
- const b = this, r = this.json, i = r.textures[e], c = r.images[a], f = (c.uri || c.bufferView) + ":" + i.sampler;
1197
+ loadTextureImage(e, a, r) {
1198
+ const b = this, H = this.json, i = H.textures[e], c = H.images[a], f = (c.uri || c.bufferView) + ":" + i.sampler;
1199
1199
  if (this.textureCache[f])
1200
1200
  return this.textureCache[f];
1201
- const t = this.loadImageSource(a, H).then(function(n) {
1201
+ const t = this.loadImageSource(a, r).then(function(n) {
1202
1202
  n.flipY = !1, n.name = i.name || c.name || "", n.name === "" && typeof c.uri == "string" && c.uri.startsWith("data:image/") === !1 && (n.name = c.uri);
1203
- const o = (r.samplers || {})[i.sampler] || {};
1204
- return n.magFilter = F0[o.magFilter] || d0, n.minFilter = F0[o.minFilter] || O0, n.wrapS = w0[o.wrapS] || n0, n.wrapT = w0[o.wrapT] || n0, n.generateMipmaps = !n.isCompressedTexture && n.minFilter !== E0 && n.minFilter !== d0, b.associations.set(n, { textures: e }), n;
1203
+ const o = (H.samplers || {})[i.sampler] || {};
1204
+ return n.magFilter = w0[o.magFilter] || d0, n.minFilter = w0[o.minFilter] || E0, n.wrapS = N0[o.wrapS] || n0, n.wrapT = N0[o.wrapT] || n0, n.generateMipmaps = !n.isCompressedTexture && n.minFilter !== G0 && n.minFilter !== d0, b.associations.set(n, { textures: e }), n;
1205
1205
  }).catch(function() {
1206
1206
  return null;
1207
1207
  });
1208
1208
  return this.textureCache[f] = t, t;
1209
1209
  }
1210
1210
  loadImageSource(e, a) {
1211
- const H = this, b = this.json, r = this.options;
1211
+ const r = this, b = this.json, H = this.options;
1212
1212
  if (this.sourceCache[e] !== void 0)
1213
1213
  return this.sourceCache[e].then((d) => d.clone());
1214
1214
  const i = b.images[e], c = self.URL || self.webkitURL;
1215
1215
  let f = i.uri || "", t = !1;
1216
1216
  if (i.bufferView !== void 0)
1217
- f = H.getDependency("bufferView", i.bufferView).then(function(d) {
1217
+ f = r.getDependency("bufferView", i.bufferView).then(function(d) {
1218
1218
  t = !0;
1219
1219
  const o = new Blob([d], { type: i.mimeType });
1220
1220
  return f = c.createObjectURL(o), f;
@@ -1225,12 +1225,12 @@ class p2 {
1225
1225
  return new Promise(function(o, s) {
1226
1226
  let l = o;
1227
1227
  a.isImageBitmapLoader === !0 && (l = function(h) {
1228
- const u = new _0(h);
1228
+ const u = new A0(h);
1229
1229
  u.needsUpdate = !0, o(u);
1230
- }), a.load(J.resolveURL(d, r.path), l, void 0, s);
1230
+ }), a.load(Q.resolveURL(d, H.path), l, void 0, s);
1231
1231
  });
1232
1232
  }).then(function(d) {
1233
- return t === !0 && c.revokeObjectURL(f), O(d, i), d.userData.mimeType = i.mimeType || _2(i.uri), d;
1233
+ return t === !0 && c.revokeObjectURL(f), E(d, i), d.userData.mimeType = i.mimeType || m2(i.uri), d;
1234
1234
  }).catch(function(d) {
1235
1235
  throw console.error("THREE.GLTFLoader: Couldn't load texture", f), d;
1236
1236
  });
@@ -1246,15 +1246,15 @@ class p2 {
1246
1246
  * @param {string} [colorSpace]
1247
1247
  * @return {Promise<Texture>}
1248
1248
  */
1249
- assignTexture(e, a, H, b) {
1250
- const r = this;
1251
- return this.getDependency("texture", H.index).then(function(i) {
1249
+ assignTexture(e, a, r, b) {
1250
+ const H = this;
1251
+ return this.getDependency("texture", r.index).then(function(i) {
1252
1252
  if (!i) return null;
1253
- if (H.texCoord !== void 0 && H.texCoord > 0 && (i = i.clone(), i.channel = H.texCoord), r.extensions[p.KHR_TEXTURE_TRANSFORM]) {
1254
- const c = H.extensions !== void 0 ? H.extensions[p.KHR_TEXTURE_TRANSFORM] : void 0;
1253
+ if (r.texCoord !== void 0 && r.texCoord > 0 && (i = i.clone(), i.channel = r.texCoord), H.extensions[p.KHR_TEXTURE_TRANSFORM]) {
1254
+ const c = r.extensions !== void 0 ? r.extensions[p.KHR_TEXTURE_TRANSFORM] : void 0;
1255
1255
  if (c) {
1256
- const f = r.associations.get(i);
1257
- i = r.extensions[p.KHR_TEXTURE_TRANSFORM].extendTexture(i, c), r.associations.set(i, f);
1256
+ const f = H.associations.get(i);
1257
+ i = H.extensions[p.KHR_TEXTURE_TRANSFORM].extendTexture(i, c), H.associations.set(i, f);
1258
1258
  }
1259
1259
  }
1260
1260
  return b !== void 0 && (i.colorSpace = b), e[a] = i, i;
@@ -1272,27 +1272,27 @@ class p2 {
1272
1272
  */
1273
1273
  assignFinalMaterial(e) {
1274
1274
  const a = e.geometry;
1275
- let H = e.material;
1276
- const b = a.attributes.tangent === void 0, r = a.attributes.color !== void 0, i = a.attributes.normal === void 0;
1275
+ let r = e.material;
1276
+ const b = a.attributes.tangent === void 0, H = a.attributes.color !== void 0, i = a.attributes.normal === void 0;
1277
1277
  if (e.isPoints) {
1278
- const c = "PointsMaterial:" + H.uuid;
1278
+ const c = "PointsMaterial:" + r.uuid;
1279
1279
  let f = this.cache.get(c);
1280
- f || (f = new ue(), b0.prototype.copy.call(f, H), f.color.copy(H.color), f.map = H.map, f.sizeAttenuation = !1, this.cache.add(c, f)), H = f;
1280
+ f || (f = new le(), b0.prototype.copy.call(f, r), f.color.copy(r.color), f.map = r.map, f.sizeAttenuation = !1, this.cache.add(c, f)), r = f;
1281
1281
  } else if (e.isLine) {
1282
- const c = "LineBasicMaterial:" + H.uuid;
1282
+ const c = "LineBasicMaterial:" + r.uuid;
1283
1283
  let f = this.cache.get(c);
1284
- f || (f = new le(), b0.prototype.copy.call(f, H), f.color.copy(H.color), f.map = H.map, this.cache.add(c, f)), H = f;
1284
+ f || (f = new he(), b0.prototype.copy.call(f, r), f.color.copy(r.color), f.map = r.map, this.cache.add(c, f)), r = f;
1285
1285
  }
1286
- if (b || r || i) {
1287
- let c = "ClonedMaterial:" + H.uuid + ":";
1288
- b && (c += "derivative-tangents:"), r && (c += "vertex-colors:"), i && (c += "flat-shading:");
1286
+ if (b || H || i) {
1287
+ let c = "ClonedMaterial:" + r.uuid + ":";
1288
+ b && (c += "derivative-tangents:"), H && (c += "vertex-colors:"), i && (c += "flat-shading:");
1289
1289
  let f = this.cache.get(c);
1290
- f || (f = H.clone(), r && (f.vertexColors = !0), i && (f.flatShading = !0), b && (f.normalScale && (f.normalScale.y *= -1), f.clearcoatNormalScale && (f.clearcoatNormalScale.y *= -1)), this.cache.add(c, f), this.associations.set(f, this.associations.get(H))), H = f;
1290
+ f || (f = r.clone(), H && (f.vertexColors = !0), i && (f.flatShading = !0), b && (f.normalScale && (f.normalScale.y *= -1), f.clearcoatNormalScale && (f.clearcoatNormalScale.y *= -1)), this.cache.add(c, f), this.associations.set(f, this.associations.get(r))), r = f;
1291
1291
  }
1292
- e.material = H;
1292
+ e.material = r;
1293
1293
  }
1294
1294
  getMaterialType() {
1295
- return G0;
1295
+ return U0;
1296
1296
  }
1297
1297
  /**
1298
1298
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1302,14 +1302,14 @@ class p2 {
1302
1302
  * @return {Promise<Material>}
1303
1303
  */
1304
1304
  loadMaterial(e) {
1305
- const a = this, H = this.json, b = this.extensions, r = H.materials[e];
1305
+ const a = this, r = this.json, b = this.extensions, H = r.materials[e];
1306
1306
  let i;
1307
- const c = {}, f = r.extensions || {}, t = [];
1307
+ const c = {}, f = H.extensions || {}, t = [];
1308
1308
  if (f[p.KHR_MATERIALS_UNLIT]) {
1309
1309
  const d = b[p.KHR_MATERIALS_UNLIT];
1310
- i = d.getMaterialType(), t.push(d.extendParams(c, r, a));
1310
+ i = d.getMaterialType(), t.push(d.extendParams(c, H, a));
1311
1311
  } else {
1312
- const d = r.pbrMetallicRoughness || {};
1312
+ const d = H.pbrMetallicRoughness || {};
1313
1313
  if (c.color = new x(1, 1, 1), c.opacity = 1, Array.isArray(d.baseColorFactor)) {
1314
1314
  const o = d.baseColorFactor;
1315
1315
  c.color.setRGB(o[0], o[1], o[2], M), c.opacity = o[3];
@@ -1320,19 +1320,19 @@ class p2 {
1320
1320
  return o.extendMaterialParams && o.extendMaterialParams(e, c);
1321
1321
  })));
1322
1322
  }
1323
- r.doubleSided === !0 && (c.side = he);
1324
- const n = r.alphaMode || r0.OPAQUE;
1325
- if (n === r0.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, n === r0.MASK && (c.alphaTest = r.alphaCutoff !== void 0 ? r.alphaCutoff : 0.5)), r.normalTexture !== void 0 && i !== Q && (t.push(a.assignTexture(c, "normalMap", r.normalTexture)), c.normalScale = new R0(1, 1), r.normalTexture.scale !== void 0)) {
1326
- const d = r.normalTexture.scale;
1323
+ H.doubleSided === !0 && (c.side = ge);
1324
+ const n = H.alphaMode || r0.OPAQUE;
1325
+ if (n === r0.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, n === r0.MASK && (c.alphaTest = H.alphaCutoff !== void 0 ? H.alphaCutoff : 0.5)), H.normalTexture !== void 0 && i !== z && (t.push(a.assignTexture(c, "normalMap", H.normalTexture)), c.normalScale = new M0(1, 1), H.normalTexture.scale !== void 0)) {
1326
+ const d = H.normalTexture.scale;
1327
1327
  c.normalScale.set(d, d);
1328
1328
  }
1329
- if (r.occlusionTexture !== void 0 && i !== Q && (t.push(a.assignTexture(c, "aoMap", r.occlusionTexture)), r.occlusionTexture.strength !== void 0 && (c.aoMapIntensity = r.occlusionTexture.strength)), r.emissiveFactor !== void 0 && i !== Q) {
1330
- const d = r.emissiveFactor;
1329
+ if (H.occlusionTexture !== void 0 && i !== z && (t.push(a.assignTexture(c, "aoMap", H.occlusionTexture)), H.occlusionTexture.strength !== void 0 && (c.aoMapIntensity = H.occlusionTexture.strength)), H.emissiveFactor !== void 0 && i !== z) {
1330
+ const d = H.emissiveFactor;
1331
1331
  c.emissive = new x().setRGB(d[0], d[1], d[2], M);
1332
1332
  }
1333
- return r.emissiveTexture !== void 0 && i !== Q && t.push(a.assignTexture(c, "emissiveMap", r.emissiveTexture, U)), Promise.all(t).then(function() {
1333
+ return H.emissiveTexture !== void 0 && i !== z && t.push(a.assignTexture(c, "emissiveMap", H.emissiveTexture, U)), Promise.all(t).then(function() {
1334
1334
  const d = new i(c);
1335
- return r.name && (d.name = r.name), O(d, r), a.associations.set(d, { materials: e }), r.extensions && V(b, d, r), d;
1335
+ return H.name && (d.name = H.name), E(d, H), a.associations.set(d, { materials: e }), H.extensions && V(b, d, H), d;
1336
1336
  });
1337
1337
  }
1338
1338
  /**
@@ -1343,7 +1343,7 @@ class p2 {
1343
1343
  * @return {string}
1344
1344
  */
1345
1345
  createUniqueName(e) {
1346
- const a = ge.sanitizeNodeName(e || "");
1346
+ const a = _e.sanitizeNodeName(e || "");
1347
1347
  return a in this.nodeNamesUsed ? a + "_" + ++this.nodeNamesUsed[a] : (this.nodeNamesUsed[a] = 0, a);
1348
1348
  }
1349
1349
  /**
@@ -1356,20 +1356,20 @@ class p2 {
1356
1356
  * @return {Promise<Array<BufferGeometry>>}
1357
1357
  */
1358
1358
  loadGeometries(e) {
1359
- const a = this, H = this.extensions, b = this.primitiveCache;
1360
- function r(c) {
1361
- return H[p.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, a).then(function(f) {
1362
- return N0(f, c, a);
1359
+ const a = this, r = this.extensions, b = this.primitiveCache;
1360
+ function H(c) {
1361
+ return r[p.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, a).then(function(f) {
1362
+ return v0(f, c, a);
1363
1363
  });
1364
1364
  }
1365
1365
  const i = [];
1366
1366
  for (let c = 0, f = e.length; c < f; c++) {
1367
- const t = e[c], n = g2(t), d = b[n];
1367
+ const t = e[c], n = p2(t), d = b[n];
1368
1368
  if (d)
1369
1369
  i.push(d.promise);
1370
1370
  else {
1371
1371
  let o;
1372
- t.extensions && t.extensions[p.KHR_DRACO_MESH_COMPRESSION] ? o = r(t) : o = N0(new U0(), t, a), b[n] = { primitive: t, promise: o }, i.push(o);
1372
+ t.extensions && t.extensions[p.KHR_DRACO_MESH_COMPRESSION] ? o = H(t) : o = v0(new x0(), t, a), b[n] = { primitive: t, promise: o }, i.push(o);
1373
1373
  }
1374
1374
  }
1375
1375
  return Promise.all(i);
@@ -1382,9 +1382,9 @@ class p2 {
1382
1382
  * @return {Promise<Group|Mesh|SkinnedMesh|Line|Points>}
1383
1383
  */
1384
1384
  loadMesh(e) {
1385
- const a = this, H = this.json, b = this.extensions, r = H.meshes[e], i = r.primitives, c = [];
1385
+ const a = this, r = this.json, b = this.extensions, H = r.meshes[e], i = H.primitives, c = [];
1386
1386
  for (let f = 0, t = i.length; f < t; f++) {
1387
- const n = i[f].material === void 0 ? u2(this.cache) : this.getDependency("material", i[f].material);
1387
+ const n = i[f].material === void 0 ? g2(this.cache) : this.getDependency("material", i[f].material);
1388
1388
  c.push(n);
1389
1389
  }
1390
1390
  return c.push(a.loadGeometries(i)), Promise.all(c).then(function(f) {
@@ -1394,18 +1394,18 @@ class p2 {
1394
1394
  let g;
1395
1395
  const _ = t[s];
1396
1396
  if (u.mode === w.TRIANGLES || u.mode === w.TRIANGLE_STRIP || u.mode === w.TRIANGLE_FAN || u.mode === void 0)
1397
- g = r.isSkinnedMesh === !0 ? new _e(h, _) : new x0(h, _), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), u.mode === w.TRIANGLE_STRIP ? g.geometry = I0(g.geometry, v0) : u.mode === w.TRIANGLE_FAN && (g.geometry = I0(g.geometry, t0));
1397
+ g = H.isSkinnedMesh === !0 ? new Ae(h, _) : new q0(h, _), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), u.mode === w.TRIANGLE_STRIP ? g.geometry = y0(g.geometry, T0) : u.mode === w.TRIANGLE_FAN && (g.geometry = y0(g.geometry, t0));
1398
1398
  else if (u.mode === w.LINES)
1399
- g = new Ae(h, _);
1400
- else if (u.mode === w.LINE_STRIP)
1401
1399
  g = new pe(h, _);
1402
- else if (u.mode === w.LINE_LOOP)
1400
+ else if (u.mode === w.LINE_STRIP)
1403
1401
  g = new me(h, _);
1404
- else if (u.mode === w.POINTS)
1402
+ else if (u.mode === w.LINE_LOOP)
1405
1403
  g = new je(h, _);
1404
+ else if (u.mode === w.POINTS)
1405
+ g = new Ie(h, _);
1406
1406
  else
1407
1407
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + u.mode);
1408
- Object.keys(g.geometry.morphAttributes).length > 0 && h2(g, r), g.name = a.createUniqueName(r.name || "mesh_" + e), O(g, r), u.extensions && V(b, g, u), a.assignFinalMaterial(g), d.push(g);
1408
+ Object.keys(g.geometry.morphAttributes).length > 0 && A2(g, H), g.name = a.createUniqueName(H.name || "mesh_" + e), E(g, H), u.extensions && V(b, g, u), a.assignFinalMaterial(g), d.push(g);
1409
1409
  }
1410
1410
  for (let s = 0, l = d.length; s < l; s++)
1411
1411
  a.associations.set(d[s], {
@@ -1413,9 +1413,9 @@ class p2 {
1413
1413
  primitives: s
1414
1414
  });
1415
1415
  if (d.length === 1)
1416
- return r.extensions && V(b, d[0], r), d[0];
1416
+ return H.extensions && V(b, d[0], H), d[0];
1417
1417
  const o = new i0();
1418
- r.extensions && V(b, o, r), a.associations.set(o, { meshes: e });
1418
+ H.extensions && V(b, o, H), a.associations.set(o, { meshes: e });
1419
1419
  for (let s = 0, l = d.length; s < l; s++)
1420
1420
  o.add(d[s]);
1421
1421
  return o;
@@ -1430,12 +1430,12 @@ class p2 {
1430
1430
  */
1431
1431
  loadCamera(e) {
1432
1432
  let a;
1433
- const H = this.json.cameras[e], b = H[H.type];
1433
+ const r = this.json.cameras[e], b = r[r.type];
1434
1434
  if (!b) {
1435
1435
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1436
1436
  return;
1437
1437
  }
1438
- return H.type === "perspective" ? a = new Ie(ye.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : H.type === "orthographic" && (a = new Fe(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), H.name && (a.name = this.createUniqueName(H.name)), O(a, H), Promise.resolve(a);
1438
+ return r.type === "perspective" ? a = new ye(Fe.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : r.type === "orthographic" && (a = new we(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), r.name && (a.name = this.createUniqueName(r.name)), E(a, r), Promise.resolve(a);
1439
1439
  }
1440
1440
  /**
1441
1441
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1445,21 +1445,21 @@ class p2 {
1445
1445
  * @return {Promise<Skeleton>}
1446
1446
  */
1447
1447
  loadSkin(e) {
1448
- const a = this.json.skins[e], H = [];
1449
- for (let b = 0, r = a.joints.length; b < r; b++)
1450
- H.push(this._loadNodeShallow(a.joints[b]));
1451
- return a.inverseBindMatrices !== void 0 ? H.push(this.getDependency("accessor", a.inverseBindMatrices)) : H.push(null), Promise.all(H).then(function(b) {
1452
- const r = b.pop(), i = b, c = [], f = [];
1448
+ const a = this.json.skins[e], r = [];
1449
+ for (let b = 0, H = a.joints.length; b < H; b++)
1450
+ r.push(this._loadNodeShallow(a.joints[b]));
1451
+ return a.inverseBindMatrices !== void 0 ? r.push(this.getDependency("accessor", a.inverseBindMatrices)) : r.push(null), Promise.all(r).then(function(b) {
1452
+ const H = b.pop(), i = b, c = [], f = [];
1453
1453
  for (let t = 0, n = i.length; t < n; t++) {
1454
1454
  const d = i[t];
1455
1455
  if (d) {
1456
1456
  c.push(d);
1457
1457
  const o = new $();
1458
- r !== null && o.fromArray(r.array, t * 16), f.push(o);
1458
+ H !== null && o.fromArray(H.array, t * 16), f.push(o);
1459
1459
  } else
1460
1460
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', a.joints[t]);
1461
1461
  }
1462
- return new we(c, f);
1462
+ return new Ne(c, f);
1463
1463
  });
1464
1464
  }
1465
1465
  /**
@@ -1470,7 +1470,7 @@ class p2 {
1470
1470
  * @return {Promise<AnimationClip>}
1471
1471
  */
1472
1472
  loadAnimation(e) {
1473
- const a = this.json, H = this, b = a.animations[e], r = b.name ? b.name : "animation_" + e, i = [], c = [], f = [], t = [], n = [];
1473
+ const a = this.json, r = this, b = a.animations[e], H = b.name ? b.name : "animation_" + e, i = [], c = [], f = [], t = [], n = [];
1474
1474
  for (let d = 0, o = b.channels.length; d < o; d++) {
1475
1475
  const s = b.channels[d], l = b.samplers[s.sampler], h = s.target, u = h.node, g = b.parameters !== void 0 ? b.parameters[l.input] : l.input, _ = b.parameters !== void 0 ? b.parameters[l.output] : l.output;
1476
1476
  h.node !== void 0 && (i.push(this.getDependency("node", u)), c.push(this.getDependency("accessor", g)), f.push(this.getDependency("accessor", _)), t.push(l), n.push(h));
@@ -1484,21 +1484,21 @@ class p2 {
1484
1484
  ]).then(function(d) {
1485
1485
  const o = d[0], s = d[1], l = d[2], h = d[3], u = d[4], g = [];
1486
1486
  for (let _ = 0, m = o.length; _ < m; _++) {
1487
- const A = o[_], I = s[_], F = l[_], y = h[_], E = u[_];
1487
+ const A = o[_], I = s[_], F = l[_], y = h[_], O = u[_];
1488
1488
  if (A === void 0) continue;
1489
1489
  A.updateMatrix && A.updateMatrix();
1490
- const N = H._createAnimationTracks(A, I, F, y, E);
1490
+ const N = r._createAnimationTracks(A, I, F, y, O);
1491
1491
  if (N)
1492
1492
  for (let T = 0; T < N.length; T++)
1493
1493
  g.push(N[T]);
1494
1494
  }
1495
- return new Ne(r, void 0, g);
1495
+ return new ve(H, void 0, g);
1496
1496
  });
1497
1497
  }
1498
1498
  createNodeMesh(e) {
1499
- const a = this.json, H = this, b = a.nodes[e];
1500
- return b.mesh === void 0 ? null : H.getDependency("mesh", b.mesh).then(function(r) {
1501
- const i = H._getNodeRef(H.meshCache, b.mesh, r);
1499
+ const a = this.json, r = this, b = a.nodes[e];
1500
+ return b.mesh === void 0 ? null : r.getDependency("mesh", b.mesh).then(function(H) {
1501
+ const i = r._getNodeRef(r.meshCache, b.mesh, H);
1502
1502
  return b.weights !== void 0 && i.traverse(function(c) {
1503
1503
  if (c.isMesh)
1504
1504
  for (let f = 0, t = b.weights.length; f < t; f++)
@@ -1514,18 +1514,18 @@ class p2 {
1514
1514
  * @return {Promise<Object3D>}
1515
1515
  */
1516
1516
  loadNode(e) {
1517
- const a = this.json, H = this, b = a.nodes[e], r = H._loadNodeShallow(e), i = [], c = b.children || [];
1517
+ const a = this.json, r = this, b = a.nodes[e], H = r._loadNodeShallow(e), i = [], c = b.children || [];
1518
1518
  for (let t = 0, n = c.length; t < n; t++)
1519
- i.push(H.getDependency("node", c[t]));
1520
- const f = b.skin === void 0 ? Promise.resolve(null) : H.getDependency("skin", b.skin);
1519
+ i.push(r.getDependency("node", c[t]));
1520
+ const f = b.skin === void 0 ? Promise.resolve(null) : r.getDependency("skin", b.skin);
1521
1521
  return Promise.all([
1522
- r,
1522
+ H,
1523
1523
  Promise.all(i),
1524
1524
  f
1525
1525
  ]).then(function(t) {
1526
1526
  const n = t[0], d = t[1], o = t[2];
1527
1527
  o !== null && n.traverse(function(s) {
1528
- s.isSkinnedMesh && s.bind(o, A2);
1528
+ s.isSkinnedMesh && s.bind(o, j2);
1529
1529
  });
1530
1530
  for (let s = 0, l = d.length; s < l; s++)
1531
1531
  n.add(d[s]);
@@ -1535,31 +1535,31 @@ class p2 {
1535
1535
  // ._loadNodeShallow() parses a single node.
1536
1536
  // skin and child nodes are created and added in .loadNode() (no '_' prefix).
1537
1537
  _loadNodeShallow(e) {
1538
- const a = this.json, H = this.extensions, b = this;
1538
+ const a = this.json, r = this.extensions, b = this;
1539
1539
  if (this.nodeCache[e] !== void 0)
1540
1540
  return this.nodeCache[e];
1541
- const r = a.nodes[e], i = r.name ? b.createUniqueName(r.name) : "", c = [], f = b._invokeOne(function(t) {
1541
+ const H = a.nodes[e], i = H.name ? b.createUniqueName(H.name) : "", c = [], f = b._invokeOne(function(t) {
1542
1542
  return t.createNodeMesh && t.createNodeMesh(e);
1543
1543
  });
1544
- return f && c.push(f), r.camera !== void 0 && c.push(b.getDependency("camera", r.camera).then(function(t) {
1545
- return b._getNodeRef(b.cameraCache, r.camera, t);
1544
+ return f && c.push(f), H.camera !== void 0 && c.push(b.getDependency("camera", H.camera).then(function(t) {
1545
+ return b._getNodeRef(b.cameraCache, H.camera, t);
1546
1546
  })), b._invokeAll(function(t) {
1547
1547
  return t.createNodeAttachment && t.createNodeAttachment(e);
1548
1548
  }).forEach(function(t) {
1549
1549
  c.push(t);
1550
1550
  }), this.nodeCache[e] = Promise.all(c).then(function(t) {
1551
1551
  let n;
1552
- if (r.isBone === !0 ? n = new ve() : t.length > 1 ? n = new i0() : t.length === 1 ? n = t[0] : n = new D0(), n !== t[0])
1552
+ if (H.isBone === !0 ? n = new Te() : t.length > 1 ? n = new i0() : t.length === 1 ? n = t[0] : n = new O0(), n !== t[0])
1553
1553
  for (let d = 0, o = t.length; d < o; d++)
1554
1554
  n.add(t[d]);
1555
- if (r.name && (n.userData.name = r.name, n.name = i), O(n, r), r.extensions && V(H, n, r), r.matrix !== void 0) {
1555
+ if (H.name && (n.userData.name = H.name, n.name = i), E(n, H), H.extensions && V(r, n, H), H.matrix !== void 0) {
1556
1556
  const d = new $();
1557
- d.fromArray(r.matrix), n.applyMatrix4(d);
1557
+ d.fromArray(H.matrix), n.applyMatrix4(d);
1558
1558
  } else
1559
- r.translation !== void 0 && n.position.fromArray(r.translation), r.rotation !== void 0 && n.quaternion.fromArray(r.rotation), r.scale !== void 0 && n.scale.fromArray(r.scale);
1559
+ H.translation !== void 0 && n.position.fromArray(H.translation), H.rotation !== void 0 && n.quaternion.fromArray(H.rotation), H.scale !== void 0 && n.scale.fromArray(H.scale);
1560
1560
  if (!b.associations.has(n))
1561
1561
  b.associations.set(n, {});
1562
- else if (r.mesh !== void 0 && b.meshCache.refs[r.mesh] > 1) {
1562
+ else if (H.mesh !== void 0 && b.meshCache.refs[H.mesh] > 1) {
1563
1563
  const d = b.associations.get(n);
1564
1564
  b.associations.set(n, { ...d });
1565
1565
  }
@@ -1574,60 +1574,60 @@ class p2 {
1574
1574
  * @return {Promise<Group>}
1575
1575
  */
1576
1576
  loadScene(e) {
1577
- const a = this.extensions, H = this.json.scenes[e], b = this, r = new i0();
1578
- H.name && (r.name = b.createUniqueName(H.name)), O(r, H), H.extensions && V(a, r, H);
1579
- const i = H.nodes || [], c = [];
1577
+ const a = this.extensions, r = this.json.scenes[e], b = this, H = new i0();
1578
+ r.name && (H.name = b.createUniqueName(r.name)), E(H, r), r.extensions && V(a, H, r);
1579
+ const i = r.nodes || [], c = [];
1580
1580
  for (let f = 0, t = i.length; f < t; f++)
1581
1581
  c.push(b.getDependency("node", i[f]));
1582
1582
  return Promise.all(c).then(function(f) {
1583
1583
  for (let n = 0, d = f.length; n < d; n++)
1584
- r.add(f[n]);
1584
+ H.add(f[n]);
1585
1585
  const t = (n) => {
1586
1586
  const d = /* @__PURE__ */ new Map();
1587
1587
  for (const [o, s] of b.associations)
1588
- (o instanceof b0 || o instanceof _0) && d.set(o, s);
1588
+ (o instanceof b0 || o instanceof A0) && d.set(o, s);
1589
1589
  return n.traverse((o) => {
1590
1590
  const s = b.associations.get(o);
1591
1591
  s != null && d.set(o, s);
1592
1592
  }), d;
1593
1593
  };
1594
- return b.associations = t(r), r;
1594
+ return b.associations = t(H), H;
1595
1595
  });
1596
1596
  }
1597
- _createAnimationTracks(e, a, H, b, r) {
1597
+ _createAnimationTracks(e, a, r, b, H) {
1598
1598
  const i = [], c = e.name ? e.name : e.uuid, f = [];
1599
- G[r.path] === G.weights ? e.traverse(function(o) {
1599
+ G[H.path] === G.weights ? e.traverse(function(o) {
1600
1600
  o.morphTargetInfluences && f.push(o.name ? o.name : o.uuid);
1601
1601
  }) : f.push(c);
1602
1602
  let t;
1603
- switch (G[r.path]) {
1603
+ switch (G[H.path]) {
1604
1604
  case G.weights:
1605
- t = p0;
1605
+ t = m0;
1606
1606
  break;
1607
1607
  case G.rotation:
1608
- t = m0;
1608
+ t = j0;
1609
1609
  break;
1610
1610
  case G.translation:
1611
1611
  case G.scale:
1612
- t = A0;
1612
+ t = p0;
1613
1613
  break;
1614
1614
  default:
1615
- switch (H.itemSize) {
1615
+ switch (r.itemSize) {
1616
1616
  case 1:
1617
- t = p0;
1617
+ t = m0;
1618
1618
  break;
1619
1619
  case 2:
1620
1620
  case 3:
1621
1621
  default:
1622
- t = A0;
1622
+ t = p0;
1623
1623
  break;
1624
1624
  }
1625
1625
  break;
1626
1626
  }
1627
- const n = b.interpolation !== void 0 ? s2[b.interpolation] : q0, d = this._getArrayFromAccessor(H);
1627
+ const n = b.interpolation !== void 0 ? h2[b.interpolation] : B0, d = this._getArrayFromAccessor(r);
1628
1628
  for (let o = 0, s = f.length; o < s; o++) {
1629
1629
  const l = new t(
1630
- f[o] + "." + G[r.path],
1630
+ f[o] + "." + G[H.path],
1631
1631
  a.array,
1632
1632
  d,
1633
1633
  n
@@ -1639,24 +1639,24 @@ class p2 {
1639
1639
  _getArrayFromAccessor(e) {
1640
1640
  let a = e.array;
1641
1641
  if (e.normalized) {
1642
- const H = s0(a.constructor), b = new Float32Array(a.length);
1643
- for (let r = 0, i = a.length; r < i; r++)
1644
- b[r] = a[r] * H;
1642
+ const r = s0(a.constructor), b = new Float32Array(a.length);
1643
+ for (let H = 0, i = a.length; H < i; H++)
1644
+ b[H] = a[H] * r;
1645
1645
  a = b;
1646
1646
  }
1647
1647
  return a;
1648
1648
  }
1649
1649
  _createCubicSplineTrackInterpolant(e) {
1650
- e.createInterpolant = function(H) {
1651
- const b = this instanceof m0 ? k2 : P0;
1652
- return new b(this.times, this.values, this.getValueSize() / 3, H);
1650
+ e.createInterpolant = function(r) {
1651
+ const b = this instanceof j0 ? l2 : W0;
1652
+ return new b(this.times, this.values, this.getValueSize() / 3, r);
1653
1653
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1654
1654
  }
1655
1655
  }
1656
- function m2(k, e, a) {
1657
- const H = e.attributes, b = new B0();
1658
- if (H.POSITION !== void 0) {
1659
- const c = a.json.accessors[H.POSITION], f = c.min, t = c.max;
1656
+ function y2(k, e, a) {
1657
+ const r = e.attributes, b = new V0();
1658
+ if (r.POSITION !== void 0) {
1659
+ const c = a.json.accessors[r.POSITION], f = c.min, t = c.max;
1660
1660
  if (f !== void 0 && t !== void 0) {
1661
1661
  if (b.set(
1662
1662
  new C(f[0], f[1], f[2]),
@@ -1671,11 +1671,11 @@ function m2(k, e, a) {
1671
1671
  }
1672
1672
  } else
1673
1673
  return;
1674
- const r = e.targets;
1675
- if (r !== void 0) {
1674
+ const H = e.targets;
1675
+ if (H !== void 0) {
1676
1676
  const c = new C(), f = new C();
1677
- for (let t = 0, n = r.length; t < n; t++) {
1678
- const d = r[t];
1677
+ for (let t = 0, n = H.length; t < n; t++) {
1678
+ const d = H[t];
1679
1679
  if (d.POSITION !== void 0) {
1680
1680
  const o = a.json.accessors[d.POSITION], s = o.min, l = o.max;
1681
1681
  if (s !== void 0 && l !== void 0) {
@@ -1691,19 +1691,19 @@ function m2(k, e, a) {
1691
1691
  b.expandByVector(c);
1692
1692
  }
1693
1693
  k.boundingBox = b;
1694
- const i = new Oe();
1694
+ const i = new Ee();
1695
1695
  b.getCenter(i.center), i.radius = b.min.distanceTo(b.max) / 2, k.boundingSphere = i;
1696
1696
  }
1697
- function N0(k, e, a) {
1698
- const H = e.attributes, b = [];
1699
- function r(i, c) {
1697
+ function v0(k, e, a) {
1698
+ const r = e.attributes, b = [];
1699
+ function H(i, c) {
1700
1700
  return a.getDependency("accessor", i).then(function(f) {
1701
1701
  k.setAttribute(c, f);
1702
1702
  });
1703
1703
  }
1704
- for (const i in H) {
1704
+ for (const i in r) {
1705
1705
  const c = k0[i] || i.toLowerCase();
1706
- c in k.attributes || b.push(r(H[i], c));
1706
+ c in k.attributes || b.push(H(r[i], c));
1707
1707
  }
1708
1708
  if (e.indices !== void 0 && !k.index) {
1709
1709
  const i = a.getDependency("accessor", e.indices).then(function(c) {
@@ -1711,12 +1711,12 @@ function N0(k, e, a) {
1711
1711
  });
1712
1712
  b.push(i);
1713
1713
  }
1714
- return o0.workingColorSpace !== M && "COLOR_0" in H && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${o0.workingColorSpace}" not supported.`), O(k, e), m2(k, e, a), Promise.all(b).then(function() {
1715
- return e.targets !== void 0 ? l2(k, e.targets, a) : k;
1714
+ return o0.workingColorSpace !== M && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${o0.workingColorSpace}" not supported.`), E(k, e), y2(k, e, a), Promise.all(b).then(function() {
1715
+ return e.targets !== void 0 ? _2(k, e.targets, a) : k;
1716
1716
  });
1717
1717
  }
1718
1718
  const c0 = /* @__PURE__ */ new WeakMap();
1719
- class j2 extends T0 {
1719
+ class F2 extends R0 {
1720
1720
  /**
1721
1721
  * Constructs a new Draco loader.
1722
1722
  *
@@ -1772,11 +1772,11 @@ class j2 extends T0 {
1772
1772
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
1773
1773
  * @param {onErrorCallback} onError - Executed when errors occur.
1774
1774
  */
1775
- load(e, a, H, b) {
1776
- const r = new X(this.manager);
1777
- r.setPath(this.path), r.setResponseType("arraybuffer"), r.setRequestHeader(this.requestHeader), r.setWithCredentials(this.withCredentials), r.load(e, (i) => {
1775
+ load(e, a, r, b) {
1776
+ const H = new X(this.manager);
1777
+ H.setPath(this.path), H.setResponseType("arraybuffer"), H.setRequestHeader(this.requestHeader), H.setWithCredentials(this.withCredentials), H.load(e, (i) => {
1778
1778
  this.parse(i, a, b);
1779
- }, H, b);
1779
+ }, r, b);
1780
1780
  }
1781
1781
  /**
1782
1782
  * Parses the given Draco data.
@@ -1785,26 +1785,26 @@ class j2 extends T0 {
1785
1785
  * @param {function(BufferGeometry)} onLoad - Executed when the loading/parsing process has been finished.
1786
1786
  * @param {onErrorCallback} onError - Executed when errors occur.
1787
1787
  */
1788
- parse(e, a, H = () => {
1788
+ parse(e, a, r = () => {
1789
1789
  }) {
1790
- this.decodeDracoFile(e, a, null, null, U, H).catch(H);
1790
+ this.decodeDracoFile(e, a, null, null, U, r).catch(r);
1791
1791
  }
1792
1792
  //
1793
- decodeDracoFile(e, a, H, b, r = M, i = () => {
1793
+ decodeDracoFile(e, a, r, b, H = M, i = () => {
1794
1794
  }) {
1795
1795
  const c = {
1796
- attributeIDs: H || this.defaultAttributeIDs,
1796
+ attributeIDs: r || this.defaultAttributeIDs,
1797
1797
  attributeTypes: b || this.defaultAttributeTypes,
1798
- useUniqueIDs: !!H,
1799
- vertexColorSpace: r
1798
+ useUniqueIDs: !!r,
1799
+ vertexColorSpace: H
1800
1800
  };
1801
1801
  return this.decodeGeometry(e, c).then(a).catch(i);
1802
1802
  }
1803
1803
  decodeGeometry(e, a) {
1804
- const H = JSON.stringify(a);
1804
+ const r = JSON.stringify(a);
1805
1805
  if (c0.has(e)) {
1806
1806
  const f = c0.get(e);
1807
- if (f.key === H)
1807
+ if (f.key === r)
1808
1808
  return f.promise;
1809
1809
  if (e.byteLength === 0)
1810
1810
  throw new Error(
@@ -1812,35 +1812,35 @@ class j2 extends T0 {
1812
1812
  );
1813
1813
  }
1814
1814
  let b;
1815
- const r = this.workerNextTaskID++, i = e.byteLength, c = this._getWorker(r, i).then((f) => (b = f, new Promise((t, n) => {
1816
- b._callbacks[r] = { resolve: t, reject: n }, b.postMessage({ type: "decode", id: r, taskConfig: a, buffer: e }, [e]);
1815
+ const H = this.workerNextTaskID++, i = e.byteLength, c = this._getWorker(H, i).then((f) => (b = f, new Promise((t, n) => {
1816
+ b._callbacks[H] = { resolve: t, reject: n }, b.postMessage({ type: "decode", id: H, taskConfig: a, buffer: e }, [e]);
1817
1817
  }))).then((f) => this._createGeometry(f.geometry));
1818
1818
  return c.catch(() => !0).then(() => {
1819
- b && r && this._releaseTask(b, r);
1819
+ b && H && this._releaseTask(b, H);
1820
1820
  }), c0.set(e, {
1821
- key: H,
1821
+ key: r,
1822
1822
  promise: c
1823
1823
  }), c;
1824
1824
  }
1825
1825
  _createGeometry(e) {
1826
- const a = new U0();
1827
- e.index && a.setIndex(new Y(e.index.array, 1));
1828
- for (let H = 0; H < e.attributes.length; H++) {
1829
- const b = e.attributes[H], r = b.name, i = b.array, c = b.itemSize, f = new Y(i, c);
1830
- r === "color" && (this._assignVertexColorSpace(f, b.vertexColorSpace), f.normalized = !(i instanceof Float32Array)), a.setAttribute(r, f);
1826
+ const a = new x0();
1827
+ e.index && a.setIndex(new J(e.index.array, 1));
1828
+ for (let r = 0; r < e.attributes.length; r++) {
1829
+ const b = e.attributes[r], H = b.name, i = b.array, c = b.itemSize, f = new J(i, c);
1830
+ H === "color" && (this._assignVertexColorSpace(f, b.vertexColorSpace), f.normalized = !(i instanceof Float32Array)), a.setAttribute(H, f);
1831
1831
  }
1832
1832
  return a;
1833
1833
  }
1834
1834
  _assignVertexColorSpace(e, a) {
1835
1835
  if (a !== U) return;
1836
- const H = new x();
1837
- for (let b = 0, r = e.count; b < r; b++)
1838
- H.fromBufferAttribute(e, b), o0.colorSpaceToWorking(H, U), e.setXYZ(b, H.r, H.g, H.b);
1836
+ const r = new x();
1837
+ for (let b = 0, H = e.count; b < H; b++)
1838
+ r.fromBufferAttribute(e, b), o0.colorSpaceToWorking(r, U), e.setXYZ(b, r.r, r.g, r.b);
1839
1839
  }
1840
1840
  _loadLibrary(e, a) {
1841
- const H = new X(this.manager);
1842
- return H.setPath(this.decoderPath), H.setResponseType(a), H.setWithCredentials(this.withCredentials), new Promise((b, r) => {
1843
- H.load(e, b, void 0, r);
1841
+ const r = new X(this.manager);
1842
+ return r.setPath(this.decoderPath), r.setResponseType(a), r.setWithCredentials(this.withCredentials), new Promise((b, H) => {
1843
+ r.load(e, b, void 0, H);
1844
1844
  });
1845
1845
  }
1846
1846
  preload() {
@@ -1849,15 +1849,15 @@ class j2 extends T0 {
1849
1849
  _initDecoder() {
1850
1850
  if (this.decoderPending) return this.decoderPending;
1851
1851
  const e = typeof WebAssembly != "object" || this.decoderConfig.type === "js", a = [];
1852
- return e ? a.push(this._loadLibrary("draco_decoder.js", "text")) : (a.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), a.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(a).then((H) => {
1853
- const b = H[0];
1854
- e || (this.decoderConfig.wasmBinary = H[1]);
1855
- const r = I2.toString(), i = [
1852
+ return e ? a.push(this._loadLibrary("draco_decoder.js", "text")) : (a.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), a.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(a).then((r) => {
1853
+ const b = r[0];
1854
+ e || (this.decoderConfig.wasmBinary = r[1]);
1855
+ const H = w2.toString(), i = [
1856
1856
  "/* draco decoder */",
1857
1857
  b,
1858
1858
  "",
1859
1859
  "/* worker */",
1860
- r.substring(r.indexOf("{") + 1, r.lastIndexOf("}"))
1860
+ H.substring(H.indexOf("{") + 1, H.lastIndexOf("}"))
1861
1861
  ].join(`
1862
1862
  `);
1863
1863
  this.workerSourceURL = URL.createObjectURL(new Blob([i]));
@@ -1867,8 +1867,8 @@ class j2 extends T0 {
1867
1867
  return this._initDecoder().then(() => {
1868
1868
  if (this.workerPool.length < this.workerLimit) {
1869
1869
  const b = new Worker(this.workerSourceURL);
1870
- b._callbacks = {}, b._taskCosts = {}, b._taskLoad = 0, b.postMessage({ type: "init", decoderConfig: this.decoderConfig }), b.onmessage = function(r) {
1871
- const i = r.data;
1870
+ b._callbacks = {}, b._taskCosts = {}, b._taskLoad = 0, b.postMessage({ type: "init", decoderConfig: this.decoderConfig }), b.onmessage = function(H) {
1871
+ const i = H.data;
1872
1872
  switch (i.type) {
1873
1873
  case "decode":
1874
1874
  b._callbacks[i.id].resolve(i);
@@ -1881,11 +1881,11 @@ class j2 extends T0 {
1881
1881
  }
1882
1882
  }, this.workerPool.push(b);
1883
1883
  } else
1884
- this.workerPool.sort(function(b, r) {
1885
- return b._taskLoad > r._taskLoad ? -1 : 1;
1884
+ this.workerPool.sort(function(b, H) {
1885
+ return b._taskLoad > H._taskLoad ? -1 : 1;
1886
1886
  });
1887
- const H = this.workerPool[this.workerPool.length - 1];
1888
- return H._taskCosts[e] = a, H._taskLoad += a, H;
1887
+ const r = this.workerPool[this.workerPool.length - 1];
1888
+ return r._taskCosts[e] = a, r._taskLoad += a, r;
1889
1889
  });
1890
1890
  }
1891
1891
  _releaseTask(e, a) {
@@ -1900,7 +1900,7 @@ class j2 extends T0 {
1900
1900
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
1901
1901
  }
1902
1902
  }
1903
- function I2() {
1903
+ function w2() {
1904
1904
  let k, e;
1905
1905
  onmessage = function(i) {
1906
1906
  const c = i.data;
@@ -1953,16 +1953,16 @@ function I2() {
1953
1953
  const A = b(i, c, o, u, g, _);
1954
1954
  u === "color" && (A.vertexColorSpace = t.vertexColorSpace), h.attributes.push(A);
1955
1955
  }
1956
- return l === i.TRIANGULAR_MESH && (h.index = H(i, c, o)), i.destroy(o), h;
1956
+ return l === i.TRIANGULAR_MESH && (h.index = r(i, c, o)), i.destroy(o), h;
1957
1957
  }
1958
- function H(i, c, f) {
1958
+ function r(i, c, f) {
1959
1959
  const n = f.num_faces() * 3, d = n * 4, o = i._malloc(d);
1960
1960
  c.GetTrianglesUInt32Array(f, d, o);
1961
1961
  const s = new Uint32Array(i.HEAPF32.buffer, o, n).slice();
1962
1962
  return i._free(o), { array: s, itemSize: 1 };
1963
1963
  }
1964
1964
  function b(i, c, f, t, n, d) {
1965
- const o = d.num_components(), l = f.num_points() * o, h = l * n.BYTES_PER_ELEMENT, u = r(i, n), g = i._malloc(h);
1965
+ const o = d.num_components(), l = f.num_points() * o, h = l * n.BYTES_PER_ELEMENT, u = H(i, n), g = i._malloc(h);
1966
1966
  c.GetAttributeDataArrayForAllPoints(f, d, u, h, g);
1967
1967
  const _ = new n(i.HEAPF32.buffer, g, l).slice();
1968
1968
  return i._free(g), {
@@ -1971,7 +1971,7 @@ function I2() {
1971
1971
  itemSize: o
1972
1972
  };
1973
1973
  }
1974
- function r(i, c) {
1974
+ function H(i, c) {
1975
1975
  switch (c) {
1976
1976
  case Float32Array:
1977
1977
  return i.DT_FLOAT32;
@@ -1990,7 +1990,7 @@ function I2() {
1990
1990
  }
1991
1991
  }
1992
1992
  }
1993
- const y2 = `
1993
+ const N2 = `
1994
1994
  var DracoDecoderModule = (() => {
1995
1995
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
1996
1996
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
@@ -2025,21 +2025,21 @@ else if (typeof define === 'function' && define['amd'])
2025
2025
  else if (typeof exports === 'object')
2026
2026
  exports["DracoDecoderModule"] = DracoDecoderModule;
2027
2027
  `;
2028
- function F2() {
2029
- const k = S(!1), e = S(""), a = S0([]), H = S(null), b = new xe(), r = new qe(), i = new Be(), c = new Pe();
2028
+ function v2() {
2029
+ const k = S(!1), e = S(""), a = L0([]), r = S(null), b = new Ve(), H = new Pe(), i = new We(), c = new Se();
2030
2030
  let f = null;
2031
2031
  return {
2032
2032
  isLoading: k,
2033
2033
  loadingProgress: e,
2034
2034
  loadedModels: a,
2035
- error: H,
2035
+ error: r,
2036
2036
  loadModelsFromBlobs: async (n) => {
2037
2037
  var l;
2038
2038
  if (!n || n.length === 0) {
2039
2039
  console.warn("loadModelsFromBlobs 加载的文件数组为空!");
2040
2040
  return;
2041
2041
  }
2042
- k.value = !0, e.value = "准备加载...", a.value = [], H.value = null;
2042
+ k.value = !0, e.value = "准备加载...", a.value = [], r.value = null;
2043
2043
  const d = /* @__PURE__ */ new Map();
2044
2044
  n.forEach((h) => {
2045
2045
  h instanceof File && d.set(h.name.toLowerCase(), h);
@@ -2062,62 +2062,62 @@ function F2() {
2062
2062
  if (d.has(I)) {
2063
2063
  const T = d.get(I), P = URL.createObjectURL(T);
2064
2064
  o.push(P);
2065
- const Z = await b.loadAsync(P);
2066
- Z.preload(), r.setMaterials(Z);
2065
+ const Y = await b.loadAsync(P);
2066
+ Y.preload(), H.setMaterials(Y);
2067
2067
  } else
2068
- r.setMaterials(null);
2069
- m = await r.loadAsync(_, A);
2068
+ H.setMaterials(null);
2069
+ m = await H.loadAsync(_, A);
2070
2070
  break;
2071
2071
  case "stl":
2072
- const F = await i.loadAsync(_, A), y = new Ee({ color: 11184810, specular: 1118481, shininess: 200 });
2073
- m = new x0(F, y);
2072
+ const F = await i.loadAsync(_, A), y = new Ge({ color: 11184810, specular: 1118481, shininess: 200 });
2073
+ m = new q0(F, y);
2074
2074
  break;
2075
2075
  case "gltf":
2076
2076
  m = (await c.loadAsync(_, A)).scene;
2077
2077
  break;
2078
2078
  case "glb":
2079
- f || (f = new j2(), f._loadLibrary = function(T, P) {
2080
- return T === "draco_decoder.js" && P === "text" ? Promise.resolve(y2) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${T}`));
2079
+ f || (f = new F2(), f._loadLibrary = function(T, P) {
2080
+ return T === "draco_decoder.js" && P === "text" ? Promise.resolve(N2) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${T}`));
2081
2081
  }, f.setDecoderConfig({ type: "js" }), f.preload()), c.setDRACOLoader(f), m = (await c.loadAsync(_, A)).scene;
2082
2082
  break;
2083
2083
  default:
2084
2084
  console.warn(`不支持的文件类型: .${g}`), e.value = `不支持的文件类型: ${u}`;
2085
2085
  continue;
2086
2086
  }
2087
- m && (m.userData.boundingBox = new B0().setFromObject(m), s.push(m));
2087
+ m && (m.userData.boundingBox = new V0().setFromObject(m), s.push(m));
2088
2088
  }
2089
2089
  a.value = s, e.value = "加载完成!";
2090
2090
  } catch (h) {
2091
- throw console.error("加载模型时出错:", h), H.value = `加载失败: ${h.message || "未知错误"}`, e.value = "加载失败!", a.value = [], h;
2091
+ throw console.error("加载模型时出错:", h), r.value = `加载失败: ${h.message || "未知错误"}`, e.value = "加载失败!", a.value = [], h;
2092
2092
  } finally {
2093
2093
  k.value = !1, o.forEach((h) => URL.revokeObjectURL(h));
2094
2094
  }
2095
2095
  }
2096
2096
  };
2097
2097
  }
2098
- function w2(k, e = {}) {
2098
+ function T2(k, e = {}) {
2099
2099
  const a = {
2100
2100
  threeInfo: {},
2101
2101
  modelLoader: {},
2102
2102
  animation: {},
2103
2103
  clipping: {}
2104
- }, H = Ge(k);
2105
- a.threeInfo = H;
2106
- const { currentModels: b, getThreeJSObjects: r } = H, { useModelLoaderHook: i, useAnimationHook: c, useClippingHook: f } = e;
2107
- return i && (a.modelLoader = F2()), a;
2104
+ }, r = Ue(k);
2105
+ a.threeInfo = r;
2106
+ const { currentModels: b, getThreeJSObjects: H } = r, { useModelLoaderHook: i, useAnimationHook: c, useClippingHook: f } = e;
2107
+ return i && (a.modelLoader = v2()), c && (a.animation = xe(H, b)), f && (a.clipping = qe(H, b)), a;
2108
2108
  }
2109
- const N2 = { class: "obj-viewer-container" }, v2 = { class: "buttonGroup-topLeft" }, T2 = { class: "buttonGroup-left" }, R2 = { class: "buttonGroup-right" }, M2 = { class: "left-panel" }, D2 = { class: "panel-header" }, O2 = {
2109
+ const R2 = { class: "obj-viewer-container" }, M2 = { class: "buttonGroup-topLeft" }, D2 = { class: "buttonGroup-left" }, O2 = { class: "buttonGroup-right" }, E2 = { class: "left-panel" }, G2 = { class: "panel-header" }, U2 = {
2110
2110
  key: 0,
2111
2111
  class: "loading-overlay"
2112
- }, E2 = /* @__PURE__ */ L0({
2112
+ }, x2 = /* @__PURE__ */ Z0({
2113
2113
  __name: "threePreview",
2114
2114
  props: {
2115
2115
  fileBlobs: { default: () => [] }
2116
2116
  },
2117
2117
  setup(k) {
2118
- const e = k, a = S(null), H = S(!1), b = S(""), {
2118
+ const e = k, a = S(null), r = S(!1), b = S(""), {
2119
2119
  threeInfo: {
2120
- currentModels: r,
2120
+ currentModels: H,
2121
2121
  resetView: i,
2122
2122
  initThreeJS: c,
2123
2123
  handleResize: f,
@@ -2134,21 +2134,21 @@ const N2 = { class: "obj-viewer-container" }, v2 = { class: "buttonGroup-topLeft
2134
2134
  error: g,
2135
2135
  loadModelsFromBlobs: _
2136
2136
  },
2137
- animation: { isAnimating: m, toggleAnimation: A, stopAnimation: I },
2137
+ animation: { isAnimating: m, toggleAnimation: A, startAnimation: I, stopAnimation: F },
2138
2138
  clipping: {
2139
- isClipping: F,
2140
- activeClippingAxis: y,
2141
- toggleClipping: E,
2142
- updateClippingPlanes: N
2139
+ isClipping: y,
2140
+ activeClippingAxis: O,
2141
+ toggleClipping: N,
2142
+ updateClippingPlanes: T
2143
2143
  }
2144
- } = w2(a, {
2144
+ } = T2(a, {
2145
2145
  useModelLoaderHook: !0,
2146
2146
  useAnimationHook: !0,
2147
2147
  useClippingHook: !0
2148
- }), T = () => {
2148
+ }), P = () => {
2149
2149
  s();
2150
- }, P = (j) => {
2151
- y.value = j, N();
2150
+ }, Y = (j) => {
2151
+ O.value = j, T();
2152
2152
  };
2153
2153
  e0(() => e.fileBlobs, (j) => {
2154
2154
  j && j.length > 0 && _(j).catch((R) => {
@@ -2160,30 +2160,30 @@ const N2 = { class: "obj-viewer-container" }, v2 = { class: "buttonGroup-topLeft
2160
2160
  }), e0(u, (j) => {
2161
2161
  j && j.length > 0 && d(j);
2162
2162
  }), e0(g, (j) => {
2163
- j && j0.error(`模型加载失败: ${j}`);
2163
+ j && I0.error(`模型加载失败: ${j}`);
2164
2164
  });
2165
- const Z = (j) => {
2166
- H.value = !0, b.value = j, j === "剖面视图" && !F.value && E();
2165
+ const u0 = (j) => {
2166
+ r.value = !0, b.value = j, j === "剖面视图" && !y.value && N();
2167
2167
  };
2168
2168
  let K = null;
2169
- return Z0(async () => {
2170
- await z0();
2169
+ return z0(async () => {
2170
+ await Q0();
2171
2171
  try {
2172
2172
  c(), a.value && (K = new ResizeObserver(f), K.observe(a.value));
2173
2173
  } catch (j) {
2174
- console.error("Three.js 初始化失败:", j), j0.error("渲染引擎初始化失败!");
2174
+ console.error("Three.js 初始化失败:", j), I0.error("渲染引擎初始化失败!");
2175
2175
  }
2176
- }), Q0(() => {
2177
- b.value = "", K && K.disconnect(), m.value && I(), n();
2176
+ }), J0(() => {
2177
+ b.value = "", K && K.disconnect(), m.value && F(), n();
2178
2178
  }), (j, R) => {
2179
- const W0 = J0("el-scrollbar");
2180
- return a0(), u0("div", N2, [
2179
+ const C0 = Y0("el-scrollbar");
2180
+ return a0(), l0("div", R2, [
2181
2181
  v("div", {
2182
2182
  ref_key: "threejsContainer",
2183
2183
  ref: a,
2184
2184
  class: "threejs-container"
2185
2185
  }, null, 512),
2186
- v("div", v2, [
2186
+ v("div", M2, [
2187
2187
  q(W, {
2188
2188
  name: "viewReset",
2189
2189
  size: "24",
@@ -2210,53 +2210,53 @@ const N2 = { class: "obj-viewer-container" }, v2 = { class: "buttonGroup-topLeft
2210
2210
  name: "zuobiaoxi",
2211
2211
  size: "24",
2212
2212
  active: B(o),
2213
- onClick: T,
2213
+ onClick: P,
2214
2214
  title: "显隐坐标轴"
2215
2215
  }, null, 8, ["active"])
2216
2216
  ]),
2217
- v("div", T2, [
2218
- h0(j.$slots, "button-left", { switchRightPanel: Z }, void 0, !0),
2217
+ v("div", D2, [
2218
+ g0(j.$slots, "button-left", { switchRightPanel: u0 }, void 0, !0),
2219
2219
  q(W, {
2220
2220
  name: "clipping",
2221
2221
  size: "24",
2222
- onClick: R[0] || (R[0] = (C0) => Z("剖面视图")),
2223
- active: H.value && b.value === "剖面视图",
2222
+ onClick: R[0] || (R[0] = (S0) => u0("剖面视图")),
2223
+ active: r.value && b.value === "剖面视图",
2224
2224
  title: "剖面视图"
2225
2225
  }, null, 8, ["active"])
2226
2226
  ]),
2227
- v("div", R2, [
2228
- h0(j.$slots, "button-right", {}, void 0, !0)
2227
+ v("div", O2, [
2228
+ g0(j.$slots, "button-right", {}, void 0, !0)
2229
2229
  ]),
2230
2230
  R[3] || (R[3] = v("div", { class: "buttonGroup-bottom" }, null, -1)),
2231
- Y0(v("div", M2, [
2232
- v("div", D2, [
2233
- v("span", null, g0(b.value), 1),
2231
+ K0(v("div", E2, [
2232
+ v("div", G2, [
2233
+ v("span", null, _0(b.value), 1),
2234
2234
  v("span", {
2235
2235
  class: "close",
2236
- onClick: R[1] || (R[1] = (C0) => H.value = !1)
2236
+ onClick: R[1] || (R[1] = (S0) => r.value = !1)
2237
2237
  }, " X ")
2238
2238
  ]),
2239
- q(W0, { "max-height": "650px" }, {
2240
- default: K0(() => [
2241
- b.value === "剖面视图" ? (a0(), X0(Ue, {
2239
+ q(C0, { "max-height": "650px" }, {
2240
+ default: X0(() => [
2241
+ b.value === "剖面视图" ? (a0(), $0(Be, {
2242
2242
  key: 0,
2243
- value: B(y),
2244
- onChange: P
2245
- }, null, 8, ["value"])) : l0("", !0)
2243
+ value: B(O),
2244
+ onChange: Y
2245
+ }, null, 8, ["value"])) : h0("", !0)
2246
2246
  ]),
2247
2247
  _: 1
2248
2248
  })
2249
2249
  ], 512), [
2250
- [$0, H.value]
2250
+ [ee, r.value]
2251
2251
  ]),
2252
- B(l) ? (a0(), u0("div", O2, [
2252
+ B(l) ? (a0(), l0("div", U2, [
2253
2253
  R[2] || (R[2] = v("div", { class: "loading-spinner" }, null, -1)),
2254
- v("p", null, g0(B(h)), 1)
2255
- ])) : l0("", !0)
2254
+ v("p", null, _0(B(h)), 1)
2255
+ ])) : h0("", !0)
2256
2256
  ]);
2257
2257
  };
2258
2258
  }
2259
- }), C2 = /* @__PURE__ */ Ve(E2, [["__scopeId", "data-v-2268e4d4"]]);
2259
+ }), Z2 = /* @__PURE__ */ Ce(x2, [["__scopeId", "data-v-2268e4d4"]]);
2260
2260
  export {
2261
- C2 as default
2261
+ Z2 as default
2262
2262
  };