ss-component-new 1.3.813 → 1.3.814

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 (34) hide show
  1. package/dist/{MTLLoader-Cw11TWAL.js → MTLLoader-Cr05Jq1r.js} +1 -1
  2. package/dist/{URDFLoader-DUzCZjnV.js → URDFLoader-BPUcMfaA.js} +2 -2
  3. package/dist/{animationData-DwQetFQD.js → animationData-BtDIT0yo.js} +11 -11
  4. package/dist/{array-COidmpRY.js → array-DedLKtnj.js} +178 -178
  5. package/dist/{iconfont-Ij2RVNFj.js → iconfont-CHWuGARa.js} +1 -1
  6. package/dist/{index-KEw10uzh.js → index-4yKtNvgp.js} +1 -1
  7. package/dist/{index-dh1Gi7jC.js → index-BbSOlGJX.js} +1 -1
  8. package/dist/{index-CcBUPD0v.js → index-BpSEfABH.js} +3 -3
  9. package/dist/{index-Cv6rlCAH.js → index-BsScSvsX.js} +19933 -19792
  10. package/dist/{index-CCZspl83.js → index-CfXO0Pxj.js} +1 -1
  11. package/dist/{index-DqizREJ2.js → index-ClGtFB-m.js} +1 -1
  12. package/dist/{index-CXY_sgN_.js → index-CyW60_5F.js} +4 -4
  13. package/dist/{index-D8-0gsl7.js → index-D5DqBgT9.js} +4 -4
  14. package/dist/{index-Dsce3BX1.js → index-D8oTYZFq.js} +3 -3
  15. package/dist/{index-B4kaaRbF.js → index-DEhKdMQM.js} +1567 -1563
  16. package/dist/{index-Cd11-eam.js → index-DF8T6mYj.js} +7191 -7184
  17. package/dist/{index-DQryAYzQ.js → index-Uu1cC9bk.js} +1 -1
  18. package/dist/{index-CaLfl7ix.js → index-aA0s_3Sc.js} +1 -1
  19. package/dist/{index-ZhT8hVC2.js → index-eCFjxwNX.js} +1 -1
  20. package/dist/{index-B7P0-Odj.js → index-mXVDZfeY.js} +2 -2
  21. package/dist/{index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-DFJL-r6K.js → index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-D8tI8Ecr.js} +30 -30
  22. package/dist/{main-fNwMqnvv.js → main-DKqsz6KW.js} +2 -2
  23. package/dist/ss-component.css +2 -2
  24. package/dist/ss-component.js +8 -8
  25. package/dist/ss-component2.js +8 -8
  26. package/dist/{threeModel-BeCT-wuA.js → threeModel-COjNAXHI.js} +49 -49
  27. package/dist/{threePreview-BnPPysvl.js → threePreview-DbCREqix.js} +1258 -1103
  28. package/dist/{threeSceneView-C_KAY9V1.js → threeSceneView-Bvx19y--.js} +71 -69
  29. package/dist/{threeSceneViewForCPMPIP-uac2fzAK.js → threeSceneViewForCPMPIP-DCKUI5B9.js} +7 -7
  30. package/dist/{threeTrackPathView-Ugj5_KnE.js → threeTrackPathView-Bj3hHKs6.js} +84 -84
  31. package/dist/{threeViewerHost-Dv0JTTnu.js → threeViewerHost-Orcumk6X.js} +2 -2
  32. package/dist/{urdfTree-CLtWTrD6.js → urdfTree-DvLm61lR.js} +1 -1
  33. package/dist/{workpieceTreePanel-Ch75Cqlr.js → workpieceTreePanel-cpqQoDnb.js} +12 -12
  34. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { ref as c0, shallowRef as H2, watch as O0, onBeforeUnmount as Pe, defineComponent as Be, computed as Y0, createBlock as be, openBlock as D0, Teleport as c2, createElementBlock as ie, createCommentVNode as re, withModifiers as f2, normalizeStyle as t2, createElementVNode as e0, toDisplayString as He, createVNode as h0, onMounted as n2, nextTick as d2, resolveComponent as o2, withDirectives as s2, unref as n0, renderSlot as Ie, withCtx as k2, vShow as l2, isRef as u2 } from "vue";
2
- import { ah as h2, ai as ce, aj as qe, R as Ve, ak as q0, U as Q0, al as u0, am as ue, C as k0, an as l0, c as A0, ao as g2, j as _2, D as A2, n as J0, V as y, ap as p2, aq as d0, ar as m2, as as We, at as j2, au as I2, a1 as V0, av as y2, aw as Ce, ax as w2, ay as F2, az as v2, aA as fe, aB as Le, aC as te, aD as N2, aE as T2, _ as R2, aF as K0, a2 as M2, t as Se, l as D2, aG as B0, aH as O2, u as ze, aI as E2, h as Ze, aJ as G2, w as U2, aK as x2, $ as P2, s as Z0, P as B2, o as q2, aL as V2, aM as W2, aN as C2, aO as L2, aP as S2, aQ as Qe, aR as z2, aS as ye, aT as we, aU as Fe, aV as ve, aW as ne, a4 as Z2, aX as Q2, B as W0, aY as J2, k as Y2, aZ as K2 } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-DFJL-r6K.js";
1
+ import { ref as I0, shallowRef as na, watch as ce, onBeforeUnmount as W2, defineComponent as V2, computed as qe, createBlock as Qe, openBlock as He, Teleport as da, createElementBlock as Ze, createCommentVNode as Je, withModifiers as oa, normalizeStyle as sa, createElementVNode as p0, toDisplayString as Ye, createVNode as q0, onMounted as ka, nextTick as la, resolveComponent as ua, withDirectives as w2, unref as M0, vShow as F2, renderSlot as v2, withCtx as ha, isRef as ga } from "vue";
2
+ import { ah as _a, ai as Ke, aj as C2, R as L2, ak as he, U as Me, al as G0, am as r2, C as O0, an as E0, c as Z0, ao as Aa, j as pa, D as ma, n as De, V as j, ap as ja, aq as $, ar as Ia, as as S2, at as ya, au as wa, a1 as ge, av as Fa, aw as z2, ax as va, ay as Na, az as Ta, aA as Xe, aB as Q2, aC as $e, aD as Ra, aE as Ma, _ as Da, aF as We, a2 as Oa, t as Z2, l as Ea, aG as ue, aH as Ga, u as J2, aI as Ua, h as H2, aJ as xa, w as Pa, aK as Ba, $ as qa, s as Ve, P as Wa, o as Va, aL as Ca, aM as La, aN as Sa, aO as za, aP as Qa, aQ as Y2, aR as Za, aS as N2, aT as T2, aU as R2, aV as M2, aW as e2, a4 as Ja, aX as Ya, B as _e, aY as Ka, k as Xa, aZ as $a, a_ as eb } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-D8tI8Ecr.js";
3
3
  import "./index-DkDX7FWy.js";
4
- import { u as X2, a as $2, b as ea, T as v0, C as aa } from "./iconfont-Ij2RVNFj.js";
5
- import { M as ba, O as ia, S as ra } from "./MTLLoader-Cw11TWAL.js";
6
- import { a as Ha } from "./index-B4kaaRbF.js";
7
- import { _ as Je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { E as Ne } from "./request-DzUsnuWu.js";
9
- function Te(n, e) {
10
- if (e === h2)
4
+ import { u as ab, a as bb, b as ib, T as K0, C as rb } from "./iconfont-CHWuGARa.js";
5
+ import { M as Hb, O as cb, S as fb } from "./MTLLoader-Cr05Jq1r.js";
6
+ import { a as tb } from "./index-DEhKdMQM.js";
7
+ import { _ as K2 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import { E as D2 } from "./request-DzUsnuWu.js";
9
+ function O2(n, e) {
10
+ if (e === _a)
11
11
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), n;
12
- if (e === ce || e === qe) {
12
+ if (e === Ke || e === C2) {
13
13
  let a = n.getIndex();
14
14
  if (a === null) {
15
15
  const r = [], f = n.getAttribute("position");
@@ -21,7 +21,7 @@ function Te(n, e) {
21
21
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), n;
22
22
  }
23
23
  const H = a.count - 2, b = [];
24
- if (e === ce)
24
+ if (e === Ke)
25
25
  for (let r = 1; r <= H; r++)
26
26
  b.push(a.getX(0)), b.push(a.getX(r)), b.push(a.getX(r + 1));
27
27
  else
@@ -33,7 +33,7 @@ function Te(n, e) {
33
33
  } else
34
34
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), n;
35
35
  }
36
- class ca extends Ve {
36
+ class nb extends L2 {
37
37
  /**
38
38
  * Constructs a new glTF loader.
39
39
  *
@@ -41,39 +41,39 @@ class ca extends Ve {
41
41
  */
42
42
  constructor(e) {
43
43
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(a) {
44
- return new oa(a);
44
+ return new lb(a);
45
45
  }), this.register(function(a) {
46
- return new sa(a);
46
+ return new ub(a);
47
47
  }), this.register(function(a) {
48
- return new ma(a);
48
+ return new yb(a);
49
49
  }), this.register(function(a) {
50
- return new ja(a);
50
+ return new wb(a);
51
51
  }), this.register(function(a) {
52
- return new Ia(a);
52
+ return new Fb(a);
53
53
  }), this.register(function(a) {
54
- return new la(a);
54
+ return new gb(a);
55
55
  }), this.register(function(a) {
56
- return new ua(a);
56
+ return new _b(a);
57
57
  }), this.register(function(a) {
58
- return new ha(a);
58
+ return new Ab(a);
59
59
  }), this.register(function(a) {
60
- return new ga(a);
60
+ return new pb(a);
61
61
  }), this.register(function(a) {
62
- return new da(a);
62
+ return new kb(a);
63
63
  }), this.register(function(a) {
64
- return new _a(a);
64
+ return new mb(a);
65
65
  }), this.register(function(a) {
66
- return new ka(a);
66
+ return new hb(a);
67
67
  }), this.register(function(a) {
68
- return new pa(a);
68
+ return new Ib(a);
69
69
  }), this.register(function(a) {
70
- return new Aa(a);
70
+ return new jb(a);
71
71
  }), this.register(function(a) {
72
- return new ta(a);
72
+ return new ob(a);
73
73
  }), this.register(function(a) {
74
- return new ya(a);
74
+ return new vb(a);
75
75
  }), this.register(function(a) {
76
- return new wa(a);
76
+ return new Nb(a);
77
77
  });
78
78
  }
79
79
  /**
@@ -91,14 +91,14 @@ class ca extends Ve {
91
91
  if (this.resourcePath !== "")
92
92
  r = this.resourcePath;
93
93
  else if (this.path !== "") {
94
- const t = q0.extractUrlBase(e);
95
- r = q0.resolveURL(t, this.path);
94
+ const t = he.extractUrlBase(e);
95
+ r = he.resolveURL(t, this.path);
96
96
  } else
97
- r = q0.extractUrlBase(e);
97
+ r = he.extractUrlBase(e);
98
98
  this.manager.itemStart(e);
99
99
  const f = function(t) {
100
100
  b ? b(t) : console.error(t), i.manager.itemError(e), i.manager.itemEnd(e);
101
- }, c = new Q0(this.manager);
101
+ }, c = new Me(this.manager);
102
102
  c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(t) {
103
103
  try {
104
104
  i.parse(t, r, function(d) {
@@ -173,14 +173,14 @@ class ca extends Ve {
173
173
  if (typeof e == "string")
174
174
  i = JSON.parse(e);
175
175
  else if (e instanceof ArrayBuffer)
176
- if (c.decode(new Uint8Array(e, 0, 4)) === Ye) {
176
+ if (c.decode(new Uint8Array(e, 0, 4)) === X2) {
177
177
  try {
178
- r[D.KHR_BINARY_GLTF] = new Fa(e);
178
+ r[x.KHR_BINARY_GLTF] = new Tb(e);
179
179
  } catch (o) {
180
180
  b && b(o);
181
181
  return;
182
182
  }
183
- i = JSON.parse(r[D.KHR_BINARY_GLTF].content);
183
+ i = JSON.parse(r[x.KHR_BINARY_GLTF].content);
184
184
  } else
185
185
  i = JSON.parse(c.decode(e));
186
186
  else
@@ -189,7 +189,7 @@ class ca extends Ve {
189
189
  b && b(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
190
190
  return;
191
191
  }
192
- const t = new Ba(i, {
192
+ const t = new Vb(i, {
193
193
  path: a || this.resourcePath || "",
194
194
  crossOrigin: this.crossOrigin,
195
195
  requestHeader: this.requestHeader,
@@ -206,17 +206,17 @@ class ca extends Ve {
206
206
  for (let d = 0; d < i.extensionsUsed.length; ++d) {
207
207
  const o = i.extensionsUsed[d], s = i.extensionsRequired || [];
208
208
  switch (o) {
209
- case D.KHR_MATERIALS_UNLIT:
210
- r[o] = new na();
209
+ case x.KHR_MATERIALS_UNLIT:
210
+ r[o] = new sb();
211
211
  break;
212
- case D.KHR_DRACO_MESH_COMPRESSION:
213
- r[o] = new va(i, this.dracoLoader);
212
+ case x.KHR_DRACO_MESH_COMPRESSION:
213
+ r[o] = new Rb(i, this.dracoLoader);
214
214
  break;
215
- case D.KHR_TEXTURE_TRANSFORM:
216
- r[o] = new Na();
215
+ case x.KHR_TEXTURE_TRANSFORM:
216
+ r[o] = new Mb();
217
217
  break;
218
- case D.KHR_MESH_QUANTIZATION:
219
- r[o] = new Ta();
218
+ case x.KHR_MESH_QUANTIZATION:
219
+ r[o] = new Db();
220
220
  break;
221
221
  default:
222
222
  s.indexOf(o) >= 0 && f[o] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + o + '".');
@@ -239,7 +239,7 @@ class ca extends Ve {
239
239
  });
240
240
  }
241
241
  }
242
- function fa() {
242
+ function db() {
243
243
  let n = {};
244
244
  return {
245
245
  get: function(e) {
@@ -256,7 +256,7 @@ function fa() {
256
256
  }
257
257
  };
258
258
  }
259
- const D = {
259
+ const x = {
260
260
  KHR_BINARY_GLTF: "KHR_binary_glTF",
261
261
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
262
262
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -280,9 +280,9 @@ const D = {
280
280
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
281
281
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
282
282
  };
283
- class ta {
283
+ class ob {
284
284
  constructor(e) {
285
- this.parser = e, this.name = D.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
285
+ this.parser = e, this.name = x.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
286
286
  }
287
287
  _markDefs() {
288
288
  const e = this.parser, a = this.parser.json.nodes || [];
@@ -297,23 +297,23 @@ class ta {
297
297
  if (b) return b;
298
298
  const i = a.json, c = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
299
299
  let t;
300
- const d = new k0(16777215);
301
- c.color !== void 0 && d.setRGB(c.color[0], c.color[1], c.color[2], l0);
300
+ const d = new O0(16777215);
301
+ c.color !== void 0 && d.setRGB(c.color[0], c.color[1], c.color[2], E0);
302
302
  const o = c.range !== void 0 ? c.range : 0;
303
303
  switch (c.type) {
304
304
  case "directional":
305
- t = new A2(d), t.target.position.set(0, 0, -1), t.add(t.target);
305
+ t = new ma(d), t.target.position.set(0, 0, -1), t.add(t.target);
306
306
  break;
307
307
  case "point":
308
- t = new _2(d), t.distance = o;
308
+ t = new pa(d), t.distance = o;
309
309
  break;
310
310
  case "spot":
311
- t = new g2(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
+ t = new Aa(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);
312
312
  break;
313
313
  default:
314
314
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
315
315
  }
316
- return t.position.set(0, 0, 0), g0(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(H, b), b;
316
+ return t.position.set(0, 0, 0), W0(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(H, b), b;
317
317
  }
318
318
  getDependency(e, a) {
319
319
  if (e === "light")
@@ -326,30 +326,30 @@ class ta {
326
326
  });
327
327
  }
328
328
  }
329
- class na {
329
+ class sb {
330
330
  constructor() {
331
- this.name = D.KHR_MATERIALS_UNLIT;
331
+ this.name = x.KHR_MATERIALS_UNLIT;
332
332
  }
333
333
  getMaterialType() {
334
- return B0;
334
+ return ue;
335
335
  }
336
336
  extendParams(e, a, H) {
337
337
  const b = [];
338
- e.color = new k0(1, 1, 1), e.opacity = 1;
338
+ e.color = new O0(1, 1, 1), e.opacity = 1;
339
339
  const i = a.pbrMetallicRoughness;
340
340
  if (i) {
341
341
  if (Array.isArray(i.baseColorFactor)) {
342
342
  const r = i.baseColorFactor;
343
- e.color.setRGB(r[0], r[1], r[2], l0), e.opacity = r[3];
343
+ e.color.setRGB(r[0], r[1], r[2], E0), e.opacity = r[3];
344
344
  }
345
- i.baseColorTexture !== void 0 && b.push(H.assignTexture(e, "map", i.baseColorTexture, A0));
345
+ i.baseColorTexture !== void 0 && b.push(H.assignTexture(e, "map", i.baseColorTexture, Z0));
346
346
  }
347
347
  return Promise.all(b);
348
348
  }
349
349
  }
350
- class da {
350
+ class kb {
351
351
  constructor(e) {
352
- this.parser = e, this.name = D.KHR_MATERIALS_EMISSIVE_STRENGTH;
352
+ this.parser = e, this.name = x.KHR_MATERIALS_EMISSIVE_STRENGTH;
353
353
  }
354
354
  extendMaterialParams(e, a) {
355
355
  const b = this.parser.json.materials[e];
@@ -359,13 +359,13 @@ class da {
359
359
  return i !== void 0 && (a.emissiveIntensity = i), Promise.resolve();
360
360
  }
361
361
  }
362
- class oa {
362
+ class lb {
363
363
  constructor(e) {
364
- this.parser = e, this.name = D.KHR_MATERIALS_CLEARCOAT;
364
+ this.parser = e, this.name = x.KHR_MATERIALS_CLEARCOAT;
365
365
  }
366
366
  getMaterialType(e) {
367
367
  const H = this.parser.json.materials[e];
368
- return !H.extensions || !H.extensions[this.name] ? null : u0;
368
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
369
369
  }
370
370
  extendMaterialParams(e, a) {
371
371
  const H = this.parser, b = H.json.materials[e];
@@ -374,18 +374,18 @@ class oa {
374
374
  const i = [], r = b.extensions[this.name];
375
375
  if (r.clearcoatFactor !== void 0 && (a.clearcoat = r.clearcoatFactor), r.clearcoatTexture !== void 0 && i.push(H.assignTexture(a, "clearcoatMap", r.clearcoatTexture)), r.clearcoatRoughnessFactor !== void 0 && (a.clearcoatRoughness = r.clearcoatRoughnessFactor), r.clearcoatRoughnessTexture !== void 0 && i.push(H.assignTexture(a, "clearcoatRoughnessMap", r.clearcoatRoughnessTexture)), r.clearcoatNormalTexture !== void 0 && (i.push(H.assignTexture(a, "clearcoatNormalMap", r.clearcoatNormalTexture)), r.clearcoatNormalTexture.scale !== void 0)) {
376
376
  const f = r.clearcoatNormalTexture.scale;
377
- a.clearcoatNormalScale = new ue(f, f);
377
+ a.clearcoatNormalScale = new r2(f, f);
378
378
  }
379
379
  return Promise.all(i);
380
380
  }
381
381
  }
382
- class sa {
382
+ class ub {
383
383
  constructor(e) {
384
- this.parser = e, this.name = D.KHR_MATERIALS_DISPERSION;
384
+ this.parser = e, this.name = x.KHR_MATERIALS_DISPERSION;
385
385
  }
386
386
  getMaterialType(e) {
387
387
  const H = this.parser.json.materials[e];
388
- return !H.extensions || !H.extensions[this.name] ? null : u0;
388
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
389
389
  }
390
390
  extendMaterialParams(e, a) {
391
391
  const b = this.parser.json.materials[e];
@@ -395,13 +395,13 @@ class sa {
395
395
  return a.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
396
396
  }
397
397
  }
398
- class ka {
398
+ class hb {
399
399
  constructor(e) {
400
- this.parser = e, this.name = D.KHR_MATERIALS_IRIDESCENCE;
400
+ this.parser = e, this.name = x.KHR_MATERIALS_IRIDESCENCE;
401
401
  }
402
402
  getMaterialType(e) {
403
403
  const H = this.parser.json.materials[e];
404
- return !H.extensions || !H.extensions[this.name] ? null : u0;
404
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
405
405
  }
406
406
  extendMaterialParams(e, a) {
407
407
  const H = this.parser, b = H.json.materials[e];
@@ -411,35 +411,35 @@ class ka {
411
411
  return r.iridescenceFactor !== void 0 && (a.iridescence = r.iridescenceFactor), r.iridescenceTexture !== void 0 && i.push(H.assignTexture(a, "iridescenceMap", r.iridescenceTexture)), r.iridescenceIor !== void 0 && (a.iridescenceIOR = r.iridescenceIor), a.iridescenceThicknessRange === void 0 && (a.iridescenceThicknessRange = [100, 400]), r.iridescenceThicknessMinimum !== void 0 && (a.iridescenceThicknessRange[0] = r.iridescenceThicknessMinimum), r.iridescenceThicknessMaximum !== void 0 && (a.iridescenceThicknessRange[1] = r.iridescenceThicknessMaximum), r.iridescenceThicknessTexture !== void 0 && i.push(H.assignTexture(a, "iridescenceThicknessMap", r.iridescenceThicknessTexture)), Promise.all(i);
412
412
  }
413
413
  }
414
- class la {
414
+ class gb {
415
415
  constructor(e) {
416
- this.parser = e, this.name = D.KHR_MATERIALS_SHEEN;
416
+ this.parser = e, this.name = x.KHR_MATERIALS_SHEEN;
417
417
  }
418
418
  getMaterialType(e) {
419
419
  const H = this.parser.json.materials[e];
420
- return !H.extensions || !H.extensions[this.name] ? null : u0;
420
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
421
421
  }
422
422
  extendMaterialParams(e, a) {
423
423
  const H = this.parser, b = H.json.materials[e];
424
424
  if (!b.extensions || !b.extensions[this.name])
425
425
  return Promise.resolve();
426
426
  const i = [];
427
- a.sheenColor = new k0(0, 0, 0), a.sheenRoughness = 0, a.sheen = 1;
427
+ a.sheenColor = new O0(0, 0, 0), a.sheenRoughness = 0, a.sheen = 1;
428
428
  const r = b.extensions[this.name];
429
429
  if (r.sheenColorFactor !== void 0) {
430
430
  const f = r.sheenColorFactor;
431
- a.sheenColor.setRGB(f[0], f[1], f[2], l0);
431
+ a.sheenColor.setRGB(f[0], f[1], f[2], E0);
432
432
  }
433
- return r.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && i.push(H.assignTexture(a, "sheenColorMap", r.sheenColorTexture, A0)), r.sheenRoughnessTexture !== void 0 && i.push(H.assignTexture(a, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(i);
433
+ return r.sheenRoughnessFactor !== void 0 && (a.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && i.push(H.assignTexture(a, "sheenColorMap", r.sheenColorTexture, Z0)), r.sheenRoughnessTexture !== void 0 && i.push(H.assignTexture(a, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(i);
434
434
  }
435
435
  }
436
- class ua {
436
+ class _b {
437
437
  constructor(e) {
438
- this.parser = e, this.name = D.KHR_MATERIALS_TRANSMISSION;
438
+ this.parser = e, this.name = x.KHR_MATERIALS_TRANSMISSION;
439
439
  }
440
440
  getMaterialType(e) {
441
441
  const H = this.parser.json.materials[e];
442
- return !H.extensions || !H.extensions[this.name] ? null : u0;
442
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
443
443
  }
444
444
  extendMaterialParams(e, a) {
445
445
  const H = this.parser, b = H.json.materials[e];
@@ -449,13 +449,13 @@ class ua {
449
449
  return r.transmissionFactor !== void 0 && (a.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && i.push(H.assignTexture(a, "transmissionMap", r.transmissionTexture)), Promise.all(i);
450
450
  }
451
451
  }
452
- class ha {
452
+ class Ab {
453
453
  constructor(e) {
454
- this.parser = e, this.name = D.KHR_MATERIALS_VOLUME;
454
+ this.parser = e, this.name = x.KHR_MATERIALS_VOLUME;
455
455
  }
456
456
  getMaterialType(e) {
457
457
  const H = this.parser.json.materials[e];
458
- return !H.extensions || !H.extensions[this.name] ? null : u0;
458
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
459
459
  }
460
460
  extendMaterialParams(e, a) {
461
461
  const H = this.parser, b = H.json.materials[e];
@@ -464,16 +464,16 @@ class ha {
464
464
  const i = [], r = b.extensions[this.name];
465
465
  a.thickness = r.thicknessFactor !== void 0 ? r.thicknessFactor : 0, r.thicknessTexture !== void 0 && i.push(H.assignTexture(a, "thicknessMap", r.thicknessTexture)), a.attenuationDistance = r.attenuationDistance || 1 / 0;
466
466
  const f = r.attenuationColor || [1, 1, 1];
467
- return a.attenuationColor = new k0().setRGB(f[0], f[1], f[2], l0), Promise.all(i);
467
+ return a.attenuationColor = new O0().setRGB(f[0], f[1], f[2], E0), Promise.all(i);
468
468
  }
469
469
  }
470
- class ga {
470
+ class pb {
471
471
  constructor(e) {
472
- this.parser = e, this.name = D.KHR_MATERIALS_IOR;
472
+ this.parser = e, this.name = x.KHR_MATERIALS_IOR;
473
473
  }
474
474
  getMaterialType(e) {
475
475
  const H = this.parser.json.materials[e];
476
- return !H.extensions || !H.extensions[this.name] ? null : u0;
476
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
477
477
  }
478
478
  extendMaterialParams(e, a) {
479
479
  const b = this.parser.json.materials[e];
@@ -483,13 +483,13 @@ class ga {
483
483
  return a.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
484
484
  }
485
485
  }
486
- class _a {
486
+ class mb {
487
487
  constructor(e) {
488
- this.parser = e, this.name = D.KHR_MATERIALS_SPECULAR;
488
+ this.parser = e, this.name = x.KHR_MATERIALS_SPECULAR;
489
489
  }
490
490
  getMaterialType(e) {
491
491
  const H = this.parser.json.materials[e];
492
- return !H.extensions || !H.extensions[this.name] ? null : u0;
492
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
493
493
  }
494
494
  extendMaterialParams(e, a) {
495
495
  const H = this.parser, b = H.json.materials[e];
@@ -498,16 +498,16 @@ class _a {
498
498
  const i = [], r = b.extensions[this.name];
499
499
  a.specularIntensity = r.specularFactor !== void 0 ? r.specularFactor : 1, r.specularTexture !== void 0 && i.push(H.assignTexture(a, "specularIntensityMap", r.specularTexture));
500
500
  const f = r.specularColorFactor || [1, 1, 1];
501
- return a.specularColor = new k0().setRGB(f[0], f[1], f[2], l0), r.specularColorTexture !== void 0 && i.push(H.assignTexture(a, "specularColorMap", r.specularColorTexture, A0)), Promise.all(i);
501
+ return a.specularColor = new O0().setRGB(f[0], f[1], f[2], E0), r.specularColorTexture !== void 0 && i.push(H.assignTexture(a, "specularColorMap", r.specularColorTexture, Z0)), Promise.all(i);
502
502
  }
503
503
  }
504
- class Aa {
504
+ class jb {
505
505
  constructor(e) {
506
- this.parser = e, this.name = D.EXT_MATERIALS_BUMP;
506
+ this.parser = e, this.name = x.EXT_MATERIALS_BUMP;
507
507
  }
508
508
  getMaterialType(e) {
509
509
  const H = this.parser.json.materials[e];
510
- return !H.extensions || !H.extensions[this.name] ? null : u0;
510
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
511
511
  }
512
512
  extendMaterialParams(e, a) {
513
513
  const H = this.parser, b = H.json.materials[e];
@@ -517,13 +517,13 @@ class Aa {
517
517
  return a.bumpScale = r.bumpFactor !== void 0 ? r.bumpFactor : 1, r.bumpTexture !== void 0 && i.push(H.assignTexture(a, "bumpMap", r.bumpTexture)), Promise.all(i);
518
518
  }
519
519
  }
520
- class pa {
520
+ class Ib {
521
521
  constructor(e) {
522
- this.parser = e, this.name = D.KHR_MATERIALS_ANISOTROPY;
522
+ this.parser = e, this.name = x.KHR_MATERIALS_ANISOTROPY;
523
523
  }
524
524
  getMaterialType(e) {
525
525
  const H = this.parser.json.materials[e];
526
- return !H.extensions || !H.extensions[this.name] ? null : u0;
526
+ return !H.extensions || !H.extensions[this.name] ? null : G0;
527
527
  }
528
528
  extendMaterialParams(e, a) {
529
529
  const H = this.parser, b = H.json.materials[e];
@@ -533,9 +533,9 @@ class pa {
533
533
  return r.anisotropyStrength !== void 0 && (a.anisotropy = r.anisotropyStrength), r.anisotropyRotation !== void 0 && (a.anisotropyRotation = r.anisotropyRotation), r.anisotropyTexture !== void 0 && i.push(H.assignTexture(a, "anisotropyMap", r.anisotropyTexture)), Promise.all(i);
534
534
  }
535
535
  }
536
- class ma {
536
+ class yb {
537
537
  constructor(e) {
538
- this.parser = e, this.name = D.KHR_TEXTURE_BASISU;
538
+ this.parser = e, this.name = x.KHR_TEXTURE_BASISU;
539
539
  }
540
540
  loadTexture(e) {
541
541
  const a = this.parser, H = a.json, b = H.textures[e];
@@ -550,9 +550,9 @@ class ma {
550
550
  return a.loadTextureImage(e, i.source, r);
551
551
  }
552
552
  }
553
- class ja {
553
+ class wb {
554
554
  constructor(e) {
555
- this.parser = e, this.name = D.EXT_TEXTURE_WEBP;
555
+ this.parser = e, this.name = x.EXT_TEXTURE_WEBP;
556
556
  }
557
557
  loadTexture(e) {
558
558
  const a = this.name, H = this.parser, b = H.json, i = b.textures[e];
@@ -567,9 +567,9 @@ class ja {
567
567
  return H.loadTextureImage(e, r.source, c);
568
568
  }
569
569
  }
570
- class Ia {
570
+ class Fb {
571
571
  constructor(e) {
572
- this.parser = e, this.name = D.EXT_TEXTURE_AVIF;
572
+ this.parser = e, this.name = x.EXT_TEXTURE_AVIF;
573
573
  }
574
574
  loadTexture(e) {
575
575
  const a = this.name, H = this.parser, b = H.json, i = b.textures[e];
@@ -584,9 +584,9 @@ class Ia {
584
584
  return H.loadTextureImage(e, r.source, c);
585
585
  }
586
586
  }
587
- class ya {
587
+ class vb {
588
588
  constructor(e) {
589
- this.name = D.EXT_MESHOPT_COMPRESSION, this.parser = e;
589
+ this.name = x.EXT_MESHOPT_COMPRESSION, this.parser = e;
590
590
  }
591
591
  loadBufferView(e) {
592
592
  const a = this.parser.json, H = a.bufferViews[e];
@@ -610,9 +610,9 @@ class ya {
610
610
  return null;
611
611
  }
612
612
  }
613
- class wa {
613
+ class Nb {
614
614
  constructor(e) {
615
- this.name = D.EXT_MESH_GPU_INSTANCING, this.parser = e;
615
+ this.name = x.EXT_MESH_GPU_INSTANCING, this.parser = e;
616
616
  }
617
617
  createNodeMesh(e) {
618
618
  const a = this.parser.json, H = a.nodes[e];
@@ -620,52 +620,52 @@ class wa {
620
620
  return null;
621
621
  const b = a.meshes[H.mesh];
622
622
  for (const t of b.primitives)
623
- if (t.mode !== t0.TRIANGLES && t.mode !== t0.TRIANGLE_STRIP && t.mode !== t0.TRIANGLE_FAN && t.mode !== void 0)
623
+ if (t.mode !== v0.TRIANGLES && t.mode !== v0.TRIANGLE_STRIP && t.mode !== v0.TRIANGLE_FAN && t.mode !== void 0)
624
624
  return null;
625
625
  const r = H.extensions[this.name].attributes, f = [], c = {};
626
626
  for (const t in r)
627
627
  f.push(this.parser.getDependency("accessor", r[t]).then((d) => (c[t] = d, c[t])));
628
628
  return f.length < 1 ? null : (f.push(this.parser.createNodeMesh(e)), Promise.all(f).then((t) => {
629
629
  const d = t.pop(), o = d.isGroup ? d.children : [d], s = t[0].count, k = [];
630
- for (const l of o) {
631
- const u = new J0(), h = new y(), m = new d0(), g = new y(1, 1, 1), A = new p2(l.geometry, l.material, s);
632
- for (let p = 0; p < s; p++)
633
- c.TRANSLATION && h.fromBufferAttribute(c.TRANSLATION, p), c.ROTATION && m.fromBufferAttribute(c.ROTATION, p), c.SCALE && g.fromBufferAttribute(c.SCALE, p), A.setMatrixAt(p, u.compose(h, m, g));
634
- for (const p in c)
635
- if (p === "_COLOR_0") {
636
- const w = c[p];
637
- A.instanceColor = new m2(w.array, w.itemSize, w.normalized);
638
- } else p !== "TRANSLATION" && p !== "ROTATION" && p !== "SCALE" && l.geometry.setAttribute(p, c[p]);
639
- We.prototype.copy.call(A, l), this.parser.assignFinalMaterial(A), k.push(A);
630
+ for (const A of o) {
631
+ const _ = new De(), g = new j(), w = new $(), p = new j(1, 1, 1), m = new ja(A.geometry, A.material, s);
632
+ for (let I = 0; I < s; I++)
633
+ c.TRANSLATION && g.fromBufferAttribute(c.TRANSLATION, I), c.ROTATION && w.fromBufferAttribute(c.ROTATION, I), c.SCALE && p.fromBufferAttribute(c.SCALE, I), m.setMatrixAt(I, _.compose(g, w, p));
634
+ for (const I in c)
635
+ if (I === "_COLOR_0") {
636
+ const G = c[I];
637
+ m.instanceColor = new Ia(G.array, G.itemSize, G.normalized);
638
+ } else I !== "TRANSLATION" && I !== "ROTATION" && I !== "SCALE" && A.geometry.setAttribute(I, c[I]);
639
+ S2.prototype.copy.call(m, A), this.parser.assignFinalMaterial(m), k.push(m);
640
640
  }
641
641
  return d.isGroup ? (d.clear(), d.add(...k), d) : k[0];
642
642
  }));
643
643
  }
644
644
  }
645
- const Ye = "glTF", P0 = 12, Re = { JSON: 1313821514, BIN: 5130562 };
646
- class Fa {
645
+ const X2 = "glTF", le = 12, E2 = { JSON: 1313821514, BIN: 5130562 };
646
+ class Tb {
647
647
  constructor(e) {
648
- this.name = D.KHR_BINARY_GLTF, this.content = null, this.body = null;
649
- const a = new DataView(e, 0, P0), H = new TextDecoder();
648
+ this.name = x.KHR_BINARY_GLTF, this.content = null, this.body = null;
649
+ const a = new DataView(e, 0, le), H = new TextDecoder();
650
650
  if (this.header = {
651
651
  magic: H.decode(new Uint8Array(e.slice(0, 4))),
652
652
  version: a.getUint32(4, !0),
653
653
  length: a.getUint32(8, !0)
654
- }, this.header.magic !== Ye)
654
+ }, this.header.magic !== X2)
655
655
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
656
656
  if (this.header.version < 2)
657
657
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
658
- const b = this.header.length - P0, i = new DataView(e, P0);
658
+ const b = this.header.length - le, i = new DataView(e, le);
659
659
  let r = 0;
660
660
  for (; r < b; ) {
661
661
  const f = i.getUint32(r, !0);
662
662
  r += 4;
663
663
  const c = i.getUint32(r, !0);
664
- if (r += 4, c === Re.JSON) {
665
- const t = new Uint8Array(e, P0 + r, f);
664
+ if (r += 4, c === E2.JSON) {
665
+ const t = new Uint8Array(e, le + r, f);
666
666
  this.content = H.decode(t);
667
- } else if (c === Re.BIN) {
668
- const t = P0 + r;
667
+ } else if (c === E2.BIN) {
668
+ const t = le + r;
669
669
  this.body = e.slice(t, t + f);
670
670
  }
671
671
  r += f;
@@ -674,52 +674,52 @@ class Fa {
674
674
  throw new Error("THREE.GLTFLoader: JSON content not found.");
675
675
  }
676
676
  }
677
- class va {
677
+ class Rb {
678
678
  constructor(e, a) {
679
679
  if (!a)
680
680
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
681
- this.name = D.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = a, this.dracoLoader.preload();
681
+ this.name = x.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = a, this.dracoLoader.preload();
682
682
  }
683
683
  decodePrimitive(e, a) {
684
684
  const H = this.json, b = this.dracoLoader, i = e.extensions[this.name].bufferView, r = e.extensions[this.name].attributes, f = {}, c = {}, t = {};
685
685
  for (const d in r) {
686
- const o = de[d] || d.toLowerCase();
686
+ const o = a2[d] || d.toLowerCase();
687
687
  f[o] = r[d];
688
688
  }
689
689
  for (const d in e.attributes) {
690
- const o = de[d] || d.toLowerCase();
690
+ const o = a2[d] || d.toLowerCase();
691
691
  if (r[d] !== void 0) {
692
- const s = H.accessors[e.attributes[d]], k = E0[s.componentType];
692
+ const s = H.accessors[e.attributes[d]], k = fe[s.componentType];
693
693
  t[o] = k.name, c[o] = s.normalized === !0;
694
694
  }
695
695
  }
696
696
  return a.getDependency("bufferView", i).then(function(d) {
697
697
  return new Promise(function(o, s) {
698
698
  b.decodeDracoFile(d, function(k) {
699
- for (const l in k.attributes) {
700
- const u = k.attributes[l], h = c[l];
701
- h !== void 0 && (u.normalized = h);
699
+ for (const A in k.attributes) {
700
+ const _ = k.attributes[A], g = c[A];
701
+ g !== void 0 && (_.normalized = g);
702
702
  }
703
703
  o(k);
704
- }, f, t, l0, s);
704
+ }, f, t, E0, s);
705
705
  });
706
706
  });
707
707
  }
708
708
  }
709
- class Na {
709
+ class Mb {
710
710
  constructor() {
711
- this.name = D.KHR_TEXTURE_TRANSFORM;
711
+ this.name = x.KHR_TEXTURE_TRANSFORM;
712
712
  }
713
713
  extendTexture(e, a) {
714
714
  return (a.texCoord === void 0 || a.texCoord === e.channel) && a.offset === void 0 && a.rotation === void 0 && a.scale === void 0 || (e = e.clone(), a.texCoord !== void 0 && (e.channel = a.texCoord), a.offset !== void 0 && e.offset.fromArray(a.offset), a.rotation !== void 0 && (e.rotation = a.rotation), a.scale !== void 0 && e.repeat.fromArray(a.scale), e.needsUpdate = !0), e;
715
715
  }
716
716
  }
717
- class Ta {
717
+ class Db {
718
718
  constructor() {
719
- this.name = D.KHR_MESH_QUANTIZATION;
719
+ this.name = x.KHR_MESH_QUANTIZATION;
720
720
  }
721
721
  }
722
- class Ke extends Q2 {
722
+ class $2 extends Ya {
723
723
  constructor(e, a, H, b) {
724
724
  super(e, a, H, b);
725
725
  }
@@ -730,22 +730,22 @@ class Ke extends Q2 {
730
730
  return a;
731
731
  }
732
732
  interpolate_(e, a, H, b) {
733
- const i = this.resultBuffer, r = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, d = b - a, o = (H - a) / d, s = o * o, k = s * o, l = e * t, u = l - t, h = -2 * k + 3 * s, m = k - s, g = 1 - h, A = m - s + o;
734
- for (let p = 0; p !== f; p++) {
735
- const w = r[u + p + f], F = r[u + p + c] * d, v = r[l + p + f], B = r[l + p] * d;
736
- i[p] = g * w + A * F + h * v + m * B;
733
+ const i = this.resultBuffer, r = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, d = b - a, o = (H - a) / d, s = o * o, k = s * o, A = e * t, _ = A - t, g = -2 * k + 3 * s, w = k - s, p = 1 - g, m = w - s + o;
734
+ for (let I = 0; I !== f; I++) {
735
+ const G = r[_ + I + f], V = r[_ + I + c] * d, S = r[A + I + f], y0 = r[A + I] * d;
736
+ i[I] = p * G + m * V + g * S + w * y0;
737
737
  }
738
738
  return i;
739
739
  }
740
740
  }
741
- const Ra = new d0();
742
- class Ma extends Ke {
741
+ const Ob = new $();
742
+ class Eb extends $2 {
743
743
  interpolate_(e, a, H, b) {
744
744
  const i = super.interpolate_(e, a, H, b);
745
- return Ra.fromArray(i).normalize().toArray(i), i;
745
+ return Ob.fromArray(i).normalize().toArray(i), i;
746
746
  }
747
747
  }
748
- const t0 = {
748
+ const v0 = {
749
749
  POINTS: 0,
750
750
  LINES: 1,
751
751
  LINE_LOOP: 2,
@@ -753,25 +753,25 @@ const t0 = {
753
753
  TRIANGLES: 4,
754
754
  TRIANGLE_STRIP: 5,
755
755
  TRIANGLE_FAN: 6
756
- }, E0 = {
756
+ }, fe = {
757
757
  5120: Int8Array,
758
758
  5121: Uint8Array,
759
759
  5122: Int16Array,
760
760
  5123: Uint16Array,
761
761
  5125: Uint32Array,
762
762
  5126: Float32Array
763
- }, Me = {
764
- 9728: Le,
765
- 9729: fe,
766
- 9984: v2,
767
- 9985: F2,
768
- 9986: w2,
769
- 9987: Ce
770
- }, De = {
771
- 33071: T2,
772
- 33648: N2,
773
- 10497: te
774
- }, X0 = {
763
+ }, G2 = {
764
+ 9728: Q2,
765
+ 9729: Xe,
766
+ 9984: Ta,
767
+ 9985: Na,
768
+ 9986: va,
769
+ 9987: z2
770
+ }, U2 = {
771
+ 33071: Ma,
772
+ 33648: Ra,
773
+ 10497: $e
774
+ }, Ce = {
775
775
  SCALAR: 1,
776
776
  VEC2: 2,
777
777
  VEC3: 3,
@@ -779,7 +779,7 @@ const t0 = {
779
779
  MAT2: 4,
780
780
  MAT3: 9,
781
781
  MAT4: 16
782
- }, de = {
782
+ }, a2 = {
783
783
  POSITION: "position",
784
784
  NORMAL: "normal",
785
785
  TANGENT: "tangent",
@@ -790,41 +790,41 @@ const t0 = {
790
790
  COLOR_0: "color",
791
791
  WEIGHTS_0: "skinWeight",
792
792
  JOINTS_0: "skinIndex"
793
- }, _0 = {
793
+ }, Q0 = {
794
794
  scale: "scale",
795
795
  translation: "position",
796
796
  rotation: "quaternion",
797
797
  weights: "morphTargetInfluences"
798
- }, Da = {
798
+ }, Gb = {
799
799
  CUBICSPLINE: void 0,
800
800
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
801
801
  // keyframe track will be initialized with a default interpolation type, then modified.
802
- LINEAR: Qe,
803
- STEP: S2
804
- }, $0 = {
802
+ LINEAR: Y2,
803
+ STEP: Qa
804
+ }, Le = {
805
805
  OPAQUE: "OPAQUE",
806
806
  MASK: "MASK",
807
807
  BLEND: "BLEND"
808
808
  };
809
- function Oa(n) {
810
- return n.DefaultMaterial === void 0 && (n.DefaultMaterial = new Se({
809
+ function Ub(n) {
810
+ return n.DefaultMaterial === void 0 && (n.DefaultMaterial = new Z2({
811
811
  color: 16777215,
812
812
  emissive: 0,
813
813
  metalness: 1,
814
814
  roughness: 1,
815
815
  transparent: !1,
816
816
  depthTest: !0,
817
- side: Z2
817
+ side: Ja
818
818
  })), n.DefaultMaterial;
819
819
  }
820
- function N0(n, e, a) {
820
+ function X0(n, e, a) {
821
821
  for (const H in a.extensions)
822
822
  n[H] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[H] = a.extensions[H]);
823
823
  }
824
- function g0(n, e) {
824
+ function W0(n, e) {
825
825
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(n.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
826
826
  }
827
- function Ea(n, e, a) {
827
+ function xb(n, e, a) {
828
828
  let H = !1, b = !1, i = !1;
829
829
  for (let t = 0, d = e.length; t < d; t++) {
830
830
  const o = e[t];
@@ -856,7 +856,7 @@ function Ea(n, e, a) {
856
856
  return H && (n.morphAttributes.position = d), b && (n.morphAttributes.normal = o), i && (n.morphAttributes.color = s), n.morphTargetsRelative = !0, n;
857
857
  });
858
858
  }
859
- function Ga(n, e) {
859
+ function Pb(n, e) {
860
860
  if (n.updateMorphTargets(), e.weights !== void 0)
861
861
  for (let a = 0, H = e.weights.length; a < H; a++)
862
862
  n.morphTargetInfluences[a] = e.weights[a];
@@ -870,22 +870,22 @@ function Ga(n, e) {
870
870
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
871
871
  }
872
872
  }
873
- function Ua(n) {
873
+ function Bb(n) {
874
874
  let e;
875
- const a = n.extensions && n.extensions[D.KHR_DRACO_MESH_COMPRESSION];
876
- if (a ? e = "draco:" + a.bufferView + ":" + a.indices + ":" + ee(a.attributes) : e = n.indices + ":" + ee(n.attributes) + ":" + n.mode, n.targets !== void 0)
875
+ const a = n.extensions && n.extensions[x.KHR_DRACO_MESH_COMPRESSION];
876
+ if (a ? e = "draco:" + a.bufferView + ":" + a.indices + ":" + Se(a.attributes) : e = n.indices + ":" + Se(n.attributes) + ":" + n.mode, n.targets !== void 0)
877
877
  for (let H = 0, b = n.targets.length; H < b; H++)
878
- e += ":" + ee(n.targets[H]);
878
+ e += ":" + Se(n.targets[H]);
879
879
  return e;
880
880
  }
881
- function ee(n) {
881
+ function Se(n) {
882
882
  let e = "";
883
883
  const a = Object.keys(n).sort();
884
884
  for (let H = 0, b = a.length; H < b; H++)
885
885
  e += a[H] + ":" + n[a[H]] + ";";
886
886
  return e;
887
887
  }
888
- function oe(n) {
888
+ function b2(n) {
889
889
  switch (n) {
890
890
  case Int8Array:
891
891
  return 1 / 127;
@@ -899,13 +899,13 @@ function oe(n) {
899
899
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
900
900
  }
901
901
  }
902
- function xa(n) {
902
+ function qb(n) {
903
903
  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";
904
904
  }
905
- const Pa = new J0();
906
- class Ba {
905
+ const Wb = new De();
906
+ class Vb {
907
907
  constructor(e = {}, a = {}) {
908
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new fa(), 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
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = a, this.cache = new db(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
909
909
  let H = !1, b = -1, i = !1, r = -1;
910
910
  if (typeof navigator < "u") {
911
911
  const f = navigator.userAgent;
@@ -913,7 +913,7 @@ class Ba {
913
913
  const c = f.match(/Version\/(\d+)/);
914
914
  b = H && c ? parseInt(c[1], 10) : -1, i = f.indexOf("Firefox") > -1, r = i ? f.match(/Firefox\/([0-9]+)\./)[1] : -1;
915
915
  }
916
- typeof createImageBitmap > "u" || H && b < 17 || i && r < 98 ? this.textureLoader = new j2(this.options.manager) : this.textureLoader = new I2(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Q0(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
916
+ typeof createImageBitmap > "u" || H && b < 17 || i && r < 98 ? this.textureLoader = new ya(this.options.manager) : this.textureLoader = new wa(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Me(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
917
917
  }
918
918
  setExtensions(e) {
919
919
  this.extensions = e;
@@ -943,7 +943,7 @@ class Ba {
943
943
  parser: H,
944
944
  userData: {}
945
945
  };
946
- return N0(i, f, b), g0(f, b), Promise.all(H._invokeAll(function(c) {
946
+ return X0(i, f, b), W0(f, b), Promise.all(H._invokeAll(function(c) {
947
947
  return c.afterRoot && c.afterRoot(f);
948
948
  })).then(function() {
949
949
  for (const c of f.scenes)
@@ -1121,10 +1121,10 @@ class Ba {
1121
1121
  if (a.type && a.type !== "arraybuffer")
1122
1122
  throw new Error("THREE.GLTFLoader: " + a.type + " buffer type is not supported.");
1123
1123
  if (a.uri === void 0 && e === 0)
1124
- return Promise.resolve(this.extensions[D.KHR_BINARY_GLTF].body);
1124
+ return Promise.resolve(this.extensions[x.KHR_BINARY_GLTF].body);
1125
1125
  const b = this.options;
1126
1126
  return new Promise(function(i, r) {
1127
- H.load(q0.resolveURL(a.uri, b.path), i, void 0, function() {
1127
+ H.load(he.resolveURL(a.uri, b.path), i, void 0, function() {
1128
1128
  r(new Error('THREE.GLTFLoader: Failed to load buffer "' + a.uri + '".'));
1129
1129
  });
1130
1130
  });
@@ -1153,29 +1153,29 @@ class Ba {
1153
1153
  loadAccessor(e) {
1154
1154
  const a = this, H = this.json, b = this.json.accessors[e];
1155
1155
  if (b.bufferView === void 0 && b.sparse === void 0) {
1156
- const r = X0[b.type], f = E0[b.componentType], c = b.normalized === !0, t = new f(b.count * r);
1157
- return Promise.resolve(new V0(t, r, c));
1156
+ const r = Ce[b.type], f = fe[b.componentType], c = b.normalized === !0, t = new f(b.count * r);
1157
+ return Promise.resolve(new ge(t, r, c));
1158
1158
  }
1159
1159
  const i = [];
1160
1160
  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(r) {
1161
- const f = r[0], c = X0[b.type], t = E0[b.componentType], d = t.BYTES_PER_ELEMENT, o = d * c, s = b.byteOffset || 0, k = b.bufferView !== void 0 ? H.bufferViews[b.bufferView].byteStride : void 0, l = b.normalized === !0;
1162
- let u, h;
1161
+ const f = r[0], c = Ce[b.type], t = fe[b.componentType], d = t.BYTES_PER_ELEMENT, o = d * c, s = b.byteOffset || 0, k = b.bufferView !== void 0 ? H.bufferViews[b.bufferView].byteStride : void 0, A = b.normalized === !0;
1162
+ let _, g;
1163
1163
  if (k && k !== o) {
1164
- const m = Math.floor(s / k), g = "InterleavedBuffer:" + b.bufferView + ":" + b.componentType + ":" + m + ":" + b.count;
1165
- let A = a.cache.get(g);
1166
- A || (u = new t(f, m * k, b.count * k / d), A = new y2(u, k / d), a.cache.add(g, A)), h = new z2(A, c, s % k / d, l);
1164
+ const w = Math.floor(s / k), p = "InterleavedBuffer:" + b.bufferView + ":" + b.componentType + ":" + w + ":" + b.count;
1165
+ let m = a.cache.get(p);
1166
+ m || (_ = new t(f, w * k, b.count * k / d), m = new Fa(_, k / d), a.cache.add(p, m)), g = new Za(m, c, s % k / d, A);
1167
1167
  } else
1168
- f === null ? u = new t(b.count * c) : u = new t(f, s, b.count * c), h = new V0(u, c, l);
1168
+ f === null ? _ = new t(b.count * c) : _ = new t(f, s, b.count * c), g = new ge(_, c, A);
1169
1169
  if (b.sparse !== void 0) {
1170
- const m = X0.SCALAR, g = E0[b.sparse.indices.componentType], A = b.sparse.indices.byteOffset || 0, p = b.sparse.values.byteOffset || 0, w = new g(r[1], A, b.sparse.count * m), F = new t(r[2], p, b.sparse.count * c);
1171
- f !== null && (h = new V0(h.array.slice(), h.itemSize, h.normalized)), h.normalized = !1;
1172
- for (let v = 0, B = w.length; v < B; v++) {
1173
- const W = w[v];
1174
- if (h.setX(W, F[v * c]), c >= 2 && h.setY(W, F[v * c + 1]), c >= 3 && h.setZ(W, F[v * c + 2]), c >= 4 && h.setW(W, F[v * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1170
+ const w = Ce.SCALAR, p = fe[b.sparse.indices.componentType], m = b.sparse.indices.byteOffset || 0, I = b.sparse.values.byteOffset || 0, G = new p(r[1], m, b.sparse.count * w), V = new t(r[2], I, b.sparse.count * c);
1171
+ f !== null && (g = new ge(g.array.slice(), g.itemSize, g.normalized)), g.normalized = !1;
1172
+ for (let S = 0, y0 = G.length; S < y0; S++) {
1173
+ const o0 = G[S];
1174
+ if (g.setX(o0, V[S * c]), c >= 2 && g.setY(o0, V[S * c + 1]), c >= 3 && g.setZ(o0, V[S * c + 2]), c >= 4 && g.setW(o0, V[S * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1175
1175
  }
1176
- h.normalized = l;
1176
+ g.normalized = A;
1177
1177
  }
1178
- return h;
1178
+ return g;
1179
1179
  });
1180
1180
  }
1181
1181
  /**
@@ -1201,7 +1201,7 @@ class Ba {
1201
1201
  const t = this.loadImageSource(a, H).then(function(d) {
1202
1202
  d.flipY = !1, d.name = r.name || f.name || "", d.name === "" && typeof f.uri == "string" && f.uri.startsWith("data:image/") === !1 && (d.name = f.uri);
1203
1203
  const s = (i.samplers || {})[r.sampler] || {};
1204
- return d.magFilter = Me[s.magFilter] || fe, d.minFilter = Me[s.minFilter] || Ce, d.wrapS = De[s.wrapS] || te, d.wrapT = De[s.wrapT] || te, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Le && d.minFilter !== fe, b.associations.set(d, { textures: e }), d;
1204
+ return d.magFilter = G2[s.magFilter] || Xe, d.minFilter = G2[s.minFilter] || z2, d.wrapS = U2[s.wrapS] || $e, d.wrapT = U2[s.wrapT] || $e, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Q2 && d.minFilter !== Xe, b.associations.set(d, { textures: e }), d;
1205
1205
  }).catch(function() {
1206
1206
  return null;
1207
1207
  });
@@ -1223,14 +1223,14 @@ class Ba {
1223
1223
  throw new Error("THREE.GLTFLoader: Image " + e + " is missing URI and bufferView");
1224
1224
  const d = Promise.resolve(c).then(function(o) {
1225
1225
  return new Promise(function(s, k) {
1226
- let l = s;
1227
- a.isImageBitmapLoader === !0 && (l = function(u) {
1228
- const h = new ye(u);
1229
- h.needsUpdate = !0, s(h);
1230
- }), a.load(q0.resolveURL(o, i.path), l, void 0, k);
1226
+ let A = s;
1227
+ a.isImageBitmapLoader === !0 && (A = function(_) {
1228
+ const g = new N2(_);
1229
+ g.needsUpdate = !0, s(g);
1230
+ }), a.load(he.resolveURL(o, i.path), A, void 0, k);
1231
1231
  });
1232
1232
  }).then(function(o) {
1233
- return t === !0 && f.revokeObjectURL(c), g0(o, r), o.userData.mimeType = r.mimeType || xa(r.uri), o;
1233
+ return t === !0 && f.revokeObjectURL(c), W0(o, r), o.userData.mimeType = r.mimeType || qb(r.uri), o;
1234
1234
  }).catch(function(o) {
1235
1235
  throw console.error("THREE.GLTFLoader: Couldn't load texture", c), o;
1236
1236
  });
@@ -1250,11 +1250,11 @@ class Ba {
1250
1250
  const i = this;
1251
1251
  return this.getDependency("texture", H.index).then(function(r) {
1252
1252
  if (!r) return null;
1253
- if (H.texCoord !== void 0 && H.texCoord > 0 && (r = r.clone(), r.channel = H.texCoord), i.extensions[D.KHR_TEXTURE_TRANSFORM]) {
1254
- const f = H.extensions !== void 0 ? H.extensions[D.KHR_TEXTURE_TRANSFORM] : void 0;
1253
+ if (H.texCoord !== void 0 && H.texCoord > 0 && (r = r.clone(), r.channel = H.texCoord), i.extensions[x.KHR_TEXTURE_TRANSFORM]) {
1254
+ const f = H.extensions !== void 0 ? H.extensions[x.KHR_TEXTURE_TRANSFORM] : void 0;
1255
1255
  if (f) {
1256
1256
  const c = i.associations.get(r);
1257
- r = i.extensions[D.KHR_TEXTURE_TRANSFORM].extendTexture(r, f), i.associations.set(r, c);
1257
+ r = i.extensions[x.KHR_TEXTURE_TRANSFORM].extendTexture(r, f), i.associations.set(r, c);
1258
1258
  }
1259
1259
  }
1260
1260
  return b !== void 0 && (r.colorSpace = b), e[a] = r, r;
@@ -1277,11 +1277,11 @@ class Ba {
1277
1277
  if (e.isPoints) {
1278
1278
  const f = "PointsMaterial:" + H.uuid;
1279
1279
  let c = this.cache.get(f);
1280
- c || (c = new R2(), K0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, c.sizeAttenuation = !1, this.cache.add(f, c)), H = c;
1280
+ c || (c = new Da(), We.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, c.sizeAttenuation = !1, this.cache.add(f, c)), H = c;
1281
1281
  } else if (e.isLine) {
1282
1282
  const f = "LineBasicMaterial:" + H.uuid;
1283
1283
  let c = this.cache.get(f);
1284
- c || (c = new M2(), K0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, this.cache.add(f, c)), H = c;
1284
+ c || (c = new Oa(), We.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, this.cache.add(f, c)), H = c;
1285
1285
  }
1286
1286
  if (b || i || r) {
1287
1287
  let f = "ClonedMaterial:" + H.uuid + ":";
@@ -1292,7 +1292,7 @@ class Ba {
1292
1292
  e.material = H;
1293
1293
  }
1294
1294
  getMaterialType() {
1295
- return Se;
1295
+ return Z2;
1296
1296
  }
1297
1297
  /**
1298
1298
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1305,34 +1305,34 @@ class Ba {
1305
1305
  const a = this, H = this.json, b = this.extensions, i = H.materials[e];
1306
1306
  let r;
1307
1307
  const f = {}, c = i.extensions || {}, t = [];
1308
- if (c[D.KHR_MATERIALS_UNLIT]) {
1309
- const o = b[D.KHR_MATERIALS_UNLIT];
1308
+ if (c[x.KHR_MATERIALS_UNLIT]) {
1309
+ const o = b[x.KHR_MATERIALS_UNLIT];
1310
1310
  r = o.getMaterialType(), t.push(o.extendParams(f, i, a));
1311
1311
  } else {
1312
1312
  const o = i.pbrMetallicRoughness || {};
1313
- if (f.color = new k0(1, 1, 1), f.opacity = 1, Array.isArray(o.baseColorFactor)) {
1313
+ if (f.color = new O0(1, 1, 1), f.opacity = 1, Array.isArray(o.baseColorFactor)) {
1314
1314
  const s = o.baseColorFactor;
1315
- f.color.setRGB(s[0], s[1], s[2], l0), f.opacity = s[3];
1315
+ f.color.setRGB(s[0], s[1], s[2], E0), f.opacity = s[3];
1316
1316
  }
1317
- 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))), r = this._invokeOne(function(s) {
1317
+ o.baseColorTexture !== void 0 && t.push(a.assignTexture(f, "map", o.baseColorTexture, Z0)), 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))), r = this._invokeOne(function(s) {
1318
1318
  return s.getMaterialType && s.getMaterialType(e);
1319
1319
  }), t.push(Promise.all(this._invokeAll(function(s) {
1320
1320
  return s.extendMaterialParams && s.extendMaterialParams(e, f);
1321
1321
  })));
1322
1322
  }
1323
- i.doubleSided === !0 && (f.side = D2);
1324
- const d = i.alphaMode || $0.OPAQUE;
1325
- if (d === $0.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, d === $0.MASK && (f.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !== B0 && (t.push(a.assignTexture(f, "normalMap", i.normalTexture)), f.normalScale = new ue(1, 1), i.normalTexture.scale !== void 0)) {
1323
+ i.doubleSided === !0 && (f.side = Ea);
1324
+ const d = i.alphaMode || Le.OPAQUE;
1325
+ if (d === Le.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, d === Le.MASK && (f.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !== ue && (t.push(a.assignTexture(f, "normalMap", i.normalTexture)), f.normalScale = new r2(1, 1), i.normalTexture.scale !== void 0)) {
1326
1326
  const o = i.normalTexture.scale;
1327
1327
  f.normalScale.set(o, o);
1328
1328
  }
1329
- if (i.occlusionTexture !== void 0 && r !== B0 && (t.push(a.assignTexture(f, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== B0) {
1329
+ if (i.occlusionTexture !== void 0 && r !== ue && (t.push(a.assignTexture(f, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== ue) {
1330
1330
  const o = i.emissiveFactor;
1331
- f.emissive = new k0().setRGB(o[0], o[1], o[2], l0);
1331
+ f.emissive = new O0().setRGB(o[0], o[1], o[2], E0);
1332
1332
  }
1333
- return i.emissiveTexture !== void 0 && r !== B0 && t.push(a.assignTexture(f, "emissiveMap", i.emissiveTexture, A0)), Promise.all(t).then(function() {
1333
+ return i.emissiveTexture !== void 0 && r !== ue && t.push(a.assignTexture(f, "emissiveMap", i.emissiveTexture, Z0)), Promise.all(t).then(function() {
1334
1334
  const o = new r(f);
1335
- return i.name && (o.name = i.name), g0(o, i), a.associations.set(o, { materials: e }), i.extensions && N0(b, o, i), o;
1335
+ return i.name && (o.name = i.name), W0(o, i), a.associations.set(o, { materials: e }), i.extensions && X0(b, o, i), o;
1336
1336
  });
1337
1337
  }
1338
1338
  /**
@@ -1343,7 +1343,7 @@ class Ba {
1343
1343
  * @return {string}
1344
1344
  */
1345
1345
  createUniqueName(e) {
1346
- const a = O2.sanitizeNodeName(e || "");
1346
+ const a = Ga.sanitizeNodeName(e || "");
1347
1347
  return a in this.nodeNamesUsed ? a + "_" + ++this.nodeNamesUsed[a] : (this.nodeNamesUsed[a] = 0, a);
1348
1348
  }
1349
1349
  /**
@@ -1358,18 +1358,18 @@ class Ba {
1358
1358
  loadGeometries(e) {
1359
1359
  const a = this, H = this.extensions, b = this.primitiveCache;
1360
1360
  function i(f) {
1361
- return H[D.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(f, a).then(function(c) {
1362
- return Oe(c, f, a);
1361
+ return H[x.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(f, a).then(function(c) {
1362
+ return x2(c, f, a);
1363
1363
  });
1364
1364
  }
1365
1365
  const r = [];
1366
1366
  for (let f = 0, c = e.length; f < c; f++) {
1367
- const t = e[f], d = Ua(t), o = b[d];
1367
+ const t = e[f], d = Bb(t), o = b[d];
1368
1368
  if (o)
1369
1369
  r.push(o.promise);
1370
1370
  else {
1371
1371
  let s;
1372
- t.extensions && t.extensions[D.KHR_DRACO_MESH_COMPRESSION] ? s = i(t) : s = Oe(new ze(), t, a), b[d] = { primitive: t, promise: s }, r.push(s);
1372
+ t.extensions && t.extensions[x.KHR_DRACO_MESH_COMPRESSION] ? s = i(t) : s = x2(new J2(), t, a), b[d] = { primitive: t, promise: s }, r.push(s);
1373
1373
  }
1374
1374
  }
1375
1375
  return Promise.all(r);
@@ -1384,39 +1384,39 @@ class Ba {
1384
1384
  loadMesh(e) {
1385
1385
  const a = this, H = this.json, b = this.extensions, i = H.meshes[e], r = i.primitives, f = [];
1386
1386
  for (let c = 0, t = r.length; c < t; c++) {
1387
- const d = r[c].material === void 0 ? Oa(this.cache) : this.getDependency("material", r[c].material);
1387
+ const d = r[c].material === void 0 ? Ub(this.cache) : this.getDependency("material", r[c].material);
1388
1388
  f.push(d);
1389
1389
  }
1390
1390
  return f.push(a.loadGeometries(r)), Promise.all(f).then(function(c) {
1391
1391
  const t = c.slice(0, c.length - 1), d = c[c.length - 1], o = [];
1392
- for (let k = 0, l = d.length; k < l; k++) {
1393
- const u = d[k], h = r[k];
1394
- let m;
1395
- const g = t[k];
1396
- if (h.mode === t0.TRIANGLES || h.mode === t0.TRIANGLE_STRIP || h.mode === t0.TRIANGLE_FAN || h.mode === void 0)
1397
- m = i.isSkinnedMesh === !0 ? new E2(u, g) : new Ze(u, g), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), h.mode === t0.TRIANGLE_STRIP ? m.geometry = Te(m.geometry, qe) : h.mode === t0.TRIANGLE_FAN && (m.geometry = Te(m.geometry, ce));
1398
- else if (h.mode === t0.LINES)
1399
- m = new G2(u, g);
1400
- else if (h.mode === t0.LINE_STRIP)
1401
- m = new U2(u, g);
1402
- else if (h.mode === t0.LINE_LOOP)
1403
- m = new x2(u, g);
1404
- else if (h.mode === t0.POINTS)
1405
- m = new P2(u, g);
1392
+ for (let k = 0, A = d.length; k < A; k++) {
1393
+ const _ = d[k], g = r[k];
1394
+ let w;
1395
+ const p = t[k];
1396
+ if (g.mode === v0.TRIANGLES || g.mode === v0.TRIANGLE_STRIP || g.mode === v0.TRIANGLE_FAN || g.mode === void 0)
1397
+ w = i.isSkinnedMesh === !0 ? new Ua(_, p) : new H2(_, p), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), g.mode === v0.TRIANGLE_STRIP ? w.geometry = O2(w.geometry, C2) : g.mode === v0.TRIANGLE_FAN && (w.geometry = O2(w.geometry, Ke));
1398
+ else if (g.mode === v0.LINES)
1399
+ w = new xa(_, p);
1400
+ else if (g.mode === v0.LINE_STRIP)
1401
+ w = new Pa(_, p);
1402
+ else if (g.mode === v0.LINE_LOOP)
1403
+ w = new Ba(_, p);
1404
+ else if (g.mode === v0.POINTS)
1405
+ w = new qa(_, p);
1406
1406
  else
1407
- throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + h.mode);
1408
- Object.keys(m.geometry.morphAttributes).length > 0 && Ga(m, i), m.name = a.createUniqueName(i.name || "mesh_" + e), g0(m, i), h.extensions && N0(b, m, h), a.assignFinalMaterial(m), o.push(m);
1407
+ throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
1408
+ Object.keys(w.geometry.morphAttributes).length > 0 && Pb(w, i), w.name = a.createUniqueName(i.name || "mesh_" + e), W0(w, i), g.extensions && X0(b, w, g), a.assignFinalMaterial(w), o.push(w);
1409
1409
  }
1410
- for (let k = 0, l = o.length; k < l; k++)
1410
+ for (let k = 0, A = o.length; k < A; k++)
1411
1411
  a.associations.set(o[k], {
1412
1412
  meshes: e,
1413
1413
  primitives: k
1414
1414
  });
1415
1415
  if (o.length === 1)
1416
- return i.extensions && N0(b, o[0], i), o[0];
1417
- const s = new Z0();
1418
- i.extensions && N0(b, s, i), a.associations.set(s, { meshes: e });
1419
- for (let k = 0, l = o.length; k < l; k++)
1416
+ return i.extensions && X0(b, o[0], i), o[0];
1417
+ const s = new Ve();
1418
+ i.extensions && X0(b, s, i), a.associations.set(s, { meshes: e });
1419
+ for (let k = 0, A = o.length; k < A; k++)
1420
1420
  s.add(o[k]);
1421
1421
  return s;
1422
1422
  });
@@ -1435,7 +1435,7 @@ class Ba {
1435
1435
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1436
1436
  return;
1437
1437
  }
1438
- return H.type === "perspective" ? a = new B2(q2.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : H.type === "orthographic" && (a = new V2(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), H.name && (a.name = this.createUniqueName(H.name)), g0(a, H), Promise.resolve(a);
1438
+ return H.type === "perspective" ? a = new Wa(Va.radToDeg(b.yfov), b.aspectRatio || 1, b.znear || 1, b.zfar || 2e6) : H.type === "orthographic" && (a = new Ca(-b.xmag, b.xmag, b.ymag, -b.ymag, b.znear, b.zfar)), H.name && (a.name = this.createUniqueName(H.name)), W0(a, H), Promise.resolve(a);
1439
1439
  }
1440
1440
  /**
1441
1441
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1454,12 +1454,12 @@ class Ba {
1454
1454
  const o = r[t];
1455
1455
  if (o) {
1456
1456
  f.push(o);
1457
- const s = new J0();
1457
+ const s = new De();
1458
1458
  i !== null && s.fromArray(i.array, t * 16), c.push(s);
1459
1459
  } else
1460
1460
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', a.joints[t]);
1461
1461
  }
1462
- return new W2(f, c);
1462
+ return new La(f, c);
1463
1463
  });
1464
1464
  }
1465
1465
  /**
@@ -1472,8 +1472,8 @@ class Ba {
1472
1472
  loadAnimation(e) {
1473
1473
  const a = this.json, H = this, b = a.animations[e], i = b.name ? b.name : "animation_" + e, r = [], f = [], c = [], t = [], d = [];
1474
1474
  for (let o = 0, s = b.channels.length; o < s; o++) {
1475
- const k = b.channels[o], l = b.samplers[k.sampler], u = k.target, h = u.node, m = b.parameters !== void 0 ? b.parameters[l.input] : l.input, g = b.parameters !== void 0 ? b.parameters[l.output] : l.output;
1476
- u.node !== void 0 && (r.push(this.getDependency("node", h)), f.push(this.getDependency("accessor", m)), c.push(this.getDependency("accessor", g)), t.push(l), d.push(u));
1475
+ const k = b.channels[o], A = b.samplers[k.sampler], _ = k.target, g = _.node, w = b.parameters !== void 0 ? b.parameters[A.input] : A.input, p = b.parameters !== void 0 ? b.parameters[A.output] : A.output;
1476
+ _.node !== void 0 && (r.push(this.getDependency("node", g)), f.push(this.getDependency("accessor", w)), c.push(this.getDependency("accessor", p)), t.push(A), d.push(_));
1477
1477
  }
1478
1478
  return Promise.all([
1479
1479
  Promise.all(r),
@@ -1482,17 +1482,17 @@ class Ba {
1482
1482
  Promise.all(t),
1483
1483
  Promise.all(d)
1484
1484
  ]).then(function(o) {
1485
- const s = o[0], k = o[1], l = o[2], u = o[3], h = o[4], m = [];
1486
- for (let g = 0, A = s.length; g < A; g++) {
1487
- const p = s[g], w = k[g], F = l[g], v = u[g], B = h[g];
1488
- if (p === void 0) continue;
1489
- p.updateMatrix && p.updateMatrix();
1490
- const W = H._createAnimationTracks(p, w, F, v, B);
1491
- if (W)
1492
- for (let E = 0; E < W.length; E++)
1493
- m.push(W[E]);
1485
+ const s = o[0], k = o[1], A = o[2], _ = o[3], g = o[4], w = [];
1486
+ for (let p = 0, m = s.length; p < m; p++) {
1487
+ const I = s[p], G = k[p], V = A[p], S = _[p], y0 = g[p];
1488
+ if (I === void 0) continue;
1489
+ I.updateMatrix && I.updateMatrix();
1490
+ const o0 = H._createAnimationTracks(I, G, V, S, y0);
1491
+ if (o0)
1492
+ for (let l0 = 0; l0 < o0.length; l0++)
1493
+ w.push(o0[l0]);
1494
1494
  }
1495
- return new C2(i, void 0, m);
1495
+ return new Sa(i, void 0, w);
1496
1496
  });
1497
1497
  }
1498
1498
  createNodeMesh(e) {
@@ -1525,9 +1525,9 @@ class Ba {
1525
1525
  ]).then(function(t) {
1526
1526
  const d = t[0], o = t[1], s = t[2];
1527
1527
  s !== null && d.traverse(function(k) {
1528
- k.isSkinnedMesh && k.bind(s, Pa);
1528
+ k.isSkinnedMesh && k.bind(s, Wb);
1529
1529
  });
1530
- for (let k = 0, l = o.length; k < l; k++)
1530
+ for (let k = 0, A = o.length; k < A; k++)
1531
1531
  d.add(o[k]);
1532
1532
  return d;
1533
1533
  });
@@ -1549,11 +1549,11 @@ class Ba {
1549
1549
  f.push(t);
1550
1550
  }), this.nodeCache[e] = Promise.all(f).then(function(t) {
1551
1551
  let d;
1552
- if (i.isBone === !0 ? d = new L2() : t.length > 1 ? d = new Z0() : t.length === 1 ? d = t[0] : d = new We(), d !== t[0])
1552
+ if (i.isBone === !0 ? d = new za() : t.length > 1 ? d = new Ve() : t.length === 1 ? d = t[0] : d = new S2(), d !== t[0])
1553
1553
  for (let o = 0, s = t.length; o < s; o++)
1554
1554
  d.add(t[o]);
1555
- if (i.name && (d.userData.name = i.name, d.name = r), g0(d, i), i.extensions && N0(H, d, i), i.matrix !== void 0) {
1556
- const o = new J0();
1555
+ if (i.name && (d.userData.name = i.name, d.name = r), W0(d, i), i.extensions && X0(H, d, i), i.matrix !== void 0) {
1556
+ const o = new De();
1557
1557
  o.fromArray(i.matrix), d.applyMatrix4(o);
1558
1558
  } else
1559
1559
  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);
@@ -1574,8 +1574,8 @@ class Ba {
1574
1574
  * @return {Promise<Group>}
1575
1575
  */
1576
1576
  loadScene(e) {
1577
- const a = this.extensions, H = this.json.scenes[e], b = this, i = new Z0();
1578
- H.name && (i.name = b.createUniqueName(H.name)), g0(i, H), H.extensions && N0(a, i, H);
1577
+ const a = this.extensions, H = this.json.scenes[e], b = this, i = new Ve();
1578
+ H.name && (i.name = b.createUniqueName(H.name)), W0(i, H), H.extensions && X0(a, i, H);
1579
1579
  const r = H.nodes || [], f = [];
1580
1580
  for (let c = 0, t = r.length; c < t; c++)
1581
1581
  f.push(b.getDependency("node", r[c]));
@@ -1585,7 +1585,7 @@ class Ba {
1585
1585
  const t = (d) => {
1586
1586
  const o = /* @__PURE__ */ new Map();
1587
1587
  for (const [s, k] of b.associations)
1588
- (s instanceof K0 || s instanceof ye) && o.set(s, k);
1588
+ (s instanceof We || s instanceof N2) && o.set(s, k);
1589
1589
  return d.traverse((s) => {
1590
1590
  const k = b.associations.get(s);
1591
1591
  k != null && o.set(s, k);
@@ -1596,50 +1596,50 @@ class Ba {
1596
1596
  }
1597
1597
  _createAnimationTracks(e, a, H, b, i) {
1598
1598
  const r = [], f = e.name ? e.name : e.uuid, c = [];
1599
- _0[i.path] === _0.weights ? e.traverse(function(s) {
1599
+ Q0[i.path] === Q0.weights ? e.traverse(function(s) {
1600
1600
  s.morphTargetInfluences && c.push(s.name ? s.name : s.uuid);
1601
1601
  }) : c.push(f);
1602
1602
  let t;
1603
- switch (_0[i.path]) {
1604
- case _0.weights:
1605
- t = Fe;
1603
+ switch (Q0[i.path]) {
1604
+ case Q0.weights:
1605
+ t = R2;
1606
1606
  break;
1607
- case _0.rotation:
1608
- t = ve;
1607
+ case Q0.rotation:
1608
+ t = M2;
1609
1609
  break;
1610
- case _0.translation:
1611
- case _0.scale:
1612
- t = we;
1610
+ case Q0.translation:
1611
+ case Q0.scale:
1612
+ t = T2;
1613
1613
  break;
1614
1614
  default:
1615
1615
  switch (H.itemSize) {
1616
1616
  case 1:
1617
- t = Fe;
1617
+ t = R2;
1618
1618
  break;
1619
1619
  case 2:
1620
1620
  case 3:
1621
1621
  default:
1622
- t = we;
1622
+ t = T2;
1623
1623
  break;
1624
1624
  }
1625
1625
  break;
1626
1626
  }
1627
- const d = b.interpolation !== void 0 ? Da[b.interpolation] : Qe, o = this._getArrayFromAccessor(H);
1627
+ const d = b.interpolation !== void 0 ? Gb[b.interpolation] : Y2, o = this._getArrayFromAccessor(H);
1628
1628
  for (let s = 0, k = c.length; s < k; s++) {
1629
- const l = new t(
1630
- c[s] + "." + _0[i.path],
1629
+ const A = new t(
1630
+ c[s] + "." + Q0[i.path],
1631
1631
  a.array,
1632
1632
  o,
1633
1633
  d
1634
1634
  );
1635
- b.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(l), r.push(l);
1635
+ b.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(A), r.push(A);
1636
1636
  }
1637
1637
  return r;
1638
1638
  }
1639
1639
  _getArrayFromAccessor(e) {
1640
1640
  let a = e.array;
1641
1641
  if (e.normalized) {
1642
- const H = oe(a.constructor), b = new Float32Array(a.length);
1642
+ const H = b2(a.constructor), b = new Float32Array(a.length);
1643
1643
  for (let i = 0, r = a.length; i < r; i++)
1644
1644
  b[i] = a[i] * H;
1645
1645
  a = b;
@@ -1648,21 +1648,21 @@ class Ba {
1648
1648
  }
1649
1649
  _createCubicSplineTrackInterpolant(e) {
1650
1650
  e.createInterpolant = function(H) {
1651
- const b = this instanceof ve ? Ma : Ke;
1651
+ const b = this instanceof M2 ? Eb : $2;
1652
1652
  return new b(this.times, this.values, this.getValueSize() / 3, H);
1653
1653
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1654
1654
  }
1655
1655
  }
1656
- function qa(n, e, a) {
1657
- const H = e.attributes, b = new W0();
1656
+ function Cb(n, e, a) {
1657
+ const H = e.attributes, b = new _e();
1658
1658
  if (H.POSITION !== void 0) {
1659
1659
  const f = a.json.accessors[H.POSITION], c = f.min, t = f.max;
1660
1660
  if (c !== void 0 && t !== void 0) {
1661
1661
  if (b.set(
1662
- new y(c[0], c[1], c[2]),
1663
- new y(t[0], t[1], t[2])
1662
+ new j(c[0], c[1], c[2]),
1663
+ new j(t[0], t[1], t[2])
1664
1664
  ), f.normalized) {
1665
- const d = oe(E0[f.componentType]);
1665
+ const d = b2(fe[f.componentType]);
1666
1666
  b.min.multiplyScalar(d), b.max.multiplyScalar(d);
1667
1667
  }
1668
1668
  } else {
@@ -1673,15 +1673,15 @@ function qa(n, e, a) {
1673
1673
  return;
1674
1674
  const i = e.targets;
1675
1675
  if (i !== void 0) {
1676
- const f = new y(), c = new y();
1676
+ const f = new j(), c = new j();
1677
1677
  for (let t = 0, d = i.length; t < d; t++) {
1678
1678
  const o = i[t];
1679
1679
  if (o.POSITION !== void 0) {
1680
- const s = a.json.accessors[o.POSITION], k = s.min, l = s.max;
1681
- if (k !== void 0 && l !== void 0) {
1682
- if (c.setX(Math.max(Math.abs(k[0]), Math.abs(l[0]))), c.setY(Math.max(Math.abs(k[1]), Math.abs(l[1]))), c.setZ(Math.max(Math.abs(k[2]), Math.abs(l[2]))), s.normalized) {
1683
- const u = oe(E0[s.componentType]);
1684
- c.multiplyScalar(u);
1680
+ const s = a.json.accessors[o.POSITION], k = s.min, A = s.max;
1681
+ if (k !== void 0 && A !== void 0) {
1682
+ if (c.setX(Math.max(Math.abs(k[0]), Math.abs(A[0]))), c.setY(Math.max(Math.abs(k[1]), Math.abs(A[1]))), c.setZ(Math.max(Math.abs(k[2]), Math.abs(A[2]))), s.normalized) {
1683
+ const _ = b2(fe[s.componentType]);
1684
+ c.multiplyScalar(_);
1685
1685
  }
1686
1686
  f.max(c);
1687
1687
  } else
@@ -1691,10 +1691,10 @@ function qa(n, e, a) {
1691
1691
  b.expandByVector(f);
1692
1692
  }
1693
1693
  n.boundingBox = b;
1694
- const r = new J2();
1694
+ const r = new Ka();
1695
1695
  b.getCenter(r.center), r.radius = b.min.distanceTo(b.max) / 2, n.boundingSphere = r;
1696
1696
  }
1697
- function Oe(n, e, a) {
1697
+ function x2(n, e, a) {
1698
1698
  const H = e.attributes, b = [];
1699
1699
  function i(r, f) {
1700
1700
  return a.getDependency("accessor", r).then(function(c) {
@@ -1702,7 +1702,7 @@ function Oe(n, e, a) {
1702
1702
  });
1703
1703
  }
1704
1704
  for (const r in H) {
1705
- const f = de[r] || r.toLowerCase();
1705
+ const f = a2[r] || r.toLowerCase();
1706
1706
  f in n.attributes || b.push(i(H[r], f));
1707
1707
  }
1708
1708
  if (e.indices !== void 0 && !n.index) {
@@ -1711,12 +1711,12 @@ function Oe(n, e, a) {
1711
1711
  });
1712
1712
  b.push(r);
1713
1713
  }
1714
- return ne.workingColorSpace !== l0 && "COLOR_0" in H && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ne.workingColorSpace}" not supported.`), g0(n, e), qa(n, e, a), Promise.all(b).then(function() {
1715
- return e.targets !== void 0 ? Ea(n, e.targets, a) : n;
1714
+ return e2.workingColorSpace !== E0 && "COLOR_0" in H && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${e2.workingColorSpace}" not supported.`), W0(n, e), Cb(n, e, a), Promise.all(b).then(function() {
1715
+ return e.targets !== void 0 ? xb(n, e.targets, a) : n;
1716
1716
  });
1717
1717
  }
1718
- const ae = /* @__PURE__ */ new WeakMap();
1719
- class Va extends Ve {
1718
+ const ze = /* @__PURE__ */ new WeakMap();
1719
+ class Lb extends L2 {
1720
1720
  /**
1721
1721
  * Constructs a new Draco loader.
1722
1722
  *
@@ -1773,7 +1773,7 @@ class Va extends Ve {
1773
1773
  * @param {onErrorCallback} onError - Executed when errors occur.
1774
1774
  */
1775
1775
  load(e, a, H, b) {
1776
- const i = new Q0(this.manager);
1776
+ const i = new Me(this.manager);
1777
1777
  i.setPath(this.path), i.setResponseType("arraybuffer"), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, (r) => {
1778
1778
  this.parse(r, a, b);
1779
1779
  }, H, b);
@@ -1787,10 +1787,10 @@ class Va extends Ve {
1787
1787
  */
1788
1788
  parse(e, a, H = () => {
1789
1789
  }) {
1790
- this.decodeDracoFile(e, a, null, null, A0, H).catch(H);
1790
+ this.decodeDracoFile(e, a, null, null, Z0, H).catch(H);
1791
1791
  }
1792
1792
  //
1793
- decodeDracoFile(e, a, H, b, i = l0, r = () => {
1793
+ decodeDracoFile(e, a, H, b, i = E0, r = () => {
1794
1794
  }) {
1795
1795
  const f = {
1796
1796
  attributeIDs: H || this.defaultAttributeIDs,
@@ -1802,8 +1802,8 @@ class Va extends Ve {
1802
1802
  }
1803
1803
  decodeGeometry(e, a) {
1804
1804
  const H = JSON.stringify(a);
1805
- if (ae.has(e)) {
1806
- const c = ae.get(e);
1805
+ if (ze.has(e)) {
1806
+ const c = ze.get(e);
1807
1807
  if (c.key === H)
1808
1808
  return c.promise;
1809
1809
  if (e.byteLength === 0)
@@ -1817,28 +1817,28 @@ class Va extends Ve {
1817
1817
  }))).then((c) => this._createGeometry(c.geometry));
1818
1818
  return f.catch(() => !0).then(() => {
1819
1819
  b && i && this._releaseTask(b, i);
1820
- }), ae.set(e, {
1820
+ }), ze.set(e, {
1821
1821
  key: H,
1822
1822
  promise: f
1823
1823
  }), f;
1824
1824
  }
1825
1825
  _createGeometry(e) {
1826
- const a = new ze();
1827
- e.index && a.setIndex(new V0(e.index.array, 1));
1826
+ const a = new J2();
1827
+ e.index && a.setIndex(new ge(e.index.array, 1));
1828
1828
  for (let H = 0; H < e.attributes.length; H++) {
1829
- const b = e.attributes[H], i = b.name, r = b.array, f = b.itemSize, c = new V0(r, f);
1829
+ const b = e.attributes[H], i = b.name, r = b.array, f = b.itemSize, c = new ge(r, f);
1830
1830
  i === "color" && (this._assignVertexColorSpace(c, b.vertexColorSpace), c.normalized = !(r instanceof Float32Array)), a.setAttribute(i, c);
1831
1831
  }
1832
1832
  return a;
1833
1833
  }
1834
1834
  _assignVertexColorSpace(e, a) {
1835
- if (a !== A0) return;
1836
- const H = new k0();
1835
+ if (a !== Z0) return;
1836
+ const H = new O0();
1837
1837
  for (let b = 0, i = e.count; b < i; b++)
1838
- H.fromBufferAttribute(e, b), ne.colorSpaceToWorking(H, A0), e.setXYZ(b, H.r, H.g, H.b);
1838
+ H.fromBufferAttribute(e, b), e2.colorSpaceToWorking(H, Z0), e.setXYZ(b, H.r, H.g, H.b);
1839
1839
  }
1840
1840
  _loadLibrary(e, a) {
1841
- const H = new Q0(this.manager);
1841
+ const H = new Me(this.manager);
1842
1842
  return H.setPath(this.decoderPath), H.setResponseType(a), H.setWithCredentials(this.withCredentials), new Promise((b, i) => {
1843
1843
  H.load(e, b, void 0, i);
1844
1844
  });
@@ -1852,7 +1852,7 @@ class Va extends Ve {
1852
1852
  return e ? a.push(this._loadLibrary("draco_decoder.js", "text")) : (a.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), a.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(a).then((H) => {
1853
1853
  const b = H[0];
1854
1854
  e || (this.decoderConfig.wasmBinary = H[1]);
1855
- const i = Wa.toString(), r = [
1855
+ const i = Sb.toString(), r = [
1856
1856
  "/* draco decoder */",
1857
1857
  b,
1858
1858
  "",
@@ -1900,7 +1900,7 @@ class Va extends Ve {
1900
1900
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
1901
1901
  }
1902
1902
  }
1903
- function Wa() {
1903
+ function Sb() {
1904
1904
  let n, e;
1905
1905
  onmessage = function(r) {
1906
1906
  const f = r.data;
@@ -1917,8 +1917,8 @@ function Wa() {
1917
1917
  e.then((d) => {
1918
1918
  const o = d.draco, s = new o.Decoder();
1919
1919
  try {
1920
- const k = a(o, s, new Int8Array(c), t), l = k.attributes.map((u) => u.array.buffer);
1921
- k.index && l.push(k.index.array.buffer), self.postMessage({ type: "decode", id: f.id, geometry: k }, l);
1920
+ const k = a(o, s, new Int8Array(c), t), A = k.attributes.map((_) => _.array.buffer);
1921
+ k.index && A.push(k.index.array.buffer), self.postMessage({ type: "decode", id: f.id, geometry: k }, A);
1922
1922
  } catch (k) {
1923
1923
  console.error(k), self.postMessage({ type: "error", id: f.id, error: k.message });
1924
1924
  } finally {
@@ -1931,29 +1931,29 @@ function Wa() {
1931
1931
  function a(r, f, c, t) {
1932
1932
  const d = t.attributeIDs, o = t.attributeTypes;
1933
1933
  let s, k;
1934
- const l = f.GetEncodedGeometryType(c);
1935
- if (l === r.TRIANGULAR_MESH)
1934
+ const A = f.GetEncodedGeometryType(c);
1935
+ if (A === r.TRIANGULAR_MESH)
1936
1936
  s = new r.Mesh(), k = f.DecodeArrayToMesh(c, c.byteLength, s);
1937
- else if (l === r.POINT_CLOUD)
1937
+ else if (A === r.POINT_CLOUD)
1938
1938
  s = new r.PointCloud(), k = f.DecodeArrayToPointCloud(c, c.byteLength, s);
1939
1939
  else
1940
1940
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
1941
1941
  if (!k.ok() || s.ptr === 0)
1942
1942
  throw new Error("THREE.DRACOLoader: Decoding failed: " + k.error_msg());
1943
- const u = { index: null, attributes: [] };
1944
- for (const h in d) {
1945
- const m = self[o[h]];
1946
- let g, A;
1943
+ const _ = { index: null, attributes: [] };
1944
+ for (const g in d) {
1945
+ const w = self[o[g]];
1946
+ let p, m;
1947
1947
  if (t.useUniqueIDs)
1948
- A = d[h], g = f.GetAttributeByUniqueId(s, A);
1948
+ m = d[g], p = f.GetAttributeByUniqueId(s, m);
1949
1949
  else {
1950
- if (A = f.GetAttributeId(s, r[d[h]]), A === -1) continue;
1951
- g = f.GetAttribute(s, A);
1950
+ if (m = f.GetAttributeId(s, r[d[g]]), m === -1) continue;
1951
+ p = f.GetAttribute(s, m);
1952
1952
  }
1953
- const p = b(r, f, s, h, m, g);
1954
- h === "color" && (p.vertexColorSpace = t.vertexColorSpace), u.attributes.push(p);
1953
+ const I = b(r, f, s, g, w, p);
1954
+ g === "color" && (I.vertexColorSpace = t.vertexColorSpace), _.attributes.push(I);
1955
1955
  }
1956
- return l === r.TRIANGULAR_MESH && (u.index = H(r, f, s)), r.destroy(s), u;
1956
+ return A === r.TRIANGULAR_MESH && (_.index = H(r, f, s)), r.destroy(s), _;
1957
1957
  }
1958
1958
  function H(r, f, c) {
1959
1959
  const d = c.num_faces() * 3, o = d * 4, s = r._malloc(o);
@@ -1962,12 +1962,12 @@ function Wa() {
1962
1962
  return r._free(s), { array: k, itemSize: 1 };
1963
1963
  }
1964
1964
  function b(r, f, c, t, d, o) {
1965
- const s = o.num_components(), l = c.num_points() * s, u = l * d.BYTES_PER_ELEMENT, h = i(r, d), m = r._malloc(u);
1966
- f.GetAttributeDataArrayForAllPoints(c, o, h, u, m);
1967
- const g = new d(r.HEAPF32.buffer, m, l).slice();
1968
- return r._free(m), {
1965
+ const s = o.num_components(), A = c.num_points() * s, _ = A * d.BYTES_PER_ELEMENT, g = i(r, d), w = r._malloc(_);
1966
+ f.GetAttributeDataArrayForAllPoints(c, o, g, _, w);
1967
+ const p = new d(r.HEAPF32.buffer, w, A).slice();
1968
+ return r._free(w), {
1969
1969
  name: t,
1970
- array: g,
1970
+ array: p,
1971
1971
  itemSize: s
1972
1972
  };
1973
1973
  }
@@ -1990,7 +1990,7 @@ function Wa() {
1990
1990
  }
1991
1991
  }
1992
1992
  }
1993
- const Ca = `
1993
+ const zb = `
1994
1994
  var DracoDecoderModule = (() => {
1995
1995
  var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
1996
1996
  if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename;
@@ -2025,8 +2025,8 @@ else if (typeof define === 'function' && define['amd'])
2025
2025
  else if (typeof exports === 'object')
2026
2026
  exports["DracoDecoderModule"] = DracoDecoderModule;
2027
2027
  `;
2028
- function La() {
2029
- const n = c0(!1), e = c0(""), a = H2([]), H = c0(null), b = new ba(), i = new ia(), r = new ra(), f = new ca();
2028
+ function Qb() {
2029
+ const n = I0(!1), e = I0(""), a = na([]), H = I0(null), b = new Hb(), i = new cb(), r = new fb(), f = new nb();
2030
2030
  let c = null;
2031
2031
  return {
2032
2032
  isLoading: n,
@@ -2034,68 +2034,68 @@ function La() {
2034
2034
  loadedModels: a,
2035
2035
  error: H,
2036
2036
  loadModelsFromBlobs: async (d) => {
2037
- var l;
2037
+ var A;
2038
2038
  if (!d || d.length === 0) {
2039
2039
  console.warn("loadModelsFromBlobs 加载的文件数组为空!");
2040
2040
  return;
2041
2041
  }
2042
2042
  n.value = !0, e.value = "准备加载...", a.value = [], H.value = null;
2043
2043
  const o = /* @__PURE__ */ new Map();
2044
- d.forEach((u) => {
2045
- u instanceof File && o.set(u.name.toLowerCase(), u);
2044
+ d.forEach((_) => {
2045
+ _ instanceof File && o.set(_.name.toLowerCase(), _);
2046
2046
  });
2047
2047
  const s = [], k = [];
2048
2048
  try {
2049
- for (const u of d) {
2050
- const h = u.name || "unknown_file", m = (l = h.split(".").pop()) == null ? void 0 : l.toLowerCase();
2051
- if (m === "mtl") continue;
2052
- const g = URL.createObjectURL(u);
2053
- s.push(g);
2054
- let A = null;
2055
- const p = (w) => {
2056
- const F = w.lengthComputable ? w.loaded / w.total * 100 : 0;
2057
- e.value = `正在加载 ${h}... ${Math.round(F)}%`;
2049
+ for (const _ of d) {
2050
+ const g = _.name || "unknown_file", w = (A = g.split(".").pop()) == null ? void 0 : A.toLowerCase();
2051
+ if (w === "mtl") continue;
2052
+ const p = URL.createObjectURL(_);
2053
+ s.push(p);
2054
+ let m = null;
2055
+ const I = (G) => {
2056
+ const V = G.lengthComputable ? G.loaded / G.total * 100 : 0;
2057
+ e.value = `正在加载 ${g}... ${Math.round(V)}%`;
2058
2058
  };
2059
- switch (e.value = `正在加载 ${h}... 0%`, m) {
2059
+ switch (e.value = `正在加载 ${g}... 0%`, w) {
2060
2060
  case "obj":
2061
- const w = h.replace(/\.obj$/i, ".mtl").toLowerCase();
2062
- if (o.has(w)) {
2063
- const E = o.get(w), x = URL.createObjectURL(E);
2064
- s.push(x);
2065
- const S = await b.loadAsync(x);
2066
- S.preload(), i.setMaterials(S);
2061
+ const G = g.replace(/\.obj$/i, ".mtl").toLowerCase();
2062
+ if (o.has(G)) {
2063
+ const l0 = o.get(G), D0 = URL.createObjectURL(l0);
2064
+ s.push(D0);
2065
+ const V0 = await b.loadAsync(D0);
2066
+ V0.preload(), i.setMaterials(V0);
2067
2067
  } else
2068
2068
  i.setMaterials(null);
2069
- A = await i.loadAsync(g, p);
2069
+ m = await i.loadAsync(p, I);
2070
2070
  break;
2071
2071
  case "stl":
2072
- const F = await r.loadAsync(g, p), v = new Y2({ color: 11184810, specular: 1118481, shininess: 200 });
2073
- A = new Ze(F, v);
2072
+ const V = await r.loadAsync(p, I), S = new Xa({ color: 11184810, specular: 1118481, shininess: 200 });
2073
+ m = new H2(V, S);
2074
2074
  break;
2075
2075
  case "gltf":
2076
- A = (await f.loadAsync(g, p)).scene;
2076
+ m = (await f.loadAsync(p, I)).scene;
2077
2077
  break;
2078
2078
  case "glb":
2079
- c || (c = new Va(), c._loadLibrary = function(E, x) {
2080
- return E === "draco_decoder.js" && x === "text" ? Promise.resolve(Ca) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${E}`));
2081
- }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), A = (await f.loadAsync(g, p)).scene;
2079
+ c || (c = new Lb(), c._loadLibrary = function(l0, D0) {
2080
+ return l0 === "draco_decoder.js" && D0 === "text" ? Promise.resolve(zb) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${l0}`));
2081
+ }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), m = (await f.loadAsync(p, I)).scene;
2082
2082
  break;
2083
2083
  default:
2084
- console.warn(`不支持的文件类型: .${m}`), e.value = `不支持的文件类型: ${h}`;
2084
+ console.warn(`不支持的文件类型: .${w}`), e.value = `不支持的文件类型: ${g}`;
2085
2085
  continue;
2086
2086
  }
2087
- A && (A.userData.boundingBox = new W0().setFromObject(A), k.push(A));
2087
+ m && (m.userData.boundingBox = new _e().setFromObject(m), k.push(m));
2088
2088
  }
2089
2089
  a.value = k, e.value = "加载完成!";
2090
- } catch (u) {
2091
- throw console.error("加载模型时出错:", u), H.value = `加载失败: ${u.message || "未知错误"}`, e.value = "加载失败!", a.value = [], u;
2090
+ } catch (_) {
2091
+ throw console.error("加载模型时出错:", _), H.value = `加载失败: ${_.message || "未知错误"}`, e.value = "加载失败!", a.value = [], _;
2092
2092
  } finally {
2093
- n.value = !1, s.forEach((u) => URL.revokeObjectURL(u));
2093
+ n.value = !1, s.forEach((_) => URL.revokeObjectURL(_));
2094
2094
  }
2095
2095
  }
2096
2096
  };
2097
2097
  }
2098
- function Sa(n, e = {}) {
2098
+ function Zb(n, e = {}) {
2099
2099
  const a = {
2100
2100
  threeInfo: {},
2101
2101
  modelLoader: {},
@@ -2103,12 +2103,12 @@ function Sa(n, e = {}) {
2103
2103
  clipping: {},
2104
2104
  partAnimation: {},
2105
2105
  millPivotAnimation: {}
2106
- }, H = X2(n);
2106
+ }, H = ab(n);
2107
2107
  a.threeInfo = H;
2108
2108
  const { currentModels: b, getThreeJSObjects: i, addBeforeRenderCallback: r, removeBeforeRenderCallback: f } = H, { useModelLoaderHook: c, useAnimationHook: t, useClippingHook: d, usePartAnimationHook: o } = e;
2109
- if (c && (a.modelLoader = La()), t && (a.animation = $2(i, b)), d && (a.clipping = ea(i, b)), o) {
2110
- const s = za(i, b, r, f);
2111
- a.partAnimation = s, a.millPivotAnimation = db(
2109
+ if (c && (a.modelLoader = Qb()), t && (a.animation = bb(i, b)), d && (a.clipping = ib(i, b)), o) {
2110
+ const s = Jb(i, b, r, f);
2111
+ a.partAnimation = s, a.millPivotAnimation = oi(
2112
2112
  b,
2113
2113
  i,
2114
2114
  s.setPartRotation,
@@ -2117,94 +2117,94 @@ function Sa(n, e = {}) {
2117
2117
  }
2118
2118
  return a;
2119
2119
  }
2120
- function za(n, e, a, H) {
2121
- const b = c0(!1), i = /* @__PURE__ */ new Map();
2120
+ function Jb(n, e, a, H) {
2121
+ const b = I0(!1), i = /* @__PURE__ */ new Map();
2122
2122
  let r = null;
2123
- function f(g) {
2124
- const A = /* @__PURE__ */ new Set([g]);
2125
- A.add(g.replace(/\./g, ""));
2126
- for (const w of e.value)
2127
- if (w)
2128
- for (const F of A) {
2129
- const v = w.getObjectByName(F);
2130
- if (v) return v;
2123
+ function f(p) {
2124
+ const m = /* @__PURE__ */ new Set([p]);
2125
+ m.add(p.replace(/\./g, ""));
2126
+ for (const G of e.value)
2127
+ if (G)
2128
+ for (const V of m) {
2129
+ const S = G.getObjectByName(V);
2130
+ if (S) return S;
2131
2131
  }
2132
- const { scene: p } = n();
2133
- if (p)
2134
- for (const w of A) {
2135
- const F = p.getObjectByName(w);
2136
- if (F) return F;
2132
+ const { scene: I } = n();
2133
+ if (I)
2134
+ for (const G of m) {
2135
+ const V = I.getObjectByName(G);
2136
+ if (V) return V;
2137
2137
  }
2138
2138
  return null;
2139
2139
  }
2140
- function c(g) {
2141
- return g.map((A) => {
2142
- const p = f(A);
2143
- return { name: A, object: p, found: !!p };
2140
+ function c(p) {
2141
+ return p.map((m) => {
2142
+ const I = f(m);
2143
+ return { name: m, object: I, found: !!I };
2144
2144
  });
2145
2145
  }
2146
- function t(g, A) {
2147
- const p = f(g);
2148
- return p ? (i.set(g, {
2149
- object: p,
2150
- axis: A.axis,
2151
- speed: A.speed,
2152
- direction: A.direction ?? 1
2153
- }), !0) : (console.warn(`[usePartAnimation] 未找到部件: "${g}"`), !1);
2154
- }
2155
- function d(g, A, p, w) {
2156
- return A ? p ? (i.set(g, {
2157
- object: A,
2158
- axis: w.axis,
2159
- speed: w.speed,
2160
- direction: w.direction ?? 1,
2161
- pivot: p
2162
- }), !0) : (console.warn(`[usePartAnimation] pivot 为空: "${g}"`), !1) : (console.warn(`[usePartAnimation] 未找到部件: "${g}"`), !1);
2163
- }
2164
- function o(g) {
2165
- let A = 0;
2166
- return g.forEach(({ partName: p, axis: w, speed: F, direction: v }) => {
2167
- t(p, { axis: w, speed: F, direction: v }) && A++;
2168
- }), A;
2169
- }
2170
- function s(g) {
2171
- i.delete(g);
2146
+ function t(p, m) {
2147
+ const I = f(p);
2148
+ return I ? (i.set(p, {
2149
+ object: I,
2150
+ axis: m.axis,
2151
+ speed: m.speed,
2152
+ direction: m.direction ?? 1
2153
+ }), !0) : (console.warn(`[usePartAnimation] 未找到部件: "${p}"`), !1);
2154
+ }
2155
+ function d(p, m, I, G) {
2156
+ return m ? I ? (i.set(p, {
2157
+ object: m,
2158
+ axis: G.axis,
2159
+ speed: G.speed,
2160
+ direction: G.direction ?? 1,
2161
+ pivot: I
2162
+ }), !0) : (console.warn(`[usePartAnimation] pivot 为空: "${p}"`), !1) : (console.warn(`[usePartAnimation] 未找到部件: "${p}"`), !1);
2163
+ }
2164
+ function o(p) {
2165
+ let m = 0;
2166
+ return p.forEach(({ partName: I, axis: G, speed: V, direction: S }) => {
2167
+ t(I, { axis: G, speed: V, direction: S }) && m++;
2168
+ }), m;
2169
+ }
2170
+ function s(p) {
2171
+ i.delete(p);
2172
2172
  }
2173
2173
  function k() {
2174
2174
  i.clear();
2175
2175
  }
2176
- function l() {
2177
- const g = [];
2178
- return i.forEach((A, p) => {
2179
- g.push({
2180
- name: p,
2181
- axis: A.axis,
2182
- speed: A.speed,
2183
- direction: A.direction,
2184
- found: !!A.object
2176
+ function A() {
2177
+ const p = [];
2178
+ return i.forEach((m, I) => {
2179
+ p.push({
2180
+ name: I,
2181
+ axis: m.axis,
2182
+ speed: m.speed,
2183
+ direction: m.direction,
2184
+ found: !!m.object
2185
2185
  });
2186
- }), g;
2186
+ }), p;
2187
2187
  }
2188
- function u() {
2188
+ function _() {
2189
2189
  if (!b.value) {
2190
2190
  if (i.size === 0) {
2191
2191
  console.warn("[usePartAnimation] 没有配置任何部件旋转");
2192
2192
  return;
2193
2193
  }
2194
- b.value = !0, r = (g) => {
2195
- b.value && i.forEach((A) => {
2196
- if (!A.object) return;
2197
- const p = A.pivot ?? A.object, w = A.axis;
2198
- p.rotation[w] += A.direction * A.speed * g;
2194
+ b.value = !0, r = (p) => {
2195
+ b.value && i.forEach((m) => {
2196
+ if (!m.object) return;
2197
+ const I = m.pivot ?? m.object, G = m.axis;
2198
+ I.rotation[G] += m.direction * m.speed * p;
2199
2199
  });
2200
2200
  }, a(r);
2201
2201
  }
2202
2202
  }
2203
- function h() {
2203
+ function g() {
2204
2204
  b.value = !1, r && (H(r), r = null);
2205
2205
  }
2206
- function m() {
2207
- b.value ? h() : u();
2206
+ function w() {
2207
+ b.value ? g() : _();
2208
2208
  }
2209
2209
  return {
2210
2210
  isPartAnimating: b,
@@ -2215,23 +2215,23 @@ function za(n, e, a, H) {
2215
2215
  setPartRotations: o,
2216
2216
  removePartRotation: s,
2217
2217
  clearAllPartRotations: k,
2218
- getPartAnimationStatus: l,
2219
- startPartAnimations: u,
2220
- stopPartAnimations: h,
2221
- togglePartAnimations: m
2218
+ getPartAnimationStatus: A,
2219
+ startPartAnimations: _,
2220
+ stopPartAnimations: g,
2221
+ togglePartAnimations: w
2222
2222
  };
2223
2223
  }
2224
- function H0(n) {
2224
+ function k0(n) {
2225
2225
  return n < 0.5 ? 4 * n * n * n : 1 - Math.pow(-2 * n + 2, 3) / 2;
2226
2226
  }
2227
- const Za = {
2227
+ const Yb = {
2228
2228
  "轧辊整体-1001": ["轧辊整体-1001", "上轧辊000-1"],
2229
2229
  "下轧辊-1001": ["下轧辊-1001", "下轧辊000-1"],
2230
2230
  "轧辊整体-1": ["轧辊整体-1", "上轧辊000-3"],
2231
2231
  "下轧辊-1": ["下轧辊-1", "下轧辊000-3"]
2232
2232
  };
2233
- function z0(n, e, a) {
2234
- const H = Za[n] ?? [n], b = (i) => {
2233
+ function B0(n, e, a) {
2234
+ const H = Yb[n] ?? [n], b = (i) => {
2235
2235
  if (!i) return null;
2236
2236
  for (const r of H) {
2237
2237
  const f = i.getObjectByName(r);
@@ -2246,488 +2246,713 @@ function z0(n, e, a) {
2246
2246
  }
2247
2247
  return b(a);
2248
2248
  }
2249
- function Qa(n, e, a, H, b = null) {
2250
- const i = c0(!1), r = 0.6, f = 5, c = 0.5, t = -0.3, d = 0.8, o = 0.3, s = 30, k = 2, l = 0.5, u = 0.6, h = 1.5, m = 3, g = 1, A = 0.6, p = 0.5, w = 0.07, F = 0.97, v = 8e-3, B = 0.97, W = 0.015, E = 0.4, x = 1, S = 1, K = 0.3;
2251
- let N = "idle", j = 0, R = new y(), V = new y(), _ = null, L = null, Q = null, C = null, J = null, X = null, f0 = null, o0 = null, p0 = null, m0 = 0, Y = null, s0 = null;
2252
- const G0 = new y(), C0 = new d0(), j0 = [];
2253
- let I0 = null, U0 = "";
2254
- const $ = new y(), y0 = new y();
2255
- function T(P) {
2256
- if (!P) return 0;
2257
- const I = new d0();
2258
- return P.getWorldQuaternion(I), I.w;
2259
- }
2260
- function O(P, I) {
2261
- const G = T(P);
2262
- return Math.abs(G - I) <= W;
2263
- }
2264
- function q(P, I, G) {
2265
- if (!P) return;
2266
- const z = new d0();
2267
- P.getWorldQuaternion(z);
2268
- const b0 = new W0().setFromObject(P), r0 = new y();
2269
- b0.getCenter(r0), y0.copy(I).applyQuaternion(z), G.copy(r0).add(y0);
2270
- }
2271
- function U(P, I) {
2272
- const G = new y();
2273
- if (P && P.getWorldPosition(G), I) {
2274
- const z = new y();
2275
- I.getWorldPosition(z), G.add(z).multiplyScalar(0.5), G.y -= 0.313;
2276
- }
2277
- return G;
2278
- }
2279
- function Z() {
2280
- const P = n.value;
2281
- if (!P || P.length === 0) return !1;
2282
- Y = H().scene;
2283
- const G = (M) => M ?? null;
2284
- for (const M of P) {
2285
- if (!M) continue;
2286
- const i0 = M.getObjectByName("机器人-2");
2287
- if (i0 && (_ = G(i0.getObjectByName("坯料-1")), _))
2249
+ function Kb(n, e, a, H, b = null, i = null, r = null, f = null) {
2250
+ const c = I0(!1), t = [
2251
+ ["夹具5倍-3", "夹具5倍-7"],
2252
+ ["夹具5倍-5", "夹具5倍-8"]
2253
+ ];
2254
+ let d = !1, o = -1;
2255
+ const s = 0.6, k = 5, A = 0.5, _ = 2, g = -0.1, w = 0.8, p = -0.48, m = 30, I = 2, G = 2, V = 1.5, S = 3, y0 = 0.6, o0 = 0.5, l0 = 0.4, D0 = 0.4, V0 = 1, te = 2, ne = 150 * Math.PI / 180, de = 100 * Math.PI / 180, Z = 0.25, s0 = 1, J = 270 * Math.PI / 180, q = 0.5, C = 150 * Math.PI / 180, Y = 100 * Math.PI / 180, n0 = 0.25, K = 1, e0 = 270 * Math.PI / 180, a0 = 0.5;
2256
+ let D = "idle", y = 0, U = new j(), B = new j(), u = null, L = null, b0 = null, i0 = null, d0 = null, u0 = null, _0 = null, R = null, E = null, H0 = null, W = null, c0 = null, A0 = null, $0 = null, ee = null, Oe = null, Ee = null, N0 = null, U0 = null, Ge = null, c2 = 0, f0 = null, Ae = null;
2257
+ const f2 = new j(), t2 = new $();
2258
+ let ae = [];
2259
+ const pe = 10, C0 = new Array(pe).fill(1), oe = [];
2260
+ let se = null;
2261
+ const m0 = new j(), n2 = new j();
2262
+ function be(h, l, F) {
2263
+ if (!h) return;
2264
+ const N = new $();
2265
+ h.getWorldQuaternion(N);
2266
+ const T = new _e().setFromObject(h), M = new j();
2267
+ T.getCenter(M), n2.copy(l).applyQuaternion(N), F.copy(M).add(n2);
2268
+ }
2269
+ function ia() {
2270
+ const h = n.value;
2271
+ if (!h || h.length === 0) return !1;
2272
+ f0 = H().scene;
2273
+ const F = (v) => v ?? null;
2274
+ for (const v of h) {
2275
+ if (!v) continue;
2276
+ const O = v.getObjectByName("机器人-2");
2277
+ if (O && (u = F(O.getObjectByName("坯料-1")), u))
2288
2278
  break;
2289
2279
  }
2290
- if (!_)
2280
+ if (!u)
2291
2281
  return console.warn("[useBilletAnimation] 未找到部件: 坯料-1 (在 机器人-2 下)"), !1;
2292
- L = z0("轧辊整体-1001", n, Y), L || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), Q = z0("下轧辊-1001", n, Y), Q || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1001 / 下轧辊000-1");
2293
- let z = null, b0 = null;
2294
- for (const M of P)
2295
- if (M && (z || (z = G(M.getObjectByName("下输送台板-1"))), b0 || (b0 = G(M.getObjectByName("下输送台板-2"))), z && b0))
2282
+ L = B0("轧辊整体-1001", n, f0), L || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), b0 = B0("下轧辊-1001", n, f0), b0 || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1001 / 下轧辊000-1"), u0 = B0("联轴器上-1001", n, f0), _0 = B0("联轴器下-2001", n, f0), L = B0("轧辊整体-1001", n, f0), L || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1");
2283
+ let N = null, T = null;
2284
+ for (const v of h)
2285
+ if (v && (N || (N = F(v.getObjectByName("下输送台板-1"))), T || (T = F(v.getObjectByName("下输送台板-2"))), N && T))
2296
2286
  break;
2297
- if ((!z || !b0) && Y && (z || (z = G(Y.getObjectByName("下输送台板-1"))), b0 || (b0 = G(Y.getObjectByName("下输送台板-2")))), z || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), b0 || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), z && b0) {
2298
- const M = new y();
2299
- z.getWorldPosition(M);
2300
- const i0 = new y();
2301
- b0.getWorldPosition(i0), X = new y().copy(M).add(i0).multiplyScalar(0.5), X.y = Math.max(M.y, i0.y) + 0.05;
2302
- }
2303
- let r0 = null;
2304
- for (const M of P)
2305
- if (M && (r0 = G(M.getObjectByName("上输送台-3")), r0))
2287
+ if ((!N || !T) && f0 && (N || (N = F(f0.getObjectByName("下输送台板-1"))), T || (T = F(f0.getObjectByName("下输送台板-2")))), N || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), T || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), N && T) {
2288
+ const v = new j();
2289
+ N.getWorldPosition(v);
2290
+ const O = new j();
2291
+ T.getWorldPosition(O), N0 = new j().copy(v).add(O).multiplyScalar(0.5), N0.y = Math.max(v.y, O.y) + 0.05;
2292
+ }
2293
+ let M = null;
2294
+ for (const v of h)
2295
+ if (v && (M = F(v.getObjectByName("上输送台-3")), M))
2306
2296
  break;
2307
- if (!r0 && Y && (r0 = G(Y.getObjectByName("上输送台-3"))), r0) {
2308
- const M = new y();
2309
- r0.getWorldPosition(M), f0 = new y(M.x, M.y + 0.1, M.z);
2297
+ if (!M && f0 && (M = F(f0.getObjectByName("上输送台-3"))), M) {
2298
+ const v = new j();
2299
+ M.getWorldPosition(v), U0 = new j(v.x, v.y + 0.1, v.z);
2310
2300
  } else
2311
2301
  console.warn("[useBilletAnimation] 未找到部件: 上输送台-3");
2312
- if (C = z0("轧辊整体-1", n, Y), C) {
2313
- const M = new y();
2314
- C.getWorldPosition(M), o0 = new y(M.x, M.y + 0.5, M.z);
2302
+ if (i0 = B0("轧辊整体-1", n, f0), i0) {
2303
+ const v = new j();
2304
+ i0.getWorldPosition(v), new j(v.x, v.y + 0.5, v.z);
2315
2305
  } else
2316
2306
  console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1 / 上轧辊000-3");
2317
- if (J = z0("下轧辊-1", n, Y), J && C) {
2318
- const M = new y();
2319
- J.getWorldPosition(M);
2320
- const i0 = new y();
2321
- C.getWorldPosition(i0), p0 = new y().copy(M).add(i0).multiplyScalar(0.5), p0.y -= 0.313;
2322
- } else J || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2323
- let M0 = null;
2324
- for (const M of P)
2325
- if (M && (M0 = G(M.getObjectByName("底板-1")), M0))
2307
+ if (d0 = B0("下轧辊-1", n, f0), d0 && i0) {
2308
+ const v = new j();
2309
+ d0.getWorldPosition(v);
2310
+ const O = new j();
2311
+ i0.getWorldPosition(O), Ge = new j().copy(v).add(O).multiplyScalar(0.5), Ge.y -= 0.313;
2312
+ } else d0 || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2313
+ R = B0("联轴器上-1", n, f0), E = B0("联轴器下-2", n, f0);
2314
+ let P = null;
2315
+ for (const v of h)
2316
+ if (v && (P = F(v.getObjectByName("底板-1")), P))
2326
2317
  break;
2327
- if (!M0 && Y && (M0 = G(Y.getObjectByName("底板-1"))), M0) {
2328
- const M = new y();
2329
- M0.getWorldPosition(M), m0 = M.y;
2318
+ if (!P && f0 && (P = F(f0.getObjectByName("底板-1"))), P) {
2319
+ const v = new j();
2320
+ P.getWorldPosition(v), c2 = v.y;
2330
2321
  } else
2331
2322
  console.warn("[useBilletAnimation] 未找到部件: 底板-1");
2332
- const je = _.parent;
2333
- if (!je)
2323
+ const X = u.parent;
2324
+ if (!X)
2334
2325
  return console.warn("[useBilletAnimation] 坯料没有父节点 (机器人-2 应作为父节点)"), !1;
2335
- j0.length = 0;
2336
- const i2 = [
2326
+ oe.length = 0;
2327
+ const z = [
2337
2328
  "Crab_Finger_Right-1",
2338
2329
  "Crab_Finger_Right-2",
2339
2330
  "Crab_Finger_Right-3",
2340
2331
  "Crab_Finger_Right-4"
2341
- ], r2 = _.position.y;
2342
- for (const M of i2) {
2343
- const i0 = je.getObjectByName(M);
2344
- i0 ? j0.push({ obj: i0, origQuat: i0.quaternion.clone(), direction: i0.position.y > r2 ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${M}`);
2345
- }
2346
- return j0.length === 0 ? (console.warn("[useBilletAnimation] 未找到任何 Crab_Finger_Right-* 手指部件"), !1) : !0;
2347
- }
2348
- function a0() {
2349
- if (!_ || !Y) return;
2350
- _.getWorldPosition(R);
2351
- const P = new d0();
2352
- _.getWorldQuaternion(P);
2353
- const I = new y();
2354
- _.getWorldScale(I), _.parent && _.removeFromParent(), Y.add(_), _.position.copy(R), _.quaternion.copy(P), _.scale.copy(I);
2355
- }
2356
- function w0(P) {
2357
- for (const I of j0) {
2358
- I.obj.quaternion.copy(I.origQuat);
2359
- const G = new d0().setFromAxisAngle(new y(1, 0, 0), p * P * I.direction);
2360
- I.obj.quaternion.premultiply(G);
2361
- }
2362
- }
2363
- const F0 = new y(), L0 = new y(), T0 = new y(), R0 = new y(), x0 = new y(), he = new y(0.43, 0.7, 0.45), ge = new y(0.785, -0.325, 0.2), S0 = new y(0.43, 0.7, 0.45), _e = new y(0.785, -0.325, 0.2);
2364
- let Ae = !1, pe = !1;
2365
- function a2() {
2366
- i.value || Z() && (s0 = _.parent, G0.copy(_.position), C0.copy(_.quaternion), i.value = !0, N = "opening", j = 0, Ae = !L || !Q, pe = !C || !p0, I0 = (P) => {
2367
- if (!(!i.value || !_))
2368
- switch (j += P, N) {
2332
+ ], r0 = u.position.y;
2333
+ for (const v of z) {
2334
+ const O = X.getObjectByName(v);
2335
+ O ? oe.push({ obj: O, origQuat: O.quaternion.clone(), direction: O.position.y > r0 ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${v}`);
2336
+ }
2337
+ if (oe.length === 0)
2338
+ return console.warn("[useBilletAnimation] 未找到任何 Crab_Finger_Right-* 手指部件"), !1;
2339
+ const Q = (v) => v ? { pos: v.position.clone(), quat: v.quaternion.clone() } : null;
2340
+ return H0 = Q(L), W = Q(b0), c0 = Q(i0), A0 = Q(d0), $0 = Q(u0), ee = Q(_0), Oe = Q(R), Ee = Q(E), ca(), !0;
2341
+ }
2342
+ function ra() {
2343
+ if (!u || !f0) return;
2344
+ u.getWorldPosition(U);
2345
+ const h = new $();
2346
+ u.getWorldQuaternion(h);
2347
+ const l = new j();
2348
+ u.getWorldScale(l), u.parent && u.removeFromParent(), f0.add(u), u.position.copy(U), u.quaternion.copy(h), u.scale.copy(l);
2349
+ }
2350
+ function ke(h) {
2351
+ for (const l of oe) {
2352
+ l.obj.quaternion.copy(l.origQuat);
2353
+ const F = new $().setFromAxisAngle(new j(1, 0, 0), o0 * h * l.direction);
2354
+ l.obj.quaternion.premultiply(F);
2355
+ }
2356
+ }
2357
+ new j();
2358
+ const w0 = new $(), F0 = new j();
2359
+ new j();
2360
+ const h0 = new j(), t0 = new $(), g0 = new $(), me = 0.8, je = { value: 0 }, ie = new j(0, 0, 1), Ie = new j(), ye = new $(), we = new j();
2361
+ let T0 = !1, J0 = !1;
2362
+ new j();
2363
+ const re = new j(), Fe = new $(), L0 = new j(), S0 = new j(), R0 = { value: 0 }, ve = new j(), Ne = new $(), Te = new j();
2364
+ let x0 = !1;
2365
+ function d2(h, l, F, N, T, M, P, X, z, r0) {
2366
+ const Q = N;
2367
+ T0 || (h.updateMatrixWorld(!0), h.getWorldPosition(Ie), h.getWorldQuaternion(ye), we.copy(Ie).sub(Q), M.value = 0, T0 = !0), M.value += P * z, w0.setFromAxisAngle(ie, M.value), h0.copy(we).applyQuaternion(w0).add(Q), t0.copy(w0).multiply(ye);
2368
+ const v = h.parent;
2369
+ if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), h0.clone(), v.worldToLocal(h0), v.getWorldQuaternion(g0), t0.premultiply(g0.clone().invert())), h.position.copy(h0), h.quaternion.copy(t0), h.updateMatrixWorld(!0), T) {
2370
+ const O = T.parent;
2371
+ O && O.type !== "Scene" ? (O.getWorldQuaternion(g0), T.quaternion.copy(g0.clone().invert()).multiply(t0)) : T.quaternion.copy(t0), T.updateMatrixWorld(!0);
2372
+ }
2373
+ return be(h, F, l.position), M.value >= X;
2374
+ }
2375
+ function o2(h, l, F, N, T, M, P, X, z, r0) {
2376
+ const Q = N;
2377
+ x0 || (h.updateMatrixWorld(!0), h.getWorldPosition(ve), h.getWorldQuaternion(Ne), Te.copy(ve).sub(Q), M.value = 0, x0 = !0), M.value += P * z, w0.setFromAxisAngle(ie, -M.value), h0.copy(Te).applyQuaternion(w0).add(Q), t0.copy(w0).multiply(Ne);
2378
+ const v = h.parent;
2379
+ if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), h0.clone(), v.worldToLocal(h0), v.getWorldQuaternion(g0), t0.premultiply(g0.clone().invert())), h.position.copy(h0), h.quaternion.copy(t0), h.updateMatrixWorld(!0), T) {
2380
+ const O = T.parent;
2381
+ O && O.type !== "Scene" ? (O.getWorldQuaternion(g0), T.quaternion.copy(g0.clone().invert()).multiply(t0)) : T.quaternion.copy(t0), T.updateMatrixWorld(!0);
2382
+ }
2383
+ return be(h, F, l.position), M.value >= X;
2384
+ }
2385
+ function s2(h, l, F, N, T, M, P) {
2386
+ const X = P ?? l;
2387
+ T0 || (h.updateMatrixWorld(!0), h.getWorldPosition(Ie), h.getWorldQuaternion(ye), we.copy(Ie).sub(X), N.value = 0, T0 = !0), N.value += T * M, w0.setFromAxisAngle(ie, N.value), h0.copy(we).applyQuaternion(w0).add(X), t0.copy(w0).multiply(ye);
2388
+ const z = h.parent;
2389
+ if (z && z.type !== "Scene" && (z.updateMatrixWorld(!0), h0.clone(), z.worldToLocal(h0), z.getWorldQuaternion(g0), t0.premultiply(g0.clone().invert())), h.position.copy(h0), h.quaternion.copy(t0), h.updateMatrixWorld(!0), F) {
2390
+ const r0 = F.parent;
2391
+ r0 && r0.type !== "Scene" ? (r0.getWorldQuaternion(g0), F.quaternion.copy(g0.clone().invert()).multiply(t0)) : F.quaternion.copy(t0), F.updateMatrixWorld(!0);
2392
+ }
2393
+ }
2394
+ function k2(h, l, F, N, T, M, P) {
2395
+ const X = P ?? l;
2396
+ x0 || (h.updateMatrixWorld(!0), h.getWorldPosition(ve), h.getWorldQuaternion(Ne), Te.copy(ve).sub(X), x0 = !0), N.value += T * M, w0.setFromAxisAngle(ie, N.value), h0.copy(Te).applyQuaternion(w0).add(X), t0.copy(w0).multiply(Ne);
2397
+ const z = h.parent;
2398
+ if (z && z.type !== "Scene" && (z.updateMatrixWorld(!0), h0.clone(), z.worldToLocal(h0), z.getWorldQuaternion(g0), t0.premultiply(g0.clone().invert())), h.position.copy(h0), h.quaternion.copy(t0), h.updateMatrixWorld(!0), F) {
2399
+ const r0 = F.parent;
2400
+ r0 && r0.type !== "Scene" ? (r0.getWorldQuaternion(g0), F.quaternion.copy(g0.clone().invert()).multiply(t0)) : F.quaternion.copy(t0), F.updateMatrixWorld(!0);
2401
+ }
2402
+ }
2403
+ const Ha = 0.5;
2404
+ let Ue = "idle";
2405
+ function j0(h) {
2406
+ Ue = h, D = "pausing", y = 0;
2407
+ }
2408
+ const l2 = new j(), u2 = new j(), h2 = new j(), g2 = new j();
2409
+ new j();
2410
+ const _2 = new j(0.63, -0.52, 0.45), A2 = new j(0.55, 0.6, 0.2), p2 = new j(0.69, -0.48, 0.45), m2 = new j(0.65, 0.58, 0.2);
2411
+ let j2 = !1, I2 = !1;
2412
+ function ca() {
2413
+ ae = [], u && (u.updateMatrixWorld(!0), u.traverse((h) => {
2414
+ if (!(h instanceof H2) || !h.geometry) return;
2415
+ const l = h.geometry;
2416
+ if (!l.attributes.position) return;
2417
+ l.computeBoundingBox();
2418
+ const N = l.boundingBox, T = N.getSize(new j()), M = N.getCenter(new j());
2419
+ let P, X, z, r0, Q, v, O, Y0, z0;
2420
+ T.x >= T.y && T.x >= T.z ? (P = 0, X = 1, z = 2, r0 = T.x, Q = Math.max(T.y, T.z) / 2, v = N.min.x, O = N.max.x, Y0 = M.y, z0 = M.z) : T.y >= T.x && T.y >= T.z ? (P = 1, X = 0, z = 2, r0 = T.y, Q = Math.max(T.x, T.z) / 2, v = N.min.y, O = N.max.y, Y0 = M.x, z0 = M.z) : (P = 2, X = 0, z = 1, r0 = T.z, Q = Math.max(T.x, T.y) / 2, v = N.min.z, O = N.max.z, Y0 = M.x, z0 = M.y);
2421
+ const P0 = new $a(Q, Q, r0, 32, 20);
2422
+ P === 0 ? P0.rotateZ(-Math.PI / 2) : P === 2 && P0.rotateX(Math.PI / 2), P0.translate(M.x, M.y, M.z);
2423
+ const Pe = l;
2424
+ h.geometry = P0;
2425
+ const Be = new Float32Array(
2426
+ P0.attributes.position.array
2427
+ );
2428
+ ae.push({
2429
+ mesh: h,
2430
+ originalGeometry: Pe,
2431
+ originalPositions: Be,
2432
+ aIdx: P,
2433
+ uIdx: X,
2434
+ vIdx: z,
2435
+ axisMin: v,
2436
+ axisMax: O,
2437
+ centerU: Y0,
2438
+ centerV: z0
2439
+ });
2440
+ }));
2441
+ }
2442
+ function xe() {
2443
+ for (let h = 0; h < pe; h++) C0[h] = 1;
2444
+ for (const h of ae) {
2445
+ const l = h.mesh.geometry.attributes.position;
2446
+ l.array.set(h.originalPositions), l.needsUpdate = !0, h.mesh.geometry.computeVertexNormals();
2447
+ }
2448
+ }
2449
+ function Re() {
2450
+ for (const h of ae) {
2451
+ const l = h.mesh.geometry.attributes.position, F = l.array, { originalPositions: N, aIdx: T, uIdx: M, vIdx: P, axisMin: X, axisMax: z, centerU: r0, centerV: Q } = h, v = z - X;
2452
+ if (!(v <= 0)) {
2453
+ for (let O = 0; O < F.length; O += 3) {
2454
+ const Y0 = N[O + T];
2455
+ let z0 = Math.floor((Y0 - X) / v * pe);
2456
+ z0 = Math.min(Math.max(z0, 0), pe - 1);
2457
+ const P0 = C0[z0];
2458
+ if (P0 < 1) {
2459
+ const Pe = N[O + M], Be = N[O + P];
2460
+ F[O + M] = r0 + (Pe - r0) * P0, F[O + P] = Q + (Be - Q) * P0, F[O + T] = Y0;
2461
+ } else
2462
+ F[O] = N[O], F[O + 1] = N[O + 1], F[O + 2] = N[O + 2];
2463
+ }
2464
+ l.needsUpdate = !0, h.mesh.geometry.computeVertexNormals();
2465
+ }
2466
+ }
2467
+ }
2468
+ function fa() {
2469
+ c.value || ia() && (xe(), Ae = u.parent, f2.copy(u.position), t2.copy(u.quaternion), c.value = !0, D = "opening", y = 0, j2 = !L || !b0, I2 = !i0 || !Ge, se = (h) => {
2470
+ if (!(!c.value || !u))
2471
+ switch (y += h, D) {
2472
+ // ========== 阶段间统一延时 ==========
2473
+ case "pausing": {
2474
+ y >= Ha && (D = Ue, y = 0, Ue = "idle");
2475
+ break;
2476
+ }
2369
2477
  // ========== 手指张开 ==========
2370
2478
  case "opening": {
2371
- const I = Math.min(j / r, 1);
2372
- w0(H0(I)), I >= 1 && (a0(), N = Ae ? "toRollGap" : "toMill1UpperGap", j = 0);
2479
+ const l = Math.min(y / s, 1);
2480
+ ke(k0(l)), l >= 1 && (xe(), ra(), j0(j2 ? "toRollGap" : "toMill1UpperGap"), y = 0);
2373
2481
  break;
2374
2482
  }
2375
2483
  // ========== 第一轧机:空隙姿态驱动流程 ==========
2376
2484
  // --- 1. 到第一轧机上辊空隙 ---
2377
2485
  case "toMill1UpperGap": {
2378
- q(L, he, F0);
2379
- const I = Math.min(j / x, 1);
2380
- _.position.lerpVectors(R, F0, H0(I)), I >= 1 && (N = "ridingMill1UpperGap", j = 0);
2486
+ be(L, _2, l2);
2487
+ const l = Math.min(y / V0, 1);
2488
+ u.position.lerpVectors(U, l2, k0(l)), l >= 1 && (j0("closing1"), y = 0, T0 = !1);
2489
+ break;
2490
+ }
2491
+ case "closing1": {
2492
+ const l = Math.min(y / y0, 1);
2493
+ ke(1 - k0(l)), l >= 1 && (ke(0), D = "ridingMill1UpperGap", y = 0);
2381
2494
  break;
2382
2495
  }
2383
- // --- 2. 随第一轧机上辊空隙转动,等待w达到0.07 ---
2496
+ // --- 2. 联轴器上辊与胚料一同逆时针转动,等待w达到目标值 ---
2384
2497
  case "ridingMill1UpperGap": {
2385
- q(L, he, F0), _.position.copy(F0), O(L, w) && (N = "fallToMill1LowerGap", j = 0, R.copy(_.position));
2498
+ L && u && (u0 ? u0.getWorldPosition(F0) : L.getWorldPosition(F0), d2(
2499
+ L,
2500
+ u,
2501
+ _2,
2502
+ F0,
2503
+ u0,
2504
+ je,
2505
+ me,
2506
+ ne,
2507
+ h
2508
+ ) && (j0("mill1Drop"), y = 0, U.copy(u.position), re.set(U.x, U.y - Z, U.z)));
2386
2509
  break;
2387
2510
  }
2388
- // --- 3. 落入第一轧机下辊空隙 ---
2389
- case "fallToMill1LowerGap": {
2390
- q(Q, ge, L0);
2391
- const I = Math.min(j / E, 1);
2392
- _.position.lerpVectors(R, L0, H0(I)), I >= 1 && (N = "ridingMill1LowerGap", j = 0);
2511
+ // --- 3a. 胚料垂直下落配置距离 ---
2512
+ case "mill1Drop": {
2513
+ const l = Math.min(y / s0, 1);
2514
+ u.position.lerpVectors(U, re, k0(l)), l >= 1 && (u.position.copy(re), u.getWorldQuaternion(Fe), j0("mill1CoRotate"), y = 0, T0 = !1, J0 = !1);
2393
2515
  break;
2394
2516
  }
2395
- // --- 4. 随第一轧机下辊空隙转动,等待w达到0.97后送出 ---
2396
- case "ridingMill1LowerGap": {
2397
- q(Q, ge, L0), _.position.copy(L0), j >= K && O(Q, F) && (R.copy(_.position), N = "exitMill1LowerGap", j = 0);
2517
+ case "mill1CoRotate": {
2518
+ if (L && b0 && u) {
2519
+ J0 || (u0 ? u0.getWorldPosition(L0) : L.getWorldPosition(L0), _0 ? _0.getWorldPosition(S0) : b0.getWorldPosition(S0), J0 = !0, T0 = !1, x0 = !1), s2(L, L0, u0, R0, q, h, L0), k2(b0, S0, _0, R0, q, h, S0), u.quaternion.copy(Fe), u.quaternion.premultiply(new $().setFromAxisAngle(ie, -R0.value));
2520
+ const l = Math.min(R0.value / J, 1), F = 1 - 0.25 * k0(l);
2521
+ for (let N = 3; N <= 7; N++) C0[N] = F;
2522
+ if (Re(), R0.value >= J) {
2523
+ for (let N = 3; N <= 7; N++) C0[N] = 0.75;
2524
+ Re(), j0("fallToMill1LowerGap"), y = 0, U.copy(u.position);
2525
+ }
2526
+ }
2398
2527
  break;
2399
2528
  }
2400
- // --- 5. 随第一轧机下辊送出(平滑移向输送台方向) ---
2401
- case "exitMill1LowerGap": {
2402
- if (X) {
2403
- const G = new y().subVectors(X, R).normalize();
2404
- x0.copy(R).addScaledVector(G, 0.6);
2405
- } else
2406
- x0.copy(R);
2407
- const I = Math.min(j / u, 1);
2408
- _.position.lerpVectors(R, x0, H0(I)), I >= 1 && (R.copy(x0), V.copy(X ?? x0), N = "toConveyor", j = 0);
2529
+ // --- 4. 落入第一轧机下辊空隙 ---
2530
+ case "fallToMill1LowerGap": {
2531
+ be(b0, A2, u2);
2532
+ const l = Math.min(y / l0, 1);
2533
+ u.position.lerpVectors(U, u2, k0(l)), l >= 1 && (j0("ridingMill1LowerGap"), y = 0, x0 = !1);
2409
2534
  break;
2410
2535
  }
2411
- // ========== 第一轧机:Fallback旧流程 ==========
2412
- // --- fallback: 到两辊中点 ---
2413
- case "toRollGap": {
2414
- const I = U(L, Q), G = Math.min(j / 1, 1);
2415
- _.position.lerpVectors(R, I, H0(G)), G >= 1 && (_.position.copy(I), N = "rolling", j = 0);
2536
+ // --- 4. 随第一轧机下辊空隙转动(顺时针),等待达到目标角度后送出 ---
2537
+ case "ridingMill1LowerGap": {
2538
+ b0 && u && (_0 ? _0.getWorldPosition(F0) : b0.getWorldPosition(F0), o2(
2539
+ b0,
2540
+ u,
2541
+ A2,
2542
+ F0,
2543
+ _0,
2544
+ je,
2545
+ me,
2546
+ de,
2547
+ h
2548
+ ) && (U.copy(u.position), j0("exitMill1LowerGap"), y = 0));
2416
2549
  break;
2417
2550
  }
2418
- // --- fallback: 原地滚动5s ---
2419
- case "rolling": {
2420
- if (_.rotation.z += P * 3, j >= 5)
2421
- if (_.rotation.z = 0, N = "toConveyor", j = 0, X)
2422
- V.copy(X);
2423
- else {
2424
- const I = U(L, Q);
2425
- V.copy(I);
2551
+ // --- 5. 随第一轧机下辊送出(移动到下输送台板表面并沿表面移动) ---
2552
+ case "exitMill1LowerGap": {
2553
+ if (N0) {
2554
+ const l = new j(
2555
+ U.x + 0.3,
2556
+ N0.y + 0.02,
2557
+ U.z
2558
+ ), F = new j(
2559
+ N0.x + 0.38,
2560
+ N0.y + 0.05,
2561
+ N0.z
2562
+ ), N = G * 2, T = Math.min(y / N, 1);
2563
+ if (T <= 0.5) {
2564
+ const M = T * 2;
2565
+ u.position.lerpVectors(U, l, k0(M));
2566
+ } else {
2567
+ const M = (T - 0.5) * 2;
2568
+ u.position.lerpVectors(l, F, k0(M));
2569
+ }
2570
+ if (T >= 1) {
2571
+ if (u.position.copy(F), !d && i) {
2572
+ i(), d = !0;
2573
+ let M = 1 / 0, P = -1;
2574
+ for (let X = 0; X < t.length; X++) {
2575
+ const [z, r0] = t[X];
2576
+ if (r && r(z, r0, m0)) {
2577
+ const Q = m0.distanceTo(F);
2578
+ Q < M && (M = Q, P = X);
2579
+ }
2580
+ }
2581
+ P >= 0 ? (o = P, U.copy(u.position), D = "liftToClamp") : D = "conveyorWait";
2582
+ } else
2583
+ D = "conveyorWait";
2584
+ y = 0;
2426
2585
  }
2586
+ } else
2587
+ D = "conveyorWait", y = 0;
2427
2588
  break;
2428
2589
  }
2429
2590
  // ========== 输送台阶段 ==========
2430
2591
  // --- 胚料向输送台移动 ---
2431
2592
  case "toConveyor": {
2432
- const I = Math.min(j / f, 1);
2433
- _.position.lerpVectors(R, V, H0(I)), X && _.position.y <= X.y + 0.1 && (_.position.copy(V), N = "conveyorWait", j = 0), j >= f && (_.position.copy(V), N = "conveyorWait", j = 0);
2593
+ const l = Math.min(y / k, 1);
2594
+ u.position.lerpVectors(U, B, k0(l)), N0 && u.position.y <= N0.y + 0.1 && (u.position.copy(B), D = "liftToClamp", y = 0), y >= k && (u.position.copy(B), D = "liftToClamp", y = 0);
2434
2595
  break;
2435
2596
  }
2436
- // --- 等待夹具到达下输送台接料点 ---
2597
+ // --- 等待夹具到达下输送台接料点(使用 pair 中点) ---
2437
2598
  case "conveyorWait": {
2438
- if (!X) {
2439
- N = "upperWait", j = 0;
2599
+ if (!N0) {
2600
+ D = "upperWait", y = 0;
2440
2601
  break;
2441
2602
  }
2442
- const I = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2443
- let G = "", z = 1 / 0;
2444
- for (const b0 of I)
2445
- if (b && b(b0, $)) {
2446
- const r0 = $.distanceTo(X);
2447
- r0 < d && r0 < z && (z = r0, G = b0);
2603
+ let l = 1 / 0, F = -1;
2604
+ for (let N = 0; N < t.length; N++) {
2605
+ const [T, M] = t[N];
2606
+ if (r && r(T, M, m0)) {
2607
+ const P = m0.distanceTo(N0);
2608
+ P < w && P < l && (l = P, F = N);
2448
2609
  }
2449
- G && (U0 = G, N = "liftToClamp", j = 0), j >= s && (N = "upperWait", j = 0);
2610
+ }
2611
+ F >= 0 && (o = F, U.copy(u.position), D = "liftToClamp", y = 0), y >= m && (D = "upperWait", y = 0);
2450
2612
  break;
2451
2613
  }
2452
- // --- 胚料升到夹具上方 ---
2614
+ // --- 胚料升到夹具上方(使用 pair 中点) ---
2453
2615
  case "liftToClamp": {
2454
- const I = Math.min(j / c, 1);
2455
- b(U0, $), $.y += 0.2, $.z += t, _.position.lerpVectors(X, $, H0(I)), I >= 1 && (_.position.copy($), N = "ridingChain", j = 0);
2616
+ const l = Math.min(y / A, 1), F = t[o];
2617
+ r(F[0], F[1], m0), m0.y += 0.13, m0.x += g, u.position.lerpVectors(U, m0, k0(l)), l >= 1 && (u.position.copy(m0), D = "ridingChain", y = 0);
2456
2618
  break;
2457
2619
  }
2458
- // --- 跟随夹具随链条滚动 ---
2620
+ // --- 跟随夹具随链条滚动(使用 pair 中点) ---
2459
2621
  case "ridingChain": {
2460
- if (!b || !b(U0, $)) {
2461
- f0 && _.position.copy(f0), N = "upperWait", j = 0;
2622
+ const l = t[o];
2623
+ if (!r || !r(l[0], l[1], m0)) {
2624
+ U0 && u.position.copy(U0), D = "upperWait", y = 0;
2462
2625
  break;
2463
2626
  }
2464
- $.y += 0.2, $.z += t, _.position.copy($), f0 && $.y >= f0.y - o && (_.position.copy(f0), N = "upperWait", j = 0), j >= 60 && (f0 && _.position.copy(f0), N = "upperWait", j = 0);
2627
+ m0.y += 0.13, m0.x += g, u.position.copy(m0), U0 && m0.y >= U0.y - p && (U.copy(u.position), B.copy(U0), B.y += 0.05, D = "dropToUpperConveyor", y = 0), y >= 60 && (U0 && u.position.copy(U0), D = "upperWait", y = 0);
2628
+ break;
2629
+ }
2630
+ // --- 从夹具平滑过渡到上输送台(避免瞬移) ---
2631
+ case "dropToUpperConveyor": {
2632
+ if (!U0) {
2633
+ D = "upperWait", y = 0;
2634
+ break;
2635
+ }
2636
+ const l = Math.min(y / _, 1);
2637
+ u.position.lerpVectors(U, B, k0(l)), l >= 1 && (u.position.copy(B), D = "upperWait", y = 0);
2465
2638
  break;
2466
2639
  }
2467
2640
  // --- 上输送台等待2s ---
2468
2641
  case "upperWait": {
2469
- j >= k && (N = pe ? "toMill2RollTop" : "toMill2UpperGap", j = 0);
2642
+ y >= I && (D = I2 ? "toMill2RollTop" : "toMill2UpperGap", y = 0);
2470
2643
  break;
2471
2644
  }
2472
- // ========== 第二轧机:空隙姿态驱动流程 ==========
2645
+ // ========== 第二轧机:空隙姿态驱动流程(与第一轧机对称) ==========
2473
2646
  // --- 1. 到第二轧机上辊空隙 ---
2474
2647
  case "toMill2UpperGap": {
2475
- q(C, S0, T0);
2476
- const I = Math.min(j / S, 1);
2477
- _.position.lerpVectors(f0, T0, H0(I)), I >= 1 && (N = "ridingMill2UpperGap", j = 0);
2648
+ be(i0, p2, h2);
2649
+ const l = Math.min(y / te, 1);
2650
+ u.position.lerpVectors(B, h2, k0(l)), l >= 1 && (j0("ridingMill2UpperGap"), y = 0, T0 = !1);
2478
2651
  break;
2479
2652
  }
2480
- // --- 2. 随第二轧机上辊空隙转动,等待w达到0.008 ---
2653
+ // --- 2. 联轴器上辊与胚料一同逆时针转动,等待达到目标角度 ---
2481
2654
  case "ridingMill2UpperGap": {
2482
- q(C, S0, T0), _.position.copy(T0), O(C, v) && (R.copy(_.position), N = "fallIntoMill2Gap", j = 0);
2655
+ i0 && u && (R ? R.getWorldPosition(F0) : i0.getWorldPosition(F0), d2(
2656
+ i0,
2657
+ u,
2658
+ p2,
2659
+ F0,
2660
+ R,
2661
+ je,
2662
+ me,
2663
+ C,
2664
+ h
2665
+ ) && (j0("mill2Drop"), y = 0, U.copy(u.position), re.set(U.x, U.y - n0, U.z)));
2483
2666
  break;
2484
2667
  }
2485
- // ========== 第二轧机:Fallback旧流程 ==========
2486
- // --- fallback: 到轧辊整体-1上表面 ---
2487
- case "toMill2RollTop": {
2488
- if (!o0) {
2489
- N = "fallIntoMill2Gap", j = 0;
2490
- break;
2668
+ // --- 3a. 胚料垂直下落配置距离 ---
2669
+ case "mill2Drop": {
2670
+ const l = Math.min(y / K, 1);
2671
+ u.position.lerpVectors(U, re, k0(l)), l >= 1 && (u.position.copy(re), u.getWorldQuaternion(Fe), j0("mill2CoRotate"), y = 0, T0 = !1, J0 = !1);
2672
+ break;
2673
+ }
2674
+ // --- 3b. 上下辊同速率逆时针共转 ---
2675
+ case "mill2CoRotate": {
2676
+ if (i0 && d0 && u) {
2677
+ J0 || (R ? R.getWorldPosition(L0) : i0.getWorldPosition(L0), E ? E.getWorldPosition(S0) : d0.getWorldPosition(S0), J0 = !0, T0 = !1, x0 = !1), s2(i0, L0, R, R0, a0, h, L0), k2(d0, S0, E, R0, a0, h, S0), u.quaternion.copy(Fe), u.quaternion.premultiply(new $().setFromAxisAngle(ie, -R0.value));
2678
+ const l = Math.min(R0.value / e0, 1), F = 1 - 0.25 * k0(l);
2679
+ C0[0] = F, C0[9] = F, Re(), R0.value >= e0 && (C0[0] = 0.75, C0[9] = 0.75, Re(), j0("fallToMill2LowerGap"), y = 0, U.copy(u.position));
2491
2680
  }
2492
- const I = Math.min(j / 1, 1);
2493
- _.position.lerpVectors(f0, o0, H0(I)), I >= 1 && (_.position.copy(o0), R.copy(o0), N = "fallIntoMill2Gap", j = 0);
2494
2681
  break;
2495
2682
  }
2496
- // ========== 共同阶段 ==========
2497
- // --- 从轧辊上表面/空隙平滑滑入下辊空隙 ---
2498
- case "fallIntoMill2Gap": {
2499
- J ? q(J, _e, R0) : q(C, S0, R0), q(C, S0, T0);
2500
- const I = Math.min(j / l, 1);
2501
- _.position.lerpVectors(T0, R0, H0(I)), I >= 1 && (R.copy(R0), N = "ridingMill2LowerGap", j = 0);
2683
+ // --- 4. 落入第二轧机下辊空隙 ---
2684
+ case "fallToMill2LowerGap": {
2685
+ be(d0, m2, g2);
2686
+ const l = Math.min(y / D0, 1);
2687
+ u.position.lerpVectors(U, g2, k0(l)), l >= 1 && (j0("ridingMill2LowerGap"), y = 0, x0 = !1);
2502
2688
  break;
2503
2689
  }
2504
- // --- 6. 随第二轧机下辊空隙转动,等待w达到0.97后送出 ---
2690
+ // --- 5. 随第二轧机下辊空隙转动(顺时针),等待达到目标角度后送出 ---
2505
2691
  case "ridingMill2LowerGap": {
2506
- J ? (q(J, _e, R0), _.position.copy(R0), j >= K && O(J, B) && (R.copy(_.position), V.set(
2507
- _.position.x + 3,
2508
- m0,
2509
- _.position.z
2510
- ), N = "fallToGround", j = 0)) : j >= 2 && (R.copy(_.position), V.set(
2511
- _.position.x + 3,
2512
- m0,
2513
- _.position.z
2514
- ), N = "fallToGround", j = 0);
2692
+ d0 && u && (E ? E.getWorldPosition(F0) : d0.getWorldPosition(F0), o2(
2693
+ d0,
2694
+ u,
2695
+ m2,
2696
+ F0,
2697
+ E,
2698
+ je,
2699
+ me,
2700
+ Y,
2701
+ h
2702
+ ) && (U.copy(u.position), j0("exitMill2LowerGap"), y = 0));
2703
+ break;
2704
+ }
2705
+ // --- 6. 随第二轧机下辊送出(移动到地面) ---
2706
+ case "exitMill2LowerGap": {
2707
+ B.set(
2708
+ U.x + 3,
2709
+ c2,
2710
+ U.z
2711
+ );
2712
+ const l = G * 2, F = Math.min(y / l, 1);
2713
+ u.position.lerpVectors(U, B, k0(F)), F >= 1 && (u.position.copy(B), D = "groundWait", y = 0);
2515
2714
  break;
2516
2715
  }
2517
2716
  // --- 掉落地面 ---
2518
2717
  case "fallToGround": {
2519
- const I = Math.min(j / h, 1);
2520
- _.position.lerpVectors(R, V, H0(I)), I >= 1 && (_.position.copy(V), N = "groundWait", j = 0);
2718
+ const l = Math.min(y / V, 1);
2719
+ u.position.lerpVectors(U, B, k0(l)), l >= 1 && (u.position.copy(B), D = "groundWait", y = 0);
2521
2720
  break;
2522
2721
  }
2523
- // --- 地面停留3s ---
2722
+ // --- 地面停留3s后全量初始化并重新开始 ---
2524
2723
  case "groundWait": {
2525
- j >= m && (N = "resetting", j = 0, a0(), s0 && (s0.updateMatrixWorld(!0), V.copy(G0), s0.localToWorld(V)));
2526
- break;
2527
- }
2528
- // --- 回到手掌 ---
2529
- case "resetting": {
2530
- const I = Math.min(j / g, 1);
2531
- _.position.lerpVectors(R, V, H0(I)), I >= 1 && (_.removeFromParent(), s0 == null || s0.add(_), _.position.copy(G0), _.quaternion.copy(C0), N = "closing", j = 0);
2532
- break;
2533
- }
2534
- // --- 手指闭合 ---
2535
- case "closing": {
2536
- const I = Math.min(j / A, 1);
2537
- w0(1 - H0(I)), I >= 1 && (w0(0), N = "opening", j = 0);
2724
+ if (y >= S) {
2725
+ f && f(), d = !1, o = -1, u && Ae && (u.removeFromParent(), Ae.add(u), u.position.copy(f2), u.quaternion.copy(t2)), xe(), ke(0);
2726
+ const l = (F, N) => {
2727
+ F && N && (F.position.copy(N.pos), F.quaternion.copy(N.quat), F.updateMatrixWorld(!0));
2728
+ };
2729
+ l(L, H0), l(b0, W), l(i0, c0), l(d0, A0), l(u0, $0), l(_0, ee), l(R, Oe), l(E, Ee), R0.value = 0, J0 = !1, T0 = !1, x0 = !1, D = "opening", y = 0;
2730
+ }
2538
2731
  break;
2539
2732
  }
2540
2733
  }
2541
- }, e(I0));
2734
+ }, e(se));
2542
2735
  }
2543
- function me() {
2544
- i.value = !1, I0 && (a(I0), I0 = null), N = "idle", w0(0), j0.length = 0, s0 = null;
2736
+ function y2() {
2737
+ c.value = !1, se && (a(se), se = null), D = "idle", d = !1, o = -1, ke(0), oe.length = 0, Ae = null;
2545
2738
  }
2546
- function b2() {
2547
- me(), _ = null, L = null, Q = null, C = null, J = null, Y = null;
2739
+ function ta() {
2740
+ y2();
2741
+ for (const h of ae)
2742
+ h.mesh.geometry = h.originalGeometry;
2743
+ ae = [], u = null, L = null, b0 = null, i0 = null, d0 = null, u0 = null, _0 = null, R = null, E = null, H0 = null, W = null, c0 = null, A0 = null, $0 = null, ee = null, Oe = null, Ee = null, f0 = null;
2548
2744
  }
2549
- return { isBilletAnimating: i, startBilletDelivery: a2, stopBilletDelivery: me, dispose: b2 };
2745
+ return { isBilletAnimating: c, startBilletDelivery: fa, stopBilletDelivery: y2, dispose: ta };
2550
2746
  }
2551
- function Ja(n, e, a) {
2552
- const H = c0(!1);
2553
- let b = [], i = [], r = null, f = 0;
2554
- const c = 6;
2555
- let t = null;
2556
- const d = new d0(), o = new y(), s = new y(), k = new y(), l = new y();
2557
- function u() {
2558
- const w = n.value;
2559
- if (!w || w.length === 0) return !1;
2560
- for (const E of w)
2561
- E && E.updateMatrixWorld(!0);
2562
- for (const E of w)
2563
- if (E && (r = E.getObjectByName("整体1-6"), r))
2747
+ function Xb(n, e, a, H = null) {
2748
+ const b = I0(!1);
2749
+ let i = [], r = [];
2750
+ const f = [
2751
+ ["夹具5倍-7", "夹具5倍-8"],
2752
+ ["夹具5倍-3", "夹具5倍-5"]
2753
+ ];
2754
+ let c = null, t = 0;
2755
+ const d = 6;
2756
+ let o = null;
2757
+ const s = new $(), k = new j(), A = new j(), _ = new j(), g = new j(), w = new $(), p = new $(), m = new $(), I = new $(), G = new $(), V = new j(), S = new j();
2758
+ function y0() {
2759
+ const Z = n.value;
2760
+ if (!Z || Z.length === 0) return !1;
2761
+ for (const K of Z)
2762
+ K && K.updateMatrixWorld(!0);
2763
+ for (const K of Z)
2764
+ if (K && (c = K.getObjectByName("整体1-6"), c))
2564
2765
  break;
2565
- if (!r) return !1;
2566
- const F = r.getObjectByName("链条5倍-1"), v = r.getObjectByName("链条5倍-2");
2567
- if (!F || !v) return !1;
2568
- const B = [F, v];
2569
- b = [];
2570
- for (const E of B) {
2571
- const x = [];
2572
- if (E.children.forEach((R) => {
2573
- R.name.startsWith("链节5倍") && x.push(R);
2574
- }), x.length === 0) return !1;
2575
- const S = [];
2576
- if (E.children.forEach((R) => {
2577
- R.name.includes("主动链轮10倍") && S.push(R.position.clone());
2578
- }), S.length < 2) return !1;
2579
- const K = new y().addVectors(S[0], S[1]).multiplyScalar(0.5);
2580
- x.sort((R, V) => {
2581
- const _ = Math.atan2(R.position.y - K.y, R.position.x - K.x), L = Math.atan2(V.position.y - K.y, V.position.x - K.x);
2582
- return (_ < 0 ? _ + 2 * Math.PI : _) - (L < 0 ? L + 2 * Math.PI : L);
2583
- });
2584
- const N = x.map((R) => R.position.clone()), j = x.map((R) => R.quaternion.clone());
2585
- b.push({ group: E, links: x, origPositions: N, origQuaternions: j });
2586
- }
2766
+ if (!c) return !1;
2767
+ const s0 = c.getObjectByName("链条5倍-1"), J = c.getObjectByName("链条5倍-2");
2768
+ if (!s0 || !J) return !1;
2769
+ const q = [s0, J];
2587
2770
  i = [];
2588
- const W = ["夹具5倍-1", "夹具5倍-2", "夹具5倍-3", "夹具5倍-5"];
2589
- for (const E of W) {
2590
- const x = r.getObjectByName(E);
2591
- if (!x) continue;
2592
- const S = new y();
2593
- x.getWorldPosition(S);
2594
- let K = -1, N = -1, j = 1 / 0, R = new y();
2595
- for (let V = 0; V < b.length; V++) {
2596
- const _ = b[V], L = new y();
2597
- _.group.worldToLocal(L.copy(S));
2598
- for (let Q = 0; Q < _.links.length; Q++) {
2599
- const C = _.origPositions[Q], J = L.distanceTo(C);
2600
- J < j && (j = J, K = V, N = Q, R = new y().subVectors(L, C));
2771
+ for (const K of q) {
2772
+ const e0 = [];
2773
+ if (K.children.forEach((B) => {
2774
+ B.name.startsWith("链节5倍") && e0.push(B);
2775
+ }), e0.length === 0) return !1;
2776
+ const a0 = [];
2777
+ if (K.children.forEach((B) => {
2778
+ B.name.includes("主动链轮10倍") && a0.push(B.position.clone());
2779
+ }), a0.length < 2) return !1;
2780
+ const D = new j().addVectors(a0[0], a0[1]).multiplyScalar(0.5);
2781
+ e0.sort((B, u) => {
2782
+ const L = Math.atan2(B.position.y - D.y, B.position.x - D.x), b0 = Math.atan2(u.position.y - D.y, u.position.x - D.x);
2783
+ return (L < 0 ? L + 2 * Math.PI : L) - (b0 < 0 ? b0 + 2 * Math.PI : b0);
2784
+ });
2785
+ const y = e0.map((B) => B.position.clone()), U = e0.map((B) => B.quaternion.clone());
2786
+ i.push({ group: K, links: e0, origPositions: y, origQuaternions: U });
2787
+ }
2788
+ r = [];
2789
+ const C = ["夹具5倍-7", "夹具5倍-8", "夹具5倍-3", "夹具5倍-5"], Y = new $(), n0 = new $();
2790
+ for (const K of C) {
2791
+ const e0 = c.getObjectByName(K);
2792
+ if (!e0) continue;
2793
+ const a0 = new j();
2794
+ e0.getWorldPosition(a0);
2795
+ let D = -1, y = -1, U = 1 / 0, B = new j();
2796
+ for (let u = 0; u < i.length; u++) {
2797
+ const L = i[u], b0 = new j();
2798
+ L.group.worldToLocal(b0.copy(a0));
2799
+ for (let i0 = 0; i0 < L.links.length; i0++) {
2800
+ const d0 = L.origPositions[i0], u0 = b0.distanceTo(d0);
2801
+ u0 < U && (U = u0, D = u, y = i0, B = new j().subVectors(b0, d0));
2601
2802
  }
2602
2803
  }
2603
- K >= 0 && i.push({
2604
- object: x,
2605
- chainIdx: K,
2606
- linkIdx: N,
2607
- localOffset: R,
2608
- origPosition: x.position.clone(),
2609
- origQuaternion: x.quaternion.clone()
2610
- });
2804
+ if (D >= 0) {
2805
+ i[D].links[y].getWorldQuaternion(Y), e0.getWorldQuaternion(n0);
2806
+ const L = new $().copy(Y).invert().multiply(n0);
2807
+ r.push({
2808
+ object: e0,
2809
+ chainIdx: D,
2810
+ linkIdx: y,
2811
+ localOffset: B,
2812
+ quatOffset: L,
2813
+ origPosition: e0.position.clone(),
2814
+ origQuaternion: e0.quaternion.clone()
2815
+ });
2816
+ }
2611
2817
  }
2612
2818
  return !0;
2613
2819
  }
2614
- function h() {
2615
- H.value || u() && (H.value = !0, f = 0, t = (w) => {
2616
- if (H.value) {
2617
- f += c * w;
2618
- for (const F of b) {
2619
- const v = F.links.length, B = Math.floor(f), W = f - B;
2620
- for (let E = 0; E < v; E++) {
2621
- const x = ((E + B) % v + v) % v, S = ((E + B + 1) % v + v) % v, K = F.links[E];
2622
- K.position.lerpVectors(
2623
- F.origPositions[x],
2624
- F.origPositions[S],
2625
- W
2626
- ), d.slerpQuaternions(
2627
- F.origQuaternions[x],
2628
- F.origQuaternions[S],
2629
- W
2630
- ), K.quaternion.copy(d);
2631
- }
2632
- }
2633
- for (const F of i) {
2634
- const v = b[F.chainIdx], B = v.links.length, W = Math.floor(f), E = f - W, x = ((F.linkIdx + W) % B + B) % B, S = ((F.linkIdx + W + 1) % B + B) % B;
2635
- o.lerpVectors(
2636
- v.origPositions[x],
2637
- v.origPositions[S],
2638
- E
2639
- ), s.copy(o).add(F.localOffset), v.group.localToWorld(k.copy(s)), r.worldToLocal(l.copy(k)), F.object.position.copy(l);
2820
+ function o0() {
2821
+ b.value || y0() && (b.value = !0, t = 0, o = (Z) => {
2822
+ var J;
2823
+ if (!b.value) return;
2824
+ t += d * Z;
2825
+ const s0 = ((J = i[0]) == null ? void 0 : J.links.length) ?? 0;
2826
+ if (s0 > 0 && t >= s0) {
2827
+ t = s0, l0(), H && H();
2828
+ return;
2829
+ }
2830
+ for (const q of i) {
2831
+ const C = q.links.length, Y = Math.floor(t), n0 = t - Y;
2832
+ for (let K = 0; K < C; K++) {
2833
+ const e0 = ((K + Y) % C + C) % C, a0 = ((K + Y + 1) % C + C) % C, D = q.links[K];
2834
+ D.position.lerpVectors(
2835
+ q.origPositions[e0],
2836
+ q.origPositions[a0],
2837
+ n0
2838
+ ), s.slerpQuaternions(
2839
+ q.origQuaternions[e0],
2840
+ q.origQuaternions[a0],
2841
+ n0
2842
+ ), D.quaternion.copy(s);
2640
2843
  }
2641
2844
  }
2642
- }, e(t));
2845
+ c.getWorldQuaternion(m), I.copy(m).invert();
2846
+ for (const q of r) {
2847
+ const C = i[q.chainIdx], Y = C.links.length, n0 = Math.floor(t), K = t - n0, e0 = ((q.linkIdx + n0) % Y + Y) % Y, a0 = ((q.linkIdx + n0 + 1) % Y + Y) % Y;
2848
+ k.lerpVectors(
2849
+ C.origPositions[e0],
2850
+ C.origPositions[a0],
2851
+ K
2852
+ ), A.copy(k).add(q.localOffset), C.group.localToWorld(_.copy(A)), c.worldToLocal(g.copy(_)), q.object.position.copy(g), C.group.getWorldQuaternion(p), w.slerpQuaternions(
2853
+ C.origQuaternions[e0],
2854
+ C.origQuaternions[a0],
2855
+ K
2856
+ ), G.copy(p).multiply(w).multiply(q.quatOffset), G.premultiply(I), q.object.quaternion.copy(G);
2857
+ }
2858
+ }, e(o));
2643
2859
  }
2644
- function m() {
2645
- H.value = !1, t && (a(t), t = null);
2646
- for (const w of b)
2647
- w.links.forEach((F, v) => {
2648
- F.position.copy(w.origPositions[v]), F.quaternion.copy(w.origQuaternions[v]);
2860
+ function l0() {
2861
+ b.value = !1, o && (a(o), o = null);
2862
+ for (const Z of i)
2863
+ Z.links.forEach((s0, J) => {
2864
+ s0.position.copy(Z.origPositions[J]), s0.quaternion.copy(Z.origQuaternions[J]);
2649
2865
  });
2650
- for (const w of i)
2651
- w.object.position.copy(w.origPosition), w.object.quaternion.copy(w.origQuaternion);
2866
+ for (const Z of r)
2867
+ Z.object.position.copy(Z.origPosition), Z.object.quaternion.copy(Z.origQuaternion);
2652
2868
  }
2653
- function g() {
2654
- m(), b = [], i = [];
2869
+ function D0() {
2870
+ l0(), i = [], r = [];
2871
+ }
2872
+ function V0(Z, s0) {
2873
+ const J = r.find((q) => q.object.name === Z);
2874
+ return J ? (J.object.getWorldPosition(s0), !0) : !1;
2655
2875
  }
2656
- function A(w, F) {
2657
- const v = i.find((B) => B.object.name === w);
2658
- return v ? (v.object.getWorldPosition(F), !0) : !1;
2876
+ function te(Z, s0, J) {
2877
+ const q = r.find((n0) => n0.object.name === Z), C = r.find((n0) => n0.object.name === s0);
2878
+ if (!q && !C) return !1;
2879
+ let Y = !1;
2880
+ return q && (q.object.getWorldPosition(V), Y = !0), C && (C.object.getWorldPosition(S), Y = !0), q && C ? J.copy(V).add(S).multiplyScalar(0.5) : q ? J.copy(V) : J.copy(S), Y;
2659
2881
  }
2660
- function p() {
2661
- return i.map((w) => w.object.name);
2882
+ function ne() {
2883
+ return r.map((Z) => Z.object.name);
2662
2884
  }
2663
- return { isChainAnimating: H, startChainAnimation: h, stopChainAnimation: m, dispose: g, getClampWorldPosition: A, getClampNames: p };
2885
+ function de() {
2886
+ return f.slice();
2887
+ }
2888
+ return { isChainAnimating: b, startChainAnimation: o0, stopChainAnimation: l0, dispose: D0, getClampWorldPosition: V0, getClampPairWorldPosition: te, getClampNames: ne, getClampPairs: de };
2664
2889
  }
2665
- const Ya = 16776960, Ka = 65280, se = "pickHighlightRoot", ke = "partType";
2666
- function Xa() {
2890
+ const $b = 16776960, ei = 65280, P2 = "pickHighlightRoot", ai = "partType";
2891
+ function bi() {
2667
2892
  return {
2668
- raycaster: new K2(),
2669
- mouse: new ue(),
2893
+ raycaster: new eb(),
2894
+ mouse: new r2(),
2670
2895
  lastMeshes: /* @__PURE__ */ new Set(),
2671
2896
  originalEmissive: /* @__PURE__ */ new Map()
2672
2897
  };
2673
2898
  }
2674
- function Xe(n, e) {
2899
+ function ea(n, e) {
2675
2900
  const a = [...e];
2676
2901
  return n.traverse((H) => {
2677
2902
  H.type === "Group" && H.name.endsWith("-pivot") && a.push(H);
2678
2903
  }), a;
2679
2904
  }
2680
- function $a(n, e) {
2905
+ function ii(n, e) {
2681
2906
  var b, i;
2682
2907
  const a = e.originalEmissive.get(n), H = n.material;
2683
2908
  a ? (b = H.emissive) == null || b.copy(a) : (i = H.emissive) == null || i.setHex(0);
2684
2909
  }
2685
- function $e(n) {
2686
- const e = n.userData[se];
2910
+ function aa(n) {
2911
+ const e = n.userData[P2];
2687
2912
  if (e && e.isObject3D) return e;
2688
2913
  let a = n.parent;
2689
2914
  for (; a; ) {
2690
- const H = a.userData[se];
2915
+ const H = a.userData[P2];
2691
2916
  if (H && H.isObject3D) return H;
2692
2917
  if (a.name && a.name.includes("联轴器")) return a;
2693
2918
  a = a.parent;
2694
2919
  }
2695
2920
  return null;
2696
2921
  }
2697
- function eb(n) {
2922
+ function ri(n) {
2698
2923
  const e = [];
2699
2924
  return n.traverse((a) => {
2700
2925
  a.isMesh && e.push(a);
2701
2926
  }), e;
2702
2927
  }
2703
- function e2(n) {
2704
- const e = $e(n);
2928
+ function ba(n) {
2929
+ const e = aa(n);
2705
2930
  if (e) {
2706
- const a = eb(e);
2931
+ const a = ri(e);
2707
2932
  if (a.length > 0) return a;
2708
2933
  }
2709
2934
  return [n];
2710
2935
  }
2711
- function Ee(n) {
2712
- n.lastMeshes.forEach((e) => $a(e, n)), n.lastMeshes.clear();
2936
+ function B2(n) {
2937
+ n.lastMeshes.forEach((e) => ii(e, n)), n.lastMeshes.clear();
2713
2938
  }
2714
- function ab(n, e, a, H, b, i, r = {}) {
2939
+ function Hi(n, e, a, H, b, i, r = {}) {
2715
2940
  var s, k;
2716
2941
  const f = e.getBoundingClientRect();
2717
2942
  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);
2718
- const c = Xe(H, b), t = i.raycaster.intersectObjects(c, !0);
2943
+ const c = ea(H, b), t = i.raycaster.intersectObjects(c, !0);
2719
2944
  if (t.length === 0) {
2720
- i.lastMeshes.size > 0 && Ee(i), (s = r.onMiss) == null || s.call(r);
2945
+ i.lastMeshes.size > 0 && B2(i), (s = r.onMiss) == null || s.call(r);
2721
2946
  return;
2722
2947
  }
2723
- const d = t[0].object, o = e2(d);
2724
- Ee(i), o.forEach((l) => {
2725
- var h, m;
2726
- const u = l.material;
2727
- i.originalEmissive.has(l) || i.originalEmissive.set(l, ((h = u.emissive) == null ? void 0 : h.clone()) ?? new k0(0)), l.material = u.clone(), (m = l.material.emissive) == null || m.setHex(Ya), i.lastMeshes.add(l);
2948
+ const d = t[0].object, o = ba(d);
2949
+ B2(i), o.forEach((A) => {
2950
+ var g, w;
2951
+ const _ = A.material;
2952
+ i.originalEmissive.has(A) || i.originalEmissive.set(A, ((g = _.emissive) == null ? void 0 : g.clone()) ?? new O0(0)), A.material = _.clone(), (w = A.material.emissive) == null || w.setHex($b), i.lastMeshes.add(A);
2728
2953
  }), (k = r.onHit) == null || k.call(r, d);
2729
2954
  }
2730
- function bb(n) {
2955
+ function ci(n) {
2731
2956
  var H;
2732
2957
  if (n.lastMeshes.size === 0) return null;
2733
2958
  const a = !(((H = n.lastMeshes.values().next().value) == null ? void 0 : H.visible) ?? !0);
@@ -2735,18 +2960,18 @@ function bb(n) {
2735
2960
  b.visible = a;
2736
2961
  }), a;
2737
2962
  }
2738
- function ib() {
2963
+ function fi() {
2739
2964
  return {
2740
- ...Xa(),
2965
+ ...bi(),
2741
2966
  selectedMeshes: /* @__PURE__ */ new Set(),
2742
2967
  selectedMesh: null
2743
2968
  };
2744
2969
  }
2745
- function rb(n) {
2970
+ function ti(n) {
2746
2971
  var c, t;
2747
- const e = $e(n), a = new W0().setFromObject(e || n), H = new y(), b = new y();
2972
+ const e = aa(n), a = new _e().setFromObject(e || n), H = new j(), b = new j();
2748
2973
  a.getCenter(H), a.getSize(b);
2749
- const i = new y();
2974
+ const i = new j();
2750
2975
  n.getWorldPosition(i);
2751
2976
  const r = n.material, f = (r == null ? void 0 : r.name) || ((c = r == null ? void 0 : r.constructor) == null ? void 0 : c.name) || "Unknown";
2752
2977
  return {
@@ -2754,7 +2979,7 @@ function rb(n) {
2754
2979
  meshName: n.name,
2755
2980
  meshUuid: n.uuid,
2756
2981
  parentName: ((t = n.parent) == null ? void 0 : t.name) || null,
2757
- partType: n.userData[ke] || null,
2982
+ partType: n.userData[ai] || null,
2758
2983
  worldPosition: i,
2759
2984
  materialName: f,
2760
2985
  boundingBox: {
@@ -2765,127 +2990,43 @@ function rb(n) {
2765
2990
  }
2766
2991
  };
2767
2992
  }
2768
- function Hb(n, e) {
2993
+ function ni(n, e) {
2769
2994
  var b, i;
2770
2995
  const a = e.originalEmissive.get(n), H = n.material;
2771
2996
  a ? (b = H.emissive) == null || b.copy(a) : (i = H.emissive) == null || i.setHex(0);
2772
2997
  }
2773
- function le(n) {
2774
- n.selectedMeshes.forEach((e) => Hb(e, n)), n.selectedMeshes.clear();
2998
+ function i2(n) {
2999
+ n.selectedMeshes.forEach((e) => ni(e, n)), n.selectedMeshes.clear();
2775
3000
  }
2776
- function cb(n, e, a, H, b, i, r = {}) {
2777
- var k, l;
3001
+ function di(n, e, a, H, b, i, r = {}) {
3002
+ var k, A;
2778
3003
  const f = e.getBoundingClientRect();
2779
3004
  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);
2780
- const c = Xe(H, b), t = i.raycaster.intersectObjects(c, !0);
3005
+ const c = ea(H, b), t = i.raycaster.intersectObjects(c, !0);
2781
3006
  if (t.length === 0) {
2782
- i.selectedMeshes.size > 0 && (le(i), i.selectedMesh = null), (k = r.onMiss) == null || k.call(r);
3007
+ i.selectedMeshes.size > 0 && (i2(i), i.selectedMesh = null), (k = r.onMiss) == null || k.call(r);
2783
3008
  return;
2784
3009
  }
2785
- const d = t[0].object, o = e2(d);
2786
- le(i), o.forEach((u) => {
2787
- var m, g;
2788
- const h = u.material;
2789
- i.originalEmissive.has(u) || i.originalEmissive.set(u, ((m = h.emissive) == null ? void 0 : m.clone()) ?? new k0(0)), u.material = h.clone(), (g = u.material.emissive) == null || g.setHex(Ka), i.selectedMeshes.add(u);
3010
+ const d = t[0].object, o = ba(d);
3011
+ i2(i), o.forEach((_) => {
3012
+ var w, p;
3013
+ const g = _.material;
3014
+ i.originalEmissive.has(_) || i.originalEmissive.set(_, ((w = g.emissive) == null ? void 0 : w.clone()) ?? new O0(0)), _.material = g.clone(), (p = _.material.emissive) == null || p.setHex(ei), i.selectedMeshes.add(_);
2790
3015
  }), i.selectedMesh = d;
2791
- const s = rb(d);
2792
- (l = r.onSelect) == null || l.call(r, d, s);
3016
+ const s = ti(d);
3017
+ (A = r.onSelect) == null || A.call(r, d, s);
2793
3018
  }
2794
- function Ge(n) {
2795
- n.selectedMeshes.size > 0 && le(n), n.originalEmissive.clear(), n.selectedMeshes.clear(), n.selectedMesh = null;
3019
+ function q2(n) {
3020
+ n.selectedMeshes.size > 0 && i2(n), n.originalEmissive.clear(), n.selectedMeshes.clear(), n.selectedMesh = null;
2796
3021
  }
2797
- const fb = {
2798
- "联轴器下-1001": ["联轴器下-1001", "联轴器下-2001"],
2799
- "下轧辊-1001": ["下轧辊-1001", "下轧辊000-1"],
2800
- "轧辊整体-1001": ["轧辊整体-1001", "上轧辊000-1"],
2801
- "下轧辊-1": ["下轧辊-1", "下轧辊000-3"],
2802
- "轧辊整体-1": ["轧辊整体-1", "上轧辊000-3"],
2803
- "联轴器下-1": ["联轴器下-1", "联轴器下-2"]
2804
- };
2805
- function Ue(n, e) {
2806
- const a = fb[n] ?? [n];
2807
- for (const H of e.value)
2808
- if (H)
2809
- for (const b of a) {
2810
- const i = H.getObjectByName(b);
2811
- if (i) return i;
2812
- }
2813
- return null;
2814
- }
2815
- function xe(n, e) {
2816
- n.userData[ke] = e, n.traverse((a) => {
2817
- a.userData[se] = n, a.userData[ke] = e;
2818
- });
2819
- }
2820
- function tb(n, e) {
2821
- if (n.parent === e) return;
2822
- n.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2823
- const a = new y(), H = new d0(), b = new y();
2824
- n.getWorldPosition(a), n.getWorldQuaternion(H), n.getWorldScale(b);
2825
- const i = new y();
2826
- e.getWorldPosition(i), n.parent && n.parent.remove(n), e.add(n), n.position.copy(a).sub(i), n.quaternion.copy(H), n.scale.copy(b), n.updateMatrixWorld(!0), e.updateMatrixWorld(!0);
2827
- }
2828
- function nb(n, e, a, H) {
2829
- const b = Ue(e, H);
2830
- if (!b)
2831
- return console.warn(`[useMillPivotAnimation] 未找到参考件: ${e}`), null;
2832
- const i = new y();
2833
- b.getWorldPosition(i);
2834
- const r = new Z0();
2835
- r.name = `${e}-pivot`, r.position.copy(i), n.add(r), r.updateMatrixWorld(!0), xe(b, "coupling");
2836
- const f = /* @__PURE__ */ new Map();
2837
- for (const c of a) {
2838
- const t = Ue(c, H);
2839
- if (!t) {
2840
- console.warn(`[useMillPivotAnimation] 未找到部件: ${c}`);
2841
- continue;
2842
- }
2843
- tb(t, r), xe(t, "roll"), f.set(c, t);
2844
- }
2845
- return { pivot: r, partMap: f };
2846
- }
2847
- function db(n, e, a, H) {
2848
- const i = [
2849
- { ref: "联轴器上-1001", parts: ["轧辊整体-1001", "联轴器上-1001"] },
2850
- { ref: "联轴器下-1001", parts: ["下轧辊-1001", "联轴器下-1001"] },
2851
- { ref: "联轴器上-1", parts: ["轧辊整体-1", "联轴器上-1"] },
2852
- { ref: "联轴器下-1", parts: ["下轧辊-1", "联轴器下-1"] }
2853
- ];
2854
- function r(c, t) {
2855
- const d = t.get(c.partName);
2856
- d ? H(c.partName, d.obj, d.pivot, c) : a(c.partName, c);
2857
- }
2858
- function f() {
2859
- const { scene: c } = e();
2860
- if (!c) {
2861
- console.warn("[useMillPivotAnimation] scene 不可用,跳过轧机 pivot 设置");
2862
- return;
2863
- }
2864
- const t = /* @__PURE__ */ new Map();
2865
- for (const s of i) {
2866
- const k = nb(c, s.ref, s.parts, n);
2867
- k && k.partMap.forEach((l, u) => {
2868
- t.set(u, { pivot: k.pivot, obj: l });
2869
- });
2870
- }
2871
- const d = [
2872
- { partName: "轧辊整体-1001", axis: "z", speed: 0.8, direction: 1 },
2873
- { partName: "联轴器上-1001", axis: "z", speed: 0.8, direction: 1 },
2874
- { partName: "下轧辊-1001", axis: "z", speed: 0.8, direction: -1 },
2875
- { partName: "联轴器下-1001", axis: "z", speed: 0.8, direction: -1 }
2876
- ], o = [
2877
- { partName: "轧辊整体-1", axis: "z", speed: 0.8, direction: 1 },
2878
- { partName: "联轴器上-1", axis: "z", speed: 0.8, direction: 1 },
2879
- { partName: "下轧辊-1", axis: "z", speed: 0.8, direction: -1 },
2880
- { partName: "联轴器下-1", axis: "z", speed: 0.8, direction: -1 }
2881
- ];
2882
- d.forEach((s) => r(s, t)), o.forEach((s) => r(s, t));
3022
+ function oi(n, e, a, H) {
3023
+ function b() {
2883
3024
  }
2884
- return { setupMillAnimations: f };
3025
+ return { setupMillAnimations: b };
2885
3026
  }
2886
- function ob(n) {
3027
+ function si(n) {
2887
3028
  let e = null;
2888
- const a = c0(!1), H = c0(null), b = c0(null);
3029
+ const a = I0(!1), H = I0(null), b = I0(null);
2889
3030
  function i() {
2890
3031
  if (!H.value || !n.threejsContainer.value) {
2891
3032
  b.value = null;
@@ -2893,41 +3034,41 @@ function ob(n) {
2893
3034
  }
2894
3035
  const { camera: k } = n.getThreeJSObjects();
2895
3036
  if (!k) return;
2896
- const u = H.value.worldPosition.clone();
2897
- u.project(k);
2898
- const h = n.threejsContainer.value.getBoundingClientRect(), m = h.left + (u.x * 0.5 + 0.5) * h.width + (n.offsetX ?? 15), g = h.top + (-(u.y * 0.5) + 0.5) * h.height + (n.offsetY ?? 15);
2899
- b.value = { x: m, y: g };
3037
+ const _ = H.value.worldPosition.clone();
3038
+ _.project(k);
3039
+ const g = n.threejsContainer.value.getBoundingClientRect(), w = g.left + (_.x * 0.5 + 0.5) * g.width + (n.offsetX ?? 15), p = g.top + (-(_.y * 0.5) + 0.5) * g.height + (n.offsetY ?? 15);
3040
+ b.value = { x: w, y: p };
2900
3041
  }
2901
3042
  function r(k) {
2902
3043
  if (!e || !n.threejsContainer.value) return;
2903
- const { camera: l, scene: u } = n.getThreeJSObjects();
2904
- if (!l || !u) return;
2905
- const h = n.offsetX ?? 15, m = n.offsetY ?? 15;
2906
- b.value = { x: k.clientX + h, y: k.clientY + m }, cb(
3044
+ const { camera: A, scene: _ } = n.getThreeJSObjects();
3045
+ if (!A || !_) return;
3046
+ const g = n.offsetX ?? 15, w = n.offsetY ?? 15;
3047
+ b.value = { x: k.clientX + g, y: k.clientY + w }, di(
2907
3048
  k,
2908
3049
  n.threejsContainer.value,
2909
- l,
2910
- u,
3050
+ A,
3051
+ _,
2911
3052
  n.currentModels.value,
2912
3053
  e,
2913
3054
  {
2914
- onSelect: (g, A) => {
2915
- var p;
2916
- H.value = A, a.value = !0, i(), (p = n.onSelect) == null || p.call(n, g, A);
3055
+ onSelect: (p, m) => {
3056
+ var I;
3057
+ H.value = m, a.value = !0, i(), (I = n.onSelect) == null || I.call(n, p, m);
2917
3058
  },
2918
3059
  onMiss: () => {
2919
- var g;
2920
- i(), (g = n.onMiss) == null || g.call(n);
3060
+ var p;
3061
+ i(), (p = n.onMiss) == null || p.call(n);
2921
3062
  }
2922
3063
  }
2923
3064
  );
2924
3065
  }
2925
3066
  function f() {
2926
3067
  var k;
2927
- e && Ge(e), e = ib(), (k = n.threejsContainer.value) == null || k.addEventListener("click", r);
3068
+ e && q2(e), e = fi(), (k = n.threejsContainer.value) == null || k.addEventListener("click", r);
2928
3069
  }
2929
3070
  function c() {
2930
- o(), n.threejsContainer.value && e && (n.threejsContainer.value.removeEventListener("click", r), Ge(e), e = null);
3071
+ o(), n.threejsContainer.value && e && (n.threejsContainer.value.removeEventListener("click", r), q2(e), e = null);
2931
3072
  }
2932
3073
  let t = null;
2933
3074
  function d() {
@@ -2939,9 +3080,9 @@ function ob(n) {
2939
3080
  function o() {
2940
3081
  t !== null && (cancelAnimationFrame(t), t = null);
2941
3082
  }
2942
- O0(a, (k) => {
3083
+ ce(a, (k) => {
2943
3084
  k ? d() : o();
2944
- }), Pe(() => {
3085
+ }), W2(() => {
2945
3086
  c();
2946
3087
  });
2947
3088
  function s() {
@@ -2957,7 +3098,7 @@ function ob(n) {
2957
3098
  updatePopupPosition: i
2958
3099
  };
2959
3100
  }
2960
- const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { class: "popup-body" }, ub = /* @__PURE__ */ Be({
3101
+ const ki = { class: "popup-header" }, li = { class: "popup-title" }, ui = { class: "popup-body" }, hi = /* @__PURE__ */ V2({
2961
3102
  __name: "threeModelInfoPanel",
2962
3103
  props: {
2963
3104
  modelValue: { type: Boolean },
@@ -2966,13 +3107,13 @@ const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { clas
2966
3107
  },
2967
3108
  emits: ["update:modelValue", "close"],
2968
3109
  setup(n, { emit: e }) {
2969
- const a = n, H = e, b = c0(a.modelValue);
2970
- O0(() => a.modelValue, (t) => {
3110
+ const a = n, H = e, b = I0(a.modelValue);
3111
+ ce(() => a.modelValue, (t) => {
2971
3112
  b.value = t;
2972
- }), O0(b, (t) => {
3113
+ }), ce(b, (t) => {
2973
3114
  H("update:modelValue", t);
2974
3115
  });
2975
- const i = Y0(() => {
3116
+ const i = qe(() => {
2976
3117
  const t = a.screenPosition;
2977
3118
  return t ? {
2978
3119
  left: `${t.x + 15}px`,
@@ -2982,7 +3123,7 @@ const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { clas
2982
3123
  top: "50%",
2983
3124
  transform: "translate(-50%, -50%)"
2984
3125
  };
2985
- }), r = Y0(() => {
3126
+ }), r = qe(() => {
2986
3127
  if (!a.partInfo) return [];
2987
3128
  const t = a.partInfo;
2988
3129
  return [
@@ -3013,7 +3154,7 @@ const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { clas
3013
3154
  value: `W:${t.boundingBox.size.x.toFixed(2)} H:${t.boundingBox.size.y.toFixed(2)} D:${t.boundingBox.size.z.toFixed(2)}`
3014
3155
  }
3015
3156
  ];
3016
- }), f = Y0(() => {
3157
+ }), f = qe(() => {
3017
3158
  const t = {};
3018
3159
  return r.value.forEach((d) => {
3019
3160
  t[d.prop] = d.value;
@@ -3021,70 +3162,70 @@ const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { clas
3021
3162
  }), c = () => {
3022
3163
  H("update:modelValue", !1), H("close");
3023
3164
  };
3024
- return (t, d) => (D0(), be(c2, { to: "body" }, [
3025
- b.value && t.partInfo ? (D0(), ie("div", {
3165
+ return (t, d) => (He(), Qe(da, { to: "body" }, [
3166
+ b.value && t.partInfo ? (He(), Ze("div", {
3026
3167
  key: 0,
3027
3168
  class: "info-popup",
3028
- style: t2(i.value),
3029
- onClick: d[0] || (d[0] = f2(() => {
3169
+ style: sa(i.value),
3170
+ onClick: d[0] || (d[0] = oa(() => {
3030
3171
  }, ["stop"]))
3031
3172
  }, [
3032
- e0("div", sb, [
3033
- e0("span", kb, He(t.partInfo.name), 1),
3034
- e0("span", {
3173
+ p0("div", ki, [
3174
+ p0("span", li, Ye(t.partInfo.name), 1),
3175
+ p0("span", {
3035
3176
  class: "popup-close",
3036
3177
  onClick: c
3037
3178
  }, "×")
3038
3179
  ]),
3039
- e0("div", lb, [
3040
- h0(Ha, {
3180
+ p0("div", ui, [
3181
+ q0(tb, {
3041
3182
  "row-contents": r.value,
3042
3183
  "row-values": f.value,
3043
3184
  "form-disabled": !0,
3044
3185
  "is-edit": !1
3045
3186
  }, null, 8, ["row-contents", "row-values"])
3046
3187
  ])
3047
- ], 4)) : re("", !0)
3188
+ ], 4)) : Je("", !0)
3048
3189
  ]));
3049
3190
  }
3050
- }), hb = /* @__PURE__ */ Je(ub, [["__scopeId", "data-v-1ac66143"]]), gb = { class: "obj-viewer-container" }, _b = { class: "buttonGroup-topLeft" }, Ab = { class: "buttonGroup-left" }, pb = { class: "buttonGroup-right" }, mb = { class: "buttonGroup-bottom" }, jb = { class: "left-panel" }, Ib = { class: "panel-header" }, yb = {
3191
+ }), gi = /* @__PURE__ */ K2(hi, [["__scopeId", "data-v-1ac66143"]]), _i = { class: "obj-viewer-container" }, Ai = { class: "buttonGroup-topLeft" }, pi = { class: "buttonGroup-left" }, mi = { class: "buttonGroup-right" }, ji = { class: "buttonGroup-bottom" }, Ii = { class: "left-panel" }, yi = { class: "panel-header" }, wi = {
3051
3192
  key: 0,
3052
3193
  class: "loading-overlay"
3053
- }, wb = !0, Fb = /* @__PURE__ */ Be({
3194
+ }, Fi = !0, vi = /* @__PURE__ */ V2({
3054
3195
  __name: "threePreview",
3055
3196
  props: {
3056
3197
  fileBlobs: { default: () => [] }
3057
3198
  },
3058
3199
  setup(n) {
3059
- const a = n, H = c0(null), b = c0(!1), i = c0("");
3200
+ const a = n, H = I0(null), b = I0(!1), i = I0("");
3060
3201
  let r = null;
3061
- function f(T) {
3202
+ function f(R) {
3062
3203
  if (!r || !H.value) return;
3063
- const { camera: O, scene: q } = C();
3064
- !O || !q || ab(
3065
- T,
3204
+ const { camera: E, scene: H0 } = Y();
3205
+ !E || !H0 || Hi(
3206
+ R,
3066
3207
  H.value,
3067
- O,
3068
- q,
3069
- _.value,
3208
+ E,
3209
+ H0,
3210
+ J.value,
3070
3211
  r,
3071
3212
  {
3072
- onHit: (U) => {
3073
- var Z;
3074
- console.log("[PICK_DEBUG] 点击的 mesh 对象:", U), console.log("[PICK_DEBUG] mesh.name:", U.name), console.log("[PICK_DEBUG] mesh.uuid:", U.uuid), console.log("[PICK_DEBUG] parent.name:", (Z = U.parent) == null ? void 0 : Z.name), console.log("[PICK_DEBUG] 完整 mesh:", U);
3213
+ onHit: (W) => {
3214
+ var c0;
3215
+ console.log("[PICK_DEBUG] 点击的 mesh 对象:", W), console.log("[PICK_DEBUG] mesh.name:", W.name), console.log("[PICK_DEBUG] mesh.uuid:", W.uuid), console.log("[PICK_DEBUG] parent.name:", (c0 = W.parent) == null ? void 0 : c0.name), console.log("[PICK_DEBUG] 完整 mesh:", W);
3075
3216
  }
3076
3217
  }
3077
3218
  );
3078
3219
  }
3079
- function c(T) {
3080
- if (!r || T.key !== "h" && T.key !== "H") return;
3081
- const O = T.target;
3082
- if (O) {
3083
- const U = O.tagName;
3084
- if (U === "INPUT" || U === "TEXTAREA" || O.isContentEditable) return;
3220
+ function c(R) {
3221
+ if (!r || R.key !== "h" && R.key !== "H") return;
3222
+ const E = R.target;
3223
+ if (E) {
3224
+ const W = E.tagName;
3225
+ if (W === "INPUT" || W === "TEXTAREA" || E.isContentEditable) return;
3085
3226
  }
3086
- const q = bb(r);
3087
- q === null ? console.log("[PICK_DEBUG] 当前没有选中部件, H 快捷键无效") : (console.log(`[PICK_DEBUG] 已${q ? "显示" : "隐藏"}当前选中部件 (快捷键 H)`), T.preventDefault());
3227
+ const H0 = ci(r);
3228
+ H0 === null ? console.log("[PICK_DEBUG] 当前没有选中部件, H 快捷键无效") : (console.log(`[PICK_DEBUG] 已${H0 ? "显示" : "隐藏"}当前选中部件 (快捷键 H)`), R.preventDefault());
3088
3229
  }
3089
3230
  const {
3090
3231
  threeInfo: t,
@@ -3093,235 +3234,249 @@ const sb = { class: "popup-header" }, kb = { class: "popup-title" }, lb = { clas
3093
3234
  loadingProgress: o,
3094
3235
  loadedModels: s,
3095
3236
  error: k,
3096
- loadModelsFromBlobs: l
3237
+ loadModelsFromBlobs: A
3097
3238
  },
3098
- animation: { isAnimating: u, toggleAnimation: h, stopAnimation: m },
3239
+ animation: { isAnimating: _, toggleAnimation: g, stopAnimation: w },
3099
3240
  clipping: {
3100
- isClipping: g,
3101
- activeClippingAxis: A,
3102
- toggleClipping: p,
3103
- updateClippingPlanes: w
3241
+ isClipping: p,
3242
+ activeClippingAxis: m,
3243
+ toggleClipping: I,
3244
+ updateClippingPlanes: G
3104
3245
  },
3105
3246
  partAnimation: {
3106
- isPartAnimating: F,
3107
- setPartRotations: v,
3108
- startPartAnimations: B,
3109
- stopPartAnimations: W
3247
+ isPartAnimating: V,
3248
+ setPartRotations: S,
3249
+ startPartAnimations: y0,
3250
+ stopPartAnimations: o0
3110
3251
  },
3111
3252
  millPivotAnimation: {
3112
- setupMillAnimations: E
3253
+ setupMillAnimations: l0
3113
3254
  }
3114
- } = Sa(H, {
3255
+ } = Zb(H, {
3115
3256
  useModelLoaderHook: !0,
3116
3257
  useAnimationHook: !0,
3117
3258
  useClippingHook: !0,
3118
3259
  usePartAnimationHook: !0
3119
- }), { resetView: x, initThreeJS: S, handleResize: K, cleanup: N, setAndFitModels: j, axesHelperVisible: R, toggleAxesVisibility: V, currentModels: _, addBeforeRenderCallback: L, removeBeforeRenderCallback: Q, getThreeJSObjects: C, isBeforeRenderPaused: J, setBeforeRenderPaused: X } = t, f0 = () => {
3120
- const T = !J.value;
3121
- X(T), console.log(`[DEBUG] 动画${T ? "已暂停" : "已恢复"}`);
3122
- }, o0 = Ja(
3123
- _,
3124
- L,
3125
- Q
3126
- ), p0 = Qa(
3127
- _,
3128
- L,
3129
- Q,
3260
+ }), { resetView: D0, initThreeJS: V0, handleResize: te, cleanup: ne, setAndFitModels: de, axesHelperVisible: Z, toggleAxesVisibility: s0, currentModels: J, addBeforeRenderCallback: q, removeBeforeRenderCallback: C, getThreeJSObjects: Y, isBeforeRenderPaused: n0, setBeforeRenderPaused: K } = t, e0 = () => {
3261
+ const R = !n0.value;
3262
+ K(R), console.log(`[DEBUG] 动画${R ? "已暂停" : "已恢复"}`);
3263
+ }, a0 = Xb(
3264
+ J,
3265
+ q,
3266
+ C,
3267
+ // 夹具第一次回到初始位置(走完一整圈)时,同步停止链轮自转
3268
+ () => o0()
3269
+ ), D = Kb(
3270
+ J,
3271
+ q,
3130
3272
  C,
3131
- // 传入链条夹具位置查询函数,使胚料能跟随夹具移动
3132
- (T, O) => o0.getClampWorldPosition(T, O)
3273
+ Y,
3274
+ // 传入单个链条夹具位置查询函数
3275
+ (R, E) => a0.getClampWorldPosition(R, E),
3276
+ // 物料到达 conveyorSurfaceEnd 后同时启动链条流动与链轮自转
3277
+ () => {
3278
+ a0.startChainAnimation(), y0();
3279
+ },
3280
+ // 传入一对夹具的中心点查询函数(两夹具共同夹持物料,取中点)
3281
+ (R, E, H0) => a0.getClampPairWorldPosition(R, E, H0),
3282
+ // 循环重置时停止链条流动与链轮自转
3283
+ () => {
3284
+ a0.stopChainAnimation(), o0();
3285
+ }
3133
3286
  ), {
3134
- showPanel: m0,
3135
- selectedPartInfo: Y,
3136
- screenPosition: s0,
3137
- init: G0,
3138
- dispose: C0
3139
- } = ob({
3287
+ showPanel: y,
3288
+ selectedPartInfo: U,
3289
+ screenPosition: B,
3290
+ init: u,
3291
+ dispose: L
3292
+ } = si({
3140
3293
  threejsContainer: H,
3141
- getThreeJSObjects: C,
3142
- currentModels: _
3143
- }), j0 = () => {
3144
- V();
3145
- }, I0 = (T) => {
3146
- A.value = T, w();
3147
- }, U0 = [
3294
+ getThreeJSObjects: Y,
3295
+ currentModels: J
3296
+ }), b0 = () => {
3297
+ s0();
3298
+ }, i0 = (R) => {
3299
+ m.value = R, G();
3300
+ }, d0 = [
3148
3301
  { partName: "主动链轮10倍-1001", axis: "y", speed: 1, direction: -1 },
3149
3302
  { partName: "主动链轮10倍-2001", axis: "y", speed: 1, direction: -1 },
3150
3303
  { partName: "主动链轮10倍-1", axis: "y", speed: 1, direction: 1 },
3151
3304
  { partName: "主动链轮10倍-2", axis: "y", speed: 1, direction: 1 }
3152
3305
  ];
3153
- O0(() => a.fileBlobs, (T) => {
3154
- T && T.length > 0 && l(T).catch((O) => {
3155
- console.error("加载错误:", O);
3306
+ ce(() => a.fileBlobs, (R) => {
3307
+ R && R.length > 0 && A(R).catch((E) => {
3308
+ console.error("加载错误:", E);
3156
3309
  });
3157
3310
  }, {
3158
3311
  immediate: !0,
3159
3312
  deep: !0
3160
- }), O0(s, (T) => {
3161
- T && T.length > 0 && (j(T), E(), v(U0), B(), o0.startChainAnimation(), p0.startBilletDelivery());
3162
- }), O0(k, (T) => {
3163
- T && Ne.error(`模型加载失败: ${T}`);
3313
+ }), ce(s, (R) => {
3314
+ R && R.length > 0 && (de(R), l0(), S(d0), D.startBilletDelivery());
3315
+ }), ce(k, (R) => {
3316
+ R && D2.error(`模型加载失败: ${R}`);
3164
3317
  });
3165
- const $ = (T) => {
3166
- b.value = !0, i.value = T, T === "剖面视图" && !g.value && p();
3318
+ const u0 = (R) => {
3319
+ b.value = !0, i.value = R, R === "剖面视图" && !p.value && I();
3167
3320
  };
3168
- let y0 = null;
3169
- return n2(async () => {
3170
- await d2();
3321
+ let _0 = null;
3322
+ return ka(async () => {
3323
+ await la();
3171
3324
  try {
3172
- S(), H.value && (y0 = new ResizeObserver(K), y0.observe(H.value)), wb && (window.__threePreview__ = {
3325
+ V0(), H.value && (_0 = new ResizeObserver(te), _0.observe(H.value)), Fi && (window.__threePreview__ = {
3173
3326
  threeInfo: t,
3174
- currentModels: _,
3327
+ currentModels: J,
3175
3328
  loadedModels: s,
3176
- getThreeJSObjects: C,
3177
- billetAnimation: p0,
3178
- chainAnimation: o0,
3179
- isBeforeRenderPaused: J,
3180
- setBeforeRenderPaused: X,
3329
+ getThreeJSObjects: Y,
3330
+ billetAnimation: D,
3331
+ chainAnimation: a0,
3332
+ isBeforeRenderPaused: n0,
3333
+ setBeforeRenderPaused: K,
3181
3334
  // 调试函数
3182
- _logRollDetails: (T, O) => {
3183
- var q;
3184
- if (O) {
3185
- const U = new y(), Z = new d0(), a0 = new y(), w0 = new y(), F0 = new W0().setFromObject(O);
3186
- F0.getCenter(a0), F0.getSize(w0), O.getWorldPosition(U), O.getWorldQuaternion(Z), console.log(`[DEBUG] ${T}:`, {
3187
- name: O.name,
3188
- parent: ((q = O.parent) == null ? void 0 : q.name) ?? "null",
3189
- worldPos: U,
3190
- bboxCenter: a0,
3191
- bboxSize: w0,
3192
- worldQuat: Z,
3193
- posVsBboxCenter: { dx: U.x - a0.x, dy: U.y - a0.y, dz: U.z - a0.z }
3335
+ _logRollDetails: (R, E) => {
3336
+ var H0;
3337
+ if (E) {
3338
+ const W = new j(), c0 = new $(), A0 = new j(), $0 = new j(), ee = new _e().setFromObject(E);
3339
+ ee.getCenter(A0), ee.getSize($0), E.getWorldPosition(W), E.getWorldQuaternion(c0), console.log(`[DEBUG] ${R}:`, {
3340
+ name: E.name,
3341
+ parent: ((H0 = E.parent) == null ? void 0 : H0.name) ?? "null",
3342
+ worldPos: W,
3343
+ bboxCenter: A0,
3344
+ bboxSize: $0,
3345
+ worldQuat: c0,
3346
+ posVsBboxCenter: { dx: W.x - A0.x, dy: W.y - A0.y, dz: W.z - A0.z }
3194
3347
  });
3195
3348
  }
3196
3349
  },
3197
3350
  // 快速打印所有轧辊状态
3198
3351
  _printAllRollStates: () => {
3199
- const { scene: T } = C();
3200
- if (!T) return;
3201
- const O = ["轧辊整体-1001", "下轧辊-1001", "轧辊整体-1", "下轧辊-1"];
3202
- for (const q of O) {
3203
- let U = null;
3204
- for (const Z of _.value) {
3205
- if (!Z) continue;
3206
- const a0 = Z.getObjectByName(q);
3207
- if (a0) {
3208
- U = a0;
3352
+ const { scene: R } = Y();
3353
+ if (!R) return;
3354
+ const E = ["轧辊整体-1001", "下轧辊-1001", "轧辊整体-1", "下轧辊-1"];
3355
+ for (const H0 of E) {
3356
+ let W = null;
3357
+ for (const c0 of J.value) {
3358
+ if (!c0) continue;
3359
+ const A0 = c0.getObjectByName(H0);
3360
+ if (A0) {
3361
+ W = A0;
3209
3362
  break;
3210
3363
  }
3211
3364
  }
3212
- if (!U) {
3213
- const Z = T.getObjectByName(q);
3214
- Z && (U = Z);
3365
+ if (!W) {
3366
+ const c0 = R.getObjectByName(H0);
3367
+ c0 && (W = c0);
3215
3368
  }
3216
- if (U) {
3217
- const Z = new y(), a0 = new d0();
3218
- U.getWorldPosition(Z), U.getWorldQuaternion(a0), console.log(`[ROLL] ${q}: pos=${Z.x.toFixed(2)}, ${Z.y.toFixed(2)}, ${Z.z.toFixed(2)} | w=${a0.w.toFixed(4)}`);
3369
+ if (W) {
3370
+ const c0 = new j(), A0 = new $();
3371
+ W.getWorldPosition(c0), W.getWorldQuaternion(A0), console.log(`[ROLL] ${H0}: pos=${c0.x.toFixed(2)}, ${c0.y.toFixed(2)}, ${c0.z.toFixed(2)} | w=${A0.w.toFixed(4)}`);
3219
3372
  }
3220
3373
  }
3221
3374
  }
3222
- }), G0(), console.log("[SELECT] 常驻部件选择已开启,点击模型显示部件信息");
3223
- } catch (T) {
3224
- console.error("Three.js 初始化失败:", T), Ne.error("渲染引擎初始化失败!");
3375
+ }), u(), console.log("[SELECT] 常驻部件选择已开启,点击模型显示部件信息");
3376
+ } catch (R) {
3377
+ console.error("Three.js 初始化失败:", R), D2.error("渲染引擎初始化失败!");
3225
3378
  }
3226
- }), Pe(() => {
3227
- i.value = "", y0 && y0.disconnect(), C0(), u.value && m(), F.value && W(), p0.dispose(), o0.dispose(), N();
3228
- }), (T, O) => {
3229
- const q = o2("el-scrollbar");
3230
- return D0(), ie("div", gb, [
3231
- e0("div", {
3379
+ }), W2(() => {
3380
+ i.value = "", _0 && _0.disconnect(), L(), _.value && w(), V.value && o0(), D.dispose(), a0.dispose(), ne();
3381
+ }), (R, E) => {
3382
+ const H0 = ua("el-scrollbar");
3383
+ return He(), Ze("div", _i, [
3384
+ p0("div", {
3232
3385
  ref_key: "threejsContainer",
3233
3386
  ref: H,
3234
3387
  class: "threejs-container"
3235
3388
  }, null, 512),
3236
- e0("div", _b, [
3237
- h0(v0, {
3389
+ w2(p0("div", Ai, [
3390
+ q0(K0, {
3238
3391
  name: "viewReset",
3239
3392
  size: "24",
3240
- onClick: n0(x),
3393
+ onClick: M0(D0),
3241
3394
  title: "重置"
3242
3395
  }, null, 8, ["onClick"]),
3243
- h0(v0, {
3396
+ q0(K0, {
3244
3397
  name: "fangda",
3245
3398
  size: "24",
3246
3399
  title: "放大"
3247
3400
  }),
3248
- h0(v0, {
3401
+ q0(K0, {
3249
3402
  name: "suoxiao",
3250
3403
  size: "24",
3251
3404
  title: "缩小"
3252
3405
  }),
3253
- h0(v0, {
3406
+ q0(K0, {
3254
3407
  name: "lookAround",
3255
3408
  size: "24",
3256
- onClick: n0(h),
3257
- title: n0(u) ? "停止动画" : "动画视图"
3409
+ onClick: M0(g),
3410
+ title: M0(_) ? "停止动画" : "动画视图"
3258
3411
  }, null, 8, ["onClick", "title"]),
3259
- h0(v0, {
3412
+ q0(K0, {
3260
3413
  name: "zuobiaoxi",
3261
3414
  size: "24",
3262
- active: n0(R),
3263
- onClick: j0,
3415
+ active: M0(Z),
3416
+ onClick: b0,
3264
3417
  title: "显隐坐标轴"
3265
3418
  }, null, 8, ["active"])
3419
+ ], 512), [
3420
+ [F2, !1]
3266
3421
  ]),
3267
- e0("div", Ab, [
3268
- Ie(T.$slots, "button-left", { switchRightPanel: $ }, void 0, !0),
3269
- h0(v0, {
3422
+ p0("div", pi, [
3423
+ v2(R.$slots, "button-left", { switchRightPanel: u0 }, void 0, !0),
3424
+ q0(K0, {
3270
3425
  name: "clipping",
3271
3426
  size: "24",
3272
- onClick: O[0] || (O[0] = (U) => $("剖面视图")),
3427
+ onClick: E[0] || (E[0] = (W) => u0("剖面视图")),
3273
3428
  active: b.value && i.value === "剖面视图",
3274
3429
  title: "剖面视图"
3275
3430
  }, null, 8, ["active"])
3276
3431
  ]),
3277
- e0("div", pb, [
3278
- Ie(T.$slots, "button-right", {}, void 0, !0)
3432
+ p0("div", mi, [
3433
+ v2(R.$slots, "button-right", {}, void 0, !0)
3279
3434
  ]),
3280
- e0("div", mb, [
3281
- (D0(), be(v0, {
3435
+ p0("div", ji, [
3436
+ (He(), Qe(K0, {
3282
3437
  key: 0,
3283
3438
  name: "zanting",
3284
3439
  size: "24",
3285
3440
  backgroundColor: "#ffffff",
3286
- title: n0(J) ? "恢复动画" : "暂停动画",
3287
- onClick: f0
3441
+ title: M0(n0) ? "恢复动画" : "暂停动画",
3442
+ onClick: e0
3288
3443
  }, null, 8, ["title"]))
3289
3444
  ]),
3290
- s2(e0("div", jb, [
3291
- e0("div", Ib, [
3292
- e0("span", null, He(i.value), 1),
3293
- e0("span", {
3445
+ w2(p0("div", Ii, [
3446
+ p0("div", yi, [
3447
+ p0("span", null, Ye(i.value), 1),
3448
+ p0("span", {
3294
3449
  class: "close",
3295
- onClick: O[1] || (O[1] = (U) => b.value = !1)
3450
+ onClick: E[1] || (E[1] = (W) => b.value = !1)
3296
3451
  }, " X ")
3297
3452
  ]),
3298
- h0(q, { "max-height": "650px" }, {
3299
- default: k2(() => [
3300
- i.value === "剖面视图" ? (D0(), be(aa, {
3453
+ q0(H0, { "max-height": "650px" }, {
3454
+ default: ha(() => [
3455
+ i.value === "剖面视图" ? (He(), Qe(rb, {
3301
3456
  key: 0,
3302
- value: n0(A),
3303
- onChange: I0
3304
- }, null, 8, ["value"])) : re("", !0)
3457
+ value: M0(m),
3458
+ onChange: i0
3459
+ }, null, 8, ["value"])) : Je("", !0)
3305
3460
  ]),
3306
3461
  _: 1
3307
3462
  })
3308
3463
  ], 512), [
3309
- [l2, b.value]
3464
+ [F2, b.value]
3310
3465
  ]),
3311
- n0(d) ? (D0(), ie("div", yb, [
3312
- O[3] || (O[3] = e0("div", { class: "loading-spinner" }, null, -1)),
3313
- e0("p", null, He(n0(o)), 1)
3314
- ])) : re("", !0),
3315
- h0(hb, {
3316
- modelValue: n0(m0),
3317
- "onUpdate:modelValue": O[2] || (O[2] = (U) => u2(m0) ? m0.value = U : null),
3318
- "part-info": n0(Y),
3319
- "screen-position": n0(s0)
3466
+ M0(d) ? (He(), Ze("div", wi, [
3467
+ E[3] || (E[3] = p0("div", { class: "loading-spinner" }, null, -1)),
3468
+ p0("p", null, Ye(M0(o)), 1)
3469
+ ])) : Je("", !0),
3470
+ q0(gi, {
3471
+ modelValue: M0(y),
3472
+ "onUpdate:modelValue": E[2] || (E[2] = (W) => ga(y) ? y.value = W : null),
3473
+ "part-info": M0(U),
3474
+ "screen-position": M0(B)
3320
3475
  }, null, 8, ["modelValue", "part-info", "screen-position"])
3321
3476
  ]);
3322
3477
  };
3323
3478
  }
3324
- }), Gb = /* @__PURE__ */ Je(Fb, [["__scopeId", "data-v-81a9f7d0"]]);
3479
+ }), Ui = /* @__PURE__ */ K2(vi, [["__scopeId", "data-v-8f5b320b"]]);
3325
3480
  export {
3326
- Gb as default
3481
+ Ui as default
3327
3482
  };