ss-component-new 1.3.704 → 1.3.706

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 (30) hide show
  1. package/dist/{array-jbiWLnR-.js → array-BMCHedyE.js} +2 -2
  2. package/dist/{iconfont-C9LP7Z-d.js → iconfont-BwY2qVoK.js} +238 -234
  3. package/dist/{index-d9yiC1Rr.js → index-B2vjWoEB.js} +40 -40
  4. package/dist/{index-eunh_06c.js → index-BTOqgc1s.js} +2 -2
  5. package/dist/{index-B0l2_9Pc.js → index-BiD2svYY.js} +1 -1
  6. package/dist/{index-6kpIJwSG.js → index-BiMfzzPV.js} +1 -1
  7. package/dist/{index-l3g33MKM.js → index-C1pYY5Kg.js} +3 -3
  8. package/dist/{index-PV2PkfRE.js → index-CCOqF2de.js} +15417 -15267
  9. package/dist/{index-Da5qIKd6.js → index-CtE-JbIk.js} +2 -2
  10. package/dist/{index-YcuQhWbw.js → index-Cwd12dIT.js} +5599 -5579
  11. package/dist/{index-OGTnqUDW.js → index-DCK25QtA.js} +8 -8
  12. package/dist/{index-SohCFB2I.js → index-DOpUAJtb.js} +1 -1
  13. package/dist/{index-BFnTZBOW.js → index-DYhamWY7.js} +2 -2
  14. package/dist/{index-CSD3bL5o.js → index-GM47WPnp.js} +1 -1
  15. package/dist/{main-Dqoc5YbP.js → main-BfygOrTN.js} +2 -2
  16. package/dist/ss-component.css +2 -2
  17. package/dist/ss-component.js +9 -9
  18. package/dist/ss-component2.js +8 -8
  19. package/dist/{threeModel-BI3l0-99.js → threeModel-CoJT33S1.js} +2 -2
  20. package/dist/{threePreview-BkYkq6k4.js → threePreview-DUfFZQ5q.js} +1123 -950
  21. package/dist/{threeSceneView-ChFhJWgw.js → threeSceneView-B5sojPk9.js} +5 -5
  22. package/dist/{threeSceneViewForCPMPIP-DE5Oil86.js → threeSceneViewForCPMPIP-Bgi4Klfy.js} +3 -3
  23. package/dist/{threeTrackPathView-BxUqwu4s.js → threeTrackPathView-DmE9QE_0.js} +1 -1
  24. package/dist/{threeViewerHost-Dc7tuhCy.js → threeViewerHost--r-yJNpU.js} +1 -1
  25. package/dist/{workpieceTreePanel-Bnhv3-BB.js → workpieceTreePanel-DCSz_IDY.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/obj/model.mtl +0 -42
  28. package/dist/obj/model.obj +0 -26110
  29. package/public/obj/model.mtl +0 -42
  30. package/public/obj/model.obj +0 -26110
@@ -1,38 +1,38 @@
1
- import { ref as H0, shallowRef as ve, defineComponent as Te, watch as M0, onMounted as Re, nextTick as Me, onBeforeUnmount as De, resolveComponent as Oe, createElementBlock as Z0, openBlock as D0, createElementVNode as J, withDirectives as Ee, createCommentVNode as Q0, createVNode as o0, unref as k0, renderSlot as J0, toDisplayString as Y0, withCtx as Ge, createBlock as Ue, vShow as xe } from "vue";
2
- import { at as qe, au as q0, av as oe, R as ke, aw as j0, U as N0, ax as e0, ay as se, C as r0, az as $, c as n0, aA as Be, j as Pe, D as Ve, n as v0, V as N, aB as We, aC as u0, aD as Ce, aE as ue, aF as Le, aG as Se, a1 as I0, aH as ze, aI as le, aJ as Ze, aK as Qe, aL as Je, aM as B0, aN as he, aO as P0, aP as Ye, aQ as Ke, _ as Xe, aR as O0, a2 as $e, t as ge, l as e2, aS as m0, aT as a2, u as _e, aU as b2, h as Ae, aV as i2, w as H2, aW as r2, $ as c2, s as w0, P as f2, o as t2, aX as n2, aY as d2, aZ as o2, a_ as k2, a$ as s2, b0 as pe, b1 as u2, b2 as K0, b3 as X0, b4 as $0, b5 as ee, b6 as V0, a4 as l2, b7 as h2, B as me, b8 as g2, k as _2, b9 as Ba } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-C2itW9KG.js";
1
+ import { ref as u0, shallowRef as Ye, defineComponent as Ke, watch as Z0, onMounted as Xe, nextTick as $e, onBeforeUnmount as e2, resolveComponent as a2, createElementBlock as he, openBlock as V0, createElementVNode as t0, withDirectives as b2, createCommentVNode as ge, createVNode as j0, unref as g0, renderSlot as _e, createBlock as Ae, toDisplayString as pe, withCtx as i2, vShow as H2 } from "vue";
2
+ import { at as r2, au as $0, av as Ee, R as Ge, aw as G0, U as L0, ax as s0, ay as fe, C as h0, az as k0, c as A0, aA as c2, j as f2, D as t2, n as S0, V as w, aB as n2, aC as n0, aD as d2, aE as Ue, aF as o2, aG as k2, a1 as U0, aH as s2, aI as xe, aJ as l2, aK as u2, aL as h2, aM as ee, aN as Pe, aO as ae, aP as g2, aQ as _2, _ as A2, aR as Q0, a2 as p2, t as Be, l as m2, aS as E0, aT as j2, u as qe, aU as I2, h as Ve, aV as y2, w as w2, aW as F2, $ as N2, s as C0, P as v2, o as T2, aX as R2, aY as M2, aZ as D2, a_ as O2, a$ as E2, b0 as We, b1 as G2, b2 as me, b3 as je, b4 as Ie, b5 as ye, b6 as be, a4 as U2, b7 as x2, B as z0, b8 as P2, k as B2, b9 as q2 } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-C2itW9KG.js";
3
3
  import "./index-Bw3sTXPI.js";
4
- import { u as A2, a as p2, b as m2, T as g0, C as j2 } from "./iconfont-C9LP7Z-d.js";
5
- import { M as I2, O as y2, S as F2 } from "./MTLLoader-CkNZudBE.js";
6
- import { E as ae } from "./request-1RPa2bBn.js";
7
- import { _ as w2 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- function be(o, e) {
9
- if (e === qe)
10
- return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), o;
11
- if (e === q0 || e === oe) {
12
- let a = o.getIndex();
4
+ import { u as V2, a as W2, b as C2, T as I0, C as L2 } from "./iconfont-BwY2qVoK.js";
5
+ import { M as S2, O as z2, S as Z2 } from "./MTLLoader-CkNZudBE.js";
6
+ import { E as we } from "./request-1RPa2bBn.js";
7
+ import { _ as Q2 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ function Fe(n, e) {
9
+ if (e === r2)
10
+ return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), n;
11
+ if (e === $0 || e === Ee) {
12
+ let a = n.getIndex();
13
13
  if (a === null) {
14
- const H = [], f = o.getAttribute("position");
14
+ const H = [], f = n.getAttribute("position");
15
15
  if (f !== void 0) {
16
16
  for (let c = 0; c < f.count; c++)
17
17
  H.push(c);
18
- o.setIndex(H), a = o.getIndex();
18
+ n.setIndex(H), a = n.getIndex();
19
19
  } else
20
- return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), o;
20
+ return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), n;
21
21
  }
22
22
  const r = a.count - 2, b = [];
23
- if (e === q0)
23
+ if (e === $0)
24
24
  for (let H = 1; H <= r; H++)
25
25
  b.push(a.getX(0)), b.push(a.getX(H)), b.push(a.getX(H + 1));
26
26
  else
27
27
  for (let H = 0; H < r; H++)
28
28
  H % 2 === 0 ? (b.push(a.getX(H)), b.push(a.getX(H + 1)), b.push(a.getX(H + 2))) : (b.push(a.getX(H + 2)), b.push(a.getX(H + 1)), b.push(a.getX(H)));
29
29
  b.length / 3 !== r && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
30
- const i = o.clone();
30
+ const i = n.clone();
31
31
  return i.setIndex(b), i.clearGroups(), i;
32
32
  } else
33
- return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), o;
33
+ return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), n;
34
34
  }
35
- class N2 extends ke {
35
+ class J2 extends Ge {
36
36
  /**
37
37
  * Constructs a new glTF loader.
38
38
  *
@@ -40,39 +40,39 @@ class N2 extends ke {
40
40
  */
41
41
  constructor(e) {
42
42
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(a) {
43
- return new D2(a);
43
+ return new ea(a);
44
44
  }), this.register(function(a) {
45
- return new O2(a);
45
+ return new aa(a);
46
46
  }), this.register(function(a) {
47
- return new W2(a);
47
+ return new da(a);
48
48
  }), this.register(function(a) {
49
- return new C2(a);
49
+ return new oa(a);
50
50
  }), this.register(function(a) {
51
- return new L2(a);
51
+ return new ka(a);
52
52
  }), this.register(function(a) {
53
- return new G2(a);
53
+ return new ia(a);
54
54
  }), this.register(function(a) {
55
- return new U2(a);
55
+ return new Ha(a);
56
56
  }), this.register(function(a) {
57
- return new x2(a);
57
+ return new ra(a);
58
58
  }), this.register(function(a) {
59
- return new q2(a);
59
+ return new ca(a);
60
60
  }), this.register(function(a) {
61
- return new M2(a);
61
+ return new $2(a);
62
62
  }), this.register(function(a) {
63
- return new B2(a);
63
+ return new fa(a);
64
64
  }), this.register(function(a) {
65
- return new E2(a);
65
+ return new ba(a);
66
66
  }), this.register(function(a) {
67
- return new V2(a);
67
+ return new na(a);
68
68
  }), this.register(function(a) {
69
- return new P2(a);
69
+ return new ta(a);
70
70
  }), this.register(function(a) {
71
- return new T2(a);
71
+ return new K2(a);
72
72
  }), this.register(function(a) {
73
- return new S2(a);
73
+ return new sa(a);
74
74
  }), this.register(function(a) {
75
- return new z2(a);
75
+ return new la(a);
76
76
  });
77
77
  }
78
78
  /**
@@ -90,21 +90,21 @@ class N2 extends ke {
90
90
  if (this.resourcePath !== "")
91
91
  H = this.resourcePath;
92
92
  else if (this.path !== "") {
93
- const t = j0.extractUrlBase(e);
94
- H = j0.resolveURL(t, this.path);
93
+ const t = G0.extractUrlBase(e);
94
+ H = G0.resolveURL(t, this.path);
95
95
  } else
96
- H = j0.extractUrlBase(e);
96
+ H = G0.extractUrlBase(e);
97
97
  this.manager.itemStart(e);
98
98
  const f = function(t) {
99
99
  b ? b(t) : console.error(t), i.manager.itemError(e), i.manager.itemEnd(e);
100
- }, c = new N0(this.manager);
100
+ }, c = new L0(this.manager);
101
101
  c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(t) {
102
102
  try {
103
- i.parse(t, H, function(n) {
104
- a(n), i.manager.itemEnd(e);
103
+ i.parse(t, H, function(d) {
104
+ a(d), i.manager.itemEnd(e);
105
105
  }, f);
106
- } catch (n) {
107
- f(n);
106
+ } catch (d) {
107
+ f(d);
108
108
  }
109
109
  }, r, f);
110
110
  }
@@ -172,14 +172,14 @@ class N2 extends ke {
172
172
  if (typeof e == "string")
173
173
  i = JSON.parse(e);
174
174
  else if (e instanceof ArrayBuffer)
175
- if (c.decode(new Uint8Array(e, 0, 4)) === je) {
175
+ if (c.decode(new Uint8Array(e, 0, 4)) === Ce) {
176
176
  try {
177
- H[T.KHR_BINARY_GLTF] = new Z2(e);
178
- } catch (d) {
179
- b && b(d);
177
+ H[D.KHR_BINARY_GLTF] = new ua(e);
178
+ } catch (o) {
179
+ b && b(o);
180
180
  return;
181
181
  }
182
- i = JSON.parse(H[T.KHR_BINARY_GLTF].content);
182
+ i = JSON.parse(H[D.KHR_BINARY_GLTF].content);
183
183
  } else
184
184
  i = JSON.parse(c.decode(e));
185
185
  else
@@ -188,7 +188,7 @@ class N2 extends ke {
188
188
  b && b(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
189
189
  return;
190
190
  }
191
- const t = new ca(i, {
191
+ const t = new va(i, {
192
192
  path: a || this.resourcePath || "",
193
193
  crossOrigin: this.crossOrigin,
194
194
  requestHeader: this.requestHeader,
@@ -197,28 +197,28 @@ class N2 extends ke {
197
197
  meshoptDecoder: this.meshoptDecoder
198
198
  });
199
199
  t.fileLoader.setRequestHeader(this.requestHeader);
200
- for (let n = 0; n < this.pluginCallbacks.length; n++) {
201
- const d = this.pluginCallbacks[n](t);
202
- d.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), f[d.name] = d, H[d.name] = !0;
200
+ for (let d = 0; d < this.pluginCallbacks.length; d++) {
201
+ const o = this.pluginCallbacks[d](t);
202
+ o.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), f[o.name] = o, H[o.name] = !0;
203
203
  }
204
204
  if (i.extensionsUsed)
205
- for (let n = 0; n < i.extensionsUsed.length; ++n) {
206
- const d = i.extensionsUsed[n], k = i.extensionsRequired || [];
207
- switch (d) {
208
- case T.KHR_MATERIALS_UNLIT:
209
- H[d] = new R2();
205
+ for (let d = 0; d < i.extensionsUsed.length; ++d) {
206
+ const o = i.extensionsUsed[d], k = i.extensionsRequired || [];
207
+ switch (o) {
208
+ case D.KHR_MATERIALS_UNLIT:
209
+ H[o] = new X2();
210
210
  break;
211
- case T.KHR_DRACO_MESH_COMPRESSION:
212
- H[d] = new Q2(i, this.dracoLoader);
211
+ case D.KHR_DRACO_MESH_COMPRESSION:
212
+ H[o] = new ha(i, this.dracoLoader);
213
213
  break;
214
- case T.KHR_TEXTURE_TRANSFORM:
215
- H[d] = new J2();
214
+ case D.KHR_TEXTURE_TRANSFORM:
215
+ H[o] = new ga();
216
216
  break;
217
- case T.KHR_MESH_QUANTIZATION:
218
- H[d] = new Y2();
217
+ case D.KHR_MESH_QUANTIZATION:
218
+ H[o] = new _a();
219
219
  break;
220
220
  default:
221
- k.indexOf(d) >= 0 && f[d] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + d + '".');
221
+ k.indexOf(o) >= 0 && f[o] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + o + '".');
222
222
  }
223
223
  }
224
224
  t.setExtensions(H), t.setPlugins(f), t.parse(r, b);
@@ -238,24 +238,24 @@ class N2 extends ke {
238
238
  });
239
239
  }
240
240
  }
241
- function v2() {
242
- let o = {};
241
+ function Y2() {
242
+ let n = {};
243
243
  return {
244
244
  get: function(e) {
245
- return o[e];
245
+ return n[e];
246
246
  },
247
247
  add: function(e, a) {
248
- o[e] = a;
248
+ n[e] = a;
249
249
  },
250
250
  remove: function(e) {
251
- delete o[e];
251
+ delete n[e];
252
252
  },
253
253
  removeAll: function() {
254
- o = {};
254
+ n = {};
255
255
  }
256
256
  };
257
257
  }
258
- const T = {
258
+ const D = {
259
259
  KHR_BINARY_GLTF: "KHR_binary_glTF",
260
260
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
261
261
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -279,9 +279,9 @@ const T = {
279
279
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
280
280
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
281
281
  };
282
- class T2 {
282
+ class K2 {
283
283
  constructor(e) {
284
- this.parser = e, this.name = T.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
284
+ this.parser = e, this.name = D.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
285
285
  }
286
286
  _markDefs() {
287
287
  const e = this.parser, a = this.parser.json.nodes || [];
@@ -296,23 +296,23 @@ class T2 {
296
296
  if (b) return b;
297
297
  const i = a.json, c = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
298
298
  let t;
299
- const n = new r0(16777215);
300
- c.color !== void 0 && n.setRGB(c.color[0], c.color[1], c.color[2], $);
301
- const d = c.range !== void 0 ? c.range : 0;
299
+ const d = new h0(16777215);
300
+ c.color !== void 0 && d.setRGB(c.color[0], c.color[1], c.color[2], k0);
301
+ const o = c.range !== void 0 ? c.range : 0;
302
302
  switch (c.type) {
303
303
  case "directional":
304
- t = new Ve(n), t.target.position.set(0, 0, -1), t.add(t.target);
304
+ t = new t2(d), t.target.position.set(0, 0, -1), t.add(t.target);
305
305
  break;
306
306
  case "point":
307
- t = new Pe(n), t.distance = d;
307
+ t = new f2(d), t.distance = o;
308
308
  break;
309
309
  case "spot":
310
- t = new Be(n), t.distance = d, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, t.angle = c.spot.outerConeAngle, t.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, t.target.position.set(0, 0, -1), t.add(t.target);
310
+ t = new c2(d), t.distance = o, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, t.angle = c.spot.outerConeAngle, t.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, t.target.position.set(0, 0, -1), t.add(t.target);
311
311
  break;
312
312
  default:
313
313
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
314
314
  }
315
- return t.position.set(0, 0, 0), i0(t, c), c.intensity !== void 0 && (t.intensity = c.intensity), t.name = a.createUniqueName(c.name || "light_" + e), b = Promise.resolve(t), a.cache.add(r, b), b;
315
+ return t.position.set(0, 0, 0), l0(t, c), c.intensity !== void 0 && (t.intensity = c.intensity), t.name = a.createUniqueName(c.name || "light_" + e), b = Promise.resolve(t), a.cache.add(r, b), b;
316
316
  }
317
317
  getDependency(e, a) {
318
318
  if (e === "light")
@@ -325,30 +325,30 @@ class T2 {
325
325
  });
326
326
  }
327
327
  }
328
- class R2 {
328
+ class X2 {
329
329
  constructor() {
330
- this.name = T.KHR_MATERIALS_UNLIT;
330
+ this.name = D.KHR_MATERIALS_UNLIT;
331
331
  }
332
332
  getMaterialType() {
333
- return m0;
333
+ return E0;
334
334
  }
335
335
  extendParams(e, a, r) {
336
336
  const b = [];
337
- e.color = new r0(1, 1, 1), e.opacity = 1;
337
+ e.color = new h0(1, 1, 1), e.opacity = 1;
338
338
  const i = a.pbrMetallicRoughness;
339
339
  if (i) {
340
340
  if (Array.isArray(i.baseColorFactor)) {
341
341
  const H = i.baseColorFactor;
342
- e.color.setRGB(H[0], H[1], H[2], $), e.opacity = H[3];
342
+ e.color.setRGB(H[0], H[1], H[2], k0), e.opacity = H[3];
343
343
  }
344
- i.baseColorTexture !== void 0 && b.push(r.assignTexture(e, "map", i.baseColorTexture, n0));
344
+ i.baseColorTexture !== void 0 && b.push(r.assignTexture(e, "map", i.baseColorTexture, A0));
345
345
  }
346
346
  return Promise.all(b);
347
347
  }
348
348
  }
349
- class M2 {
349
+ class $2 {
350
350
  constructor(e) {
351
- this.parser = e, this.name = T.KHR_MATERIALS_EMISSIVE_STRENGTH;
351
+ this.parser = e, this.name = D.KHR_MATERIALS_EMISSIVE_STRENGTH;
352
352
  }
353
353
  extendMaterialParams(e, a) {
354
354
  const b = this.parser.json.materials[e];
@@ -358,13 +358,13 @@ class M2 {
358
358
  return i !== void 0 && (a.emissiveIntensity = i), Promise.resolve();
359
359
  }
360
360
  }
361
- class D2 {
361
+ class ea {
362
362
  constructor(e) {
363
- this.parser = e, this.name = T.KHR_MATERIALS_CLEARCOAT;
363
+ this.parser = e, this.name = D.KHR_MATERIALS_CLEARCOAT;
364
364
  }
365
365
  getMaterialType(e) {
366
366
  const r = this.parser.json.materials[e];
367
- return !r.extensions || !r.extensions[this.name] ? null : e0;
367
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
368
368
  }
369
369
  extendMaterialParams(e, a) {
370
370
  const r = this.parser, b = r.json.materials[e];
@@ -373,18 +373,18 @@ class D2 {
373
373
  const i = [], H = b.extensions[this.name];
374
374
  if (H.clearcoatFactor !== void 0 && (a.clearcoat = H.clearcoatFactor), H.clearcoatTexture !== void 0 && i.push(r.assignTexture(a, "clearcoatMap", H.clearcoatTexture)), H.clearcoatRoughnessFactor !== void 0 && (a.clearcoatRoughness = H.clearcoatRoughnessFactor), H.clearcoatRoughnessTexture !== void 0 && i.push(r.assignTexture(a, "clearcoatRoughnessMap", H.clearcoatRoughnessTexture)), H.clearcoatNormalTexture !== void 0 && (i.push(r.assignTexture(a, "clearcoatNormalMap", H.clearcoatNormalTexture)), H.clearcoatNormalTexture.scale !== void 0)) {
375
375
  const f = H.clearcoatNormalTexture.scale;
376
- a.clearcoatNormalScale = new se(f, f);
376
+ a.clearcoatNormalScale = new fe(f, f);
377
377
  }
378
378
  return Promise.all(i);
379
379
  }
380
380
  }
381
- class O2 {
381
+ class aa {
382
382
  constructor(e) {
383
- this.parser = e, this.name = T.KHR_MATERIALS_DISPERSION;
383
+ this.parser = e, this.name = D.KHR_MATERIALS_DISPERSION;
384
384
  }
385
385
  getMaterialType(e) {
386
386
  const r = this.parser.json.materials[e];
387
- return !r.extensions || !r.extensions[this.name] ? null : e0;
387
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
388
388
  }
389
389
  extendMaterialParams(e, a) {
390
390
  const b = this.parser.json.materials[e];
@@ -394,13 +394,13 @@ class O2 {
394
394
  return a.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
395
395
  }
396
396
  }
397
- class E2 {
397
+ class ba {
398
398
  constructor(e) {
399
- this.parser = e, this.name = T.KHR_MATERIALS_IRIDESCENCE;
399
+ this.parser = e, this.name = D.KHR_MATERIALS_IRIDESCENCE;
400
400
  }
401
401
  getMaterialType(e) {
402
402
  const r = this.parser.json.materials[e];
403
- return !r.extensions || !r.extensions[this.name] ? null : e0;
403
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
404
404
  }
405
405
  extendMaterialParams(e, a) {
406
406
  const r = this.parser, b = r.json.materials[e];
@@ -410,35 +410,35 @@ class E2 {
410
410
  return H.iridescenceFactor !== void 0 && (a.iridescence = H.iridescenceFactor), H.iridescenceTexture !== void 0 && i.push(r.assignTexture(a, "iridescenceMap", H.iridescenceTexture)), H.iridescenceIor !== void 0 && (a.iridescenceIOR = H.iridescenceIor), a.iridescenceThicknessRange === void 0 && (a.iridescenceThicknessRange = [100, 400]), H.iridescenceThicknessMinimum !== void 0 && (a.iridescenceThicknessRange[0] = H.iridescenceThicknessMinimum), H.iridescenceThicknessMaximum !== void 0 && (a.iridescenceThicknessRange[1] = H.iridescenceThicknessMaximum), H.iridescenceThicknessTexture !== void 0 && i.push(r.assignTexture(a, "iridescenceThicknessMap", H.iridescenceThicknessTexture)), Promise.all(i);
411
411
  }
412
412
  }
413
- class G2 {
413
+ class ia {
414
414
  constructor(e) {
415
- this.parser = e, this.name = T.KHR_MATERIALS_SHEEN;
415
+ this.parser = e, this.name = D.KHR_MATERIALS_SHEEN;
416
416
  }
417
417
  getMaterialType(e) {
418
418
  const r = this.parser.json.materials[e];
419
- return !r.extensions || !r.extensions[this.name] ? null : e0;
419
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
420
420
  }
421
421
  extendMaterialParams(e, a) {
422
422
  const r = this.parser, b = r.json.materials[e];
423
423
  if (!b.extensions || !b.extensions[this.name])
424
424
  return Promise.resolve();
425
425
  const i = [];
426
- a.sheenColor = new r0(0, 0, 0), a.sheenRoughness = 0, a.sheen = 1;
426
+ a.sheenColor = new h0(0, 0, 0), a.sheenRoughness = 0, a.sheen = 1;
427
427
  const H = b.extensions[this.name];
428
428
  if (H.sheenColorFactor !== void 0) {
429
429
  const f = H.sheenColorFactor;
430
- a.sheenColor.setRGB(f[0], f[1], f[2], $);
430
+ a.sheenColor.setRGB(f[0], f[1], f[2], k0);
431
431
  }
432
- return H.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = H.sheenRoughnessFactor), H.sheenColorTexture !== void 0 && i.push(r.assignTexture(a, "sheenColorMap", H.sheenColorTexture, n0)), H.sheenRoughnessTexture !== void 0 && i.push(r.assignTexture(a, "sheenRoughnessMap", H.sheenRoughnessTexture)), Promise.all(i);
432
+ return H.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = H.sheenRoughnessFactor), H.sheenColorTexture !== void 0 && i.push(r.assignTexture(a, "sheenColorMap", H.sheenColorTexture, A0)), H.sheenRoughnessTexture !== void 0 && i.push(r.assignTexture(a, "sheenRoughnessMap", H.sheenRoughnessTexture)), Promise.all(i);
433
433
  }
434
434
  }
435
- class U2 {
435
+ class Ha {
436
436
  constructor(e) {
437
- this.parser = e, this.name = T.KHR_MATERIALS_TRANSMISSION;
437
+ this.parser = e, this.name = D.KHR_MATERIALS_TRANSMISSION;
438
438
  }
439
439
  getMaterialType(e) {
440
440
  const r = this.parser.json.materials[e];
441
- return !r.extensions || !r.extensions[this.name] ? null : e0;
441
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
442
442
  }
443
443
  extendMaterialParams(e, a) {
444
444
  const r = this.parser, b = r.json.materials[e];
@@ -448,13 +448,13 @@ class U2 {
448
448
  return H.transmissionFactor !== void 0 && (a.transmission = H.transmissionFactor), H.transmissionTexture !== void 0 && i.push(r.assignTexture(a, "transmissionMap", H.transmissionTexture)), Promise.all(i);
449
449
  }
450
450
  }
451
- class x2 {
451
+ class ra {
452
452
  constructor(e) {
453
- this.parser = e, this.name = T.KHR_MATERIALS_VOLUME;
453
+ this.parser = e, this.name = D.KHR_MATERIALS_VOLUME;
454
454
  }
455
455
  getMaterialType(e) {
456
456
  const r = this.parser.json.materials[e];
457
- return !r.extensions || !r.extensions[this.name] ? null : e0;
457
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
458
458
  }
459
459
  extendMaterialParams(e, a) {
460
460
  const r = this.parser, b = r.json.materials[e];
@@ -463,16 +463,16 @@ class x2 {
463
463
  const i = [], H = b.extensions[this.name];
464
464
  a.thickness = H.thicknessFactor !== void 0 ? H.thicknessFactor : 0, H.thicknessTexture !== void 0 && i.push(r.assignTexture(a, "thicknessMap", H.thicknessTexture)), a.attenuationDistance = H.attenuationDistance || 1 / 0;
465
465
  const f = H.attenuationColor || [1, 1, 1];
466
- return a.attenuationColor = new r0().setRGB(f[0], f[1], f[2], $), Promise.all(i);
466
+ return a.attenuationColor = new h0().setRGB(f[0], f[1], f[2], k0), Promise.all(i);
467
467
  }
468
468
  }
469
- class q2 {
469
+ class ca {
470
470
  constructor(e) {
471
- this.parser = e, this.name = T.KHR_MATERIALS_IOR;
471
+ this.parser = e, this.name = D.KHR_MATERIALS_IOR;
472
472
  }
473
473
  getMaterialType(e) {
474
474
  const r = this.parser.json.materials[e];
475
- return !r.extensions || !r.extensions[this.name] ? null : e0;
475
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
476
476
  }
477
477
  extendMaterialParams(e, a) {
478
478
  const b = this.parser.json.materials[e];
@@ -482,13 +482,13 @@ class q2 {
482
482
  return a.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
483
483
  }
484
484
  }
485
- class B2 {
485
+ class fa {
486
486
  constructor(e) {
487
- this.parser = e, this.name = T.KHR_MATERIALS_SPECULAR;
487
+ this.parser = e, this.name = D.KHR_MATERIALS_SPECULAR;
488
488
  }
489
489
  getMaterialType(e) {
490
490
  const r = this.parser.json.materials[e];
491
- return !r.extensions || !r.extensions[this.name] ? null : e0;
491
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
492
492
  }
493
493
  extendMaterialParams(e, a) {
494
494
  const r = this.parser, b = r.json.materials[e];
@@ -497,16 +497,16 @@ class B2 {
497
497
  const i = [], H = b.extensions[this.name];
498
498
  a.specularIntensity = H.specularFactor !== void 0 ? H.specularFactor : 1, H.specularTexture !== void 0 && i.push(r.assignTexture(a, "specularIntensityMap", H.specularTexture));
499
499
  const f = H.specularColorFactor || [1, 1, 1];
500
- return a.specularColor = new r0().setRGB(f[0], f[1], f[2], $), H.specularColorTexture !== void 0 && i.push(r.assignTexture(a, "specularColorMap", H.specularColorTexture, n0)), Promise.all(i);
500
+ return a.specularColor = new h0().setRGB(f[0], f[1], f[2], k0), H.specularColorTexture !== void 0 && i.push(r.assignTexture(a, "specularColorMap", H.specularColorTexture, A0)), Promise.all(i);
501
501
  }
502
502
  }
503
- class P2 {
503
+ class ta {
504
504
  constructor(e) {
505
- this.parser = e, this.name = T.EXT_MATERIALS_BUMP;
505
+ this.parser = e, this.name = D.EXT_MATERIALS_BUMP;
506
506
  }
507
507
  getMaterialType(e) {
508
508
  const r = this.parser.json.materials[e];
509
- return !r.extensions || !r.extensions[this.name] ? null : e0;
509
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
510
510
  }
511
511
  extendMaterialParams(e, a) {
512
512
  const r = this.parser, b = r.json.materials[e];
@@ -516,13 +516,13 @@ class P2 {
516
516
  return a.bumpScale = H.bumpFactor !== void 0 ? H.bumpFactor : 1, H.bumpTexture !== void 0 && i.push(r.assignTexture(a, "bumpMap", H.bumpTexture)), Promise.all(i);
517
517
  }
518
518
  }
519
- class V2 {
519
+ class na {
520
520
  constructor(e) {
521
- this.parser = e, this.name = T.KHR_MATERIALS_ANISOTROPY;
521
+ this.parser = e, this.name = D.KHR_MATERIALS_ANISOTROPY;
522
522
  }
523
523
  getMaterialType(e) {
524
524
  const r = this.parser.json.materials[e];
525
- return !r.extensions || !r.extensions[this.name] ? null : e0;
525
+ return !r.extensions || !r.extensions[this.name] ? null : s0;
526
526
  }
527
527
  extendMaterialParams(e, a) {
528
528
  const r = this.parser, b = r.json.materials[e];
@@ -532,9 +532,9 @@ class V2 {
532
532
  return H.anisotropyStrength !== void 0 && (a.anisotropy = H.anisotropyStrength), H.anisotropyRotation !== void 0 && (a.anisotropyRotation = H.anisotropyRotation), H.anisotropyTexture !== void 0 && i.push(r.assignTexture(a, "anisotropyMap", H.anisotropyTexture)), Promise.all(i);
533
533
  }
534
534
  }
535
- class W2 {
535
+ class da {
536
536
  constructor(e) {
537
- this.parser = e, this.name = T.KHR_TEXTURE_BASISU;
537
+ this.parser = e, this.name = D.KHR_TEXTURE_BASISU;
538
538
  }
539
539
  loadTexture(e) {
540
540
  const a = this.parser, r = a.json, b = r.textures[e];
@@ -549,9 +549,9 @@ class W2 {
549
549
  return a.loadTextureImage(e, i.source, H);
550
550
  }
551
551
  }
552
- class C2 {
552
+ class oa {
553
553
  constructor(e) {
554
- this.parser = e, this.name = T.EXT_TEXTURE_WEBP;
554
+ this.parser = e, this.name = D.EXT_TEXTURE_WEBP;
555
555
  }
556
556
  loadTexture(e) {
557
557
  const a = this.name, r = this.parser, b = r.json, i = b.textures[e];
@@ -566,9 +566,9 @@ class C2 {
566
566
  return r.loadTextureImage(e, H.source, c);
567
567
  }
568
568
  }
569
- class L2 {
569
+ class ka {
570
570
  constructor(e) {
571
- this.parser = e, this.name = T.EXT_TEXTURE_AVIF;
571
+ this.parser = e, this.name = D.EXT_TEXTURE_AVIF;
572
572
  }
573
573
  loadTexture(e) {
574
574
  const a = this.name, r = this.parser, b = r.json, i = b.textures[e];
@@ -583,9 +583,9 @@ class L2 {
583
583
  return r.loadTextureImage(e, H.source, c);
584
584
  }
585
585
  }
586
- class S2 {
586
+ class sa {
587
587
  constructor(e) {
588
- this.name = T.EXT_MESHOPT_COMPRESSION, this.parser = e;
588
+ this.name = D.EXT_MESHOPT_COMPRESSION, this.parser = e;
589
589
  }
590
590
  loadBufferView(e) {
591
591
  const a = this.parser.json, r = a.bufferViews[e];
@@ -597,21 +597,21 @@ class S2 {
597
597
  return null;
598
598
  }
599
599
  return i.then(function(f) {
600
- const c = b.byteOffset || 0, t = b.byteLength || 0, n = b.count, d = b.byteStride, k = new Uint8Array(f, c, t);
601
- return H.decodeGltfBufferAsync ? H.decodeGltfBufferAsync(n, d, k, b.mode, b.filter).then(function(s) {
600
+ const c = b.byteOffset || 0, t = b.byteLength || 0, d = b.count, o = b.byteStride, k = new Uint8Array(f, c, t);
601
+ return H.decodeGltfBufferAsync ? H.decodeGltfBufferAsync(d, o, k, b.mode, b.filter).then(function(s) {
602
602
  return s.buffer;
603
603
  }) : H.ready.then(function() {
604
- const s = new ArrayBuffer(n * d);
605
- return H.decodeGltfBuffer(new Uint8Array(s), n, d, k, b.mode, b.filter), s;
604
+ const s = new ArrayBuffer(d * o);
605
+ return H.decodeGltfBuffer(new Uint8Array(s), d, o, k, b.mode, b.filter), s;
606
606
  });
607
607
  });
608
608
  } else
609
609
  return null;
610
610
  }
611
611
  }
612
- class z2 {
612
+ class la {
613
613
  constructor(e) {
614
- this.name = T.EXT_MESH_GPU_INSTANCING, this.parser = e;
614
+ this.name = D.EXT_MESH_GPU_INSTANCING, this.parser = e;
615
615
  }
616
616
  createNodeMesh(e) {
617
617
  const a = this.parser.json, r = a.nodes[e];
@@ -619,52 +619,52 @@ class z2 {
619
619
  return null;
620
620
  const b = a.meshes[r.mesh];
621
621
  for (const t of b.primitives)
622
- if (t.mode !== Q.TRIANGLES && t.mode !== Q.TRIANGLE_STRIP && t.mode !== Q.TRIANGLE_FAN && t.mode !== void 0)
622
+ if (t.mode !== f0.TRIANGLES && t.mode !== f0.TRIANGLE_STRIP && t.mode !== f0.TRIANGLE_FAN && t.mode !== void 0)
623
623
  return null;
624
624
  const H = r.extensions[this.name].attributes, f = [], c = {};
625
625
  for (const t in H)
626
- f.push(this.parser.getDependency("accessor", H[t]).then((n) => (c[t] = n, c[t])));
626
+ f.push(this.parser.getDependency("accessor", H[t]).then((d) => (c[t] = d, c[t])));
627
627
  return f.length < 1 ? null : (f.push(this.parser.createNodeMesh(e)), Promise.all(f).then((t) => {
628
- const n = t.pop(), d = n.isGroup ? n.children : [n], k = t[0].count, s = [];
629
- for (const u of d) {
630
- const _ = new v0(), l = new N(), j = new u0(), h = new N(1, 1, 1), g = new We(u.geometry, u.material, k);
628
+ const d = t.pop(), o = d.isGroup ? d.children : [d], k = t[0].count, s = [];
629
+ for (const u of o) {
630
+ const _ = new S0(), h = new w(), I = new n0(), A = new w(1, 1, 1), g = new n2(u.geometry, u.material, k);
631
631
  for (let p = 0; p < k; p++)
632
- c.TRANSLATION && l.fromBufferAttribute(c.TRANSLATION, p), c.ROTATION && j.fromBufferAttribute(c.ROTATION, p), c.SCALE && h.fromBufferAttribute(c.SCALE, p), g.setMatrixAt(p, _.compose(l, j, h));
632
+ c.TRANSLATION && h.fromBufferAttribute(c.TRANSLATION, p), c.ROTATION && I.fromBufferAttribute(c.ROTATION, p), c.SCALE && A.fromBufferAttribute(c.SCALE, p), g.setMatrixAt(p, _.compose(h, I, A));
633
633
  for (const p in c)
634
634
  if (p === "_COLOR_0") {
635
- const I = c[p];
636
- g.instanceColor = new Ce(I.array, I.itemSize, I.normalized);
635
+ const y = c[p];
636
+ g.instanceColor = new d2(y.array, y.itemSize, y.normalized);
637
637
  } else p !== "TRANSLATION" && p !== "ROTATION" && p !== "SCALE" && u.geometry.setAttribute(p, c[p]);
638
- ue.prototype.copy.call(g, u), this.parser.assignFinalMaterial(g), s.push(g);
638
+ Ue.prototype.copy.call(g, u), this.parser.assignFinalMaterial(g), s.push(g);
639
639
  }
640
- return n.isGroup ? (n.clear(), n.add(...s), n) : s[0];
640
+ return d.isGroup ? (d.clear(), d.add(...s), d) : s[0];
641
641
  }));
642
642
  }
643
643
  }
644
- const je = "glTF", p0 = 12, ie = { JSON: 1313821514, BIN: 5130562 };
645
- class Z2 {
644
+ const Ce = "glTF", O0 = 12, Ne = { JSON: 1313821514, BIN: 5130562 };
645
+ class ua {
646
646
  constructor(e) {
647
- this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
648
- const a = new DataView(e, 0, p0), r = new TextDecoder();
647
+ this.name = D.KHR_BINARY_GLTF, this.content = null, this.body = null;
648
+ const a = new DataView(e, 0, O0), r = new TextDecoder();
649
649
  if (this.header = {
650
650
  magic: r.decode(new Uint8Array(e.slice(0, 4))),
651
651
  version: a.getUint32(4, !0),
652
652
  length: a.getUint32(8, !0)
653
- }, this.header.magic !== je)
653
+ }, this.header.magic !== Ce)
654
654
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
655
655
  if (this.header.version < 2)
656
656
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
657
- const b = this.header.length - p0, i = new DataView(e, p0);
657
+ const b = this.header.length - O0, i = new DataView(e, O0);
658
658
  let H = 0;
659
659
  for (; H < b; ) {
660
660
  const f = i.getUint32(H, !0);
661
661
  H += 4;
662
662
  const c = i.getUint32(H, !0);
663
- if (H += 4, c === ie.JSON) {
664
- const t = new Uint8Array(e, p0 + H, f);
663
+ if (H += 4, c === Ne.JSON) {
664
+ const t = new Uint8Array(e, O0 + H, f);
665
665
  this.content = r.decode(t);
666
- } else if (c === ie.BIN) {
667
- const t = p0 + H;
666
+ } else if (c === Ne.BIN) {
667
+ const t = O0 + H;
668
668
  this.body = e.slice(t, t + f);
669
669
  }
670
670
  H += f;
@@ -673,52 +673,52 @@ class Z2 {
673
673
  throw new Error("THREE.GLTFLoader: JSON content not found.");
674
674
  }
675
675
  }
676
- class Q2 {
676
+ class ha {
677
677
  constructor(e, a) {
678
678
  if (!a)
679
679
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
680
- this.name = T.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = a, this.dracoLoader.preload();
680
+ this.name = D.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = a, this.dracoLoader.preload();
681
681
  }
682
682
  decodePrimitive(e, a) {
683
683
  const r = this.json, b = this.dracoLoader, i = e.extensions[this.name].bufferView, H = e.extensions[this.name].attributes, f = {}, c = {}, t = {};
684
- for (const n in H) {
685
- const d = W0[n] || n.toLowerCase();
686
- f[d] = H[n];
684
+ for (const d in H) {
685
+ const o = ie[d] || d.toLowerCase();
686
+ f[o] = H[d];
687
687
  }
688
- for (const n in e.attributes) {
689
- const d = W0[n] || n.toLowerCase();
690
- if (H[n] !== void 0) {
691
- const k = r.accessors[e.attributes[n]], s = _0[k.componentType];
692
- t[d] = s.name, c[d] = k.normalized === !0;
688
+ for (const d in e.attributes) {
689
+ const o = ie[d] || d.toLowerCase();
690
+ if (H[d] !== void 0) {
691
+ const k = r.accessors[e.attributes[d]], s = T0[k.componentType];
692
+ t[o] = s.name, c[o] = k.normalized === !0;
693
693
  }
694
694
  }
695
- return a.getDependency("bufferView", i).then(function(n) {
696
- return new Promise(function(d, k) {
697
- b.decodeDracoFile(n, function(s) {
695
+ return a.getDependency("bufferView", i).then(function(d) {
696
+ return new Promise(function(o, k) {
697
+ b.decodeDracoFile(d, function(s) {
698
698
  for (const u in s.attributes) {
699
- const _ = s.attributes[u], l = c[u];
700
- l !== void 0 && (_.normalized = l);
699
+ const _ = s.attributes[u], h = c[u];
700
+ h !== void 0 && (_.normalized = h);
701
701
  }
702
- d(s);
703
- }, f, t, $, k);
702
+ o(s);
703
+ }, f, t, k0, k);
704
704
  });
705
705
  });
706
706
  }
707
707
  }
708
- class J2 {
708
+ class ga {
709
709
  constructor() {
710
- this.name = T.KHR_TEXTURE_TRANSFORM;
710
+ this.name = D.KHR_TEXTURE_TRANSFORM;
711
711
  }
712
712
  extendTexture(e, a) {
713
713
  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;
714
714
  }
715
715
  }
716
- class Y2 {
716
+ class _a {
717
717
  constructor() {
718
- this.name = T.KHR_MESH_QUANTIZATION;
718
+ this.name = D.KHR_MESH_QUANTIZATION;
719
719
  }
720
720
  }
721
- class Ie extends h2 {
721
+ class Le extends x2 {
722
722
  constructor(e, a, r, b) {
723
723
  super(e, a, r, b);
724
724
  }
@@ -729,22 +729,22 @@ class Ie extends h2 {
729
729
  return a;
730
730
  }
731
731
  interpolate_(e, a, r, b) {
732
- const i = this.resultBuffer, H = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, n = b - a, d = (r - a) / n, k = d * d, s = k * d, u = e * t, _ = u - t, l = -2 * s + 3 * k, j = s - k, h = 1 - l, g = j - k + d;
732
+ const i = this.resultBuffer, H = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, d = b - a, o = (r - a) / d, k = o * o, s = k * o, u = e * t, _ = u - t, h = -2 * s + 3 * k, I = s - k, A = 1 - h, g = I - k + o;
733
733
  for (let p = 0; p !== f; p++) {
734
- const I = H[_ + p + f], F = H[_ + p + c] * n, w = H[u + p + f], y = H[u + p] * n;
735
- i[p] = h * I + g * F + l * w + j * y;
734
+ const y = H[_ + p + f], F = H[_ + p + c] * d, N = H[u + p + f], B = H[u + p] * d;
735
+ i[p] = A * y + g * F + h * N + I * B;
736
736
  }
737
737
  return i;
738
738
  }
739
739
  }
740
- const K2 = new u0();
741
- class X2 extends Ie {
740
+ const Aa = new n0();
741
+ class pa extends Le {
742
742
  interpolate_(e, a, r, b) {
743
743
  const i = super.interpolate_(e, a, r, b);
744
- return K2.fromArray(i).normalize().toArray(i), i;
744
+ return Aa.fromArray(i).normalize().toArray(i), i;
745
745
  }
746
746
  }
747
- const Q = {
747
+ const f0 = {
748
748
  POINTS: 0,
749
749
  LINES: 1,
750
750
  LINE_LOOP: 2,
@@ -752,25 +752,25 @@ const Q = {
752
752
  TRIANGLES: 4,
753
753
  TRIANGLE_STRIP: 5,
754
754
  TRIANGLE_FAN: 6
755
- }, _0 = {
755
+ }, T0 = {
756
756
  5120: Int8Array,
757
757
  5121: Uint8Array,
758
758
  5122: Int16Array,
759
759
  5123: Uint16Array,
760
760
  5125: Uint32Array,
761
761
  5126: Float32Array
762
- }, He = {
763
- 9728: he,
764
- 9729: B0,
765
- 9984: Je,
766
- 9985: Qe,
767
- 9986: Ze,
768
- 9987: le
769
- }, re = {
770
- 33071: Ke,
771
- 33648: Ye,
772
- 10497: P0
773
- }, E0 = {
762
+ }, ve = {
763
+ 9728: Pe,
764
+ 9729: ee,
765
+ 9984: h2,
766
+ 9985: u2,
767
+ 9986: l2,
768
+ 9987: xe
769
+ }, Te = {
770
+ 33071: _2,
771
+ 33648: g2,
772
+ 10497: ae
773
+ }, J0 = {
774
774
  SCALAR: 1,
775
775
  VEC2: 2,
776
776
  VEC3: 3,
@@ -778,7 +778,7 @@ const Q = {
778
778
  MAT2: 4,
779
779
  MAT3: 9,
780
780
  MAT4: 16
781
- }, W0 = {
781
+ }, ie = {
782
782
  POSITION: "position",
783
783
  NORMAL: "normal",
784
784
  TANGENT: "tangent",
@@ -789,60 +789,60 @@ const Q = {
789
789
  COLOR_0: "color",
790
790
  WEIGHTS_0: "skinWeight",
791
791
  JOINTS_0: "skinIndex"
792
- }, t0 = {
792
+ }, _0 = {
793
793
  scale: "scale",
794
794
  translation: "position",
795
795
  rotation: "quaternion",
796
796
  weights: "morphTargetInfluences"
797
- }, $2 = {
797
+ }, ma = {
798
798
  CUBICSPLINE: void 0,
799
799
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
800
800
  // keyframe track will be initialized with a default interpolation type, then modified.
801
- LINEAR: pe,
802
- STEP: s2
803
- }, G0 = {
801
+ LINEAR: We,
802
+ STEP: E2
803
+ }, Y0 = {
804
804
  OPAQUE: "OPAQUE",
805
805
  MASK: "MASK",
806
806
  BLEND: "BLEND"
807
807
  };
808
- function ea(o) {
809
- return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new ge({
808
+ function ja(n) {
809
+ return n.DefaultMaterial === void 0 && (n.DefaultMaterial = new Be({
810
810
  color: 16777215,
811
811
  emissive: 0,
812
812
  metalness: 1,
813
813
  roughness: 1,
814
814
  transparent: !1,
815
815
  depthTest: !0,
816
- side: l2
817
- })), o.DefaultMaterial;
816
+ side: U2
817
+ })), n.DefaultMaterial;
818
818
  }
819
- function s0(o, e, a) {
819
+ function y0(n, e, a) {
820
820
  for (const r in a.extensions)
821
- o[r] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[r] = a.extensions[r]);
821
+ n[r] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[r] = a.extensions[r]);
822
822
  }
823
- function i0(o, e) {
824
- e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(o.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
823
+ function l0(n, e) {
824
+ e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(n.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
825
825
  }
826
- function aa(o, e, a) {
826
+ function Ia(n, e, a) {
827
827
  let r = !1, b = !1, i = !1;
828
- for (let t = 0, n = e.length; t < n; t++) {
829
- const d = e[t];
830
- if (d.POSITION !== void 0 && (r = !0), d.NORMAL !== void 0 && (b = !0), d.COLOR_0 !== void 0 && (i = !0), r && b && i) break;
828
+ for (let t = 0, d = e.length; t < d; t++) {
829
+ const o = e[t];
830
+ if (o.POSITION !== void 0 && (r = !0), o.NORMAL !== void 0 && (b = !0), o.COLOR_0 !== void 0 && (i = !0), r && b && i) break;
831
831
  }
832
- if (!r && !b && !i) return Promise.resolve(o);
832
+ if (!r && !b && !i) return Promise.resolve(n);
833
833
  const H = [], f = [], c = [];
834
- for (let t = 0, n = e.length; t < n; t++) {
835
- const d = e[t];
834
+ for (let t = 0, d = e.length; t < d; t++) {
835
+ const o = e[t];
836
836
  if (r) {
837
- const k = d.POSITION !== void 0 ? a.getDependency("accessor", d.POSITION) : o.attributes.position;
837
+ const k = o.POSITION !== void 0 ? a.getDependency("accessor", o.POSITION) : n.attributes.position;
838
838
  H.push(k);
839
839
  }
840
840
  if (b) {
841
- const k = d.NORMAL !== void 0 ? a.getDependency("accessor", d.NORMAL) : o.attributes.normal;
841
+ const k = o.NORMAL !== void 0 ? a.getDependency("accessor", o.NORMAL) : n.attributes.normal;
842
842
  f.push(k);
843
843
  }
844
844
  if (i) {
845
- const k = d.COLOR_0 !== void 0 ? a.getDependency("accessor", d.COLOR_0) : o.attributes.color;
845
+ const k = o.COLOR_0 !== void 0 ? a.getDependency("accessor", o.COLOR_0) : n.attributes.color;
846
846
  c.push(k);
847
847
  }
848
848
  }
@@ -851,41 +851,41 @@ function aa(o, e, a) {
851
851
  Promise.all(f),
852
852
  Promise.all(c)
853
853
  ]).then(function(t) {
854
- const n = t[0], d = t[1], k = t[2];
855
- return r && (o.morphAttributes.position = n), b && (o.morphAttributes.normal = d), i && (o.morphAttributes.color = k), o.morphTargetsRelative = !0, o;
854
+ const d = t[0], o = t[1], k = t[2];
855
+ return r && (n.morphAttributes.position = d), b && (n.morphAttributes.normal = o), i && (n.morphAttributes.color = k), n.morphTargetsRelative = !0, n;
856
856
  });
857
857
  }
858
- function ba(o, e) {
859
- if (o.updateMorphTargets(), e.weights !== void 0)
858
+ function ya(n, e) {
859
+ if (n.updateMorphTargets(), e.weights !== void 0)
860
860
  for (let a = 0, r = e.weights.length; a < r; a++)
861
- o.morphTargetInfluences[a] = e.weights[a];
861
+ n.morphTargetInfluences[a] = e.weights[a];
862
862
  if (e.extras && Array.isArray(e.extras.targetNames)) {
863
863
  const a = e.extras.targetNames;
864
- if (o.morphTargetInfluences.length === a.length) {
865
- o.morphTargetDictionary = {};
864
+ if (n.morphTargetInfluences.length === a.length) {
865
+ n.morphTargetDictionary = {};
866
866
  for (let r = 0, b = a.length; r < b; r++)
867
- o.morphTargetDictionary[a[r]] = r;
867
+ n.morphTargetDictionary[a[r]] = r;
868
868
  } else
869
869
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
870
870
  }
871
871
  }
872
- function ia(o) {
872
+ function wa(n) {
873
873
  let e;
874
- const a = o.extensions && o.extensions[T.KHR_DRACO_MESH_COMPRESSION];
875
- if (a ? e = "draco:" + a.bufferView + ":" + a.indices + ":" + U0(a.attributes) : e = o.indices + ":" + U0(o.attributes) + ":" + o.mode, o.targets !== void 0)
876
- for (let r = 0, b = o.targets.length; r < b; r++)
877
- e += ":" + U0(o.targets[r]);
874
+ const a = n.extensions && n.extensions[D.KHR_DRACO_MESH_COMPRESSION];
875
+ if (a ? e = "draco:" + a.bufferView + ":" + a.indices + ":" + K0(a.attributes) : e = n.indices + ":" + K0(n.attributes) + ":" + n.mode, n.targets !== void 0)
876
+ for (let r = 0, b = n.targets.length; r < b; r++)
877
+ e += ":" + K0(n.targets[r]);
878
878
  return e;
879
879
  }
880
- function U0(o) {
880
+ function K0(n) {
881
881
  let e = "";
882
- const a = Object.keys(o).sort();
882
+ const a = Object.keys(n).sort();
883
883
  for (let r = 0, b = a.length; r < b; r++)
884
- e += a[r] + ":" + o[a[r]] + ";";
884
+ e += a[r] + ":" + n[a[r]] + ";";
885
885
  return e;
886
886
  }
887
- function C0(o) {
888
- switch (o) {
887
+ function He(n) {
888
+ switch (n) {
889
889
  case Int8Array:
890
890
  return 1 / 127;
891
891
  case Uint8Array:
@@ -898,13 +898,13 @@ function C0(o) {
898
898
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
899
899
  }
900
900
  }
901
- function Ha(o) {
902
- return o.search(/\.jpe?g($|\?)/i) > 0 || o.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : o.search(/\.webp($|\?)/i) > 0 || o.search(/^data\:image\/webp/) === 0 ? "image/webp" : o.search(/\.ktx2($|\?)/i) > 0 || o.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
901
+ function Fa(n) {
902
+ return n.search(/\.jpe?g($|\?)/i) > 0 || n.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : n.search(/\.webp($|\?)/i) > 0 || n.search(/^data\:image\/webp/) === 0 ? "image/webp" : n.search(/\.ktx2($|\?)/i) > 0 || n.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
903
903
  }
904
- const ra = new v0();
905
- class ca {
904
+ const Na = new S0();
905
+ class va {
906
906
  constructor(e = {}, a = {}) {
907
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new v2(), 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 = {};
907
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new Y2(), 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 = {};
908
908
  let r = !1, b = -1, i = !1, H = -1;
909
909
  if (typeof navigator < "u") {
910
910
  const f = navigator.userAgent;
@@ -912,7 +912,7 @@ class ca {
912
912
  const c = f.match(/Version\/(\d+)/);
913
913
  b = r && c ? parseInt(c[1], 10) : -1, i = f.indexOf("Firefox") > -1, H = i ? f.match(/Firefox\/([0-9]+)\./)[1] : -1;
914
914
  }
915
- typeof createImageBitmap > "u" || r && b < 17 || i && H < 98 ? this.textureLoader = new Le(this.options.manager) : this.textureLoader = new Se(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new N0(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
915
+ typeof createImageBitmap > "u" || r && b < 17 || i && H < 98 ? this.textureLoader = new o2(this.options.manager) : this.textureLoader = new k2(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new L0(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
916
916
  }
917
917
  setExtensions(e) {
918
918
  this.extensions = e;
@@ -942,7 +942,7 @@ class ca {
942
942
  parser: r,
943
943
  userData: {}
944
944
  };
945
- return s0(i, f, b), i0(f, b), Promise.all(r._invokeAll(function(c) {
945
+ return y0(i, f, b), l0(f, b), Promise.all(r._invokeAll(function(c) {
946
946
  return c.afterRoot && c.afterRoot(f);
947
947
  })).then(function() {
948
948
  for (const c of f.scenes)
@@ -998,8 +998,8 @@ class ca {
998
998
  const b = r.clone(), i = (H, f) => {
999
999
  const c = this.associations.get(H);
1000
1000
  c != null && this.associations.set(f, c);
1001
- for (const [t, n] of H.children.entries())
1002
- i(n, f.children[t]);
1001
+ for (const [t, d] of H.children.entries())
1002
+ i(d, f.children[t]);
1003
1003
  };
1004
1004
  return i(r, b), b.name += "_instance_" + e.uses[a]++, b;
1005
1005
  }
@@ -1120,10 +1120,10 @@ class ca {
1120
1120
  if (a.type && a.type !== "arraybuffer")
1121
1121
  throw new Error("THREE.GLTFLoader: " + a.type + " buffer type is not supported.");
1122
1122
  if (a.uri === void 0 && e === 0)
1123
- return Promise.resolve(this.extensions[T.KHR_BINARY_GLTF].body);
1123
+ return Promise.resolve(this.extensions[D.KHR_BINARY_GLTF].body);
1124
1124
  const b = this.options;
1125
1125
  return new Promise(function(i, H) {
1126
- r.load(j0.resolveURL(a.uri, b.path), i, void 0, function() {
1126
+ r.load(G0.resolveURL(a.uri, b.path), i, void 0, function() {
1127
1127
  H(new Error('THREE.GLTFLoader: Failed to load buffer "' + a.uri + '".'));
1128
1128
  });
1129
1129
  });
@@ -1152,29 +1152,29 @@ class ca {
1152
1152
  loadAccessor(e) {
1153
1153
  const a = this, r = this.json, b = this.json.accessors[e];
1154
1154
  if (b.bufferView === void 0 && b.sparse === void 0) {
1155
- const H = E0[b.type], f = _0[b.componentType], c = b.normalized === !0, t = new f(b.count * H);
1156
- return Promise.resolve(new I0(t, H, c));
1155
+ const H = J0[b.type], f = T0[b.componentType], c = b.normalized === !0, t = new f(b.count * H);
1156
+ return Promise.resolve(new U0(t, H, c));
1157
1157
  }
1158
1158
  const i = [];
1159
1159
  return b.bufferView !== void 0 ? i.push(this.getDependency("bufferView", b.bufferView)) : i.push(null), b.sparse !== void 0 && (i.push(this.getDependency("bufferView", b.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", b.sparse.values.bufferView))), Promise.all(i).then(function(H) {
1160
- const f = H[0], c = E0[b.type], t = _0[b.componentType], n = t.BYTES_PER_ELEMENT, d = n * c, k = b.byteOffset || 0, s = b.bufferView !== void 0 ? r.bufferViews[b.bufferView].byteStride : void 0, u = b.normalized === !0;
1161
- let _, l;
1162
- if (s && s !== d) {
1163
- const j = Math.floor(k / s), h = "InterleavedBuffer:" + b.bufferView + ":" + b.componentType + ":" + j + ":" + b.count;
1164
- let g = a.cache.get(h);
1165
- g || (_ = new t(f, j * s, b.count * s / n), g = new ze(_, s / n), a.cache.add(h, g)), l = new u2(g, c, k % s / n, u);
1160
+ const f = H[0], c = J0[b.type], t = T0[b.componentType], d = t.BYTES_PER_ELEMENT, o = d * c, k = b.byteOffset || 0, s = b.bufferView !== void 0 ? r.bufferViews[b.bufferView].byteStride : void 0, u = b.normalized === !0;
1161
+ let _, h;
1162
+ if (s && s !== o) {
1163
+ const I = Math.floor(k / s), A = "InterleavedBuffer:" + b.bufferView + ":" + b.componentType + ":" + I + ":" + b.count;
1164
+ let g = a.cache.get(A);
1165
+ g || (_ = new t(f, I * s, b.count * s / d), g = new s2(_, s / d), a.cache.add(A, g)), h = new G2(g, c, k % s / d, u);
1166
1166
  } else
1167
- f === null ? _ = new t(b.count * c) : _ = new t(f, k, b.count * c), l = new I0(_, c, u);
1167
+ f === null ? _ = new t(b.count * c) : _ = new t(f, k, b.count * c), h = new U0(_, c, u);
1168
1168
  if (b.sparse !== void 0) {
1169
- const j = E0.SCALAR, h = _0[b.sparse.indices.componentType], g = b.sparse.indices.byteOffset || 0, p = b.sparse.values.byteOffset || 0, I = new h(H[1], g, b.sparse.count * j), F = new t(H[2], p, b.sparse.count * c);
1170
- f !== null && (l = new I0(l.array.slice(), l.itemSize, l.normalized)), l.normalized = !1;
1171
- for (let w = 0, y = I.length; w < y; w++) {
1172
- const m = I[w];
1173
- if (l.setX(m, F[w * c]), c >= 2 && l.setY(m, F[w * c + 1]), c >= 3 && l.setZ(m, F[w * c + 2]), c >= 4 && l.setW(m, F[w * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1169
+ const I = J0.SCALAR, A = T0[b.sparse.indices.componentType], g = b.sparse.indices.byteOffset || 0, p = b.sparse.values.byteOffset || 0, y = new A(H[1], g, b.sparse.count * I), F = new t(H[2], p, b.sparse.count * c);
1170
+ f !== null && (h = new U0(h.array.slice(), h.itemSize, h.normalized)), h.normalized = !1;
1171
+ for (let N = 0, B = y.length; N < B; N++) {
1172
+ const V = y[N];
1173
+ if (h.setX(V, F[N * c]), c >= 2 && h.setY(V, F[N * c + 1]), c >= 3 && h.setZ(V, F[N * c + 2]), c >= 4 && h.setW(V, F[N * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1174
1174
  }
1175
- l.normalized = u;
1175
+ h.normalized = u;
1176
1176
  }
1177
- return l;
1177
+ return h;
1178
1178
  });
1179
1179
  }
1180
1180
  /**
@@ -1197,10 +1197,10 @@ class ca {
1197
1197
  const b = this, i = this.json, H = i.textures[e], f = i.images[a], c = (f.uri || f.bufferView) + ":" + H.sampler;
1198
1198
  if (this.textureCache[c])
1199
1199
  return this.textureCache[c];
1200
- const t = this.loadImageSource(a, r).then(function(n) {
1201
- n.flipY = !1, n.name = H.name || f.name || "", n.name === "" && typeof f.uri == "string" && f.uri.startsWith("data:image/") === !1 && (n.name = f.uri);
1200
+ const t = this.loadImageSource(a, r).then(function(d) {
1201
+ d.flipY = !1, d.name = H.name || f.name || "", d.name === "" && typeof f.uri == "string" && f.uri.startsWith("data:image/") === !1 && (d.name = f.uri);
1202
1202
  const k = (i.samplers || {})[H.sampler] || {};
1203
- return n.magFilter = He[k.magFilter] || B0, n.minFilter = He[k.minFilter] || le, n.wrapS = re[k.wrapS] || P0, n.wrapT = re[k.wrapT] || P0, n.generateMipmaps = !n.isCompressedTexture && n.minFilter !== he && n.minFilter !== B0, b.associations.set(n, { textures: e }), n;
1203
+ return d.magFilter = ve[k.magFilter] || ee, d.minFilter = ve[k.minFilter] || xe, d.wrapS = Te[k.wrapS] || ae, d.wrapT = Te[k.wrapT] || ae, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Pe && d.minFilter !== ee, b.associations.set(d, { textures: e }), d;
1204
1204
  }).catch(function() {
1205
1205
  return null;
1206
1206
  });
@@ -1209,31 +1209,31 @@ class ca {
1209
1209
  loadImageSource(e, a) {
1210
1210
  const r = this, b = this.json, i = this.options;
1211
1211
  if (this.sourceCache[e] !== void 0)
1212
- return this.sourceCache[e].then((d) => d.clone());
1212
+ return this.sourceCache[e].then((o) => o.clone());
1213
1213
  const H = b.images[e], f = self.URL || self.webkitURL;
1214
1214
  let c = H.uri || "", t = !1;
1215
1215
  if (H.bufferView !== void 0)
1216
- c = r.getDependency("bufferView", H.bufferView).then(function(d) {
1216
+ c = r.getDependency("bufferView", H.bufferView).then(function(o) {
1217
1217
  t = !0;
1218
- const k = new Blob([d], { type: H.mimeType });
1218
+ const k = new Blob([o], { type: H.mimeType });
1219
1219
  return c = f.createObjectURL(k), c;
1220
1220
  });
1221
1221
  else if (H.uri === void 0)
1222
1222
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
1223
- const n = Promise.resolve(c).then(function(d) {
1223
+ const d = Promise.resolve(c).then(function(o) {
1224
1224
  return new Promise(function(k, s) {
1225
1225
  let u = k;
1226
1226
  a.isImageBitmapLoader === !0 && (u = function(_) {
1227
- const l = new K0(_);
1228
- l.needsUpdate = !0, k(l);
1229
- }), a.load(j0.resolveURL(d, i.path), u, void 0, s);
1227
+ const h = new me(_);
1228
+ h.needsUpdate = !0, k(h);
1229
+ }), a.load(G0.resolveURL(o, i.path), u, void 0, s);
1230
1230
  });
1231
- }).then(function(d) {
1232
- return t === !0 && f.revokeObjectURL(c), i0(d, H), d.userData.mimeType = H.mimeType || Ha(H.uri), d;
1233
- }).catch(function(d) {
1234
- throw console.error("THREE.GLTFLoader: Couldn't load texture", c), d;
1231
+ }).then(function(o) {
1232
+ return t === !0 && f.revokeObjectURL(c), l0(o, H), o.userData.mimeType = H.mimeType || Fa(H.uri), o;
1233
+ }).catch(function(o) {
1234
+ throw console.error("THREE.GLTFLoader: Couldn't load texture", c), o;
1235
1235
  });
1236
- return this.sourceCache[e] = n, n;
1236
+ return this.sourceCache[e] = d, d;
1237
1237
  }
1238
1238
  /**
1239
1239
  * Asynchronously assigns a texture to the given material parameters.
@@ -1249,11 +1249,11 @@ class ca {
1249
1249
  const i = this;
1250
1250
  return this.getDependency("texture", r.index).then(function(H) {
1251
1251
  if (!H) return null;
1252
- if (r.texCoord !== void 0 && r.texCoord > 0 && (H = H.clone(), H.channel = r.texCoord), i.extensions[T.KHR_TEXTURE_TRANSFORM]) {
1253
- const f = r.extensions !== void 0 ? r.extensions[T.KHR_TEXTURE_TRANSFORM] : void 0;
1252
+ if (r.texCoord !== void 0 && r.texCoord > 0 && (H = H.clone(), H.channel = r.texCoord), i.extensions[D.KHR_TEXTURE_TRANSFORM]) {
1253
+ const f = r.extensions !== void 0 ? r.extensions[D.KHR_TEXTURE_TRANSFORM] : void 0;
1254
1254
  if (f) {
1255
1255
  const c = i.associations.get(H);
1256
- H = i.extensions[T.KHR_TEXTURE_TRANSFORM].extendTexture(H, f), i.associations.set(H, c);
1256
+ H = i.extensions[D.KHR_TEXTURE_TRANSFORM].extendTexture(H, f), i.associations.set(H, c);
1257
1257
  }
1258
1258
  }
1259
1259
  return b !== void 0 && (H.colorSpace = b), e[a] = H, H;
@@ -1276,11 +1276,11 @@ class ca {
1276
1276
  if (e.isPoints) {
1277
1277
  const f = "PointsMaterial:" + r.uuid;
1278
1278
  let c = this.cache.get(f);
1279
- c || (c = new Xe(), O0.prototype.copy.call(c, r), c.color.copy(r.color), c.map = r.map, c.sizeAttenuation = !1, this.cache.add(f, c)), r = c;
1279
+ c || (c = new A2(), Q0.prototype.copy.call(c, r), c.color.copy(r.color), c.map = r.map, c.sizeAttenuation = !1, this.cache.add(f, c)), r = c;
1280
1280
  } else if (e.isLine) {
1281
1281
  const f = "LineBasicMaterial:" + r.uuid;
1282
1282
  let c = this.cache.get(f);
1283
- c || (c = new $e(), O0.prototype.copy.call(c, r), c.color.copy(r.color), c.map = r.map, this.cache.add(f, c)), r = c;
1283
+ c || (c = new p2(), Q0.prototype.copy.call(c, r), c.color.copy(r.color), c.map = r.map, this.cache.add(f, c)), r = c;
1284
1284
  }
1285
1285
  if (b || i || H) {
1286
1286
  let f = "ClonedMaterial:" + r.uuid + ":";
@@ -1291,7 +1291,7 @@ class ca {
1291
1291
  e.material = r;
1292
1292
  }
1293
1293
  getMaterialType() {
1294
- return ge;
1294
+ return Be;
1295
1295
  }
1296
1296
  /**
1297
1297
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1304,34 +1304,34 @@ class ca {
1304
1304
  const a = this, r = this.json, b = this.extensions, i = r.materials[e];
1305
1305
  let H;
1306
1306
  const f = {}, c = i.extensions || {}, t = [];
1307
- if (c[T.KHR_MATERIALS_UNLIT]) {
1308
- const d = b[T.KHR_MATERIALS_UNLIT];
1309
- H = d.getMaterialType(), t.push(d.extendParams(f, i, a));
1307
+ if (c[D.KHR_MATERIALS_UNLIT]) {
1308
+ const o = b[D.KHR_MATERIALS_UNLIT];
1309
+ H = o.getMaterialType(), t.push(o.extendParams(f, i, a));
1310
1310
  } else {
1311
- const d = i.pbrMetallicRoughness || {};
1312
- if (f.color = new r0(1, 1, 1), f.opacity = 1, Array.isArray(d.baseColorFactor)) {
1313
- const k = d.baseColorFactor;
1314
- f.color.setRGB(k[0], k[1], k[2], $), f.opacity = k[3];
1311
+ const o = i.pbrMetallicRoughness || {};
1312
+ if (f.color = new h0(1, 1, 1), f.opacity = 1, Array.isArray(o.baseColorFactor)) {
1313
+ const k = o.baseColorFactor;
1314
+ f.color.setRGB(k[0], k[1], k[2], k0), f.opacity = k[3];
1315
1315
  }
1316
- d.baseColorTexture !== void 0 && t.push(a.assignTexture(f, "map", d.baseColorTexture, n0)), f.metalness = d.metallicFactor !== void 0 ? d.metallicFactor : 1, f.roughness = d.roughnessFactor !== void 0 ? d.roughnessFactor : 1, d.metallicRoughnessTexture !== void 0 && (t.push(a.assignTexture(f, "metalnessMap", d.metallicRoughnessTexture)), t.push(a.assignTexture(f, "roughnessMap", d.metallicRoughnessTexture))), H = this._invokeOne(function(k) {
1316
+ o.baseColorTexture !== void 0 && t.push(a.assignTexture(f, "map", o.baseColorTexture, A0)), f.metalness = o.metallicFactor !== void 0 ? o.metallicFactor : 1, f.roughness = o.roughnessFactor !== void 0 ? o.roughnessFactor : 1, o.metallicRoughnessTexture !== void 0 && (t.push(a.assignTexture(f, "metalnessMap", o.metallicRoughnessTexture)), t.push(a.assignTexture(f, "roughnessMap", o.metallicRoughnessTexture))), H = this._invokeOne(function(k) {
1317
1317
  return k.getMaterialType && k.getMaterialType(e);
1318
1318
  }), t.push(Promise.all(this._invokeAll(function(k) {
1319
1319
  return k.extendMaterialParams && k.extendMaterialParams(e, f);
1320
1320
  })));
1321
1321
  }
1322
- i.doubleSided === !0 && (f.side = e2);
1323
- const n = i.alphaMode || G0.OPAQUE;
1324
- if (n === G0.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, n === G0.MASK && (f.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && H !== m0 && (t.push(a.assignTexture(f, "normalMap", i.normalTexture)), f.normalScale = new se(1, 1), i.normalTexture.scale !== void 0)) {
1325
- const d = i.normalTexture.scale;
1326
- f.normalScale.set(d, d);
1322
+ i.doubleSided === !0 && (f.side = m2);
1323
+ const d = i.alphaMode || Y0.OPAQUE;
1324
+ if (d === Y0.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, d === Y0.MASK && (f.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && H !== E0 && (t.push(a.assignTexture(f, "normalMap", i.normalTexture)), f.normalScale = new fe(1, 1), i.normalTexture.scale !== void 0)) {
1325
+ const o = i.normalTexture.scale;
1326
+ f.normalScale.set(o, o);
1327
1327
  }
1328
- if (i.occlusionTexture !== void 0 && H !== m0 && (t.push(a.assignTexture(f, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && H !== m0) {
1329
- const d = i.emissiveFactor;
1330
- f.emissive = new r0().setRGB(d[0], d[1], d[2], $);
1328
+ if (i.occlusionTexture !== void 0 && H !== E0 && (t.push(a.assignTexture(f, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && H !== E0) {
1329
+ const o = i.emissiveFactor;
1330
+ f.emissive = new h0().setRGB(o[0], o[1], o[2], k0);
1331
1331
  }
1332
- return i.emissiveTexture !== void 0 && H !== m0 && t.push(a.assignTexture(f, "emissiveMap", i.emissiveTexture, n0)), Promise.all(t).then(function() {
1333
- const d = new H(f);
1334
- return i.name && (d.name = i.name), i0(d, i), a.associations.set(d, { materials: e }), i.extensions && s0(b, d, i), d;
1332
+ return i.emissiveTexture !== void 0 && H !== E0 && t.push(a.assignTexture(f, "emissiveMap", i.emissiveTexture, A0)), Promise.all(t).then(function() {
1333
+ const o = new H(f);
1334
+ return i.name && (o.name = i.name), l0(o, i), a.associations.set(o, { materials: e }), i.extensions && y0(b, o, i), o;
1335
1335
  });
1336
1336
  }
1337
1337
  /**
@@ -1342,7 +1342,7 @@ class ca {
1342
1342
  * @return {string}
1343
1343
  */
1344
1344
  createUniqueName(e) {
1345
- const a = a2.sanitizeNodeName(e || "");
1345
+ const a = j2.sanitizeNodeName(e || "");
1346
1346
  return a in this.nodeNamesUsed ? a + "_" + ++this.nodeNamesUsed[a] : (this.nodeNamesUsed[a] = 0, a);
1347
1347
  }
1348
1348
  /**
@@ -1357,18 +1357,18 @@ class ca {
1357
1357
  loadGeometries(e) {
1358
1358
  const a = this, r = this.extensions, b = this.primitiveCache;
1359
1359
  function i(f) {
1360
- return r[T.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(f, a).then(function(c) {
1361
- return ce(c, f, a);
1360
+ return r[D.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(f, a).then(function(c) {
1361
+ return Re(c, f, a);
1362
1362
  });
1363
1363
  }
1364
1364
  const H = [];
1365
1365
  for (let f = 0, c = e.length; f < c; f++) {
1366
- const t = e[f], n = ia(t), d = b[n];
1367
- if (d)
1368
- H.push(d.promise);
1366
+ const t = e[f], d = wa(t), o = b[d];
1367
+ if (o)
1368
+ H.push(o.promise);
1369
1369
  else {
1370
1370
  let k;
1371
- t.extensions && t.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? k = i(t) : k = ce(new _e(), t, a), b[n] = { primitive: t, promise: k }, H.push(k);
1371
+ t.extensions && t.extensions[D.KHR_DRACO_MESH_COMPRESSION] ? k = i(t) : k = Re(new qe(), t, a), b[d] = { primitive: t, promise: k }, H.push(k);
1372
1372
  }
1373
1373
  }
1374
1374
  return Promise.all(H);
@@ -1383,40 +1383,40 @@ class ca {
1383
1383
  loadMesh(e) {
1384
1384
  const a = this, r = this.json, b = this.extensions, i = r.meshes[e], H = i.primitives, f = [];
1385
1385
  for (let c = 0, t = H.length; c < t; c++) {
1386
- const n = H[c].material === void 0 ? ea(this.cache) : this.getDependency("material", H[c].material);
1387
- f.push(n);
1386
+ const d = H[c].material === void 0 ? ja(this.cache) : this.getDependency("material", H[c].material);
1387
+ f.push(d);
1388
1388
  }
1389
1389
  return f.push(a.loadGeometries(H)), Promise.all(f).then(function(c) {
1390
- const t = c.slice(0, c.length - 1), n = c[c.length - 1], d = [];
1391
- for (let s = 0, u = n.length; s < u; s++) {
1392
- const _ = n[s], l = H[s];
1393
- let j;
1394
- const h = t[s];
1395
- if (l.mode === Q.TRIANGLES || l.mode === Q.TRIANGLE_STRIP || l.mode === Q.TRIANGLE_FAN || l.mode === void 0)
1396
- j = i.isSkinnedMesh === !0 ? new b2(_, h) : new Ae(_, h), j.isSkinnedMesh === !0 && j.normalizeSkinWeights(), l.mode === Q.TRIANGLE_STRIP ? j.geometry = be(j.geometry, oe) : l.mode === Q.TRIANGLE_FAN && (j.geometry = be(j.geometry, q0));
1397
- else if (l.mode === Q.LINES)
1398
- j = new i2(_, h);
1399
- else if (l.mode === Q.LINE_STRIP)
1400
- j = new H2(_, h);
1401
- else if (l.mode === Q.LINE_LOOP)
1402
- j = new r2(_, h);
1403
- else if (l.mode === Q.POINTS)
1404
- j = new c2(_, h);
1390
+ const t = c.slice(0, c.length - 1), d = c[c.length - 1], o = [];
1391
+ for (let s = 0, u = d.length; s < u; s++) {
1392
+ const _ = d[s], h = H[s];
1393
+ let I;
1394
+ const A = t[s];
1395
+ if (h.mode === f0.TRIANGLES || h.mode === f0.TRIANGLE_STRIP || h.mode === f0.TRIANGLE_FAN || h.mode === void 0)
1396
+ I = i.isSkinnedMesh === !0 ? new I2(_, A) : new Ve(_, A), I.isSkinnedMesh === !0 && I.normalizeSkinWeights(), h.mode === f0.TRIANGLE_STRIP ? I.geometry = Fe(I.geometry, Ee) : h.mode === f0.TRIANGLE_FAN && (I.geometry = Fe(I.geometry, $0));
1397
+ else if (h.mode === f0.LINES)
1398
+ I = new y2(_, A);
1399
+ else if (h.mode === f0.LINE_STRIP)
1400
+ I = new w2(_, A);
1401
+ else if (h.mode === f0.LINE_LOOP)
1402
+ I = new F2(_, A);
1403
+ else if (h.mode === f0.POINTS)
1404
+ I = new N2(_, A);
1405
1405
  else
1406
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + l.mode);
1407
- Object.keys(j.geometry.morphAttributes).length > 0 && ba(j, i), j.name = a.createUniqueName(i.name || "mesh_" + e), i0(j, i), l.extensions && s0(b, j, l), a.assignFinalMaterial(j), d.push(j);
1406
+ throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + h.mode);
1407
+ Object.keys(I.geometry.morphAttributes).length > 0 && ya(I, i), I.name = a.createUniqueName(i.name || "mesh_" + e), l0(I, i), h.extensions && y0(b, I, h), a.assignFinalMaterial(I), o.push(I);
1408
1408
  }
1409
- for (let s = 0, u = d.length; s < u; s++)
1410
- a.associations.set(d[s], {
1409
+ for (let s = 0, u = o.length; s < u; s++)
1410
+ a.associations.set(o[s], {
1411
1411
  meshes: e,
1412
1412
  primitives: s
1413
1413
  });
1414
- if (d.length === 1)
1415
- return i.extensions && s0(b, d[0], i), d[0];
1416
- const k = new w0();
1417
- i.extensions && s0(b, k, i), a.associations.set(k, { meshes: e });
1418
- for (let s = 0, u = d.length; s < u; s++)
1419
- k.add(d[s]);
1414
+ if (o.length === 1)
1415
+ return i.extensions && y0(b, o[0], i), o[0];
1416
+ const k = new C0();
1417
+ i.extensions && y0(b, k, i), a.associations.set(k, { meshes: e });
1418
+ for (let s = 0, u = o.length; s < u; s++)
1419
+ k.add(o[s]);
1420
1420
  return k;
1421
1421
  });
1422
1422
  }
@@ -1434,7 +1434,7 @@ class ca {
1434
1434
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1435
1435
  return;
1436
1436
  }
1437
- return r.type === "perspective" ? a = new f2(t2.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : r.type === "orthographic" && (a = new n2(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), r.name && (a.name = this.createUniqueName(r.name)), i0(a, r), Promise.resolve(a);
1437
+ return r.type === "perspective" ? a = new v2(T2.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : r.type === "orthographic" && (a = new R2(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), r.name && (a.name = this.createUniqueName(r.name)), l0(a, r), Promise.resolve(a);
1438
1438
  }
1439
1439
  /**
1440
1440
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1449,16 +1449,16 @@ class ca {
1449
1449
  r.push(this._loadNodeShallow(a.joints[b]));
1450
1450
  return a.inverseBindMatrices !== void 0 ? r.push(this.getDependency("accessor", a.inverseBindMatrices)) : r.push(null), Promise.all(r).then(function(b) {
1451
1451
  const i = b.pop(), H = b, f = [], c = [];
1452
- for (let t = 0, n = H.length; t < n; t++) {
1453
- const d = H[t];
1454
- if (d) {
1455
- f.push(d);
1456
- const k = new v0();
1452
+ for (let t = 0, d = H.length; t < d; t++) {
1453
+ const o = H[t];
1454
+ if (o) {
1455
+ f.push(o);
1456
+ const k = new S0();
1457
1457
  i !== null && k.fromArray(i.array, t * 16), c.push(k);
1458
1458
  } else
1459
1459
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', a.joints[t]);
1460
1460
  }
1461
- return new d2(f, c);
1461
+ return new M2(f, c);
1462
1462
  });
1463
1463
  }
1464
1464
  /**
@@ -1469,29 +1469,29 @@ class ca {
1469
1469
  * @return {Promise<AnimationClip>}
1470
1470
  */
1471
1471
  loadAnimation(e) {
1472
- const a = this.json, r = this, b = a.animations[e], i = b.name ? b.name : "animation_" + e, H = [], f = [], c = [], t = [], n = [];
1473
- for (let d = 0, k = b.channels.length; d < k; d++) {
1474
- const s = b.channels[d], u = b.samplers[s.sampler], _ = s.target, l = _.node, j = b.parameters !== void 0 ? b.parameters[u.input] : u.input, h = b.parameters !== void 0 ? b.parameters[u.output] : u.output;
1475
- _.node !== void 0 && (H.push(this.getDependency("node", l)), f.push(this.getDependency("accessor", j)), c.push(this.getDependency("accessor", h)), t.push(u), n.push(_));
1472
+ const a = this.json, r = this, b = a.animations[e], i = b.name ? b.name : "animation_" + e, H = [], f = [], c = [], t = [], d = [];
1473
+ for (let o = 0, k = b.channels.length; o < k; o++) {
1474
+ const s = b.channels[o], u = b.samplers[s.sampler], _ = s.target, h = _.node, I = b.parameters !== void 0 ? b.parameters[u.input] : u.input, A = b.parameters !== void 0 ? b.parameters[u.output] : u.output;
1475
+ _.node !== void 0 && (H.push(this.getDependency("node", h)), f.push(this.getDependency("accessor", I)), c.push(this.getDependency("accessor", A)), t.push(u), d.push(_));
1476
1476
  }
1477
1477
  return Promise.all([
1478
1478
  Promise.all(H),
1479
1479
  Promise.all(f),
1480
1480
  Promise.all(c),
1481
1481
  Promise.all(t),
1482
- Promise.all(n)
1483
- ]).then(function(d) {
1484
- const k = d[0], s = d[1], u = d[2], _ = d[3], l = d[4], j = [];
1485
- for (let h = 0, g = k.length; h < g; h++) {
1486
- const p = k[h], I = s[h], F = u[h], w = _[h], y = l[h];
1482
+ Promise.all(d)
1483
+ ]).then(function(o) {
1484
+ const k = o[0], s = o[1], u = o[2], _ = o[3], h = o[4], I = [];
1485
+ for (let A = 0, g = k.length; A < g; A++) {
1486
+ const p = k[A], y = s[A], F = u[A], N = _[A], B = h[A];
1487
1487
  if (p === void 0) continue;
1488
1488
  p.updateMatrix && p.updateMatrix();
1489
- const m = r._createAnimationTracks(p, I, F, w, y);
1490
- if (m)
1491
- for (let D = 0; D < m.length; D++)
1492
- j.push(m[D]);
1489
+ const V = r._createAnimationTracks(p, y, F, N, B);
1490
+ if (V)
1491
+ for (let O = 0; O < V.length; O++)
1492
+ I.push(V[O]);
1493
1493
  }
1494
- return new o2(i, void 0, j);
1494
+ return new D2(i, void 0, I);
1495
1495
  });
1496
1496
  }
1497
1497
  createNodeMesh(e) {
@@ -1514,7 +1514,7 @@ class ca {
1514
1514
  */
1515
1515
  loadNode(e) {
1516
1516
  const a = this.json, r = this, b = a.nodes[e], i = r._loadNodeShallow(e), H = [], f = b.children || [];
1517
- for (let t = 0, n = f.length; t < n; t++)
1517
+ for (let t = 0, d = f.length; t < d; t++)
1518
1518
  H.push(r.getDependency("node", f[t]));
1519
1519
  const c = b.skin === void 0 ? Promise.resolve(null) : r.getDependency("skin", b.skin);
1520
1520
  return Promise.all([
@@ -1522,13 +1522,13 @@ class ca {
1522
1522
  Promise.all(H),
1523
1523
  c
1524
1524
  ]).then(function(t) {
1525
- const n = t[0], d = t[1], k = t[2];
1526
- k !== null && n.traverse(function(s) {
1527
- s.isSkinnedMesh && s.bind(k, ra);
1525
+ const d = t[0], o = t[1], k = t[2];
1526
+ k !== null && d.traverse(function(s) {
1527
+ s.isSkinnedMesh && s.bind(k, Na);
1528
1528
  });
1529
- for (let s = 0, u = d.length; s < u; s++)
1530
- n.add(d[s]);
1531
- return n;
1529
+ for (let s = 0, u = o.length; s < u; s++)
1530
+ d.add(o[s]);
1531
+ return d;
1532
1532
  });
1533
1533
  }
1534
1534
  // ._loadNodeShallow() parses a single node.
@@ -1547,22 +1547,22 @@ class ca {
1547
1547
  }).forEach(function(t) {
1548
1548
  f.push(t);
1549
1549
  }), this.nodeCache[e] = Promise.all(f).then(function(t) {
1550
- let n;
1551
- if (i.isBone === !0 ? n = new k2() : t.length > 1 ? n = new w0() : t.length === 1 ? n = t[0] : n = new ue(), n !== t[0])
1552
- for (let d = 0, k = t.length; d < k; d++)
1553
- n.add(t[d]);
1554
- if (i.name && (n.userData.name = i.name, n.name = H), i0(n, i), i.extensions && s0(r, n, i), i.matrix !== void 0) {
1555
- const d = new v0();
1556
- d.fromArray(i.matrix), n.applyMatrix4(d);
1550
+ let d;
1551
+ if (i.isBone === !0 ? d = new O2() : t.length > 1 ? d = new C0() : t.length === 1 ? d = t[0] : d = new Ue(), d !== t[0])
1552
+ for (let o = 0, k = t.length; o < k; o++)
1553
+ d.add(t[o]);
1554
+ if (i.name && (d.userData.name = i.name, d.name = H), l0(d, i), i.extensions && y0(r, d, i), i.matrix !== void 0) {
1555
+ const o = new S0();
1556
+ o.fromArray(i.matrix), d.applyMatrix4(o);
1557
1557
  } else
1558
- i.translation !== void 0 && n.position.fromArray(i.translation), i.rotation !== void 0 && n.quaternion.fromArray(i.rotation), i.scale !== void 0 && n.scale.fromArray(i.scale);
1559
- if (!b.associations.has(n))
1560
- b.associations.set(n, {});
1558
+ i.translation !== void 0 && d.position.fromArray(i.translation), i.rotation !== void 0 && d.quaternion.fromArray(i.rotation), i.scale !== void 0 && d.scale.fromArray(i.scale);
1559
+ if (!b.associations.has(d))
1560
+ b.associations.set(d, {});
1561
1561
  else if (i.mesh !== void 0 && b.meshCache.refs[i.mesh] > 1) {
1562
- const d = b.associations.get(n);
1563
- b.associations.set(n, { ...d });
1562
+ const o = b.associations.get(d);
1563
+ b.associations.set(d, { ...o });
1564
1564
  }
1565
- return b.associations.get(n).nodes = e, n;
1565
+ return b.associations.get(d).nodes = e, d;
1566
1566
  }), this.nodeCache[e];
1567
1567
  }
1568
1568
  /**
@@ -1573,63 +1573,63 @@ class ca {
1573
1573
  * @return {Promise<Group>}
1574
1574
  */
1575
1575
  loadScene(e) {
1576
- const a = this.extensions, r = this.json.scenes[e], b = this, i = new w0();
1577
- r.name && (i.name = b.createUniqueName(r.name)), i0(i, r), r.extensions && s0(a, i, r);
1576
+ const a = this.extensions, r = this.json.scenes[e], b = this, i = new C0();
1577
+ r.name && (i.name = b.createUniqueName(r.name)), l0(i, r), r.extensions && y0(a, i, r);
1578
1578
  const H = r.nodes || [], f = [];
1579
1579
  for (let c = 0, t = H.length; c < t; c++)
1580
1580
  f.push(b.getDependency("node", H[c]));
1581
1581
  return Promise.all(f).then(function(c) {
1582
- for (let n = 0, d = c.length; n < d; n++)
1583
- i.add(c[n]);
1584
- const t = (n) => {
1585
- const d = /* @__PURE__ */ new Map();
1582
+ for (let d = 0, o = c.length; d < o; d++)
1583
+ i.add(c[d]);
1584
+ const t = (d) => {
1585
+ const o = /* @__PURE__ */ new Map();
1586
1586
  for (const [k, s] of b.associations)
1587
- (k instanceof O0 || k instanceof K0) && d.set(k, s);
1588
- return n.traverse((k) => {
1587
+ (k instanceof Q0 || k instanceof me) && o.set(k, s);
1588
+ return d.traverse((k) => {
1589
1589
  const s = b.associations.get(k);
1590
- s != null && d.set(k, s);
1591
- }), d;
1590
+ s != null && o.set(k, s);
1591
+ }), o;
1592
1592
  };
1593
1593
  return b.associations = t(i), i;
1594
1594
  });
1595
1595
  }
1596
1596
  _createAnimationTracks(e, a, r, b, i) {
1597
1597
  const H = [], f = e.name ? e.name : e.uuid, c = [];
1598
- t0[i.path] === t0.weights ? e.traverse(function(k) {
1598
+ _0[i.path] === _0.weights ? e.traverse(function(k) {
1599
1599
  k.morphTargetInfluences && c.push(k.name ? k.name : k.uuid);
1600
1600
  }) : c.push(f);
1601
1601
  let t;
1602
- switch (t0[i.path]) {
1603
- case t0.weights:
1604
- t = $0;
1602
+ switch (_0[i.path]) {
1603
+ case _0.weights:
1604
+ t = Ie;
1605
1605
  break;
1606
- case t0.rotation:
1607
- t = ee;
1606
+ case _0.rotation:
1607
+ t = ye;
1608
1608
  break;
1609
- case t0.translation:
1610
- case t0.scale:
1611
- t = X0;
1609
+ case _0.translation:
1610
+ case _0.scale:
1611
+ t = je;
1612
1612
  break;
1613
1613
  default:
1614
1614
  switch (r.itemSize) {
1615
1615
  case 1:
1616
- t = $0;
1616
+ t = Ie;
1617
1617
  break;
1618
1618
  case 2:
1619
1619
  case 3:
1620
1620
  default:
1621
- t = X0;
1621
+ t = je;
1622
1622
  break;
1623
1623
  }
1624
1624
  break;
1625
1625
  }
1626
- const n = b.interpolation !== void 0 ? $2[b.interpolation] : pe, d = this._getArrayFromAccessor(r);
1626
+ const d = b.interpolation !== void 0 ? ma[b.interpolation] : We, o = this._getArrayFromAccessor(r);
1627
1627
  for (let k = 0, s = c.length; k < s; k++) {
1628
1628
  const u = new t(
1629
- c[k] + "." + t0[i.path],
1629
+ c[k] + "." + _0[i.path],
1630
1630
  a.array,
1631
- d,
1632
- n
1631
+ o,
1632
+ d
1633
1633
  );
1634
1634
  b.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(u), H.push(u);
1635
1635
  }
@@ -1638,7 +1638,7 @@ class ca {
1638
1638
  _getArrayFromAccessor(e) {
1639
1639
  let a = e.array;
1640
1640
  if (e.normalized) {
1641
- const r = C0(a.constructor), b = new Float32Array(a.length);
1641
+ const r = He(a.constructor), b = new Float32Array(a.length);
1642
1642
  for (let i = 0, H = a.length; i < H; i++)
1643
1643
  b[i] = a[i] * r;
1644
1644
  a = b;
@@ -1647,22 +1647,22 @@ class ca {
1647
1647
  }
1648
1648
  _createCubicSplineTrackInterpolant(e) {
1649
1649
  e.createInterpolant = function(r) {
1650
- const b = this instanceof ee ? X2 : Ie;
1650
+ const b = this instanceof ye ? pa : Le;
1651
1651
  return new b(this.times, this.values, this.getValueSize() / 3, r);
1652
1652
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1653
1653
  }
1654
1654
  }
1655
- function fa(o, e, a) {
1656
- const r = e.attributes, b = new me();
1655
+ function Ta(n, e, a) {
1656
+ const r = e.attributes, b = new z0();
1657
1657
  if (r.POSITION !== void 0) {
1658
1658
  const f = a.json.accessors[r.POSITION], c = f.min, t = f.max;
1659
1659
  if (c !== void 0 && t !== void 0) {
1660
1660
  if (b.set(
1661
- new N(c[0], c[1], c[2]),
1662
- new N(t[0], t[1], t[2])
1661
+ new w(c[0], c[1], c[2]),
1662
+ new w(t[0], t[1], t[2])
1663
1663
  ), f.normalized) {
1664
- const n = C0(_0[f.componentType]);
1665
- b.min.multiplyScalar(n), b.max.multiplyScalar(n);
1664
+ const d = He(T0[f.componentType]);
1665
+ b.min.multiplyScalar(d), b.max.multiplyScalar(d);
1666
1666
  }
1667
1667
  } else {
1668
1668
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -1672,14 +1672,14 @@ function fa(o, e, a) {
1672
1672
  return;
1673
1673
  const i = e.targets;
1674
1674
  if (i !== void 0) {
1675
- const f = new N(), c = new N();
1676
- for (let t = 0, n = i.length; t < n; t++) {
1677
- const d = i[t];
1678
- if (d.POSITION !== void 0) {
1679
- const k = a.json.accessors[d.POSITION], s = k.min, u = k.max;
1675
+ const f = new w(), c = new w();
1676
+ for (let t = 0, d = i.length; t < d; t++) {
1677
+ const o = i[t];
1678
+ if (o.POSITION !== void 0) {
1679
+ const k = a.json.accessors[o.POSITION], s = k.min, u = k.max;
1680
1680
  if (s !== void 0 && u !== void 0) {
1681
1681
  if (c.setX(Math.max(Math.abs(s[0]), Math.abs(u[0]))), c.setY(Math.max(Math.abs(s[1]), Math.abs(u[1]))), c.setZ(Math.max(Math.abs(s[2]), Math.abs(u[2]))), k.normalized) {
1682
- const _ = C0(_0[k.componentType]);
1682
+ const _ = He(T0[k.componentType]);
1683
1683
  c.multiplyScalar(_);
1684
1684
  }
1685
1685
  f.max(c);
@@ -1689,33 +1689,33 @@ function fa(o, e, a) {
1689
1689
  }
1690
1690
  b.expandByVector(f);
1691
1691
  }
1692
- o.boundingBox = b;
1693
- const H = new g2();
1694
- b.getCenter(H.center), H.radius = b.min.distanceTo(b.max) / 2, o.boundingSphere = H;
1692
+ n.boundingBox = b;
1693
+ const H = new P2();
1694
+ b.getCenter(H.center), H.radius = b.min.distanceTo(b.max) / 2, n.boundingSphere = H;
1695
1695
  }
1696
- function ce(o, e, a) {
1696
+ function Re(n, e, a) {
1697
1697
  const r = e.attributes, b = [];
1698
1698
  function i(H, f) {
1699
1699
  return a.getDependency("accessor", H).then(function(c) {
1700
- o.setAttribute(f, c);
1700
+ n.setAttribute(f, c);
1701
1701
  });
1702
1702
  }
1703
1703
  for (const H in r) {
1704
- const f = W0[H] || H.toLowerCase();
1705
- f in o.attributes || b.push(i(r[H], f));
1704
+ const f = ie[H] || H.toLowerCase();
1705
+ f in n.attributes || b.push(i(r[H], f));
1706
1706
  }
1707
- if (e.indices !== void 0 && !o.index) {
1707
+ if (e.indices !== void 0 && !n.index) {
1708
1708
  const H = a.getDependency("accessor", e.indices).then(function(f) {
1709
- o.setIndex(f);
1709
+ n.setIndex(f);
1710
1710
  });
1711
1711
  b.push(H);
1712
1712
  }
1713
- return V0.workingColorSpace !== $ && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${V0.workingColorSpace}" not supported.`), i0(o, e), fa(o, e, a), Promise.all(b).then(function() {
1714
- return e.targets !== void 0 ? aa(o, e.targets, a) : o;
1713
+ return be.workingColorSpace !== k0 && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${be.workingColorSpace}" not supported.`), l0(n, e), Ta(n, e, a), Promise.all(b).then(function() {
1714
+ return e.targets !== void 0 ? Ia(n, e.targets, a) : n;
1715
1715
  });
1716
1716
  }
1717
- const x0 = /* @__PURE__ */ new WeakMap();
1718
- class ta extends ke {
1717
+ const X0 = /* @__PURE__ */ new WeakMap();
1718
+ class Ra extends Ge {
1719
1719
  /**
1720
1720
  * Constructs a new Draco loader.
1721
1721
  *
@@ -1772,7 +1772,7 @@ class ta extends ke {
1772
1772
  * @param {onErrorCallback} onError - Executed when errors occur.
1773
1773
  */
1774
1774
  load(e, a, r, b) {
1775
- const i = new N0(this.manager);
1775
+ const i = new L0(this.manager);
1776
1776
  i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (H) => {
1777
1777
  this.parse(H, a, b);
1778
1778
  }, r, b);
@@ -1786,10 +1786,10 @@ class ta extends ke {
1786
1786
  */
1787
1787
  parse(e, a, r = () => {
1788
1788
  }) {
1789
- this.decodeDracoFile(e, a, null, null, n0, r).catch(r);
1789
+ this.decodeDracoFile(e, a, null, null, A0, r).catch(r);
1790
1790
  }
1791
1791
  //
1792
- decodeDracoFile(e, a, r, b, i = $, H = () => {
1792
+ decodeDracoFile(e, a, r, b, i = k0, H = () => {
1793
1793
  }) {
1794
1794
  const f = {
1795
1795
  attributeIDs: r || this.defaultAttributeIDs,
@@ -1801,8 +1801,8 @@ class ta extends ke {
1801
1801
  }
1802
1802
  decodeGeometry(e, a) {
1803
1803
  const r = JSON.stringify(a);
1804
- if (x0.has(e)) {
1805
- const c = x0.get(e);
1804
+ if (X0.has(e)) {
1805
+ const c = X0.get(e);
1806
1806
  if (c.key === r)
1807
1807
  return c.promise;
1808
1808
  if (e.byteLength === 0)
@@ -1811,33 +1811,33 @@ class ta extends ke {
1811
1811
  );
1812
1812
  }
1813
1813
  let b;
1814
- const i = this.workerNextTaskID++, H = e.byteLength, f = this._getWorker(i, H).then((c) => (b = c, new Promise((t, n) => {
1815
- b._callbacks[i] = { resolve: t, reject: n }, b.postMessage({ type: "decode", id: i, taskConfig: a, buffer: e }, [e]);
1814
+ const i = this.workerNextTaskID++, H = e.byteLength, f = this._getWorker(i, H).then((c) => (b = c, new Promise((t, d) => {
1815
+ b._callbacks[i] = { resolve: t, reject: d }, b.postMessage({ type: "decode", id: i, taskConfig: a, buffer: e }, [e]);
1816
1816
  }))).then((c) => this._createGeometry(c.geometry));
1817
1817
  return f.catch(() => !0).then(() => {
1818
1818
  b && i && this._releaseTask(b, i);
1819
- }), x0.set(e, {
1819
+ }), X0.set(e, {
1820
1820
  key: r,
1821
1821
  promise: f
1822
1822
  }), f;
1823
1823
  }
1824
1824
  _createGeometry(e) {
1825
- const a = new _e();
1826
- e.index && a.setIndex(new I0(e.index.array, 1));
1825
+ const a = new qe();
1826
+ e.index && a.setIndex(new U0(e.index.array, 1));
1827
1827
  for (let r = 0; r < e.attributes.length; r++) {
1828
- const b = e.attributes[r], i = b.name, H = b.array, f = b.itemSize, c = new I0(H, f);
1828
+ const b = e.attributes[r], i = b.name, H = b.array, f = b.itemSize, c = new U0(H, f);
1829
1829
  i === "color" && (this._assignVertexColorSpace(c, b.vertexColorSpace), c.normalized = !(H instanceof Float32Array)), a.setAttribute(i, c);
1830
1830
  }
1831
1831
  return a;
1832
1832
  }
1833
1833
  _assignVertexColorSpace(e, a) {
1834
- if (a !== n0) return;
1835
- const r = new r0();
1834
+ if (a !== A0) return;
1835
+ const r = new h0();
1836
1836
  for (let b = 0, i = e.count; b < i; b++)
1837
- r.fromBufferAttribute(e, b), V0.colorSpaceToWorking(r, n0), e.setXYZ(b, r.r, r.g, r.b);
1837
+ r.fromBufferAttribute(e, b), be.colorSpaceToWorking(r, A0), e.setXYZ(b, r.r, r.g, r.b);
1838
1838
  }
1839
1839
  _loadLibrary(e, a) {
1840
- const r = new N0(this.manager);
1840
+ const r = new L0(this.manager);
1841
1841
  return r.setPath(this.decoderPath), r.setResponseType(a), r.setWithCredentials(this.withCredentials), new Promise((b, i) => {
1842
1842
  r.load(e, b, void 0, i);
1843
1843
  });
@@ -1851,7 +1851,7 @@ class ta extends ke {
1851
1851
  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) => {
1852
1852
  const b = r[0];
1853
1853
  e || (this.decoderConfig.wasmBinary = r[1]);
1854
- const i = na.toString(), H = [
1854
+ const i = Ma.toString(), H = [
1855
1855
  "/* draco decoder */",
1856
1856
  b,
1857
1857
  "",
@@ -1899,36 +1899,36 @@ class ta extends ke {
1899
1899
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
1900
1900
  }
1901
1901
  }
1902
- function na() {
1903
- let o, e;
1902
+ function Ma() {
1903
+ let n, e;
1904
1904
  onmessage = function(H) {
1905
1905
  const f = H.data;
1906
1906
  switch (f.type) {
1907
1907
  case "init":
1908
- o = f.decoderConfig, e = new Promise(function(n) {
1909
- o.onModuleLoaded = function(d) {
1910
- n({ draco: d });
1911
- }, DracoDecoderModule(o);
1908
+ n = f.decoderConfig, e = new Promise(function(d) {
1909
+ n.onModuleLoaded = function(o) {
1910
+ d({ draco: o });
1911
+ }, DracoDecoderModule(n);
1912
1912
  });
1913
1913
  break;
1914
1914
  case "decode":
1915
1915
  const c = f.buffer, t = f.taskConfig;
1916
- e.then((n) => {
1917
- const d = n.draco, k = new d.Decoder();
1916
+ e.then((d) => {
1917
+ const o = d.draco, k = new o.Decoder();
1918
1918
  try {
1919
- const s = a(d, k, new Int8Array(c), t), u = s.attributes.map((_) => _.array.buffer);
1919
+ const s = a(o, k, new Int8Array(c), t), u = s.attributes.map((_) => _.array.buffer);
1920
1920
  s.index && u.push(s.index.array.buffer), self.postMessage({ type: "decode", id: f.id, geometry: s }, u);
1921
1921
  } catch (s) {
1922
1922
  console.error(s), self.postMessage({ type: "error", id: f.id, error: s.message });
1923
1923
  } finally {
1924
- d.destroy(k);
1924
+ o.destroy(k);
1925
1925
  }
1926
1926
  });
1927
1927
  break;
1928
1928
  }
1929
1929
  };
1930
1930
  function a(H, f, c, t) {
1931
- const n = t.attributeIDs, d = t.attributeTypes;
1931
+ const d = t.attributeIDs, o = t.attributeTypes;
1932
1932
  let k, s;
1933
1933
  const u = f.GetEncodedGeometryType(c);
1934
1934
  if (u === H.TRIANGULAR_MESH)
@@ -1940,33 +1940,33 @@ function na() {
1940
1940
  if (!s.ok() || k.ptr === 0)
1941
1941
  throw new Error("THREE.DRACOLoader: Decoding failed: " + s.error_msg());
1942
1942
  const _ = { index: null, attributes: [] };
1943
- for (const l in n) {
1944
- const j = self[d[l]];
1945
- let h, g;
1943
+ for (const h in d) {
1944
+ const I = self[o[h]];
1945
+ let A, g;
1946
1946
  if (t.useUniqueIDs)
1947
- g = n[l], h = f.GetAttributeByUniqueId(k, g);
1947
+ g = d[h], A = f.GetAttributeByUniqueId(k, g);
1948
1948
  else {
1949
- if (g = f.GetAttributeId(k, H[n[l]]), g === -1) continue;
1950
- h = f.GetAttribute(k, g);
1949
+ if (g = f.GetAttributeId(k, H[d[h]]), g === -1) continue;
1950
+ A = f.GetAttribute(k, g);
1951
1951
  }
1952
- const p = b(H, f, k, l, j, h);
1953
- l === "color" && (p.vertexColorSpace = t.vertexColorSpace), _.attributes.push(p);
1952
+ const p = b(H, f, k, h, I, A);
1953
+ h === "color" && (p.vertexColorSpace = t.vertexColorSpace), _.attributes.push(p);
1954
1954
  }
1955
1955
  return u === H.TRIANGULAR_MESH && (_.index = r(H, f, k)), H.destroy(k), _;
1956
1956
  }
1957
1957
  function r(H, f, c) {
1958
- const n = c.num_faces() * 3, d = n * 4, k = H._malloc(d);
1959
- f.GetTrianglesUInt32Array(c, d, k);
1960
- const s = new Uint32Array(H.HEAPF32.buffer, k, n).slice();
1958
+ const d = c.num_faces() * 3, o = d * 4, k = H._malloc(o);
1959
+ f.GetTrianglesUInt32Array(c, o, k);
1960
+ const s = new Uint32Array(H.HEAPF32.buffer, k, d).slice();
1961
1961
  return H._free(k), { array: s, itemSize: 1 };
1962
1962
  }
1963
- function b(H, f, c, t, n, d) {
1964
- const k = d.num_components(), u = c.num_points() * k, _ = u * n.BYTES_PER_ELEMENT, l = i(H, n), j = H._malloc(_);
1965
- f.GetAttributeDataArrayForAllPoints(c, d, l, _, j);
1966
- const h = new n(H.HEAPF32.buffer, j, u).slice();
1967
- return H._free(j), {
1963
+ function b(H, f, c, t, d, o) {
1964
+ const k = o.num_components(), u = c.num_points() * k, _ = u * d.BYTES_PER_ELEMENT, h = i(H, d), I = H._malloc(_);
1965
+ f.GetAttributeDataArrayForAllPoints(c, o, h, _, I);
1966
+ const A = new d(H.HEAPF32.buffer, I, u).slice();
1967
+ return H._free(I), {
1968
1968
  name: t,
1969
- array: h,
1969
+ array: A,
1970
1970
  itemSize: k
1971
1971
  };
1972
1972
  }
@@ -1989,7 +1989,7 @@ function na() {
1989
1989
  }
1990
1990
  }
1991
1991
  }
1992
- const da = `
1992
+ const Da = `
1993
1993
  var DracoDecoderModule = (() => {
1994
1994
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
1995
1995
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
@@ -2024,77 +2024,77 @@ else if (typeof define === 'function' && define['amd'])
2024
2024
  else if (typeof exports === 'object')
2025
2025
  exports["DracoDecoderModule"] = DracoDecoderModule;
2026
2026
  `;
2027
- function oa() {
2028
- const o = H0(!1), e = H0(""), a = ve([]), r = H0(null), b = new I2(), i = new y2(), H = new F2(), f = new N2();
2027
+ function Oa() {
2028
+ const n = u0(!1), e = u0(""), a = Ye([]), r = u0(null), b = new S2(), i = new z2(), H = new Z2(), f = new J2();
2029
2029
  let c = null;
2030
2030
  return {
2031
- isLoading: o,
2031
+ isLoading: n,
2032
2032
  loadingProgress: e,
2033
2033
  loadedModels: a,
2034
2034
  error: r,
2035
- loadModelsFromBlobs: async (n) => {
2035
+ loadModelsFromBlobs: async (d) => {
2036
2036
  var u;
2037
- if (!n || n.length === 0) {
2037
+ if (!d || d.length === 0) {
2038
2038
  console.warn("loadModelsFromBlobs 加载的文件数组为空!");
2039
2039
  return;
2040
2040
  }
2041
- o.value = !0, e.value = "准备加载...", a.value = [], r.value = null;
2042
- const d = /* @__PURE__ */ new Map();
2043
- n.forEach((_) => {
2044
- _ instanceof File && d.set(_.name.toLowerCase(), _);
2041
+ n.value = !0, e.value = "准备加载...", a.value = [], r.value = null;
2042
+ const o = /* @__PURE__ */ new Map();
2043
+ d.forEach((_) => {
2044
+ _ instanceof File && o.set(_.name.toLowerCase(), _);
2045
2045
  });
2046
2046
  const k = [], s = [];
2047
2047
  try {
2048
- for (const _ of n) {
2049
- const l = _.name || "unknown_file", j = (u = l.split(".").pop()) == null ? void 0 : u.toLowerCase();
2050
- if (j === "mtl") continue;
2051
- const h = URL.createObjectURL(_);
2052
- k.push(h);
2048
+ for (const _ of d) {
2049
+ const h = _.name || "unknown_file", I = (u = h.split(".").pop()) == null ? void 0 : u.toLowerCase();
2050
+ if (I === "mtl") continue;
2051
+ const A = URL.createObjectURL(_);
2052
+ k.push(A);
2053
2053
  let g = null;
2054
- const p = (I) => {
2055
- const F = I.lengthComputable ? I.loaded / I.total * 100 : 0;
2056
- e.value = `正在加载 ${l}... ${Math.round(F)}%`;
2054
+ const p = (y) => {
2055
+ const F = y.lengthComputable ? y.loaded / y.total * 100 : 0;
2056
+ e.value = `正在加载 ${h}... ${Math.round(F)}%`;
2057
2057
  };
2058
- switch (e.value = `正在加载 ${l}... 0%`, j) {
2058
+ switch (e.value = `正在加载 ${h}... 0%`, I) {
2059
2059
  case "obj":
2060
- const I = l.replace(/\.obj$/i, ".mtl").toLowerCase();
2061
- if (d.has(I)) {
2062
- const D = d.get(I), R = URL.createObjectURL(D);
2063
- k.push(R);
2064
- const U = await b.loadAsync(R);
2065
- U.preload(), i.setMaterials(U);
2060
+ const y = h.replace(/\.obj$/i, ".mtl").toLowerCase();
2061
+ if (o.has(y)) {
2062
+ const O = o.get(y), x = URL.createObjectURL(O);
2063
+ k.push(x);
2064
+ const S = await b.loadAsync(x);
2065
+ S.preload(), i.setMaterials(S);
2066
2066
  } else
2067
2067
  i.setMaterials(null);
2068
- g = await i.loadAsync(h, p);
2068
+ g = await i.loadAsync(A, p);
2069
2069
  break;
2070
2070
  case "stl":
2071
- const F = await H.loadAsync(h, p), w = new _2({ color: 11184810, specular: 1118481, shininess: 200 });
2072
- g = new Ae(F, w);
2071
+ const F = await H.loadAsync(A, p), N = new B2({ color: 11184810, specular: 1118481, shininess: 200 });
2072
+ g = new Ve(F, N);
2073
2073
  break;
2074
2074
  case "gltf":
2075
- g = (await f.loadAsync(h, p)).scene;
2075
+ g = (await f.loadAsync(A, p)).scene;
2076
2076
  break;
2077
2077
  case "glb":
2078
- c || (c = new ta(), c._loadLibrary = function(D, R) {
2079
- return D === "draco_decoder.js" && R === "text" ? Promise.resolve(da) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${D}`));
2080
- }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), g = (await f.loadAsync(h, p)).scene;
2078
+ c || (c = new Ra(), c._loadLibrary = function(O, x) {
2079
+ return O === "draco_decoder.js" && x === "text" ? Promise.resolve(Da) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${O}`));
2080
+ }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), g = (await f.loadAsync(A, p)).scene;
2081
2081
  break;
2082
2082
  default:
2083
- console.warn(`不支持的文件类型: .${j}`), e.value = `不支持的文件类型: ${l}`;
2083
+ console.warn(`不支持的文件类型: .${I}`), e.value = `不支持的文件类型: ${h}`;
2084
2084
  continue;
2085
2085
  }
2086
- g && (g.userData.boundingBox = new me().setFromObject(g), s.push(g));
2086
+ g && (g.userData.boundingBox = new z0().setFromObject(g), s.push(g));
2087
2087
  }
2088
2088
  a.value = s, e.value = "加载完成!";
2089
2089
  } catch (_) {
2090
2090
  throw console.error("加载模型时出错:", _), r.value = `加载失败: ${_.message || "未知错误"}`, e.value = "加载失败!", a.value = [], _;
2091
2091
  } finally {
2092
- o.value = !1, k.forEach((_) => URL.revokeObjectURL(_));
2092
+ n.value = !1, k.forEach((_) => URL.revokeObjectURL(_));
2093
2093
  }
2094
2094
  }
2095
2095
  };
2096
2096
  }
2097
- function ka(o, e = {}) {
2097
+ function Ea(n, e = {}) {
2098
2098
  const a = {
2099
2099
  threeInfo: {},
2100
2100
  modelLoader: {},
@@ -2102,12 +2102,12 @@ function ka(o, e = {}) {
2102
2102
  clipping: {},
2103
2103
  partAnimation: {},
2104
2104
  millPivotAnimation: {}
2105
- }, r = A2(o);
2105
+ }, r = V2(n);
2106
2106
  a.threeInfo = r;
2107
- const { currentModels: b, getThreeJSObjects: i, addBeforeRenderCallback: H, removeBeforeRenderCallback: f } = r, { useModelLoaderHook: c, useAnimationHook: t, useClippingHook: n, usePartAnimationHook: d } = e;
2108
- if (c && (a.modelLoader = oa()), t && (a.animation = p2(i, b)), n && (a.clipping = m2(i, b)), d) {
2109
- const k = sa(i, b, H, f);
2110
- a.partAnimation = k, a.millPivotAnimation = Na(
2107
+ const { currentModels: b, getThreeJSObjects: i, addBeforeRenderCallback: H, removeBeforeRenderCallback: f } = r, { useModelLoaderHook: c, useAnimationHook: t, useClippingHook: d, usePartAnimationHook: o } = e;
2108
+ if (c && (a.modelLoader = Oa()), t && (a.animation = W2(i, b)), d && (a.clipping = C2(i, b)), o) {
2109
+ const k = Ga(i, b, H, f);
2110
+ a.partAnimation = k, a.millPivotAnimation = Xa(
2111
2111
  b,
2112
2112
  i,
2113
2113
  k.setPartRotation,
@@ -2116,73 +2116,73 @@ function ka(o, e = {}) {
2116
2116
  }
2117
2117
  return a;
2118
2118
  }
2119
- function sa(o, e, a, r) {
2120
- const b = H0(!1), i = /* @__PURE__ */ new Map();
2119
+ function Ga(n, e, a, r) {
2120
+ const b = u0(!1), i = /* @__PURE__ */ new Map();
2121
2121
  let H = null;
2122
- function f(h) {
2123
- const g = /* @__PURE__ */ new Set([h]);
2124
- g.add(h.replace(/\./g, ""));
2125
- for (const I of e.value)
2126
- if (I)
2122
+ function f(A) {
2123
+ const g = /* @__PURE__ */ new Set([A]);
2124
+ g.add(A.replace(/\./g, ""));
2125
+ for (const y of e.value)
2126
+ if (y)
2127
2127
  for (const F of g) {
2128
- const w = I.getObjectByName(F);
2129
- if (w) return w;
2128
+ const N = y.getObjectByName(F);
2129
+ if (N) return N;
2130
2130
  }
2131
- const { scene: p } = o();
2131
+ const { scene: p } = n();
2132
2132
  if (p)
2133
- for (const I of g) {
2134
- const F = p.getObjectByName(I);
2133
+ for (const y of g) {
2134
+ const F = p.getObjectByName(y);
2135
2135
  if (F) return F;
2136
2136
  }
2137
2137
  return null;
2138
2138
  }
2139
- function c(h) {
2140
- return h.map((g) => {
2139
+ function c(A) {
2140
+ return A.map((g) => {
2141
2141
  const p = f(g);
2142
2142
  return { name: g, object: p, found: !!p };
2143
2143
  });
2144
2144
  }
2145
- function t(h, g) {
2146
- const p = f(h);
2147
- return p ? (i.set(h, {
2145
+ function t(A, g) {
2146
+ const p = f(A);
2147
+ return p ? (i.set(A, {
2148
2148
  object: p,
2149
2149
  axis: g.axis,
2150
2150
  speed: g.speed,
2151
2151
  direction: g.direction ?? 1
2152
- }), !0) : (console.warn(`[usePartAnimation] 未找到部件: "${h}"`), !1);
2152
+ }), !0) : (console.warn(`[usePartAnimation] 未找到部件: "${A}"`), !1);
2153
2153
  }
2154
- function n(h, g, p, I) {
2155
- return g ? p ? (i.set(h, {
2154
+ function d(A, g, p, y) {
2155
+ return g ? p ? (i.set(A, {
2156
2156
  object: g,
2157
- axis: I.axis,
2158
- speed: I.speed,
2159
- direction: I.direction ?? 1,
2157
+ axis: y.axis,
2158
+ speed: y.speed,
2159
+ direction: y.direction ?? 1,
2160
2160
  pivot: p
2161
- }), !0) : (console.warn(`[usePartAnimation] pivot 为空: "${h}"`), !1) : (console.warn(`[usePartAnimation] 未找到部件: "${h}"`), !1);
2161
+ }), !0) : (console.warn(`[usePartAnimation] pivot 为空: "${A}"`), !1) : (console.warn(`[usePartAnimation] 未找到部件: "${A}"`), !1);
2162
2162
  }
2163
- function d(h) {
2163
+ function o(A) {
2164
2164
  let g = 0;
2165
- return h.forEach(({ partName: p, axis: I, speed: F, direction: w }) => {
2166
- t(p, { axis: I, speed: F, direction: w }) && g++;
2165
+ return A.forEach(({ partName: p, axis: y, speed: F, direction: N }) => {
2166
+ t(p, { axis: y, speed: F, direction: N }) && g++;
2167
2167
  }), g;
2168
2168
  }
2169
- function k(h) {
2170
- i.delete(h);
2169
+ function k(A) {
2170
+ i.delete(A);
2171
2171
  }
2172
2172
  function s() {
2173
2173
  i.clear();
2174
2174
  }
2175
2175
  function u() {
2176
- const h = [];
2176
+ const A = [];
2177
2177
  return i.forEach((g, p) => {
2178
- h.push({
2178
+ A.push({
2179
2179
  name: p,
2180
2180
  axis: g.axis,
2181
2181
  speed: g.speed,
2182
2182
  direction: g.direction,
2183
2183
  found: !!g.object
2184
2184
  });
2185
- }), h;
2185
+ }), A;
2186
2186
  }
2187
2187
  function _() {
2188
2188
  if (!b.value) {
@@ -2190,47 +2190,47 @@ function sa(o, e, a, r) {
2190
2190
  console.warn("[usePartAnimation] 没有配置任何部件旋转");
2191
2191
  return;
2192
2192
  }
2193
- b.value = !0, H = (h) => {
2193
+ b.value = !0, H = (A) => {
2194
2194
  b.value && i.forEach((g) => {
2195
2195
  if (!g.object) return;
2196
- const p = g.pivot ?? g.object, I = g.axis;
2197
- p.rotation[I] += g.direction * g.speed * h;
2196
+ const p = g.pivot ?? g.object, y = g.axis;
2197
+ p.rotation[y] += g.direction * g.speed * A;
2198
2198
  });
2199
2199
  }, a(H);
2200
2200
  }
2201
2201
  }
2202
- function l() {
2202
+ function h() {
2203
2203
  b.value = !1, H && (r(H), H = null);
2204
2204
  }
2205
- function j() {
2206
- b.value ? l() : _();
2205
+ function I() {
2206
+ b.value ? h() : _();
2207
2207
  }
2208
2208
  return {
2209
2209
  isPartAnimating: b,
2210
2210
  findPart: f,
2211
2211
  findParts: c,
2212
2212
  setPartRotation: t,
2213
- setPartRotationPivotByObject: n,
2214
- setPartRotations: d,
2213
+ setPartRotationPivotByObject: d,
2214
+ setPartRotations: o,
2215
2215
  removePartRotation: k,
2216
2216
  clearAllPartRotations: s,
2217
2217
  getPartAnimationStatus: u,
2218
2218
  startPartAnimations: _,
2219
- stopPartAnimations: l,
2220
- togglePartAnimations: j
2219
+ stopPartAnimations: h,
2220
+ togglePartAnimations: I
2221
2221
  };
2222
2222
  }
2223
- function b0(o) {
2224
- return o < 0.5 ? 4 * o * o * o : 1 - Math.pow(-2 * o + 2, 3) / 2;
2223
+ function r0(n) {
2224
+ return n < 0.5 ? 4 * n * n * n : 1 - Math.pow(-2 * n + 2, 3) / 2;
2225
2225
  }
2226
- const ua = {
2226
+ const Ua = {
2227
2227
  "轧辊整体-1001": ["轧辊整体-1001", "上轧辊000-1"],
2228
2228
  "下轧辊-1001": ["下轧辊-1001", "下轧辊000-1"],
2229
2229
  "轧辊整体-1": ["轧辊整体-1", "上轧辊000-3"],
2230
2230
  "下轧辊-1": ["下轧辊-1", "下轧辊000-3"]
2231
2231
  };
2232
- function F0(o, e, a) {
2233
- const r = ua[o] ?? [o], b = (i) => {
2232
+ function W0(n, e, a) {
2233
+ const r = Ua[n] ?? [n], b = (i) => {
2234
2234
  if (!i) return null;
2235
2235
  for (const H of r) {
2236
2236
  const f = i.getObjectByName(H);
@@ -2245,392 +2245,499 @@ function F0(o, e, a) {
2245
2245
  }
2246
2246
  return b(a);
2247
2247
  }
2248
- function la(o, e, a, r, b = null) {
2249
- const i = H0(!1), H = 0.6, f = 1, c = 5, t = 5, n = 0.5, d = -0.3, k = 0.8, s = 0.3, u = 30, _ = 2, l = 1, j = 0.5, h = 5, g = 1.5, p = 3, I = 1, F = 0.6, w = 0.5;
2250
- let y = "idle", m = 0, D = new N(), R = new N(), U = new N(), A = null, S = null, Y = null, O = null, q = null, P = null, B = null, z = 0, x = null, L = null;
2251
- const A0 = new N(), y0 = new u0(), c0 = [];
2252
- let K = null, E = "";
2253
- const G = new N();
2254
- function l0() {
2255
- const V = o.value;
2256
- if (!V || V.length === 0) return !1;
2257
- x = r().scene;
2258
- for (const v of V) {
2259
- if (!v) continue;
2260
- const C = v.getObjectByName("机器人-2");
2261
- if (C && (A = C.getObjectByName("坯料-1"), A))
2248
+ function xa(n, e, a, r, b = null) {
2249
+ const i = u0(!1), H = 0.6, f = 5, c = 0.5, t = -0.3, d = 0.8, o = 0.3, k = 30, s = 2, u = 0.5, _ = 0.6, h = 1.5, I = 3, A = 1, g = 0.6, p = 0.5, y = 0.07, F = 0.97, N = 8e-3, B = 0.97, V = 0.015, O = 0.4, x = 1, S = 1, K = 0.3;
2250
+ let v = "idle", m = 0, R = new w(), q = new w(), l = null, W = null, Q = null, C = null, J = null, $ = null, c0 = null, d0 = null, p0 = null, R0 = 0, Y = null, o0 = null;
2251
+ const w0 = new w(), m0 = new n0(), T = [];
2252
+ let E = null, L = "";
2253
+ const G = new w(), Z = new w();
2254
+ function e0(P) {
2255
+ if (!P) return 0;
2256
+ const j = new n0();
2257
+ return P.getWorldQuaternion(j), j.w;
2258
+ }
2259
+ function X(P, j) {
2260
+ const U = e0(P);
2261
+ return Math.abs(U - j) <= V;
2262
+ }
2263
+ function i0(P, j, U) {
2264
+ if (!P) return;
2265
+ const z = new n0();
2266
+ P.getWorldQuaternion(z);
2267
+ const a0 = new z0().setFromObject(P), H0 = new w();
2268
+ a0.getCenter(H0), Z.copy(j).applyQuaternion(z), U.copy(H0).add(Z);
2269
+ }
2270
+ function M0(P, j) {
2271
+ const U = new w();
2272
+ if (P && P.getWorldPosition(U), j) {
2273
+ const z = new w();
2274
+ j.getWorldPosition(z), U.add(z).multiplyScalar(0.5), U.y -= 0.313;
2275
+ }
2276
+ return U;
2277
+ }
2278
+ function Se() {
2279
+ const P = n.value;
2280
+ if (!P || P.length === 0) return !1;
2281
+ Y = r().scene;
2282
+ const U = (M) => M ?? null;
2283
+ for (const M of P) {
2284
+ if (!M) continue;
2285
+ const b0 = M.getObjectByName("机器人-2");
2286
+ if (b0 && (l = U(b0.getObjectByName("坯料-1")), l))
2262
2287
  break;
2263
2288
  }
2264
- if (!A)
2289
+ if (!l)
2265
2290
  return console.warn("[useBilletAnimation] 未找到部件: 坯料-1 (在 机器人-2 下)"), !1;
2266
- if (S = F0("轧辊整体-1001", o, x), !S)
2267
- return console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), !1;
2268
- Y = F0("下轧辊-1001", o, x);
2269
- let W = null, Z = null;
2270
- for (const v of V)
2271
- if (v && (W || (W = v.getObjectByName("下输送台板-1")), Z || (Z = v.getObjectByName("下输送台板-2")), W && Z))
2291
+ W = W0("轧辊整体-1001", n, Y), W || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), Q = W0("下轧辊-1001", n, Y), Q || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1001 / 下轧辊000-1");
2292
+ let z = null, a0 = null;
2293
+ for (const M of P)
2294
+ if (M && (z || (z = U(M.getObjectByName("下输送台板-1"))), a0 || (a0 = U(M.getObjectByName("下输送台板-2"))), z && a0))
2272
2295
  break;
2273
- if ((!W || !Z) && x && (W || (W = x.getObjectByName("下输送台板-1")), Z || (Z = x.getObjectByName("下输送台板-2"))), W || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), Z || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), W && Z) {
2274
- const v = new N();
2275
- W.getWorldPosition(v);
2276
- const C = new N();
2277
- Z.getWorldPosition(C), O = new N().copy(v).add(C).multiplyScalar(0.5), O.y = Math.max(v.y, C.y) + 0.05;
2296
+ if ((!z || !a0) && Y && (z || (z = U(Y.getObjectByName("下输送台板-1"))), a0 || (a0 = U(Y.getObjectByName("下输送台板-2")))), z || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), a0 || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), z && a0) {
2297
+ const M = new w();
2298
+ z.getWorldPosition(M);
2299
+ const b0 = new w();
2300
+ a0.getWorldPosition(b0), $ = new w().copy(M).add(b0).multiplyScalar(0.5), $.y = Math.max(M.y, b0.y) + 0.05;
2278
2301
  }
2279
- let a0 = null;
2280
- for (const v of V)
2281
- if (v && (a0 = v.getObjectByName("上输送台-3"), a0))
2302
+ let H0 = null;
2303
+ for (const M of P)
2304
+ if (M && (H0 = U(M.getObjectByName("上输送台-3")), H0))
2282
2305
  break;
2283
- if (!a0 && x && (a0 = x.getObjectByName("上输送台-3")), a0) {
2284
- const v = new N();
2285
- a0.getWorldPosition(v), q = new N(v.x, v.y + 0.1, v.z);
2306
+ if (!H0 && Y && (H0 = U(Y.getObjectByName("上输送台-3"))), H0) {
2307
+ const M = new w();
2308
+ H0.getWorldPosition(M), c0 = new w(M.x, M.y + 0.1, M.z);
2286
2309
  } else
2287
2310
  console.warn("[useBilletAnimation] 未找到部件: 上输送台-3");
2288
- const f0 = F0("轧辊整体-1", o, x);
2289
- if (f0) {
2290
- const v = new N();
2291
- f0.getWorldPosition(v), P = new N(v.x, v.y + 0.5, v.z);
2311
+ if (C = W0("轧辊整体-1", n, Y), C) {
2312
+ const M = new w();
2313
+ C.getWorldPosition(M), d0 = new w(M.x, M.y + 0.5, M.z);
2292
2314
  } else
2293
2315
  console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1 / 上轧辊000-3");
2294
- const T0 = F0("下轧辊-1", o, x);
2295
- if (T0 && f0) {
2296
- const v = new N();
2297
- T0.getWorldPosition(v);
2298
- const C = new N();
2299
- f0.getWorldPosition(C), B = new N().copy(v).add(C).multiplyScalar(0.5), B.y -= 0.313;
2300
- } else T0 || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2301
- let h0 = null;
2302
- for (const v of V)
2303
- if (v && (h0 = v.getObjectByName("底板-1"), h0))
2316
+ if (J = W0("下轧辊-1", n, Y), J && C) {
2317
+ const M = new w();
2318
+ J.getWorldPosition(M);
2319
+ const b0 = new w();
2320
+ C.getWorldPosition(b0), p0 = new w().copy(M).add(b0).multiplyScalar(0.5), p0.y -= 0.313;
2321
+ } else J || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2322
+ let v0 = null;
2323
+ for (const M of P)
2324
+ if (M && (v0 = U(M.getObjectByName("底板-1")), v0))
2304
2325
  break;
2305
- if (!h0 && x && (h0 = x.getObjectByName("底板-1")), h0) {
2306
- const v = new N();
2307
- h0.getWorldPosition(v), z = v.y;
2326
+ if (!v0 && Y && (v0 = U(Y.getObjectByName("底板-1"))), v0) {
2327
+ const M = new w();
2328
+ v0.getWorldPosition(M), R0 = M.y;
2308
2329
  } else
2309
2330
  console.warn("[useBilletAnimation] 未找到部件: 底板-1");
2310
- const z0 = A.parent;
2311
- if (!z0)
2331
+ const ue = l.parent;
2332
+ if (!ue)
2312
2333
  return console.warn("[useBilletAnimation] 坯料没有父节点 (机器人-2 应作为父节点)"), !1;
2313
- c0.length = 0;
2314
- const we = [
2334
+ T.length = 0;
2335
+ const Qe = [
2315
2336
  "Crab_Finger_Right-1",
2316
2337
  "Crab_Finger_Right-2",
2317
2338
  "Crab_Finger_Right-3",
2318
2339
  "Crab_Finger_Right-4"
2319
- ], Ne = A.position.y;
2320
- for (const v of we) {
2321
- const C = z0.getObjectByName(v);
2322
- C ? c0.push({ obj: C, origQuat: C.quaternion.clone(), direction: C.position.y > Ne ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${v}`);
2340
+ ], Je = l.position.y;
2341
+ for (const M of Qe) {
2342
+ const b0 = ue.getObjectByName(M);
2343
+ b0 ? T.push({ obj: b0, origQuat: b0.quaternion.clone(), direction: b0.position.y > Je ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${M}`);
2323
2344
  }
2324
- if (c0.length === 0)
2325
- return console.warn("[useBilletAnimation] 未找到任何 Crab_Finger_Right-* 手指部件"), !1;
2326
- const R0 = new N();
2327
- if (S.getWorldPosition(R0), Y) {
2328
- const v = new N();
2329
- Y.getWorldPosition(v), U.copy(R0).add(v).multiplyScalar(0.5), U.y -= 0.313;
2330
- } else
2331
- U.copy(R0);
2332
- return !0;
2333
- }
2334
- function X() {
2335
- if (!A || !x) return;
2336
- A.getWorldPosition(D);
2337
- const V = new u0();
2338
- A.getWorldQuaternion(V);
2339
- const M = new N();
2340
- A.getWorldScale(M), A.parent && A.removeFromParent(), x.add(A), A.position.copy(D), A.quaternion.copy(V), A.scale.copy(M);
2341
- }
2342
- function d0(V) {
2343
- for (const M of c0) {
2344
- M.obj.quaternion.copy(M.origQuat);
2345
- const W = new u0().setFromAxisAngle(new N(1, 0, 0), w * V * M.direction);
2346
- M.obj.quaternion.premultiply(W);
2345
+ return T.length === 0 ? (console.warn("[useBilletAnimation] 未找到任何 Crab_Finger_Right-* 手指部件"), !1) : !0;
2346
+ }
2347
+ function te() {
2348
+ if (!l || !Y) return;
2349
+ l.getWorldPosition(R);
2350
+ const P = new n0();
2351
+ l.getWorldQuaternion(P);
2352
+ const j = new w();
2353
+ l.getWorldScale(j), l.parent && l.removeFromParent(), Y.add(l), l.position.copy(R), l.quaternion.copy(P), l.scale.copy(j);
2354
+ }
2355
+ function x0(P) {
2356
+ for (const j of T) {
2357
+ j.obj.quaternion.copy(j.origQuat);
2358
+ const U = new n0().setFromAxisAngle(new w(1, 0, 0), p * P * j.direction);
2359
+ j.obj.quaternion.premultiply(U);
2347
2360
  }
2348
2361
  }
2349
- function ye() {
2350
- i.value || l0() && (L = A.parent, A0.copy(A.position), y0.copy(A.quaternion), i.value = !0, y = "opening", m = 0, K = (V) => {
2351
- if (!(!i.value || !A || !S))
2352
- switch (m += V, y) {
2362
+ const P0 = new w(), B0 = new w(), F0 = new w(), N0 = new w(), D0 = new w(), ne = new w(0.43, 0.7, 0.45), de = new w(0.785, -0.325, 0.2), q0 = new w(0.43, 0.7, 0.45), oe = new w(0.785, -0.325, 0.2);
2363
+ let ke = !1, se = !1;
2364
+ function ze() {
2365
+ i.value || Se() && (o0 = l.parent, w0.copy(l.position), m0.copy(l.quaternion), i.value = !0, v = "opening", m = 0, ke = !W || !Q, se = !C || !p0, E = (P) => {
2366
+ if (!(!i.value || !l))
2367
+ switch (m += P, v) {
2368
+ // ========== 手指张开 ==========
2353
2369
  case "opening": {
2354
- const M = Math.min(m / H, 1);
2355
- d0(b0(M)), M >= 1 && (y = "toRollGap", m = 0, X());
2370
+ const j = Math.min(m / H, 1);
2371
+ x0(r0(j)), j >= 1 && (te(), v = ke ? "toRollGap" : "toMill1UpperGap", m = 0);
2372
+ break;
2373
+ }
2374
+ // ========== 第一轧机:空隙姿态驱动流程 ==========
2375
+ // --- 1. 到第一轧机上辊空隙 ---
2376
+ case "toMill1UpperGap": {
2377
+ i0(W, ne, P0);
2378
+ const j = Math.min(m / x, 1);
2379
+ l.position.lerpVectors(R, P0, r0(j)), j >= 1 && (v = "ridingMill1UpperGap", m = 0);
2356
2380
  break;
2357
2381
  }
2382
+ // --- 2. 随第一轧机上辊空隙转动,等待w达到0.07 ---
2383
+ case "ridingMill1UpperGap": {
2384
+ i0(W, ne, P0), l.position.copy(P0), X(W, y) && (v = "fallToMill1LowerGap", m = 0, R.copy(l.position));
2385
+ break;
2386
+ }
2387
+ // --- 3. 落入第一轧机下辊空隙 ---
2388
+ case "fallToMill1LowerGap": {
2389
+ i0(Q, de, B0);
2390
+ const j = Math.min(m / O, 1);
2391
+ l.position.lerpVectors(R, B0, r0(j)), j >= 1 && (v = "ridingMill1LowerGap", m = 0);
2392
+ break;
2393
+ }
2394
+ // --- 4. 随第一轧机下辊空隙转动,等待w达到0.97后送出 ---
2395
+ case "ridingMill1LowerGap": {
2396
+ i0(Q, de, B0), l.position.copy(B0), m >= K && X(Q, F) && (R.copy(l.position), v = "exitMill1LowerGap", m = 0);
2397
+ break;
2398
+ }
2399
+ // --- 5. 随第一轧机下辊送出(平滑移向输送台方向) ---
2400
+ case "exitMill1LowerGap": {
2401
+ if ($) {
2402
+ const U = new w().subVectors($, R).normalize();
2403
+ D0.copy(R).addScaledVector(U, 0.6);
2404
+ } else
2405
+ D0.copy(R);
2406
+ const j = Math.min(m / _, 1);
2407
+ l.position.lerpVectors(R, D0, r0(j)), j >= 1 && (R.copy(D0), q.copy($ ?? D0), v = "toConveyor", m = 0);
2408
+ break;
2409
+ }
2410
+ // ========== 第一轧机:Fallback旧流程 ==========
2411
+ // --- fallback: 到两辊中点 ---
2358
2412
  case "toRollGap": {
2359
- const M = Math.min(m / f, 1);
2360
- A.position.lerpVectors(D, U, b0(M)), M >= 1 && (A.position.copy(U), y = "rolling", m = 0);
2413
+ const j = M0(W, Q), U = Math.min(m / 1, 1);
2414
+ l.position.lerpVectors(R, j, r0(U)), U >= 1 && (l.position.copy(j), v = "rolling", m = 0);
2361
2415
  break;
2362
2416
  }
2417
+ // --- fallback: 原地滚动5s ---
2363
2418
  case "rolling": {
2364
- A.rotation.z += V * 3, m >= c && (A.rotation.z = 0, y = "toConveyor", m = 0, O ? R.copy(O) : R.copy(U));
2419
+ if (l.rotation.z += P * 3, m >= 5)
2420
+ if (l.rotation.z = 0, v = "toConveyor", m = 0, $)
2421
+ q.copy($);
2422
+ else {
2423
+ const j = M0(W, Q);
2424
+ q.copy(j);
2425
+ }
2365
2426
  break;
2366
2427
  }
2367
- // --- 事件驱动:胚料向输送台移动,检测Y到达输送台表面即切换 ---
2428
+ // ========== 输送台阶段 ==========
2429
+ // --- 胚料向输送台移动 ---
2368
2430
  case "toConveyor": {
2369
- const M = Math.min(m / t, 1);
2370
- A.position.lerpVectors(U, R, b0(M)), O && A.position.y <= O.y + 0.1 && (A.position.copy(R), y = "conveyorWait", m = 0), m >= t && (A.position.copy(R), y = "conveyorWait", m = 0);
2431
+ const j = Math.min(m / f, 1);
2432
+ l.position.lerpVectors(R, q, r0(j)), $ && l.position.y <= $.y + 0.1 && (l.position.copy(q), v = "conveyorWait", m = 0), m >= f && (l.position.copy(q), v = "conveyorWait", m = 0);
2371
2433
  break;
2372
2434
  }
2373
- // --- 事件驱动:等待夹具到达下输送台接料点 ---
2435
+ // --- 等待夹具到达下输送台接料点 ---
2374
2436
  case "conveyorWait": {
2375
- if (!O) {
2376
- y = "upperWait", m = 0;
2437
+ if (!$) {
2438
+ v = "upperWait", m = 0;
2377
2439
  break;
2378
2440
  }
2379
- const M = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2380
- let W = "", Z = 1 / 0;
2381
- for (const a0 of M)
2441
+ const j = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2442
+ let U = "", z = 1 / 0;
2443
+ for (const a0 of j)
2382
2444
  if (b && b(a0, G)) {
2383
- const f0 = G.distanceTo(O);
2384
- f0 < k && f0 < Z && (Z = f0, W = a0);
2445
+ const H0 = G.distanceTo($);
2446
+ H0 < d && H0 < z && (z = H0, U = a0);
2385
2447
  }
2386
- W && (E = W, y = "liftToClamp", m = 0), m >= u && (y = "upperWait", m = 0);
2448
+ U && (L = U, v = "liftToClamp", m = 0), m >= k && (v = "upperWait", m = 0);
2387
2449
  break;
2388
2450
  }
2389
- // --- 胚料升到夹具上方(在夹具位置基础上加 Z 偏移) ---
2451
+ // --- 胚料升到夹具上方 ---
2390
2452
  case "liftToClamp": {
2391
- const M = Math.min(m / n, 1);
2392
- b(E, G), G.y += 0.2, G.z += d, A.position.lerpVectors(O, G, b0(M)), M >= 1 && (A.position.copy(G), y = "ridingChain", m = 0);
2453
+ const j = Math.min(m / c, 1);
2454
+ b(L, G), G.y += 0.2, G.z += t, l.position.lerpVectors($, G, r0(j)), j >= 1 && (l.position.copy(G), v = "ridingChain", m = 0);
2393
2455
  break;
2394
2456
  }
2395
- // --- 事件驱动:跟随夹具随链条滚动(Z 轴加偏移),直到夹具到达上输送台 ---
2457
+ // --- 跟随夹具随链条滚动 ---
2396
2458
  case "ridingChain": {
2397
- if (!b || !b(E, G)) {
2398
- q && A.position.copy(q), y = "upperWait", m = 0;
2459
+ if (!b || !b(L, G)) {
2460
+ c0 && l.position.copy(c0), v = "upperWait", m = 0;
2399
2461
  break;
2400
2462
  }
2401
- G.y += 0.2, G.z += d, A.position.copy(G), q && G.y >= q.y - s && (A.position.copy(q), y = "upperWait", m = 0), m >= 60 && (q && A.position.copy(q), y = "upperWait", m = 0);
2463
+ G.y += 0.2, G.z += t, l.position.copy(G), c0 && G.y >= c0.y - o && (l.position.copy(c0), v = "upperWait", m = 0), m >= 60 && (c0 && l.position.copy(c0), v = "upperWait", m = 0);
2402
2464
  break;
2403
2465
  }
2404
2466
  // --- 上输送台等待2s ---
2405
2467
  case "upperWait": {
2406
- m >= _ && (y = "toMill2RollTop", m = 0);
2468
+ m >= s && (v = se ? "toMill2RollTop" : "toMill2UpperGap", m = 0);
2469
+ break;
2470
+ }
2471
+ // ========== 第二轧机:空隙姿态驱动流程 ==========
2472
+ // --- 1. 到第二轧机上辊空隙 ---
2473
+ case "toMill2UpperGap": {
2474
+ i0(C, q0, F0);
2475
+ const j = Math.min(m / S, 1);
2476
+ l.position.lerpVectors(c0, F0, r0(j)), j >= 1 && (v = "ridingMill2UpperGap", m = 0);
2407
2477
  break;
2408
2478
  }
2409
- // --- 从上输送台滚动到轧辊整体-1上表面 ---
2479
+ // --- 2. 随第二轧机上辊空隙转动,等待w达到0.008 ---
2480
+ case "ridingMill2UpperGap": {
2481
+ i0(C, q0, F0), l.position.copy(F0), X(C, N) && (R.copy(l.position), v = "fallIntoMill2Gap", m = 0);
2482
+ break;
2483
+ }
2484
+ // ========== 第二轧机:Fallback旧流程 ==========
2485
+ // --- fallback: 到轧辊整体-1上表面 ---
2410
2486
  case "toMill2RollTop": {
2411
- const M = Math.min(m / l, 1);
2412
- A.position.lerpVectors(q, P, b0(M)), M >= 1 && (A.position.copy(P), y = "fallIntoMill2Gap", m = 0);
2487
+ if (!d0) {
2488
+ v = "fallIntoMill2Gap", m = 0;
2489
+ break;
2490
+ }
2491
+ const j = Math.min(m / 1, 1);
2492
+ l.position.lerpVectors(c0, d0, r0(j)), j >= 1 && (l.position.copy(d0), R.copy(d0), v = "fallIntoMill2Gap", m = 0);
2413
2493
  break;
2414
2494
  }
2415
- // --- 从轧辊上表面平滑滑入两辊间隙 ---
2495
+ // ========== 共同阶段 ==========
2496
+ // --- 从轧辊上表面/空隙平滑滑入下辊空隙 ---
2416
2497
  case "fallIntoMill2Gap": {
2417
- const M = Math.min(m / j, 1);
2418
- A.position.lerpVectors(P, B, b0(M)), M >= 1 && (A.position.copy(B), y = "mill2Rolling", m = 0);
2498
+ J ? i0(J, oe, N0) : i0(C, q0, N0), i0(C, q0, F0);
2499
+ const j = Math.min(m / u, 1);
2500
+ l.position.lerpVectors(F0, N0, r0(j)), j >= 1 && (R.copy(N0), v = "ridingMill2LowerGap", m = 0);
2419
2501
  break;
2420
2502
  }
2421
- // --- 轧机#2中滚动5s ---
2422
- case "mill2Rolling": {
2423
- A.rotation.z += V * 3, m >= h && (A.rotation.z = 0, y = "fallToGround", m = 0, R.set(
2424
- A.position.x + 3,
2425
- z,
2426
- A.position.z
2427
- ));
2503
+ // --- 6. 随第二轧机下辊空隙转动,等待w达到0.97后送出 ---
2504
+ case "ridingMill2LowerGap": {
2505
+ J ? (i0(J, oe, N0), l.position.copy(N0), m >= K && X(J, B) && (R.copy(l.position), q.set(
2506
+ l.position.x + 3,
2507
+ R0,
2508
+ l.position.z
2509
+ ), v = "fallToGround", m = 0)) : m >= 2 && (R.copy(l.position), q.set(
2510
+ l.position.x + 3,
2511
+ R0,
2512
+ l.position.z
2513
+ ), v = "fallToGround", m = 0);
2428
2514
  break;
2429
2515
  }
2430
2516
  // --- 掉落地面 ---
2431
2517
  case "fallToGround": {
2432
- const M = Math.min(m / g, 1);
2433
- A.position.lerpVectors(B, R, b0(M)), M >= 1 && (A.position.copy(R), y = "groundWait", m = 0);
2518
+ const j = Math.min(m / h, 1);
2519
+ l.position.lerpVectors(R, q, r0(j)), j >= 1 && (l.position.copy(q), v = "groundWait", m = 0);
2434
2520
  break;
2435
2521
  }
2436
2522
  // --- 地面停留3s ---
2437
2523
  case "groundWait": {
2438
- m >= p && (y = "resetting", m = 0, X(), L && (L.updateMatrixWorld(!0), R.copy(A0), L.localToWorld(R)));
2524
+ m >= I && (v = "resetting", m = 0, te(), o0 && (o0.updateMatrixWorld(!0), q.copy(w0), o0.localToWorld(q)));
2439
2525
  break;
2440
2526
  }
2527
+ // --- 回到手掌 ---
2441
2528
  case "resetting": {
2442
- const M = Math.min(m / I, 1);
2443
- A.position.lerpVectors(D, R, b0(M)), M >= 1 && (A.removeFromParent(), L == null || L.add(A), A.position.copy(A0), A.quaternion.copy(y0), y = "closing", m = 0);
2529
+ const j = Math.min(m / A, 1);
2530
+ l.position.lerpVectors(R, q, r0(j)), j >= 1 && (l.removeFromParent(), o0 == null || o0.add(l), l.position.copy(w0), l.quaternion.copy(m0), v = "closing", m = 0);
2444
2531
  break;
2445
2532
  }
2533
+ // --- 手指闭合 ---
2446
2534
  case "closing": {
2447
- const M = Math.min(m / F, 1);
2448
- d0(1 - b0(M)), M >= 1 && (d0(0), y = "opening", m = 0);
2535
+ const j = Math.min(m / g, 1);
2536
+ x0(1 - r0(j)), j >= 1 && (x0(0), v = "opening", m = 0);
2449
2537
  break;
2450
2538
  }
2451
2539
  }
2452
- }, e(K));
2540
+ }, e(E));
2453
2541
  }
2454
- function S0() {
2455
- i.value = !1, K && (a(K), K = null), y = "idle", d0(0), c0.length = 0, L = null;
2542
+ function le() {
2543
+ i.value = !1, E && (a(E), E = null), v = "idle", x0(0), T.length = 0, o0 = null;
2456
2544
  }
2457
- function Fe() {
2458
- S0(), A = null, S = null, x = null;
2545
+ function Ze() {
2546
+ le(), l = null, W = null, Q = null, C = null, J = null, Y = null;
2459
2547
  }
2460
- return { isBilletAnimating: i, startBilletDelivery: ye, stopBilletDelivery: S0, dispose: Fe };
2548
+ return { isBilletAnimating: i, startBilletDelivery: ze, stopBilletDelivery: le, dispose: Ze };
2461
2549
  }
2462
- function ha(o, e, a) {
2463
- const r = H0(!1);
2550
+ function Pa(n, e, a) {
2551
+ const r = u0(!1);
2464
2552
  let b = [], i = [], H = null, f = 0;
2465
2553
  const c = 6;
2466
2554
  let t = null;
2467
- const n = new u0(), d = new N(), k = new N(), s = new N(), u = new N();
2555
+ const d = new n0(), o = new w(), k = new w(), s = new w(), u = new w();
2468
2556
  function _() {
2469
- const I = o.value;
2470
- if (!I || I.length === 0) return !1;
2471
- for (const D of I)
2472
- D && D.updateMatrixWorld(!0);
2473
- for (const D of I)
2474
- if (D && (H = D.getObjectByName("整体1-6"), H))
2557
+ const y = n.value;
2558
+ if (!y || y.length === 0) return !1;
2559
+ for (const O of y)
2560
+ O && O.updateMatrixWorld(!0);
2561
+ for (const O of y)
2562
+ if (O && (H = O.getObjectByName("整体1-6"), H))
2475
2563
  break;
2476
2564
  if (!H) return !1;
2477
- const F = H.getObjectByName("链条5倍-1"), w = H.getObjectByName("链条5倍-2");
2478
- if (!F || !w) return !1;
2479
- const y = [F, w];
2565
+ const F = H.getObjectByName("链条5倍-1"), N = H.getObjectByName("链条5倍-2");
2566
+ if (!F || !N) return !1;
2567
+ const B = [F, N];
2480
2568
  b = [];
2481
- for (const D of y) {
2482
- const R = [];
2483
- if (D.children.forEach((O) => {
2484
- O.name.startsWith("链节5倍") && R.push(O);
2485
- }), R.length === 0) return !1;
2486
- const U = [];
2487
- if (D.children.forEach((O) => {
2488
- O.name.includes("主动链轮10倍") && U.push(O.position.clone());
2489
- }), U.length < 2) return !1;
2490
- const A = new N().addVectors(U[0], U[1]).multiplyScalar(0.5);
2491
- R.sort((O, q) => {
2492
- const P = Math.atan2(O.position.y - A.y, O.position.x - A.x), B = Math.atan2(q.position.y - A.y, q.position.x - A.x);
2493
- return (P < 0 ? P + 2 * Math.PI : P) - (B < 0 ? B + 2 * Math.PI : B);
2569
+ for (const O of B) {
2570
+ const x = [];
2571
+ if (O.children.forEach((R) => {
2572
+ R.name.startsWith("链节5倍") && x.push(R);
2573
+ }), x.length === 0) return !1;
2574
+ const S = [];
2575
+ if (O.children.forEach((R) => {
2576
+ R.name.includes("主动链轮10倍") && S.push(R.position.clone());
2577
+ }), S.length < 2) return !1;
2578
+ const K = new w().addVectors(S[0], S[1]).multiplyScalar(0.5);
2579
+ x.sort((R, q) => {
2580
+ const l = Math.atan2(R.position.y - K.y, R.position.x - K.x), W = Math.atan2(q.position.y - K.y, q.position.x - K.x);
2581
+ return (l < 0 ? l + 2 * Math.PI : l) - (W < 0 ? W + 2 * Math.PI : W);
2494
2582
  });
2495
- const S = R.map((O) => O.position.clone()), Y = R.map((O) => O.quaternion.clone());
2496
- b.push({ group: D, links: R, origPositions: S, origQuaternions: Y });
2583
+ const v = x.map((R) => R.position.clone()), m = x.map((R) => R.quaternion.clone());
2584
+ b.push({ group: O, links: x, origPositions: v, origQuaternions: m });
2497
2585
  }
2498
2586
  i = [];
2499
- const m = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2500
- for (const D of m) {
2501
- const R = H.getObjectByName(D);
2502
- if (!R) continue;
2503
- const U = new N();
2504
- R.getWorldPosition(U);
2505
- let A = -1, S = -1, Y = 1 / 0, O = new N();
2587
+ const V = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2588
+ for (const O of V) {
2589
+ const x = H.getObjectByName(O);
2590
+ if (!x) continue;
2591
+ const S = new w();
2592
+ x.getWorldPosition(S);
2593
+ let K = -1, v = -1, m = 1 / 0, R = new w();
2506
2594
  for (let q = 0; q < b.length; q++) {
2507
- const P = b[q], B = new N();
2508
- P.group.worldToLocal(B.copy(U));
2509
- for (let z = 0; z < P.links.length; z++) {
2510
- const x = P.origPositions[z], L = B.distanceTo(x);
2511
- L < Y && (Y = L, A = q, S = z, O = new N().subVectors(B, x));
2595
+ const l = b[q], W = new w();
2596
+ l.group.worldToLocal(W.copy(S));
2597
+ for (let Q = 0; Q < l.links.length; Q++) {
2598
+ const C = l.origPositions[Q], J = W.distanceTo(C);
2599
+ J < m && (m = J, K = q, v = Q, R = new w().subVectors(W, C));
2512
2600
  }
2513
2601
  }
2514
- A >= 0 && i.push({
2515
- object: R,
2516
- chainIdx: A,
2517
- linkIdx: S,
2518
- localOffset: O,
2519
- origPosition: R.position.clone(),
2520
- origQuaternion: R.quaternion.clone()
2602
+ K >= 0 && i.push({
2603
+ object: x,
2604
+ chainIdx: K,
2605
+ linkIdx: v,
2606
+ localOffset: R,
2607
+ origPosition: x.position.clone(),
2608
+ origQuaternion: x.quaternion.clone()
2521
2609
  });
2522
2610
  }
2523
2611
  return !0;
2524
2612
  }
2525
- function l() {
2526
- r.value || _() && (r.value = !0, f = 0, t = (I) => {
2613
+ function h() {
2614
+ r.value || _() && (r.value = !0, f = 0, t = (y) => {
2527
2615
  if (r.value) {
2528
- f += c * I;
2616
+ f += c * y;
2529
2617
  for (const F of b) {
2530
- const w = F.links.length, y = Math.floor(f), m = f - y;
2531
- for (let D = 0; D < w; D++) {
2532
- const R = ((D + y) % w + w) % w, U = ((D + y + 1) % w + w) % w, A = F.links[D];
2533
- A.position.lerpVectors(
2534
- F.origPositions[R],
2535
- F.origPositions[U],
2536
- m
2537
- ), n.slerpQuaternions(
2538
- F.origQuaternions[R],
2539
- F.origQuaternions[U],
2540
- m
2541
- ), A.quaternion.copy(n);
2618
+ const N = F.links.length, B = Math.floor(f), V = f - B;
2619
+ for (let O = 0; O < N; O++) {
2620
+ const x = ((O + B) % N + N) % N, S = ((O + B + 1) % N + N) % N, K = F.links[O];
2621
+ K.position.lerpVectors(
2622
+ F.origPositions[x],
2623
+ F.origPositions[S],
2624
+ V
2625
+ ), d.slerpQuaternions(
2626
+ F.origQuaternions[x],
2627
+ F.origQuaternions[S],
2628
+ V
2629
+ ), K.quaternion.copy(d);
2542
2630
  }
2543
2631
  }
2544
2632
  for (const F of i) {
2545
- const w = b[F.chainIdx], y = w.links.length, m = Math.floor(f), D = f - m, R = ((F.linkIdx + m) % y + y) % y, U = ((F.linkIdx + m + 1) % y + y) % y;
2546
- d.lerpVectors(
2547
- w.origPositions[R],
2548
- w.origPositions[U],
2549
- D
2550
- ), k.copy(d).add(F.localOffset), w.group.localToWorld(s.copy(k)), H.worldToLocal(u.copy(s)), F.object.position.copy(u);
2633
+ const N = b[F.chainIdx], B = N.links.length, V = Math.floor(f), O = f - V, x = ((F.linkIdx + V) % B + B) % B, S = ((F.linkIdx + V + 1) % B + B) % B;
2634
+ o.lerpVectors(
2635
+ N.origPositions[x],
2636
+ N.origPositions[S],
2637
+ O
2638
+ ), k.copy(o).add(F.localOffset), N.group.localToWorld(s.copy(k)), H.worldToLocal(u.copy(s)), F.object.position.copy(u);
2551
2639
  }
2552
2640
  }
2553
2641
  }, e(t));
2554
2642
  }
2555
- function j() {
2643
+ function I() {
2556
2644
  r.value = !1, t && (a(t), t = null);
2557
- for (const I of b)
2558
- I.links.forEach((F, w) => {
2559
- F.position.copy(I.origPositions[w]), F.quaternion.copy(I.origQuaternions[w]);
2645
+ for (const y of b)
2646
+ y.links.forEach((F, N) => {
2647
+ F.position.copy(y.origPositions[N]), F.quaternion.copy(y.origQuaternions[N]);
2560
2648
  });
2561
- for (const I of i)
2562
- I.object.position.copy(I.origPosition), I.object.quaternion.copy(I.origQuaternion);
2649
+ for (const y of i)
2650
+ y.object.position.copy(y.origPosition), y.object.quaternion.copy(y.origQuaternion);
2563
2651
  }
2564
- function h() {
2565
- j(), b = [], i = [];
2652
+ function A() {
2653
+ I(), b = [], i = [];
2566
2654
  }
2567
- function g(I, F) {
2568
- const w = i.find((y) => y.object.name === I);
2569
- return w ? (w.object.getWorldPosition(F), !0) : !1;
2655
+ function g(y, F) {
2656
+ const N = i.find((B) => B.object.name === y);
2657
+ return N ? (N.object.getWorldPosition(F), !0) : !1;
2570
2658
  }
2571
2659
  function p() {
2572
- return i.map((I) => I.object.name);
2660
+ return i.map((y) => y.object.name);
2573
2661
  }
2574
- return { isChainAnimating: r, startChainAnimation: l, stopChainAnimation: j, dispose: h, getClampWorldPosition: g, getClampNames: p };
2662
+ return { isChainAnimating: r, startChainAnimation: h, stopChainAnimation: I, dispose: A, getClampWorldPosition: g, getClampNames: p };
2575
2663
  }
2576
- const ga = 16776960, L0 = "pickHighlightRoot", fe = "partType";
2577
- function _a(o, e) {
2664
+ const Ba = 16776960, re = "pickHighlightRoot", Me = "partType";
2665
+ function qa() {
2666
+ return {
2667
+ raycaster: new q2(),
2668
+ mouse: new fe(),
2669
+ lastMeshes: /* @__PURE__ */ new Set(),
2670
+ originalEmissive: /* @__PURE__ */ new Map()
2671
+ };
2672
+ }
2673
+ function Va(n, e) {
2578
2674
  const a = [...e];
2579
- return o.traverse((r) => {
2675
+ return n.traverse((r) => {
2580
2676
  r.type === "Group" && r.name.endsWith("-pivot") && a.push(r);
2581
2677
  }), a;
2582
2678
  }
2583
- function Aa(o, e) {
2679
+ function Wa(n, e) {
2584
2680
  var b, i;
2585
- const a = e.originalEmissive.get(o), r = o.material;
2681
+ const a = e.originalEmissive.get(n), r = n.material;
2586
2682
  a ? (b = r.emissive) == null || b.copy(a) : (i = r.emissive) == null || i.setHex(0);
2587
2683
  }
2588
- function pa(o) {
2589
- const e = o.userData[L0];
2684
+ function Ca(n) {
2685
+ const e = n.userData[re];
2590
2686
  if (e && e.isObject3D) return e;
2591
- let a = o.parent;
2687
+ let a = n.parent;
2592
2688
  for (; a; ) {
2593
- const r = a.userData[L0];
2689
+ const r = a.userData[re];
2594
2690
  if (r && r.isObject3D) return r;
2595
2691
  if (a.name && a.name.includes("联轴器")) return a;
2596
2692
  a = a.parent;
2597
2693
  }
2598
2694
  return null;
2599
2695
  }
2600
- function ma(o) {
2696
+ function La(n) {
2601
2697
  const e = [];
2602
- return o.traverse((a) => {
2698
+ return n.traverse((a) => {
2603
2699
  a.isMesh && e.push(a);
2604
2700
  }), e;
2605
2701
  }
2606
- function ja(o) {
2607
- const e = pa(o);
2702
+ function Sa(n) {
2703
+ const e = Ca(n);
2608
2704
  if (e) {
2609
- const a = ma(e);
2705
+ const a = La(e);
2610
2706
  if (a.length > 0) return a;
2611
2707
  }
2612
- return [o];
2708
+ return [n];
2613
2709
  }
2614
- function te(o) {
2615
- o.lastMeshes.forEach((e) => Aa(e, o)), o.lastMeshes.clear();
2710
+ function ce(n) {
2711
+ n.lastMeshes.forEach((e) => Wa(e, n)), n.lastMeshes.clear();
2616
2712
  }
2617
- function Ia(o, e, a, r, b, i, H = {}) {
2713
+ function za(n, e, a, r, b, i, H = {}) {
2618
2714
  var k, s;
2619
2715
  const f = e.getBoundingClientRect();
2620
- i.mouse.x = (o.clientX - f.left) / f.width * 2 - 1, i.mouse.y = -((o.clientY - f.top) / f.height) * 2 + 1, i.raycaster.setFromCamera(i.mouse, a);
2621
- const c = _a(r, b), t = i.raycaster.intersectObjects(c, !0);
2716
+ i.mouse.x = (n.clientX - f.left) / f.width * 2 - 1, i.mouse.y = -((n.clientY - f.top) / f.height) * 2 + 1, i.raycaster.setFromCamera(i.mouse, a);
2717
+ const c = Va(r, b), t = i.raycaster.intersectObjects(c, !0);
2622
2718
  if (t.length === 0) {
2623
- i.lastMeshes.size > 0 && te(i), (k = H.onMiss) == null || k.call(H);
2719
+ i.lastMeshes.size > 0 && ce(i), (k = H.onMiss) == null || k.call(H);
2624
2720
  return;
2625
2721
  }
2626
- const n = t[0].object, d = ja(n);
2627
- te(i), d.forEach((u) => {
2628
- var l, j;
2722
+ const d = t[0].object, o = Sa(d);
2723
+ ce(i), o.forEach((u) => {
2724
+ var h, I;
2629
2725
  const _ = u.material;
2630
- i.originalEmissive.has(u) || i.originalEmissive.set(u, ((l = _.emissive) == null ? void 0 : l.clone()) ?? new r0(0)), u.material = _.clone(), (j = u.material.emissive) == null || j.setHex(ga), i.lastMeshes.add(u);
2631
- }), (s = H.onHit) == null || s.call(H, n);
2726
+ i.originalEmissive.has(u) || i.originalEmissive.set(u, ((h = _.emissive) == null ? void 0 : h.clone()) ?? new h0(0)), u.material = _.clone(), (I = u.material.emissive) == null || I.setHex(Ba), i.lastMeshes.add(u);
2727
+ }), (s = H.onHit) == null || s.call(H, d);
2728
+ }
2729
+ function Za(n) {
2730
+ n.lastMeshes.size > 0 && ce(n), n.originalEmissive.clear();
2731
+ }
2732
+ function Qa(n) {
2733
+ var r;
2734
+ if (n.lastMeshes.size === 0) return null;
2735
+ const a = !(((r = n.lastMeshes.values().next().value) == null ? void 0 : r.visible) ?? !0);
2736
+ return n.lastMeshes.forEach((b) => {
2737
+ b.visible = a;
2738
+ }), a;
2632
2739
  }
2633
- const ya = {
2740
+ const Ja = {
2634
2741
  "联轴器下-1001": ["联轴器下-1001", "联轴器下-2001"],
2635
2742
  "下轧辊-1001": ["下轧辊-1001", "下轧辊000-1"],
2636
2743
  "轧辊整体-1001": ["轧辊整体-1001", "上轧辊000-1"],
@@ -2638,8 +2745,8 @@ const ya = {
2638
2745
  "轧辊整体-1": ["轧辊整体-1", "上轧辊000-3"],
2639
2746
  "联轴器下-1": ["联轴器下-1", "联轴器下-2"]
2640
2747
  };
2641
- function ne(o, e) {
2642
- const a = ya[o] ?? [o];
2748
+ function De(n, e) {
2749
+ const a = Ja[n] ?? [n];
2643
2750
  for (const r of e.value)
2644
2751
  if (r)
2645
2752
  for (const b of a) {
@@ -2648,39 +2755,39 @@ function ne(o, e) {
2648
2755
  }
2649
2756
  return null;
2650
2757
  }
2651
- function de(o, e) {
2652
- o.userData[fe] = e, o.traverse((a) => {
2653
- a.userData[L0] = o, a.userData[fe] = e;
2758
+ function Oe(n, e) {
2759
+ n.userData[Me] = e, n.traverse((a) => {
2760
+ a.userData[re] = n, a.userData[Me] = e;
2654
2761
  });
2655
2762
  }
2656
- function Fa(o, e) {
2657
- if (o.parent === e) return;
2658
- o.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2659
- const a = new N(), r = new u0(), b = new N();
2660
- o.getWorldPosition(a), o.getWorldQuaternion(r), o.getWorldScale(b);
2661
- const i = new N();
2662
- e.getWorldPosition(i), o.parent && o.parent.remove(o), e.add(o), o.position.copy(a).sub(i), o.quaternion.copy(r), o.scale.copy(b), o.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2763
+ function Ya(n, e) {
2764
+ if (n.parent === e) return;
2765
+ n.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2766
+ const a = new w(), r = new n0(), b = new w();
2767
+ n.getWorldPosition(a), n.getWorldQuaternion(r), n.getWorldScale(b);
2768
+ const i = new w();
2769
+ e.getWorldPosition(i), n.parent && n.parent.remove(n), e.add(n), n.position.copy(a).sub(i), n.quaternion.copy(r), n.scale.copy(b), n.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2663
2770
  }
2664
- function wa(o, e, a, r) {
2665
- const b = ne(e, r);
2771
+ function Ka(n, e, a, r) {
2772
+ const b = De(e, r);
2666
2773
  if (!b)
2667
2774
  return console.warn(`[useMillPivotAnimation] 未找到参考件: ${e}`), null;
2668
- const i = new N();
2775
+ const i = new w();
2669
2776
  b.getWorldPosition(i);
2670
- const H = new w0();
2671
- H.name = `${e}-pivot`, H.position.copy(i), o.add(H), H.updateMatrixWorld(!0), de(b, "coupling");
2777
+ const H = new C0();
2778
+ H.name = `${e}-pivot`, H.position.copy(i), n.add(H), H.updateMatrixWorld(!0), Oe(b, "coupling");
2672
2779
  const f = /* @__PURE__ */ new Map();
2673
2780
  for (const c of a) {
2674
- const t = ne(c, r);
2781
+ const t = De(c, r);
2675
2782
  if (!t) {
2676
2783
  console.warn(`[useMillPivotAnimation] 未找到部件: ${c}`);
2677
2784
  continue;
2678
2785
  }
2679
- Fa(t, H), de(t, "roll"), f.set(c, t);
2786
+ Ya(t, H), Oe(t, "roll"), f.set(c, t);
2680
2787
  }
2681
2788
  return { pivot: H, partMap: f };
2682
2789
  }
2683
- function Na(o, e, a, r) {
2790
+ function Xa(n, e, a, r) {
2684
2791
  const i = [
2685
2792
  { ref: "联轴器上-1001", parts: ["轧辊整体-1001", "联轴器上-1001"] },
2686
2793
  { ref: "联轴器下-1001", parts: ["下轧辊-1001", "联轴器下-1001"] },
@@ -2688,8 +2795,8 @@ function Na(o, e, a, r) {
2688
2795
  { ref: "联轴器下-1", parts: ["下轧辊-1", "联轴器下-1"] }
2689
2796
  ];
2690
2797
  function H(c, t) {
2691
- const n = t.get(c.partName);
2692
- n ? r(c.partName, n.obj, n.pivot, c) : a(c.partName, c);
2798
+ const d = t.get(c.partName);
2799
+ d ? r(c.partName, d.obj, d.pivot, c) : a(c.partName, c);
2693
2800
  }
2694
2801
  function f() {
2695
2802
  const { scene: c } = e();
@@ -2699,220 +2806,286 @@ function Na(o, e, a, r) {
2699
2806
  }
2700
2807
  const t = /* @__PURE__ */ new Map();
2701
2808
  for (const k of i) {
2702
- const s = wa(c, k.ref, k.parts, o);
2809
+ const s = Ka(c, k.ref, k.parts, n);
2703
2810
  s && s.partMap.forEach((u, _) => {
2704
2811
  t.set(_, { pivot: s.pivot, obj: u });
2705
2812
  });
2706
2813
  }
2707
- const n = [
2814
+ const d = [
2708
2815
  { partName: "轧辊整体-1001", axis: "z", speed: 0.8, direction: 1 },
2709
2816
  { partName: "联轴器上-1001", axis: "z", speed: 0.8, direction: 1 },
2710
2817
  { partName: "下轧辊-1001", axis: "z", speed: 0.8, direction: -1 },
2711
2818
  { partName: "联轴器下-1001", axis: "z", speed: 0.8, direction: -1 }
2712
- ], d = [
2819
+ ], o = [
2713
2820
  { partName: "轧辊整体-1", axis: "z", speed: 0.8, direction: 1 },
2714
2821
  { partName: "联轴器上-1", axis: "z", speed: 0.8, direction: 1 },
2715
2822
  { partName: "下轧辊-1", axis: "z", speed: 0.8, direction: -1 },
2716
2823
  { partName: "联轴器下-1", axis: "z", speed: 0.8, direction: -1 }
2717
2824
  ];
2718
- n.forEach((k) => H(k, t)), d.forEach((k) => H(k, t));
2825
+ d.forEach((k) => H(k, t)), o.forEach((k) => H(k, t));
2719
2826
  }
2720
2827
  return { setupMillAnimations: f };
2721
2828
  }
2722
- const va = { class: "obj-viewer-container" }, Ta = { class: "buttonGroup-topLeft" }, Ra = { class: "buttonGroup-left" }, Ma = { class: "buttonGroup-right" }, Da = { class: "left-panel" }, Oa = { class: "panel-header" }, Ea = {
2829
+ const $a = { class: "obj-viewer-container" }, eb = { class: "buttonGroup-topLeft" }, ab = { class: "buttonGroup-left" }, bb = { class: "buttonGroup-right" }, ib = { class: "buttonGroup-bottom" }, Hb = { class: "left-panel" }, rb = { class: "panel-header" }, cb = {
2723
2830
  key: 0,
2724
2831
  class: "loading-overlay"
2725
- }, Ga = !1, Ua = /* @__PURE__ */ Te({
2832
+ }, fb = !0, tb = /* @__PURE__ */ Ke({
2726
2833
  __name: "threePreview",
2727
2834
  props: {
2728
2835
  fileBlobs: { default: () => [] }
2729
2836
  },
2730
- setup(o) {
2731
- const e = o, a = H0(null), r = H0(!1), b = H0("");
2732
- let i = null;
2733
- function H(E) {
2734
- if (!i || !a.value) return;
2735
- const { camera: G, scene: l0 } = B();
2736
- !G || !l0 || Ia(
2837
+ setup(n) {
2838
+ const a = n, r = u0(null), b = u0(!1), i = u0("");
2839
+ let H = null;
2840
+ function f(T) {
2841
+ if (!H || !r.value) return;
2842
+ const { camera: E, scene: L } = C();
2843
+ !E || !L || za(
2844
+ T,
2845
+ r.value,
2737
2846
  E,
2738
- a.value,
2739
- G,
2740
- l0,
2741
- O.value,
2742
- i,
2847
+ L,
2848
+ l.value,
2849
+ H,
2743
2850
  {
2744
- onHit: (X) => {
2745
- var d0;
2746
- console.log("[PICK_DEBUG] 点击的 mesh 对象:", X), console.log("[PICK_DEBUG] mesh.name:", X.name), console.log("[PICK_DEBUG] mesh.uuid:", X.uuid), console.log("[PICK_DEBUG] parent.name:", (d0 = X.parent) == null ? void 0 : d0.name), console.log("[PICK_DEBUG] 完整 mesh:", X);
2851
+ onHit: (G) => {
2852
+ var Z;
2853
+ console.log("[PICK_DEBUG] 点击的 mesh 对象:", G), console.log("[PICK_DEBUG] mesh.name:", G.name), console.log("[PICK_DEBUG] mesh.uuid:", G.uuid), console.log("[PICK_DEBUG] parent.name:", (Z = G.parent) == null ? void 0 : Z.name), console.log("[PICK_DEBUG] 完整 mesh:", G);
2747
2854
  }
2748
2855
  }
2749
2856
  );
2750
2857
  }
2858
+ function c(T) {
2859
+ if (!H || T.key !== "h" && T.key !== "H") return;
2860
+ const E = T.target;
2861
+ if (E) {
2862
+ const G = E.tagName;
2863
+ if (G === "INPUT" || G === "TEXTAREA" || E.isContentEditable) return;
2864
+ }
2865
+ const L = Qa(H);
2866
+ L === null ? console.log("[PICK_DEBUG] 当前没有选中部件, H 快捷键无效") : (console.log(`[PICK_DEBUG] 已${L ? "显示" : "隐藏"}当前选中部件 (快捷键 H)`), T.preventDefault());
2867
+ }
2751
2868
  const {
2752
- threeInfo: f,
2869
+ threeInfo: t,
2753
2870
  modelLoader: {
2754
- isLoading: c,
2755
- loadingProgress: t,
2756
- loadedModels: n,
2757
- error: d,
2758
- loadModelsFromBlobs: k
2871
+ isLoading: d,
2872
+ loadingProgress: o,
2873
+ loadedModels: k,
2874
+ error: s,
2875
+ loadModelsFromBlobs: u
2759
2876
  },
2760
- animation: { isAnimating: s, toggleAnimation: u, stopAnimation: _ },
2877
+ animation: { isAnimating: _, toggleAnimation: h, stopAnimation: I },
2761
2878
  clipping: {
2762
- isClipping: l,
2763
- activeClippingAxis: j,
2764
- toggleClipping: h,
2765
- updateClippingPlanes: g
2879
+ isClipping: A,
2880
+ activeClippingAxis: g,
2881
+ toggleClipping: p,
2882
+ updateClippingPlanes: y
2766
2883
  },
2767
2884
  partAnimation: {
2768
- isPartAnimating: p,
2769
- setPartRotations: I,
2770
- startPartAnimations: F,
2771
- stopPartAnimations: w
2885
+ isPartAnimating: F,
2886
+ setPartRotations: N,
2887
+ startPartAnimations: B,
2888
+ stopPartAnimations: V
2772
2889
  },
2773
2890
  millPivotAnimation: {
2774
- setupMillAnimations: y
2891
+ setupMillAnimations: O
2775
2892
  }
2776
- } = ka(a, {
2893
+ } = Ea(r, {
2777
2894
  useModelLoaderHook: !0,
2778
2895
  useAnimationHook: !0,
2779
2896
  useClippingHook: !0,
2780
2897
  usePartAnimationHook: !0
2781
- }), { resetView: m, initThreeJS: D, handleResize: R, cleanup: U, setAndFitModels: A, axesHelperVisible: S, toggleAxesVisibility: Y, currentModels: O, addBeforeRenderCallback: q, removeBeforeRenderCallback: P, getThreeJSObjects: B } = f, z = ha(
2782
- O,
2783
- q,
2784
- P
2785
- ), x = la(
2786
- O,
2787
- q,
2788
- P,
2789
- B,
2898
+ }), { resetView: x, initThreeJS: S, handleResize: K, cleanup: v, setAndFitModels: m, axesHelperVisible: R, toggleAxesVisibility: q, currentModels: l, addBeforeRenderCallback: W, removeBeforeRenderCallback: Q, getThreeJSObjects: C, isBeforeRenderPaused: J, setBeforeRenderPaused: $ } = t, c0 = () => {
2899
+ const T = !J.value;
2900
+ $(T), console.log(`[DEBUG] 动画${T ? "已暂停" : "已恢复"}`);
2901
+ }, d0 = Pa(
2902
+ l,
2903
+ W,
2904
+ Q
2905
+ ), p0 = xa(
2906
+ l,
2907
+ W,
2908
+ Q,
2909
+ C,
2790
2910
  // 传入链条夹具位置查询函数,使胚料能跟随夹具移动
2791
- (E, G) => z.getClampWorldPosition(E, G)
2792
- ), L = () => {
2793
- Y();
2794
- }, A0 = (E) => {
2795
- j.value = E, g();
2796
- }, y0 = [
2911
+ (T, E) => d0.getClampWorldPosition(T, E)
2912
+ ), R0 = () => {
2913
+ q();
2914
+ }, Y = (T) => {
2915
+ g.value = T, y();
2916
+ }, o0 = [
2797
2917
  { partName: "主动链轮10倍-1001", axis: "y", speed: 1, direction: -1 },
2798
2918
  { partName: "主动链轮10倍-2001", axis: "y", speed: 1, direction: -1 },
2799
2919
  { partName: "主动链轮10倍-1", axis: "y", speed: 1, direction: 1 },
2800
2920
  { partName: "主动链轮10倍-2", axis: "y", speed: 1, direction: 1 }
2801
2921
  ];
2802
- M0(() => e.fileBlobs, (E) => {
2803
- E && E.length > 0 && k(E).catch((G) => {
2804
- console.error("加载错误:", G);
2922
+ Z0(() => a.fileBlobs, (T) => {
2923
+ T && T.length > 0 && u(T).catch((E) => {
2924
+ console.error("加载错误:", E);
2805
2925
  });
2806
2926
  }, {
2807
2927
  immediate: !0,
2808
2928
  deep: !0
2809
- }), M0(n, (E) => {
2810
- E && E.length > 0 && (A(E), y(), I(y0), F(), z.startChainAnimation(), x.startBilletDelivery());
2811
- }), M0(d, (E) => {
2812
- E && ae.error(`模型加载失败: ${E}`);
2929
+ }), Z0(k, (T) => {
2930
+ T && T.length > 0 && (m(T), O(), N(o0), B(), d0.startChainAnimation(), p0.startBilletDelivery());
2931
+ }), Z0(s, (T) => {
2932
+ T && we.error(`模型加载失败: ${T}`);
2813
2933
  });
2814
- const c0 = (E) => {
2815
- r.value = !0, b.value = E, E === "剖面视图" && !l.value && h();
2934
+ const w0 = (T) => {
2935
+ b.value = !0, i.value = T, T === "剖面视图" && !A.value && p();
2816
2936
  };
2817
- let K = null;
2818
- return Re(async () => {
2819
- await Me();
2937
+ let m0 = null;
2938
+ return Xe(async () => {
2939
+ var T;
2940
+ await $e();
2820
2941
  try {
2821
- D(), a.value && (K = new ResizeObserver(R), K.observe(a.value)), window.__threePreview__ = {
2822
- threeInfo: f,
2823
- currentModels: O,
2824
- loadedModels: n,
2825
- getThreeJSObjects: B,
2826
- billetAnimation: x,
2827
- chainAnimation: z
2828
- };
2942
+ S(), r.value && (m0 = new ResizeObserver(K), m0.observe(r.value)), fb && (window.__threePreview__ = {
2943
+ threeInfo: t,
2944
+ currentModels: l,
2945
+ loadedModels: k,
2946
+ getThreeJSObjects: C,
2947
+ billetAnimation: p0,
2948
+ chainAnimation: d0,
2949
+ isBeforeRenderPaused: J,
2950
+ setBeforeRenderPaused: $,
2951
+ // 调试函数
2952
+ _logRollDetails: (E, L) => {
2953
+ var G;
2954
+ if (L) {
2955
+ const Z = new w(), e0 = new n0(), X = new w(), i0 = new w(), M0 = new z0().setFromObject(L);
2956
+ M0.getCenter(X), M0.getSize(i0), L.getWorldPosition(Z), L.getWorldQuaternion(e0), console.log(`[DEBUG] ${E}:`, {
2957
+ name: L.name,
2958
+ parent: ((G = L.parent) == null ? void 0 : G.name) ?? "null",
2959
+ worldPos: Z,
2960
+ bboxCenter: X,
2961
+ bboxSize: i0,
2962
+ worldQuat: e0,
2963
+ posVsBboxCenter: { dx: Z.x - X.x, dy: Z.y - X.y, dz: Z.z - X.z }
2964
+ });
2965
+ }
2966
+ },
2967
+ // 快速打印所有轧辊状态
2968
+ _printAllRollStates: () => {
2969
+ const { scene: E } = C();
2970
+ if (!E) return;
2971
+ const L = ["轧辊整体-1001", "下轧辊-1001", "轧辊整体-1", "下轧辊-1"];
2972
+ for (const G of L) {
2973
+ let Z = null;
2974
+ for (const e0 of l.value) {
2975
+ if (!e0) continue;
2976
+ const X = e0.getObjectByName(G);
2977
+ if (X) {
2978
+ Z = X;
2979
+ break;
2980
+ }
2981
+ }
2982
+ if (!Z) {
2983
+ const e0 = E.getObjectByName(G);
2984
+ e0 && (Z = e0);
2985
+ }
2986
+ if (Z) {
2987
+ const e0 = new w(), X = new n0();
2988
+ Z.getWorldPosition(e0), Z.getWorldQuaternion(X), console.log(`[ROLL] ${G}: pos=${e0.x.toFixed(2)}, ${e0.y.toFixed(2)}, ${e0.z.toFixed(2)} | w=${X.w.toFixed(4)}`);
2989
+ }
2990
+ }
2991
+ }
2992
+ }), H = qa(), (T = r.value) == null || T.addEventListener("click", f), window.addEventListener("keydown", c), console.log("[PICK_DEBUG] 部件拾取调试已开启,点击模型查看信息,按 H 显隐当前选中部件");
2829
2993
  } catch (E) {
2830
- console.error("Three.js 初始化失败:", E), ae.error("渲染引擎初始化失败!");
2994
+ console.error("Three.js 初始化失败:", E), we.error("渲染引擎初始化失败!");
2831
2995
  }
2832
- }), De(() => {
2833
- b.value = "", K && K.disconnect(), s.value && _(), p.value && w(), x.dispose(), z.dispose(), U();
2834
- }), (E, G) => {
2835
- const l0 = Oe("el-scrollbar");
2836
- return D0(), Z0("div", va, [
2837
- J("div", {
2996
+ }), e2(() => {
2997
+ i.value = "", m0 && m0.disconnect(), r.value && H && (r.value.removeEventListener("click", f), window.removeEventListener("keydown", c), Za(H), H = null), _.value && I(), F.value && V(), p0.dispose(), d0.dispose(), v();
2998
+ }), (T, E) => {
2999
+ const L = a2("el-scrollbar");
3000
+ return V0(), he("div", $a, [
3001
+ t0("div", {
2838
3002
  ref_key: "threejsContainer",
2839
- ref: a,
3003
+ ref: r,
2840
3004
  class: "threejs-container"
2841
3005
  }, null, 512),
2842
- J("div", Ta, [
2843
- o0(g0, {
3006
+ t0("div", eb, [
3007
+ j0(I0, {
2844
3008
  name: "viewReset",
2845
3009
  size: "24",
2846
- onClick: k0(m),
3010
+ onClick: g0(x),
2847
3011
  title: "重置"
2848
3012
  }, null, 8, ["onClick"]),
2849
- o0(g0, {
3013
+ j0(I0, {
2850
3014
  name: "fangda",
2851
3015
  size: "24",
2852
3016
  title: "放大"
2853
3017
  }),
2854
- o0(g0, {
3018
+ j0(I0, {
2855
3019
  name: "suoxiao",
2856
3020
  size: "24",
2857
3021
  title: "缩小"
2858
3022
  }),
2859
- o0(g0, {
3023
+ j0(I0, {
2860
3024
  name: "lookAround",
2861
3025
  size: "24",
2862
- onClick: k0(u),
2863
- title: k0(s) ? "停止动画" : "动画视图"
3026
+ onClick: g0(h),
3027
+ title: g0(_) ? "停止动画" : "动画视图"
2864
3028
  }, null, 8, ["onClick", "title"]),
2865
- o0(g0, {
3029
+ j0(I0, {
2866
3030
  name: "zuobiaoxi",
2867
3031
  size: "24",
2868
- active: k0(S),
2869
- onClick: L,
3032
+ active: g0(R),
3033
+ onClick: R0,
2870
3034
  title: "显隐坐标轴"
2871
3035
  }, null, 8, ["active"])
2872
3036
  ]),
2873
- J("div", Ra, [
2874
- J0(E.$slots, "button-left", { switchRightPanel: c0 }, void 0, !0),
2875
- o0(g0, {
3037
+ t0("div", ab, [
3038
+ _e(T.$slots, "button-left", { switchRightPanel: w0 }, void 0, !0),
3039
+ j0(I0, {
2876
3040
  name: "clipping",
2877
3041
  size: "24",
2878
- onClick: G[0] || (G[0] = (X) => c0("剖面视图")),
2879
- active: r.value && b.value === "剖面视图",
3042
+ onClick: E[0] || (E[0] = (G) => w0("剖面视图")),
3043
+ active: b.value && i.value === "剖面视图",
2880
3044
  title: "剖面视图"
2881
3045
  }, null, 8, ["active"])
2882
3046
  ]),
2883
- J("div", Ma, [
2884
- J0(E.$slots, "button-right", {}, void 0, !0)
3047
+ t0("div", bb, [
3048
+ _e(T.$slots, "button-right", {}, void 0, !0)
3049
+ ]),
3050
+ t0("div", ib, [
3051
+ (V0(), Ae(I0, {
3052
+ key: 0,
3053
+ name: "zanting",
3054
+ size: "24",
3055
+ backgroundColor: "#ffffff",
3056
+ title: g0(J) ? "恢复动画" : "暂停动画",
3057
+ onClick: c0
3058
+ }, null, 8, ["title"]))
2885
3059
  ]),
2886
- G[3] || (G[3] = J("div", { class: "buttonGroup-bottom" }, null, -1)),
2887
- Ee(J("div", Da, [
2888
- J("div", Oa, [
2889
- J("span", null, Y0(b.value), 1),
2890
- J("span", {
3060
+ b2(t0("div", Hb, [
3061
+ t0("div", rb, [
3062
+ t0("span", null, pe(i.value), 1),
3063
+ t0("span", {
2891
3064
  class: "close",
2892
- onClick: G[1] || (G[1] = (X) => r.value = !1)
3065
+ onClick: E[1] || (E[1] = (G) => b.value = !1)
2893
3066
  }, " X ")
2894
3067
  ]),
2895
- o0(l0, { "max-height": "650px" }, {
2896
- default: Ge(() => [
2897
- b.value === "剖面视图" ? (D0(), Ue(j2, {
3068
+ j0(L, { "max-height": "650px" }, {
3069
+ default: i2(() => [
3070
+ i.value === "剖面视图" ? (V0(), Ae(L2, {
2898
3071
  key: 0,
2899
- value: k0(j),
2900
- onChange: A0
2901
- }, null, 8, ["value"])) : Q0("", !0)
3072
+ value: g0(g),
3073
+ onChange: Y
3074
+ }, null, 8, ["value"])) : ge("", !0)
2902
3075
  ]),
2903
3076
  _: 1
2904
3077
  })
2905
3078
  ], 512), [
2906
- [xe, r.value]
3079
+ [H2, b.value]
2907
3080
  ]),
2908
- k0(c) ? (D0(), Z0("div", Ea, [
2909
- G[2] || (G[2] = J("div", { class: "loading-spinner" }, null, -1)),
2910
- J("p", null, Y0(k0(t)), 1)
2911
- ])) : Q0("", !0)
3081
+ g0(d) ? (V0(), he("div", cb, [
3082
+ E[2] || (E[2] = t0("div", { class: "loading-spinner" }, null, -1)),
3083
+ t0("p", null, pe(g0(o)), 1)
3084
+ ])) : ge("", !0)
2912
3085
  ]);
2913
3086
  };
2914
3087
  }
2915
- }), Sa = /* @__PURE__ */ w2(Ua, [["__scopeId", "data-v-91aa0ef4"]]);
3088
+ }), hb = /* @__PURE__ */ Q2(tb, [["__scopeId", "data-v-7ef33d10"]]);
2916
3089
  export {
2917
- Sa as default
3090
+ hb as default
2918
3091
  };