ss-component-new 1.3.882 → 1.3.883

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { ref as ne, shallowRef as g2, watch as Ke, onBeforeUnmount as Sa, onUnmounted as za, defineComponent as P0, computed as V0, createBlock as G0, openBlock as Ve, Teleport as Qa, createElementBlock as m0, createCommentVNode as K0, withModifiers as _2, normalizeStyle as A2, createElementVNode as se, toDisplayString as X0, createVNode as Ie, unref as Me, nextTick as Za, onMounted as Ja, resolveComponent as p2, withDirectives as Na, vShow as Ta, renderSlot as Ra, withCtx as m2, isRef as j2 } from "vue";
2
- import { b as I2, p as Ya, s as Ka, a as y2 } from "./index-CD8ntnXQ.js";
3
- import { aj as w2, ak as $0, al as Xa, Y as $a, am as A0, Z as U0, an as Pe, ao as ca, C as Ue, ap as xe, c as Xe, aq as F2, j as v2, D as N2, n as x0, V as j, ar as T2, as as $, at as R2, au as e2, av as M2, aw as D2, a3 as p0, ax as O2, ay as a2, az as E2, aA as G2, aB as U2, aC as ea, aD as i2, aE as aa, aF as x2, aG as P2, a0 as B2, aH as L0, a4 as q2, t as b2, l as W2, aI as _0, aJ as C2, u as r2, aK as V2, h as fa, aL as L2, w as S2, aM as z2, a1 as Q2, s as S0, P as Z2, o as J2, aN as Y2, aO as K2, aP as X2, aQ as $2, aR as ei, aS as H2, aT as ai, aU as Ma, aV as Da, aW as Oa, aX as Ea, aY as ia, a6 as ii, aZ as bi, B as j0, a_ as ri, k as Hi, a$ as ci, b0 as fi, ai as ti } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-DZleBV8W.js";
4
- import { u as ni, a as di, b as oi, T as a0, C as si } from "./iconfont-DQXt5WPU.js";
5
- import { M as ki, O as li, S as ui } from "./MTLLoader-DjveDb4X.js";
6
- import { a as hi } from "./index-CT9AmRJY.js";
7
- import { _ as ta } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { B as gi, M as _i, K as Ai, L as pi, N as mi, a1 as ji, T as Ii, cj as yi, E as Ga } from "./request-BQZTUjLG.js";
1
+ import { ref as de, shallowRef as g2, watch as Ye, onBeforeUnmount as za, onUnmounted as Qa, defineComponent as q0, computed as S0, createBlock as x0, openBlock as Ce, Teleport as Za, createElementBlock as j0, createCommentVNode as $0, withModifiers as _2, normalizeStyle as A2, createElementVNode as se, toDisplayString as ea, createVNode as Ie, unref as Re, nextTick as Ja, onMounted as Ya, resolveComponent as p2, withDirectives as Ta, vShow as Ra, renderSlot as Ma, withCtx as m2, isRef as j2 } from "vue";
2
+ import { b as I2, p as Ka, s as Xa, a as y2 } from "./index-CD8ntnXQ.js";
3
+ import { aj as w2, ak as aa, al as $a, Y as e2, am as p0, Z as P0, an as xe, ao as fa, C as Ge, ap as Ue, c as Ke, aq as F2, j as v2, D as N2, n as B0, V as j, ar as T2, as as ee, at as R2, au as a2, av as M2, aw as D2, a3 as m0, ax as O2, ay as i2, az as E2, aA as G2, aB as U2, aC as ia, aD as b2, aE as ba, aF as x2, aG as P2, a0 as B2, aH as z0, a4 as q2, t as r2, l as W2, aI as A0, aJ as C2, u as H2, aK as V2, h as ta, aL as L2, w as S2, aM as z2, a1 as Q2, s as Q0, P as Z2, o as J2, aN as Y2, aO as K2, aP as X2, aQ as $2, aR as ei, aS as c2, aT as ai, aU as Da, aV as Oa, aW as Ea, aX as Ga, aY as ra, a6 as ii, aZ as bi, B as I0, a_ as ri, k as Hi, a$ as ci, b0 as fi, ai as ti } from "./index.vue_vue_type_style_index_0_scoped_05e3a1d8_lang-DZleBV8W.js";
4
+ import { u as ni, a as di, b as oi, T as e0, C as si } from "./iconfont-DQXt5WPU.js";
5
+ import { M as li, O as ki, S as ui } from "./MTLLoader-DjveDb4X.js";
6
+ import { a as hi } from "./index-jjJsAlHI.js";
7
+ import { _ as na } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import { B as gi, M as _i, K as Ai, L as pi, N as mi, a1 as ji, T as Ii, cj as yi, E as Ua } from "./request-BQZTUjLG.js";
9
9
  var wi = "[object Map]", Fi = "[object Set]", vi = Object.prototype, Ni = vi.hasOwnProperty;
10
- function Ua(n) {
10
+ function xa(n) {
11
11
  if (n == null)
12
12
  return !0;
13
13
  if (gi(n) && (_i(n) || typeof n == "string" || typeof n.splice == "function" || Ai(n) || pi(n) || mi(n)))
@@ -22,34 +22,34 @@ function Ua(n) {
22
22
  return !1;
23
23
  return !0;
24
24
  }
25
- function xa(n, a) {
25
+ function Pa(n, a) {
26
26
  if (a === w2)
27
27
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), n;
28
- if (a === $0 || a === Xa) {
28
+ if (a === aa || a === $a) {
29
29
  let e = n.getIndex();
30
30
  if (e === null) {
31
- const r = [], f = n.getAttribute("position");
31
+ const b = [], f = n.getAttribute("position");
32
32
  if (f !== void 0) {
33
33
  for (let c = 0; c < f.count; c++)
34
- r.push(c);
35
- n.setIndex(r), e = n.getIndex();
34
+ b.push(c);
35
+ n.setIndex(b), e = n.getIndex();
36
36
  } else
37
37
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), n;
38
38
  }
39
39
  const H = e.count - 2, i = [];
40
- if (a === $0)
41
- for (let r = 1; r <= H; r++)
42
- i.push(e.getX(0)), i.push(e.getX(r)), i.push(e.getX(r + 1));
40
+ if (a === aa)
41
+ for (let b = 1; b <= H; b++)
42
+ i.push(e.getX(0)), i.push(e.getX(b)), i.push(e.getX(b + 1));
43
43
  else
44
- for (let r = 0; r < H; r++)
45
- r % 2 === 0 ? (i.push(e.getX(r)), i.push(e.getX(r + 1)), i.push(e.getX(r + 2))) : (i.push(e.getX(r + 2)), i.push(e.getX(r + 1)), i.push(e.getX(r)));
44
+ for (let b = 0; b < H; b++)
45
+ b % 2 === 0 ? (i.push(e.getX(b)), i.push(e.getX(b + 1)), i.push(e.getX(b + 2))) : (i.push(e.getX(b + 2)), i.push(e.getX(b + 1)), i.push(e.getX(b)));
46
46
  i.length / 3 !== H && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
47
- const b = n.clone();
48
- return b.setIndex(i), b.clearGroups(), b;
47
+ const r = n.clone();
48
+ return r.setIndex(i), r.clearGroups(), r;
49
49
  } else
50
50
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", a), n;
51
51
  }
52
- class Ti extends $a {
52
+ class Ti extends e2 {
53
53
  /**
54
54
  * Constructs a new glTF loader.
55
55
  *
@@ -102,23 +102,23 @@ class Ti extends $a {
102
102
  * @param {onErrorCallback} onError - Executed when errors occur.
103
103
  */
104
104
  load(a, e, H, i) {
105
- const b = this;
106
- let r;
105
+ const r = this;
106
+ let b;
107
107
  if (this.resourcePath !== "")
108
- r = this.resourcePath;
108
+ b = this.resourcePath;
109
109
  else if (this.path !== "") {
110
- const t = A0.extractUrlBase(a);
111
- r = A0.resolveURL(t, this.path);
110
+ const t = p0.extractUrlBase(a);
111
+ b = p0.resolveURL(t, this.path);
112
112
  } else
113
- r = A0.extractUrlBase(a);
113
+ b = p0.extractUrlBase(a);
114
114
  this.manager.itemStart(a);
115
115
  const f = function(t) {
116
- i ? i(t) : console.error(t), b.manager.itemError(a), b.manager.itemEnd(a);
117
- }, c = new U0(this.manager);
116
+ i ? i(t) : console.error(t), r.manager.itemError(a), r.manager.itemEnd(a);
117
+ }, c = new P0(this.manager);
118
118
  c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(a, function(t) {
119
119
  try {
120
- b.parse(t, r, function(o) {
121
- e(o), b.manager.itemEnd(a);
120
+ r.parse(t, b, function(o) {
121
+ e(o), r.manager.itemEnd(a);
122
122
  }, f);
123
123
  } catch (o) {
124
124
  f(o);
@@ -184,28 +184,28 @@ class Ti extends $a {
184
184
  * @param {onErrorCallback} onError - Executed when errors occur.
185
185
  */
186
186
  parse(a, e, H, i) {
187
- let b;
188
- const r = {}, f = {}, c = new TextDecoder();
187
+ let r;
188
+ const b = {}, f = {}, c = new TextDecoder();
189
189
  if (typeof a == "string")
190
- b = JSON.parse(a);
190
+ r = JSON.parse(a);
191
191
  else if (a instanceof ArrayBuffer)
192
- if (c.decode(new Uint8Array(a, 0, 4)) === c2) {
192
+ if (c.decode(new Uint8Array(a, 0, 4)) === f2) {
193
193
  try {
194
- r[x.KHR_BINARY_GLTF] = new Ji(a);
194
+ b[x.KHR_BINARY_GLTF] = new Ji(a);
195
195
  } catch (d) {
196
196
  i && i(d);
197
197
  return;
198
198
  }
199
- b = JSON.parse(r[x.KHR_BINARY_GLTF].content);
199
+ r = JSON.parse(b[x.KHR_BINARY_GLTF].content);
200
200
  } else
201
- b = JSON.parse(c.decode(a));
201
+ r = JSON.parse(c.decode(a));
202
202
  else
203
- b = a;
204
- if (b.asset === void 0 || b.asset.version[0] < 2) {
203
+ r = a;
204
+ if (r.asset === void 0 || r.asset.version[0] < 2) {
205
205
  i && i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
206
206
  return;
207
207
  }
208
- const t = new tb(b, {
208
+ const t = new tb(r, {
209
209
  path: e || this.resourcePath || "",
210
210
  crossOrigin: this.crossOrigin,
211
211
  requestHeader: this.requestHeader,
@@ -216,29 +216,29 @@ class Ti extends $a {
216
216
  t.fileLoader.setRequestHeader(this.requestHeader);
217
217
  for (let o = 0; o < this.pluginCallbacks.length; o++) {
218
218
  const d = this.pluginCallbacks[o](t);
219
- d.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), f[d.name] = d, r[d.name] = !0;
219
+ d.name || console.error("THREE.GLTFLoader: Invalid plugin found: missing name"), f[d.name] = d, b[d.name] = !0;
220
220
  }
221
- if (b.extensionsUsed)
222
- for (let o = 0; o < b.extensionsUsed.length; ++o) {
223
- const d = b.extensionsUsed[o], s = b.extensionsRequired || [];
221
+ if (r.extensionsUsed)
222
+ for (let o = 0; o < r.extensionsUsed.length; ++o) {
223
+ const d = r.extensionsUsed[o], s = r.extensionsRequired || [];
224
224
  switch (d) {
225
225
  case x.KHR_MATERIALS_UNLIT:
226
- r[d] = new Di();
226
+ b[d] = new Di();
227
227
  break;
228
228
  case x.KHR_DRACO_MESH_COMPRESSION:
229
- r[d] = new Yi(b, this.dracoLoader);
229
+ b[d] = new Yi(r, this.dracoLoader);
230
230
  break;
231
231
  case x.KHR_TEXTURE_TRANSFORM:
232
- r[d] = new Ki();
232
+ b[d] = new Ki();
233
233
  break;
234
234
  case x.KHR_MESH_QUANTIZATION:
235
- r[d] = new Xi();
235
+ b[d] = new Xi();
236
236
  break;
237
237
  default:
238
238
  s.indexOf(d) >= 0 && f[d] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + d + '".');
239
239
  }
240
240
  }
241
- t.setExtensions(r), t.setPlugins(f), t.parse(H, i);
241
+ t.setExtensions(b), t.setPlugins(f), t.parse(H, i);
242
242
  }
243
243
  /**
244
244
  * Async version of {@link GLTFLoader#parse}.
@@ -250,8 +250,8 @@ class Ti extends $a {
250
250
  */
251
251
  parseAsync(a, e) {
252
252
  const H = this;
253
- return new Promise(function(i, b) {
254
- H.parse(a, e, i, b);
253
+ return new Promise(function(i, r) {
254
+ H.parse(a, e, i, r);
255
255
  });
256
256
  }
257
257
  }
@@ -303,18 +303,18 @@ class Mi {
303
303
  _markDefs() {
304
304
  const a = this.parser, e = this.parser.json.nodes || [];
305
305
  for (let H = 0, i = e.length; H < i; H++) {
306
- const b = e[H];
307
- b.extensions && b.extensions[this.name] && b.extensions[this.name].light !== void 0 && a._addNodeRef(this.cache, b.extensions[this.name].light);
306
+ const r = e[H];
307
+ r.extensions && r.extensions[this.name] && r.extensions[this.name].light !== void 0 && a._addNodeRef(this.cache, r.extensions[this.name].light);
308
308
  }
309
309
  }
310
310
  _loadLight(a) {
311
311
  const e = this.parser, H = "light:" + a;
312
312
  let i = e.cache.get(H);
313
313
  if (i) return i;
314
- const b = e.json, c = ((b.extensions && b.extensions[this.name] || {}).lights || [])[a];
314
+ const r = e.json, c = ((r.extensions && r.extensions[this.name] || {}).lights || [])[a];
315
315
  let t;
316
- const o = new Ue(16777215);
317
- c.color !== void 0 && o.setRGB(c.color[0], c.color[1], c.color[2], xe);
316
+ const o = new Ge(16777215);
317
+ c.color !== void 0 && o.setRGB(c.color[0], c.color[1], c.color[2], Ue);
318
318
  const d = c.range !== void 0 ? c.range : 0;
319
319
  switch (c.type) {
320
320
  case "directional":
@@ -329,14 +329,14 @@ class Mi {
329
329
  default:
330
330
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
331
331
  }
332
- return t.position.set(0, 0, 0), Ce(t, c), c.intensity !== void 0 && (t.intensity = c.intensity), t.name = e.createUniqueName(c.name || "light_" + a), i = Promise.resolve(t), e.cache.add(H, i), i;
332
+ return t.position.set(0, 0, 0), We(t, c), c.intensity !== void 0 && (t.intensity = c.intensity), t.name = e.createUniqueName(c.name || "light_" + a), i = Promise.resolve(t), e.cache.add(H, i), i;
333
333
  }
334
334
  getDependency(a, e) {
335
335
  if (a === "light")
336
336
  return this._loadLight(e);
337
337
  }
338
338
  createNodeAttachment(a) {
339
- const e = this, H = this.parser, b = H.json.nodes[a], f = (b.extensions && b.extensions[this.name] || {}).light;
339
+ const e = this, H = this.parser, r = H.json.nodes[a], f = (r.extensions && r.extensions[this.name] || {}).light;
340
340
  return f === void 0 ? null : this._loadLight(f).then(function(c) {
341
341
  return H._getNodeRef(e.cache, f, c);
342
342
  });
@@ -347,18 +347,18 @@ class Di {
347
347
  this.name = x.KHR_MATERIALS_UNLIT;
348
348
  }
349
349
  getMaterialType() {
350
- return _0;
350
+ return A0;
351
351
  }
352
352
  extendParams(a, e, H) {
353
353
  const i = [];
354
- a.color = new Ue(1, 1, 1), a.opacity = 1;
355
- const b = e.pbrMetallicRoughness;
356
- if (b) {
357
- if (Array.isArray(b.baseColorFactor)) {
358
- const r = b.baseColorFactor;
359
- a.color.setRGB(r[0], r[1], r[2], xe), a.opacity = r[3];
354
+ a.color = new Ge(1, 1, 1), a.opacity = 1;
355
+ const r = e.pbrMetallicRoughness;
356
+ if (r) {
357
+ if (Array.isArray(r.baseColorFactor)) {
358
+ const b = r.baseColorFactor;
359
+ a.color.setRGB(b[0], b[1], b[2], Ue), a.opacity = b[3];
360
360
  }
361
- b.baseColorTexture !== void 0 && i.push(H.assignTexture(a, "map", b.baseColorTexture, Xe));
361
+ r.baseColorTexture !== void 0 && i.push(H.assignTexture(a, "map", r.baseColorTexture, Ke));
362
362
  }
363
363
  return Promise.all(i);
364
364
  }
@@ -371,8 +371,8 @@ class Oi {
371
371
  const i = this.parser.json.materials[a];
372
372
  if (!i.extensions || !i.extensions[this.name])
373
373
  return Promise.resolve();
374
- const b = i.extensions[this.name].emissiveStrength;
375
- return b !== void 0 && (e.emissiveIntensity = b), Promise.resolve();
374
+ const r = i.extensions[this.name].emissiveStrength;
375
+ return r !== void 0 && (e.emissiveIntensity = r), Promise.resolve();
376
376
  }
377
377
  }
378
378
  class Ei {
@@ -381,18 +381,18 @@ class Ei {
381
381
  }
382
382
  getMaterialType(a) {
383
383
  const H = this.parser.json.materials[a];
384
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
384
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
385
385
  }
386
386
  extendMaterialParams(a, e) {
387
387
  const H = this.parser, i = H.json.materials[a];
388
388
  if (!i.extensions || !i.extensions[this.name])
389
389
  return Promise.resolve();
390
- const b = [], r = i.extensions[this.name];
391
- if (r.clearcoatFactor !== void 0 && (e.clearcoat = r.clearcoatFactor), r.clearcoatTexture !== void 0 && b.push(H.assignTexture(e, "clearcoatMap", r.clearcoatTexture)), r.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = r.clearcoatRoughnessFactor), r.clearcoatRoughnessTexture !== void 0 && b.push(H.assignTexture(e, "clearcoatRoughnessMap", r.clearcoatRoughnessTexture)), r.clearcoatNormalTexture !== void 0 && (b.push(H.assignTexture(e, "clearcoatNormalMap", r.clearcoatNormalTexture)), r.clearcoatNormalTexture.scale !== void 0)) {
392
- const f = r.clearcoatNormalTexture.scale;
393
- e.clearcoatNormalScale = new ca(f, f);
390
+ const r = [], b = i.extensions[this.name];
391
+ if (b.clearcoatFactor !== void 0 && (e.clearcoat = b.clearcoatFactor), b.clearcoatTexture !== void 0 && r.push(H.assignTexture(e, "clearcoatMap", b.clearcoatTexture)), b.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = b.clearcoatRoughnessFactor), b.clearcoatRoughnessTexture !== void 0 && r.push(H.assignTexture(e, "clearcoatRoughnessMap", b.clearcoatRoughnessTexture)), b.clearcoatNormalTexture !== void 0 && (r.push(H.assignTexture(e, "clearcoatNormalMap", b.clearcoatNormalTexture)), b.clearcoatNormalTexture.scale !== void 0)) {
392
+ const f = b.clearcoatNormalTexture.scale;
393
+ e.clearcoatNormalScale = new fa(f, f);
394
394
  }
395
- return Promise.all(b);
395
+ return Promise.all(r);
396
396
  }
397
397
  }
398
398
  class Gi {
@@ -401,14 +401,14 @@ class Gi {
401
401
  }
402
402
  getMaterialType(a) {
403
403
  const H = this.parser.json.materials[a];
404
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
404
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
405
405
  }
406
406
  extendMaterialParams(a, e) {
407
407
  const i = this.parser.json.materials[a];
408
408
  if (!i.extensions || !i.extensions[this.name])
409
409
  return Promise.resolve();
410
- const b = i.extensions[this.name];
411
- return e.dispersion = b.dispersion !== void 0 ? b.dispersion : 0, Promise.resolve();
410
+ const r = i.extensions[this.name];
411
+ return e.dispersion = r.dispersion !== void 0 ? r.dispersion : 0, Promise.resolve();
412
412
  }
413
413
  }
414
414
  class Ui {
@@ -417,14 +417,14 @@ class Ui {
417
417
  }
418
418
  getMaterialType(a) {
419
419
  const H = this.parser.json.materials[a];
420
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
420
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
421
421
  }
422
422
  extendMaterialParams(a, e) {
423
423
  const H = this.parser, i = H.json.materials[a];
424
424
  if (!i.extensions || !i.extensions[this.name])
425
425
  return Promise.resolve();
426
- const b = [], r = i.extensions[this.name];
427
- return r.iridescenceFactor !== void 0 && (e.iridescence = r.iridescenceFactor), r.iridescenceTexture !== void 0 && b.push(H.assignTexture(e, "iridescenceMap", r.iridescenceTexture)), r.iridescenceIor !== void 0 && (e.iridescenceIOR = r.iridescenceIor), e.iridescenceThicknessRange === void 0 && (e.iridescenceThicknessRange = [100, 400]), r.iridescenceThicknessMinimum !== void 0 && (e.iridescenceThicknessRange[0] = r.iridescenceThicknessMinimum), r.iridescenceThicknessMaximum !== void 0 && (e.iridescenceThicknessRange[1] = r.iridescenceThicknessMaximum), r.iridescenceThicknessTexture !== void 0 && b.push(H.assignTexture(e, "iridescenceThicknessMap", r.iridescenceThicknessTexture)), Promise.all(b);
426
+ const r = [], b = i.extensions[this.name];
427
+ return b.iridescenceFactor !== void 0 && (e.iridescence = b.iridescenceFactor), b.iridescenceTexture !== void 0 && r.push(H.assignTexture(e, "iridescenceMap", b.iridescenceTexture)), b.iridescenceIor !== void 0 && (e.iridescenceIOR = b.iridescenceIor), e.iridescenceThicknessRange === void 0 && (e.iridescenceThicknessRange = [100, 400]), b.iridescenceThicknessMinimum !== void 0 && (e.iridescenceThicknessRange[0] = b.iridescenceThicknessMinimum), b.iridescenceThicknessMaximum !== void 0 && (e.iridescenceThicknessRange[1] = b.iridescenceThicknessMaximum), b.iridescenceThicknessTexture !== void 0 && r.push(H.assignTexture(e, "iridescenceThicknessMap", b.iridescenceThicknessTexture)), Promise.all(r);
428
428
  }
429
429
  }
430
430
  class xi {
@@ -433,20 +433,20 @@ class xi {
433
433
  }
434
434
  getMaterialType(a) {
435
435
  const H = this.parser.json.materials[a];
436
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
436
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
437
437
  }
438
438
  extendMaterialParams(a, e) {
439
439
  const H = this.parser, i = H.json.materials[a];
440
440
  if (!i.extensions || !i.extensions[this.name])
441
441
  return Promise.resolve();
442
- const b = [];
443
- e.sheenColor = new Ue(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
444
- const r = i.extensions[this.name];
445
- if (r.sheenColorFactor !== void 0) {
446
- const f = r.sheenColorFactor;
447
- e.sheenColor.setRGB(f[0], f[1], f[2], xe);
442
+ const r = [];
443
+ e.sheenColor = new Ge(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
444
+ const b = i.extensions[this.name];
445
+ if (b.sheenColorFactor !== void 0) {
446
+ const f = b.sheenColorFactor;
447
+ e.sheenColor.setRGB(f[0], f[1], f[2], Ue);
448
448
  }
449
- return r.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && b.push(H.assignTexture(e, "sheenColorMap", r.sheenColorTexture, Xe)), r.sheenRoughnessTexture !== void 0 && b.push(H.assignTexture(e, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(b);
449
+ return b.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = b.sheenRoughnessFactor), b.sheenColorTexture !== void 0 && r.push(H.assignTexture(e, "sheenColorMap", b.sheenColorTexture, Ke)), b.sheenRoughnessTexture !== void 0 && r.push(H.assignTexture(e, "sheenRoughnessMap", b.sheenRoughnessTexture)), Promise.all(r);
450
450
  }
451
451
  }
452
452
  class Pi {
@@ -455,14 +455,14 @@ class Pi {
455
455
  }
456
456
  getMaterialType(a) {
457
457
  const H = this.parser.json.materials[a];
458
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
458
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
459
459
  }
460
460
  extendMaterialParams(a, e) {
461
461
  const H = this.parser, i = H.json.materials[a];
462
462
  if (!i.extensions || !i.extensions[this.name])
463
463
  return Promise.resolve();
464
- const b = [], r = i.extensions[this.name];
465
- return r.transmissionFactor !== void 0 && (e.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && b.push(H.assignTexture(e, "transmissionMap", r.transmissionTexture)), Promise.all(b);
464
+ const r = [], b = i.extensions[this.name];
465
+ return b.transmissionFactor !== void 0 && (e.transmission = b.transmissionFactor), b.transmissionTexture !== void 0 && r.push(H.assignTexture(e, "transmissionMap", b.transmissionTexture)), Promise.all(r);
466
466
  }
467
467
  }
468
468
  class Bi {
@@ -471,16 +471,16 @@ class Bi {
471
471
  }
472
472
  getMaterialType(a) {
473
473
  const H = this.parser.json.materials[a];
474
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
474
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
475
475
  }
476
476
  extendMaterialParams(a, e) {
477
477
  const H = this.parser, i = H.json.materials[a];
478
478
  if (!i.extensions || !i.extensions[this.name])
479
479
  return Promise.resolve();
480
- const b = [], r = i.extensions[this.name];
481
- e.thickness = r.thicknessFactor !== void 0 ? r.thicknessFactor : 0, r.thicknessTexture !== void 0 && b.push(H.assignTexture(e, "thicknessMap", r.thicknessTexture)), e.attenuationDistance = r.attenuationDistance || 1 / 0;
482
- const f = r.attenuationColor || [1, 1, 1];
483
- return e.attenuationColor = new Ue().setRGB(f[0], f[1], f[2], xe), Promise.all(b);
480
+ const r = [], b = i.extensions[this.name];
481
+ e.thickness = b.thicknessFactor !== void 0 ? b.thicknessFactor : 0, b.thicknessTexture !== void 0 && r.push(H.assignTexture(e, "thicknessMap", b.thicknessTexture)), e.attenuationDistance = b.attenuationDistance || 1 / 0;
482
+ const f = b.attenuationColor || [1, 1, 1];
483
+ return e.attenuationColor = new Ge().setRGB(f[0], f[1], f[2], Ue), Promise.all(r);
484
484
  }
485
485
  }
486
486
  class qi {
@@ -489,14 +489,14 @@ class qi {
489
489
  }
490
490
  getMaterialType(a) {
491
491
  const H = this.parser.json.materials[a];
492
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
492
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
493
493
  }
494
494
  extendMaterialParams(a, e) {
495
495
  const i = this.parser.json.materials[a];
496
496
  if (!i.extensions || !i.extensions[this.name])
497
497
  return Promise.resolve();
498
- const b = i.extensions[this.name];
499
- return e.ior = b.ior !== void 0 ? b.ior : 1.5, Promise.resolve();
498
+ const r = i.extensions[this.name];
499
+ return e.ior = r.ior !== void 0 ? r.ior : 1.5, Promise.resolve();
500
500
  }
501
501
  }
502
502
  class Wi {
@@ -505,16 +505,16 @@ class Wi {
505
505
  }
506
506
  getMaterialType(a) {
507
507
  const H = this.parser.json.materials[a];
508
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
508
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
509
509
  }
510
510
  extendMaterialParams(a, e) {
511
511
  const H = this.parser, i = H.json.materials[a];
512
512
  if (!i.extensions || !i.extensions[this.name])
513
513
  return Promise.resolve();
514
- const b = [], r = i.extensions[this.name];
515
- e.specularIntensity = r.specularFactor !== void 0 ? r.specularFactor : 1, r.specularTexture !== void 0 && b.push(H.assignTexture(e, "specularIntensityMap", r.specularTexture));
516
- const f = r.specularColorFactor || [1, 1, 1];
517
- return e.specularColor = new Ue().setRGB(f[0], f[1], f[2], xe), r.specularColorTexture !== void 0 && b.push(H.assignTexture(e, "specularColorMap", r.specularColorTexture, Xe)), Promise.all(b);
514
+ const r = [], b = i.extensions[this.name];
515
+ e.specularIntensity = b.specularFactor !== void 0 ? b.specularFactor : 1, b.specularTexture !== void 0 && r.push(H.assignTexture(e, "specularIntensityMap", b.specularTexture));
516
+ const f = b.specularColorFactor || [1, 1, 1];
517
+ return e.specularColor = new Ge().setRGB(f[0], f[1], f[2], Ue), b.specularColorTexture !== void 0 && r.push(H.assignTexture(e, "specularColorMap", b.specularColorTexture, Ke)), Promise.all(r);
518
518
  }
519
519
  }
520
520
  class Ci {
@@ -523,14 +523,14 @@ class Ci {
523
523
  }
524
524
  getMaterialType(a) {
525
525
  const H = this.parser.json.materials[a];
526
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
526
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
527
527
  }
528
528
  extendMaterialParams(a, e) {
529
529
  const H = this.parser, i = H.json.materials[a];
530
530
  if (!i.extensions || !i.extensions[this.name])
531
531
  return Promise.resolve();
532
- const b = [], r = i.extensions[this.name];
533
- return e.bumpScale = r.bumpFactor !== void 0 ? r.bumpFactor : 1, r.bumpTexture !== void 0 && b.push(H.assignTexture(e, "bumpMap", r.bumpTexture)), Promise.all(b);
532
+ const r = [], b = i.extensions[this.name];
533
+ return e.bumpScale = b.bumpFactor !== void 0 ? b.bumpFactor : 1, b.bumpTexture !== void 0 && r.push(H.assignTexture(e, "bumpMap", b.bumpTexture)), Promise.all(r);
534
534
  }
535
535
  }
536
536
  class Vi {
@@ -539,14 +539,14 @@ class Vi {
539
539
  }
540
540
  getMaterialType(a) {
541
541
  const H = this.parser.json.materials[a];
542
- return !H.extensions || !H.extensions[this.name] ? null : Pe;
542
+ return !H.extensions || !H.extensions[this.name] ? null : xe;
543
543
  }
544
544
  extendMaterialParams(a, e) {
545
545
  const H = this.parser, i = H.json.materials[a];
546
546
  if (!i.extensions || !i.extensions[this.name])
547
547
  return Promise.resolve();
548
- const b = [], r = i.extensions[this.name];
549
- return r.anisotropyStrength !== void 0 && (e.anisotropy = r.anisotropyStrength), r.anisotropyRotation !== void 0 && (e.anisotropyRotation = r.anisotropyRotation), r.anisotropyTexture !== void 0 && b.push(H.assignTexture(e, "anisotropyMap", r.anisotropyTexture)), Promise.all(b);
548
+ const r = [], b = i.extensions[this.name];
549
+ return b.anisotropyStrength !== void 0 && (e.anisotropy = b.anisotropyStrength), b.anisotropyRotation !== void 0 && (e.anisotropyRotation = b.anisotropyRotation), b.anisotropyTexture !== void 0 && r.push(H.assignTexture(e, "anisotropyMap", b.anisotropyTexture)), Promise.all(r);
550
550
  }
551
551
  }
552
552
  class Li {
@@ -557,13 +557,13 @@ class Li {
557
557
  const e = this.parser, H = e.json, i = H.textures[a];
558
558
  if (!i.extensions || !i.extensions[this.name])
559
559
  return null;
560
- const b = i.extensions[this.name], r = e.options.ktx2Loader;
561
- if (!r) {
560
+ const r = i.extensions[this.name], b = e.options.ktx2Loader;
561
+ if (!b) {
562
562
  if (H.extensionsRequired && H.extensionsRequired.indexOf(this.name) >= 0)
563
563
  throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
564
564
  return null;
565
565
  }
566
- return e.loadTextureImage(a, b.source, r);
566
+ return e.loadTextureImage(a, r.source, b);
567
567
  }
568
568
  }
569
569
  class Si {
@@ -571,16 +571,16 @@ class Si {
571
571
  this.parser = a, this.name = x.EXT_TEXTURE_WEBP;
572
572
  }
573
573
  loadTexture(a) {
574
- const e = this.name, H = this.parser, i = H.json, b = i.textures[a];
575
- if (!b.extensions || !b.extensions[e])
574
+ const e = this.name, H = this.parser, i = H.json, r = i.textures[a];
575
+ if (!r.extensions || !r.extensions[e])
576
576
  return null;
577
- const r = b.extensions[e], f = i.images[r.source];
577
+ const b = r.extensions[e], f = i.images[b.source];
578
578
  let c = H.textureLoader;
579
579
  if (f.uri) {
580
580
  const t = H.options.manager.getHandler(f.uri);
581
581
  t !== null && (c = t);
582
582
  }
583
- return H.loadTextureImage(a, r.source, c);
583
+ return H.loadTextureImage(a, b.source, c);
584
584
  }
585
585
  }
586
586
  class zi {
@@ -588,16 +588,16 @@ class zi {
588
588
  this.parser = a, this.name = x.EXT_TEXTURE_AVIF;
589
589
  }
590
590
  loadTexture(a) {
591
- const e = this.name, H = this.parser, i = H.json, b = i.textures[a];
592
- if (!b.extensions || !b.extensions[e])
591
+ const e = this.name, H = this.parser, i = H.json, r = i.textures[a];
592
+ if (!r.extensions || !r.extensions[e])
593
593
  return null;
594
- const r = b.extensions[e], f = i.images[r.source];
594
+ const b = r.extensions[e], f = i.images[b.source];
595
595
  let c = H.textureLoader;
596
596
  if (f.uri) {
597
597
  const t = H.options.manager.getHandler(f.uri);
598
598
  t !== null && (c = t);
599
599
  }
600
- return H.loadTextureImage(a, r.source, c);
600
+ return H.loadTextureImage(a, b.source, c);
601
601
  }
602
602
  }
603
603
  class Qi {
@@ -607,19 +607,19 @@ class Qi {
607
607
  loadBufferView(a) {
608
608
  const e = this.parser.json, H = e.bufferViews[a];
609
609
  if (H.extensions && H.extensions[this.name]) {
610
- const i = H.extensions[this.name], b = this.parser.getDependency("buffer", i.buffer), r = this.parser.options.meshoptDecoder;
611
- if (!r || !r.supported) {
610
+ const i = H.extensions[this.name], r = this.parser.getDependency("buffer", i.buffer), b = this.parser.options.meshoptDecoder;
611
+ if (!b || !b.supported) {
612
612
  if (e.extensionsRequired && e.extensionsRequired.indexOf(this.name) >= 0)
613
613
  throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");
614
614
  return null;
615
615
  }
616
- return b.then(function(f) {
616
+ return r.then(function(f) {
617
617
  const c = i.byteOffset || 0, t = i.byteLength || 0, o = i.count, d = i.byteStride, s = new Uint8Array(f, c, t);
618
- return r.decodeGltfBufferAsync ? r.decodeGltfBufferAsync(o, d, s, i.mode, i.filter).then(function(k) {
619
- return k.buffer;
620
- }) : r.ready.then(function() {
621
- const k = new ArrayBuffer(o * d);
622
- return r.decodeGltfBuffer(new Uint8Array(k), o, d, s, i.mode, i.filter), k;
618
+ return b.decodeGltfBufferAsync ? b.decodeGltfBufferAsync(o, d, s, i.mode, i.filter).then(function(l) {
619
+ return l.buffer;
620
+ }) : b.ready.then(function() {
621
+ const l = new ArrayBuffer(o * d);
622
+ return b.decodeGltfBuffer(new Uint8Array(l), o, d, s, i.mode, i.filter), l;
623
623
  });
624
624
  });
625
625
  } else
@@ -636,55 +636,55 @@ class Zi {
636
636
  return null;
637
637
  const i = e.meshes[H.mesh];
638
638
  for (const t of i.primitives)
639
- if (t.mode !== De.TRIANGLES && t.mode !== De.TRIANGLE_STRIP && t.mode !== De.TRIANGLE_FAN && t.mode !== void 0)
639
+ if (t.mode !== Me.TRIANGLES && t.mode !== Me.TRIANGLE_STRIP && t.mode !== Me.TRIANGLE_FAN && t.mode !== void 0)
640
640
  return null;
641
- const r = H.extensions[this.name].attributes, f = [], c = {};
642
- for (const t in r)
643
- f.push(this.parser.getDependency("accessor", r[t]).then((o) => (c[t] = o, c[t])));
641
+ const b = H.extensions[this.name].attributes, f = [], c = {};
642
+ for (const t in b)
643
+ f.push(this.parser.getDependency("accessor", b[t]).then((o) => (c[t] = o, c[t])));
644
644
  return f.length < 1 ? null : (f.push(this.parser.createNodeMesh(a)), Promise.all(f).then((t) => {
645
- const o = t.pop(), d = o.isGroup ? o.children : [o], s = t[0].count, k = [];
645
+ const o = t.pop(), d = o.isGroup ? o.children : [o], s = t[0].count, l = [];
646
646
  for (const h of d) {
647
- const A = new x0(), _ = new j(), w = new $(), p = new j(1, 1, 1), m = new T2(h.geometry, h.material, s);
647
+ const m = new B0(), _ = new j(), w = new ee(), p = new j(1, 1, 1), A = new T2(h.geometry, h.material, s);
648
648
  for (let I = 0; I < s; I++)
649
- c.TRANSLATION && _.fromBufferAttribute(c.TRANSLATION, I), c.ROTATION && w.fromBufferAttribute(c.ROTATION, I), c.SCALE && p.fromBufferAttribute(c.SCALE, I), m.setMatrixAt(I, A.compose(_, w, p));
649
+ c.TRANSLATION && _.fromBufferAttribute(c.TRANSLATION, I), c.ROTATION && w.fromBufferAttribute(c.ROTATION, I), c.SCALE && p.fromBufferAttribute(c.SCALE, I), A.setMatrixAt(I, m.compose(_, w, p));
650
650
  for (const I in c)
651
651
  if (I === "_COLOR_0") {
652
- const G = c[I];
653
- m.instanceColor = new R2(G.array, G.itemSize, G.normalized);
652
+ const O = c[I];
653
+ A.instanceColor = new R2(O.array, O.itemSize, O.normalized);
654
654
  } else I !== "TRANSLATION" && I !== "ROTATION" && I !== "SCALE" && h.geometry.setAttribute(I, c[I]);
655
- e2.prototype.copy.call(m, h), this.parser.assignFinalMaterial(m), k.push(m);
655
+ a2.prototype.copy.call(A, h), this.parser.assignFinalMaterial(A), l.push(A);
656
656
  }
657
- return o.isGroup ? (o.clear(), o.add(...k), o) : k[0];
657
+ return o.isGroup ? (o.clear(), o.add(...l), o) : l[0];
658
658
  }));
659
659
  }
660
660
  }
661
- const c2 = "glTF", g0 = 12, Pa = { JSON: 1313821514, BIN: 5130562 };
661
+ const f2 = "glTF", _0 = 12, Ba = { JSON: 1313821514, BIN: 5130562 };
662
662
  class Ji {
663
663
  constructor(a) {
664
664
  this.name = x.KHR_BINARY_GLTF, this.content = null, this.body = null;
665
- const e = new DataView(a, 0, g0), H = new TextDecoder();
665
+ const e = new DataView(a, 0, _0), H = new TextDecoder();
666
666
  if (this.header = {
667
667
  magic: H.decode(new Uint8Array(a.slice(0, 4))),
668
668
  version: e.getUint32(4, !0),
669
669
  length: e.getUint32(8, !0)
670
- }, this.header.magic !== c2)
670
+ }, this.header.magic !== f2)
671
671
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
672
672
  if (this.header.version < 2)
673
673
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
674
- const i = this.header.length - g0, b = new DataView(a, g0);
675
- let r = 0;
676
- for (; r < i; ) {
677
- const f = b.getUint32(r, !0);
678
- r += 4;
679
- const c = b.getUint32(r, !0);
680
- if (r += 4, c === Pa.JSON) {
681
- const t = new Uint8Array(a, g0 + r, f);
674
+ const i = this.header.length - _0, r = new DataView(a, _0);
675
+ let b = 0;
676
+ for (; b < i; ) {
677
+ const f = r.getUint32(b, !0);
678
+ b += 4;
679
+ const c = r.getUint32(b, !0);
680
+ if (b += 4, c === Ba.JSON) {
681
+ const t = new Uint8Array(a, _0 + b, f);
682
682
  this.content = H.decode(t);
683
- } else if (c === Pa.BIN) {
684
- const t = g0 + r;
683
+ } else if (c === Ba.BIN) {
684
+ const t = _0 + b;
685
685
  this.body = a.slice(t, t + f);
686
686
  }
687
- r += f;
687
+ b += f;
688
688
  }
689
689
  if (this.content === null)
690
690
  throw new Error("THREE.GLTFLoader: JSON content not found.");
@@ -697,27 +697,27 @@ class Yi {
697
697
  this.name = x.KHR_DRACO_MESH_COMPRESSION, this.json = a, this.dracoLoader = e, this.dracoLoader.preload();
698
698
  }
699
699
  decodePrimitive(a, e) {
700
- const H = this.json, i = this.dracoLoader, b = a.extensions[this.name].bufferView, r = a.extensions[this.name].attributes, f = {}, c = {}, t = {};
701
- for (const o in r) {
702
- const d = ba[o] || o.toLowerCase();
703
- f[d] = r[o];
700
+ const H = this.json, i = this.dracoLoader, r = a.extensions[this.name].bufferView, b = a.extensions[this.name].attributes, f = {}, c = {}, t = {};
701
+ for (const o in b) {
702
+ const d = Ha[o] || o.toLowerCase();
703
+ f[d] = b[o];
704
704
  }
705
705
  for (const o in a.attributes) {
706
- const d = ba[o] || o.toLowerCase();
707
- if (r[o] !== void 0) {
708
- const s = H.accessors[a.attributes[o]], k = n0[s.componentType];
709
- t[d] = k.name, c[d] = s.normalized === !0;
706
+ const d = Ha[o] || o.toLowerCase();
707
+ if (b[o] !== void 0) {
708
+ const s = H.accessors[a.attributes[o]], l = t0[s.componentType];
709
+ t[d] = l.name, c[d] = s.normalized === !0;
710
710
  }
711
711
  }
712
- return e.getDependency("bufferView", b).then(function(o) {
712
+ return e.getDependency("bufferView", r).then(function(o) {
713
713
  return new Promise(function(d, s) {
714
- i.decodeDracoFile(o, function(k) {
715
- for (const h in k.attributes) {
716
- const A = k.attributes[h], _ = c[h];
717
- _ !== void 0 && (A.normalized = _);
714
+ i.decodeDracoFile(o, function(l) {
715
+ for (const h in l.attributes) {
716
+ const m = l.attributes[h], _ = c[h];
717
+ _ !== void 0 && (m.normalized = _);
718
718
  }
719
- d(k);
720
- }, f, t, xe, s);
719
+ d(l);
720
+ }, f, t, Ue, s);
721
721
  });
722
722
  });
723
723
  }
@@ -735,33 +735,33 @@ class Xi {
735
735
  this.name = x.KHR_MESH_QUANTIZATION;
736
736
  }
737
737
  }
738
- class f2 extends bi {
738
+ class t2 extends bi {
739
739
  constructor(a, e, H, i) {
740
740
  super(a, e, H, i);
741
741
  }
742
742
  copySampleValue_(a) {
743
- const e = this.resultBuffer, H = this.sampleValues, i = this.valueSize, b = a * i * 3 + i;
744
- for (let r = 0; r !== i; r++)
745
- e[r] = H[b + r];
743
+ const e = this.resultBuffer, H = this.sampleValues, i = this.valueSize, r = a * i * 3 + i;
744
+ for (let b = 0; b !== i; b++)
745
+ e[b] = H[r + b];
746
746
  return e;
747
747
  }
748
748
  interpolate_(a, e, H, i) {
749
- const b = this.resultBuffer, r = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, o = i - e, d = (H - e) / o, s = d * d, k = s * d, h = a * t, A = h - t, _ = -2 * k + 3 * s, w = k - s, p = 1 - _, m = w - s + d;
749
+ const r = this.resultBuffer, b = this.sampleValues, f = this.valueSize, c = f * 2, t = f * 3, o = i - e, d = (H - e) / o, s = d * d, l = s * d, h = a * t, m = h - t, _ = -2 * l + 3 * s, w = l - s, p = 1 - _, A = w - s + d;
750
750
  for (let I = 0; I !== f; I++) {
751
- const G = r[A + I + f], C = r[A + I + c] * o, S = r[h + I + f], ye = r[h + I] * o;
752
- b[I] = p * G + m * C + _ * S + w * ye;
751
+ const O = b[m + I + f], q = b[m + I + c] * o, z = b[h + I + f], ye = b[h + I] * o;
752
+ r[I] = p * O + A * q + _ * z + w * ye;
753
753
  }
754
- return b;
754
+ return r;
755
755
  }
756
756
  }
757
- const $i = new $();
758
- class eb extends f2 {
757
+ const $i = new ee();
758
+ class eb extends t2 {
759
759
  interpolate_(a, e, H, i) {
760
- const b = super.interpolate_(a, e, H, i);
761
- return $i.fromArray(b).normalize().toArray(b), b;
760
+ const r = super.interpolate_(a, e, H, i);
761
+ return $i.fromArray(r).normalize().toArray(r), r;
762
762
  }
763
763
  }
764
- const De = {
764
+ const Me = {
765
765
  POINTS: 0,
766
766
  LINES: 1,
767
767
  LINE_LOOP: 2,
@@ -769,25 +769,25 @@ const De = {
769
769
  TRIANGLES: 4,
770
770
  TRIANGLE_STRIP: 5,
771
771
  TRIANGLE_FAN: 6
772
- }, n0 = {
772
+ }, t0 = {
773
773
  5120: Int8Array,
774
774
  5121: Uint8Array,
775
775
  5122: Int16Array,
776
776
  5123: Uint16Array,
777
777
  5125: Uint32Array,
778
778
  5126: Float32Array
779
- }, Ba = {
780
- 9728: i2,
781
- 9729: ea,
779
+ }, qa = {
780
+ 9728: b2,
781
+ 9729: ia,
782
782
  9984: U2,
783
783
  9985: G2,
784
784
  9986: E2,
785
- 9987: a2
786
- }, qa = {
785
+ 9987: i2
786
+ }, Wa = {
787
787
  33071: P2,
788
788
  33648: x2,
789
- 10497: aa
790
- }, z0 = {
789
+ 10497: ba
790
+ }, Z0 = {
791
791
  SCALAR: 1,
792
792
  VEC2: 2,
793
793
  VEC3: 3,
@@ -795,7 +795,7 @@ const De = {
795
795
  MAT2: 4,
796
796
  MAT3: 9,
797
797
  MAT4: 16
798
- }, ba = {
798
+ }, Ha = {
799
799
  POSITION: "position",
800
800
  NORMAL: "normal",
801
801
  TANGENT: "tangent",
@@ -806,7 +806,7 @@ const De = {
806
806
  COLOR_0: "color",
807
807
  WEIGHTS_0: "skinWeight",
808
808
  JOINTS_0: "skinIndex"
809
- }, Ye = {
809
+ }, Je = {
810
810
  scale: "scale",
811
811
  translation: "position",
812
812
  rotation: "quaternion",
@@ -815,15 +815,15 @@ const De = {
815
815
  CUBICSPLINE: void 0,
816
816
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
817
817
  // keyframe track will be initialized with a default interpolation type, then modified.
818
- LINEAR: H2,
818
+ LINEAR: c2,
819
819
  STEP: ei
820
- }, Q0 = {
820
+ }, J0 = {
821
821
  OPAQUE: "OPAQUE",
822
822
  MASK: "MASK",
823
823
  BLEND: "BLEND"
824
824
  };
825
825
  function ib(n) {
826
- return n.DefaultMaterial === void 0 && (n.DefaultMaterial = new b2({
826
+ return n.DefaultMaterial === void 0 && (n.DefaultMaterial = new r2({
827
827
  color: 16777215,
828
828
  emissive: 0,
829
829
  metalness: 1,
@@ -833,43 +833,43 @@ function ib(n) {
833
833
  side: ii
834
834
  })), n.DefaultMaterial;
835
835
  }
836
- function i0(n, a, e) {
836
+ function a0(n, a, e) {
837
837
  for (const H in e.extensions)
838
838
  n[H] === void 0 && (a.userData.gltfExtensions = a.userData.gltfExtensions || {}, a.userData.gltfExtensions[H] = e.extensions[H]);
839
839
  }
840
- function Ce(n, a) {
840
+ function We(n, a) {
841
841
  a.extras !== void 0 && (typeof a.extras == "object" ? Object.assign(n.userData, a.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + a.extras));
842
842
  }
843
843
  function bb(n, a, e) {
844
- let H = !1, i = !1, b = !1;
844
+ let H = !1, i = !1, r = !1;
845
845
  for (let t = 0, o = a.length; t < o; t++) {
846
846
  const d = a[t];
847
- if (d.POSITION !== void 0 && (H = !0), d.NORMAL !== void 0 && (i = !0), d.COLOR_0 !== void 0 && (b = !0), H && i && b) break;
847
+ if (d.POSITION !== void 0 && (H = !0), d.NORMAL !== void 0 && (i = !0), d.COLOR_0 !== void 0 && (r = !0), H && i && r) break;
848
848
  }
849
- if (!H && !i && !b) return Promise.resolve(n);
850
- const r = [], f = [], c = [];
849
+ if (!H && !i && !r) return Promise.resolve(n);
850
+ const b = [], f = [], c = [];
851
851
  for (let t = 0, o = a.length; t < o; t++) {
852
852
  const d = a[t];
853
853
  if (H) {
854
854
  const s = d.POSITION !== void 0 ? e.getDependency("accessor", d.POSITION) : n.attributes.position;
855
- r.push(s);
855
+ b.push(s);
856
856
  }
857
857
  if (i) {
858
858
  const s = d.NORMAL !== void 0 ? e.getDependency("accessor", d.NORMAL) : n.attributes.normal;
859
859
  f.push(s);
860
860
  }
861
- if (b) {
861
+ if (r) {
862
862
  const s = d.COLOR_0 !== void 0 ? e.getDependency("accessor", d.COLOR_0) : n.attributes.color;
863
863
  c.push(s);
864
864
  }
865
865
  }
866
866
  return Promise.all([
867
- Promise.all(r),
867
+ Promise.all(b),
868
868
  Promise.all(f),
869
869
  Promise.all(c)
870
870
  ]).then(function(t) {
871
871
  const o = t[0], d = t[1], s = t[2];
872
- return H && (n.morphAttributes.position = o), i && (n.morphAttributes.normal = d), b && (n.morphAttributes.color = s), n.morphTargetsRelative = !0, n;
872
+ return H && (n.morphAttributes.position = o), i && (n.morphAttributes.normal = d), r && (n.morphAttributes.color = s), n.morphTargetsRelative = !0, n;
873
873
  });
874
874
  }
875
875
  function rb(n, a) {
@@ -889,19 +889,19 @@ function rb(n, a) {
889
889
  function Hb(n) {
890
890
  let a;
891
891
  const e = n.extensions && n.extensions[x.KHR_DRACO_MESH_COMPRESSION];
892
- if (e ? a = "draco:" + e.bufferView + ":" + e.indices + ":" + Z0(e.attributes) : a = n.indices + ":" + Z0(n.attributes) + ":" + n.mode, n.targets !== void 0)
892
+ if (e ? a = "draco:" + e.bufferView + ":" + e.indices + ":" + Y0(e.attributes) : a = n.indices + ":" + Y0(n.attributes) + ":" + n.mode, n.targets !== void 0)
893
893
  for (let H = 0, i = n.targets.length; H < i; H++)
894
- a += ":" + Z0(n.targets[H]);
894
+ a += ":" + Y0(n.targets[H]);
895
895
  return a;
896
896
  }
897
- function Z0(n) {
897
+ function Y0(n) {
898
898
  let a = "";
899
899
  const e = Object.keys(n).sort();
900
900
  for (let H = 0, i = e.length; H < i; H++)
901
901
  a += e[H] + ":" + n[e[H]] + ";";
902
902
  return a;
903
903
  }
904
- function ra(n) {
904
+ function ca(n) {
905
905
  switch (n) {
906
906
  case Int8Array:
907
907
  return 1 / 127;
@@ -918,18 +918,18 @@ function ra(n) {
918
918
  function cb(n) {
919
919
  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";
920
920
  }
921
- const fb = new x0();
921
+ const fb = new B0();
922
922
  class tb {
923
923
  constructor(a = {}, e = {}) {
924
924
  this.json = a, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new Ri(), 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 = {};
925
- let H = !1, i = -1, b = !1, r = -1;
925
+ let H = !1, i = -1, r = !1, b = -1;
926
926
  if (typeof navigator < "u") {
927
927
  const f = navigator.userAgent;
928
928
  H = /^((?!chrome|android).)*safari/i.test(f) === !0;
929
929
  const c = f.match(/Version\/(\d+)/);
930
- i = H && c ? parseInt(c[1], 10) : -1, b = f.indexOf("Firefox") > -1, r = b ? f.match(/Firefox\/([0-9]+)\./)[1] : -1;
930
+ i = H && c ? parseInt(c[1], 10) : -1, r = f.indexOf("Firefox") > -1, b = r ? f.match(/Firefox\/([0-9]+)\./)[1] : -1;
931
931
  }
932
- typeof createImageBitmap > "u" || H && i < 17 || b && r < 98 ? this.textureLoader = new M2(this.options.manager) : this.textureLoader = new D2(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new U0(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
932
+ typeof createImageBitmap > "u" || H && i < 17 || r && b < 98 ? this.textureLoader = new M2(this.options.manager) : this.textureLoader = new D2(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new P0(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
933
933
  }
934
934
  setExtensions(a) {
935
935
  this.extensions = a;
@@ -938,28 +938,28 @@ class tb {
938
938
  this.plugins = a;
939
939
  }
940
940
  parse(a, e) {
941
- const H = this, i = this.json, b = this.extensions;
942
- this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(r) {
943
- return r._markDefs && r._markDefs();
944
- }), Promise.all(this._invokeAll(function(r) {
945
- return r.beforeRoot && r.beforeRoot();
941
+ const H = this, i = this.json, r = this.extensions;
942
+ this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(b) {
943
+ return b._markDefs && b._markDefs();
944
+ }), Promise.all(this._invokeAll(function(b) {
945
+ return b.beforeRoot && b.beforeRoot();
946
946
  })).then(function() {
947
947
  return Promise.all([
948
948
  H.getDependencies("scene"),
949
949
  H.getDependencies("animation"),
950
950
  H.getDependencies("camera")
951
951
  ]);
952
- }).then(function(r) {
952
+ }).then(function(b) {
953
953
  const f = {
954
- scene: r[0][i.scene || 0],
955
- scenes: r[0],
956
- animations: r[1],
957
- cameras: r[2],
954
+ scene: b[0][i.scene || 0],
955
+ scenes: b[0],
956
+ animations: b[1],
957
+ cameras: b[2],
958
958
  asset: i.asset,
959
959
  parser: H,
960
960
  userData: {}
961
961
  };
962
- return i0(b, f, i), Ce(f, i), Promise.all(H._invokeAll(function(c) {
962
+ return a0(r, f, i), We(f, i), Promise.all(H._invokeAll(function(c) {
963
963
  return c.afterRoot && c.afterRoot(f);
964
964
  })).then(function() {
965
965
  for (const c of f.scenes)
@@ -975,14 +975,14 @@ class tb {
975
975
  */
976
976
  _markDefs() {
977
977
  const a = this.json.nodes || [], e = this.json.skins || [], H = this.json.meshes || [];
978
- for (let i = 0, b = e.length; i < b; i++) {
979
- const r = e[i].joints;
980
- for (let f = 0, c = r.length; f < c; f++)
981
- a[r[f]].isBone = !0;
978
+ for (let i = 0, r = e.length; i < r; i++) {
979
+ const b = e[i].joints;
980
+ for (let f = 0, c = b.length; f < c; f++)
981
+ a[b[f]].isBone = !0;
982
982
  }
983
- for (let i = 0, b = a.length; i < b; i++) {
984
- const r = a[i];
985
- r.mesh !== void 0 && (this._addNodeRef(this.meshCache, r.mesh), r.skin !== void 0 && (H[r.mesh].isSkinnedMesh = !0)), r.camera !== void 0 && this._addNodeRef(this.cameraCache, r.camera);
983
+ for (let i = 0, r = a.length; i < r; i++) {
984
+ const b = a[i];
985
+ b.mesh !== void 0 && (this._addNodeRef(this.meshCache, b.mesh), b.skin !== void 0 && (H[b.mesh].isSkinnedMesh = !0)), b.camera !== void 0 && this._addNodeRef(this.cameraCache, b.camera);
986
986
  }
987
987
  }
988
988
  /**
@@ -1012,13 +1012,13 @@ class tb {
1012
1012
  */
1013
1013
  _getNodeRef(a, e, H) {
1014
1014
  if (a.refs[e] <= 1) return H;
1015
- const i = H.clone(), b = (r, f) => {
1016
- const c = this.associations.get(r);
1015
+ const i = H.clone(), r = (b, f) => {
1016
+ const c = this.associations.get(b);
1017
1017
  c != null && this.associations.set(f, c);
1018
- for (const [t, o] of r.children.entries())
1019
- b(o, f.children[t]);
1018
+ for (const [t, o] of b.children.entries())
1019
+ r(o, f.children[t]);
1020
1020
  };
1021
- return b(H, i), i.name += "_instance_" + a.uses[e]++, i;
1021
+ return r(H, i), i.name += "_instance_" + a.uses[e]++, i;
1022
1022
  }
1023
1023
  _invokeOne(a) {
1024
1024
  const e = Object.values(this.plugins);
@@ -1034,8 +1034,8 @@ class tb {
1034
1034
  e.unshift(this);
1035
1035
  const H = [];
1036
1036
  for (let i = 0; i < e.length; i++) {
1037
- const b = a(e[i]);
1038
- b && H.push(b);
1037
+ const r = a(e[i]);
1038
+ r && H.push(r);
1039
1039
  }
1040
1040
  return H;
1041
1041
  }
@@ -1056,50 +1056,50 @@ class tb {
1056
1056
  i = this.loadScene(e);
1057
1057
  break;
1058
1058
  case "node":
1059
- i = this._invokeOne(function(b) {
1060
- return b.loadNode && b.loadNode(e);
1059
+ i = this._invokeOne(function(r) {
1060
+ return r.loadNode && r.loadNode(e);
1061
1061
  });
1062
1062
  break;
1063
1063
  case "mesh":
1064
- i = this._invokeOne(function(b) {
1065
- return b.loadMesh && b.loadMesh(e);
1064
+ i = this._invokeOne(function(r) {
1065
+ return r.loadMesh && r.loadMesh(e);
1066
1066
  });
1067
1067
  break;
1068
1068
  case "accessor":
1069
1069
  i = this.loadAccessor(e);
1070
1070
  break;
1071
1071
  case "bufferView":
1072
- i = this._invokeOne(function(b) {
1073
- return b.loadBufferView && b.loadBufferView(e);
1072
+ i = this._invokeOne(function(r) {
1073
+ return r.loadBufferView && r.loadBufferView(e);
1074
1074
  });
1075
1075
  break;
1076
1076
  case "buffer":
1077
1077
  i = this.loadBuffer(e);
1078
1078
  break;
1079
1079
  case "material":
1080
- i = this._invokeOne(function(b) {
1081
- return b.loadMaterial && b.loadMaterial(e);
1080
+ i = this._invokeOne(function(r) {
1081
+ return r.loadMaterial && r.loadMaterial(e);
1082
1082
  });
1083
1083
  break;
1084
1084
  case "texture":
1085
- i = this._invokeOne(function(b) {
1086
- return b.loadTexture && b.loadTexture(e);
1085
+ i = this._invokeOne(function(r) {
1086
+ return r.loadTexture && r.loadTexture(e);
1087
1087
  });
1088
1088
  break;
1089
1089
  case "skin":
1090
1090
  i = this.loadSkin(e);
1091
1091
  break;
1092
1092
  case "animation":
1093
- i = this._invokeOne(function(b) {
1094
- return b.loadAnimation && b.loadAnimation(e);
1093
+ i = this._invokeOne(function(r) {
1094
+ return r.loadAnimation && r.loadAnimation(e);
1095
1095
  });
1096
1096
  break;
1097
1097
  case "camera":
1098
1098
  i = this.loadCamera(e);
1099
1099
  break;
1100
1100
  default:
1101
- if (i = this._invokeOne(function(b) {
1102
- return b != this && b.getDependency && b.getDependency(a, e);
1101
+ if (i = this._invokeOne(function(r) {
1102
+ return r != this && r.getDependency && r.getDependency(a, e);
1103
1103
  }), !i)
1104
1104
  throw new Error("Unknown type: " + a);
1105
1105
  break;
@@ -1119,8 +1119,8 @@ class tb {
1119
1119
  let e = this.cache.get(a);
1120
1120
  if (!e) {
1121
1121
  const H = this, i = this.json[a + (a === "mesh" ? "es" : "s")] || [];
1122
- e = Promise.all(i.map(function(b, r) {
1123
- return H.getDependency(a, r);
1122
+ e = Promise.all(i.map(function(r, b) {
1123
+ return H.getDependency(a, b);
1124
1124
  })), this.cache.add(a, e);
1125
1125
  }
1126
1126
  return e;
@@ -1139,9 +1139,9 @@ class tb {
1139
1139
  if (e.uri === void 0 && a === 0)
1140
1140
  return Promise.resolve(this.extensions[x.KHR_BINARY_GLTF].body);
1141
1141
  const i = this.options;
1142
- return new Promise(function(b, r) {
1143
- H.load(A0.resolveURL(e.uri, i.path), b, void 0, function() {
1144
- r(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
1142
+ return new Promise(function(r, b) {
1143
+ H.load(p0.resolveURL(e.uri, i.path), r, void 0, function() {
1144
+ b(new Error('THREE.GLTFLoader: Failed to load buffer "' + e.uri + '".'));
1145
1145
  });
1146
1146
  });
1147
1147
  }
@@ -1155,8 +1155,8 @@ class tb {
1155
1155
  loadBufferView(a) {
1156
1156
  const e = this.json.bufferViews[a];
1157
1157
  return this.getDependency("buffer", e.buffer).then(function(H) {
1158
- const i = e.byteLength || 0, b = e.byteOffset || 0;
1159
- return H.slice(b, b + i);
1158
+ const i = e.byteLength || 0, r = e.byteOffset || 0;
1159
+ return H.slice(r, r + i);
1160
1160
  });
1161
1161
  }
1162
1162
  /**
@@ -1169,25 +1169,25 @@ class tb {
1169
1169
  loadAccessor(a) {
1170
1170
  const e = this, H = this.json, i = this.json.accessors[a];
1171
1171
  if (i.bufferView === void 0 && i.sparse === void 0) {
1172
- const r = z0[i.type], f = n0[i.componentType], c = i.normalized === !0, t = new f(i.count * r);
1173
- return Promise.resolve(new p0(t, r, c));
1172
+ const b = Z0[i.type], f = t0[i.componentType], c = i.normalized === !0, t = new f(i.count * b);
1173
+ return Promise.resolve(new m0(t, b, c));
1174
1174
  }
1175
- const b = [];
1176
- return i.bufferView !== void 0 ? b.push(this.getDependency("bufferView", i.bufferView)) : b.push(null), i.sparse !== void 0 && (b.push(this.getDependency("bufferView", i.sparse.indices.bufferView)), b.push(this.getDependency("bufferView", i.sparse.values.bufferView))), Promise.all(b).then(function(r) {
1177
- const f = r[0], c = z0[i.type], t = n0[i.componentType], o = t.BYTES_PER_ELEMENT, d = o * c, s = i.byteOffset || 0, k = i.bufferView !== void 0 ? H.bufferViews[i.bufferView].byteStride : void 0, h = i.normalized === !0;
1178
- let A, _;
1179
- if (k && k !== d) {
1180
- const w = Math.floor(s / k), p = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + w + ":" + i.count;
1181
- let m = e.cache.get(p);
1182
- m || (A = new t(f, w * k, i.count * k / o), m = new O2(A, k / o), e.cache.add(p, m)), _ = new ai(m, c, s % k / o, h);
1175
+ const r = [];
1176
+ return i.bufferView !== void 0 ? r.push(this.getDependency("bufferView", i.bufferView)) : r.push(null), i.sparse !== void 0 && (r.push(this.getDependency("bufferView", i.sparse.indices.bufferView)), r.push(this.getDependency("bufferView", i.sparse.values.bufferView))), Promise.all(r).then(function(b) {
1177
+ const f = b[0], c = Z0[i.type], t = t0[i.componentType], o = t.BYTES_PER_ELEMENT, d = o * c, s = i.byteOffset || 0, l = i.bufferView !== void 0 ? H.bufferViews[i.bufferView].byteStride : void 0, h = i.normalized === !0;
1178
+ let m, _;
1179
+ if (l && l !== d) {
1180
+ const w = Math.floor(s / l), p = "InterleavedBuffer:" + i.bufferView + ":" + i.componentType + ":" + w + ":" + i.count;
1181
+ let A = e.cache.get(p);
1182
+ A || (m = new t(f, w * l, i.count * l / o), A = new O2(m, l / o), e.cache.add(p, A)), _ = new ai(A, c, s % l / o, h);
1183
1183
  } else
1184
- f === null ? A = new t(i.count * c) : A = new t(f, s, i.count * c), _ = new p0(A, c, h);
1184
+ f === null ? m = new t(i.count * c) : m = new t(f, s, i.count * c), _ = new m0(m, c, h);
1185
1185
  if (i.sparse !== void 0) {
1186
- const w = z0.SCALAR, p = n0[i.sparse.indices.componentType], m = i.sparse.indices.byteOffset || 0, I = i.sparse.values.byteOffset || 0, G = new p(r[1], m, i.sparse.count * w), C = new t(r[2], I, i.sparse.count * c);
1187
- f !== null && (_ = new p0(_.array.slice(), _.itemSize, _.normalized)), _.normalized = !1;
1188
- for (let S = 0, ye = G.length; S < ye; S++) {
1189
- const le = G[S];
1190
- if (_.setX(le, C[S * c]), c >= 2 && _.setY(le, C[S * c + 1]), c >= 3 && _.setZ(le, C[S * c + 2]), c >= 4 && _.setW(le, C[S * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1186
+ const w = Z0.SCALAR, p = t0[i.sparse.indices.componentType], A = i.sparse.indices.byteOffset || 0, I = i.sparse.values.byteOffset || 0, O = new p(b[1], A, i.sparse.count * w), q = new t(b[2], I, i.sparse.count * c);
1187
+ f !== null && (_ = new m0(_.array.slice(), _.itemSize, _.normalized)), _.normalized = !1;
1188
+ for (let z = 0, ye = O.length; z < ye; z++) {
1189
+ const ke = O[z];
1190
+ if (_.setX(ke, q[z * c]), c >= 2 && _.setY(ke, q[z * c + 1]), c >= 3 && _.setZ(ke, q[z * c + 2]), c >= 4 && _.setW(ke, q[z * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1191
1191
  }
1192
1192
  _.normalized = h;
1193
1193
  }
@@ -1202,51 +1202,51 @@ class tb {
1202
1202
  * @return {Promise<THREE.Texture|null>}
1203
1203
  */
1204
1204
  loadTexture(a) {
1205
- const e = this.json, H = this.options, b = e.textures[a].source, r = e.images[b];
1205
+ const e = this.json, H = this.options, r = e.textures[a].source, b = e.images[r];
1206
1206
  let f = this.textureLoader;
1207
- if (r.uri) {
1208
- const c = H.manager.getHandler(r.uri);
1207
+ if (b.uri) {
1208
+ const c = H.manager.getHandler(b.uri);
1209
1209
  c !== null && (f = c);
1210
1210
  }
1211
- return this.loadTextureImage(a, b, f);
1211
+ return this.loadTextureImage(a, r, f);
1212
1212
  }
1213
1213
  loadTextureImage(a, e, H) {
1214
- const i = this, b = this.json, r = b.textures[a], f = b.images[e], c = (f.uri || f.bufferView) + ":" + r.sampler;
1214
+ const i = this, r = this.json, b = r.textures[a], f = r.images[e], c = (f.uri || f.bufferView) + ":" + b.sampler;
1215
1215
  if (this.textureCache[c])
1216
1216
  return this.textureCache[c];
1217
1217
  const t = this.loadImageSource(e, H).then(function(o) {
1218
- o.flipY = !1, o.name = r.name || f.name || "", o.name === "" && typeof f.uri == "string" && f.uri.startsWith("data:image/") === !1 && (o.name = f.uri);
1219
- const s = (b.samplers || {})[r.sampler] || {};
1220
- return o.magFilter = Ba[s.magFilter] || ea, o.minFilter = Ba[s.minFilter] || a2, o.wrapS = qa[s.wrapS] || aa, o.wrapT = qa[s.wrapT] || aa, o.generateMipmaps = !o.isCompressedTexture && o.minFilter !== i2 && o.minFilter !== ea, i.associations.set(o, { textures: a }), o;
1218
+ o.flipY = !1, o.name = b.name || f.name || "", o.name === "" && typeof f.uri == "string" && f.uri.startsWith("data:image/") === !1 && (o.name = f.uri);
1219
+ const s = (r.samplers || {})[b.sampler] || {};
1220
+ return o.magFilter = qa[s.magFilter] || ia, o.minFilter = qa[s.minFilter] || i2, o.wrapS = Wa[s.wrapS] || ba, o.wrapT = Wa[s.wrapT] || ba, o.generateMipmaps = !o.isCompressedTexture && o.minFilter !== b2 && o.minFilter !== ia, i.associations.set(o, { textures: a }), o;
1221
1221
  }).catch(function() {
1222
1222
  return null;
1223
1223
  });
1224
1224
  return this.textureCache[c] = t, t;
1225
1225
  }
1226
1226
  loadImageSource(a, e) {
1227
- const H = this, i = this.json, b = this.options;
1227
+ const H = this, i = this.json, r = this.options;
1228
1228
  if (this.sourceCache[a] !== void 0)
1229
1229
  return this.sourceCache[a].then((d) => d.clone());
1230
- const r = i.images[a], f = self.URL || self.webkitURL;
1231
- let c = r.uri || "", t = !1;
1232
- if (r.bufferView !== void 0)
1233
- c = H.getDependency("bufferView", r.bufferView).then(function(d) {
1230
+ const b = i.images[a], f = self.URL || self.webkitURL;
1231
+ let c = b.uri || "", t = !1;
1232
+ if (b.bufferView !== void 0)
1233
+ c = H.getDependency("bufferView", b.bufferView).then(function(d) {
1234
1234
  t = !0;
1235
- const s = new Blob([d], { type: r.mimeType });
1235
+ const s = new Blob([d], { type: b.mimeType });
1236
1236
  return c = f.createObjectURL(s), c;
1237
1237
  });
1238
- else if (r.uri === void 0)
1238
+ else if (b.uri === void 0)
1239
1239
  throw new Error("THREE.GLTFLoader: Image " + a + " is missing URI and bufferView");
1240
1240
  const o = Promise.resolve(c).then(function(d) {
1241
- return new Promise(function(s, k) {
1241
+ return new Promise(function(s, l) {
1242
1242
  let h = s;
1243
- e.isImageBitmapLoader === !0 && (h = function(A) {
1244
- const _ = new Ma(A);
1243
+ e.isImageBitmapLoader === !0 && (h = function(m) {
1244
+ const _ = new Da(m);
1245
1245
  _.needsUpdate = !0, s(_);
1246
- }), e.load(A0.resolveURL(d, b.path), h, void 0, k);
1246
+ }), e.load(p0.resolveURL(d, r.path), h, void 0, l);
1247
1247
  });
1248
1248
  }).then(function(d) {
1249
- return t === !0 && f.revokeObjectURL(c), Ce(d, r), d.userData.mimeType = r.mimeType || cb(r.uri), d;
1249
+ return t === !0 && f.revokeObjectURL(c), We(d, b), d.userData.mimeType = b.mimeType || cb(b.uri), d;
1250
1250
  }).catch(function(d) {
1251
1251
  throw console.error("THREE.GLTFLoader: Couldn't load texture", c), d;
1252
1252
  });
@@ -1263,17 +1263,17 @@ class tb {
1263
1263
  * @return {Promise<Texture>}
1264
1264
  */
1265
1265
  assignTexture(a, e, H, i) {
1266
- const b = this;
1267
- return this.getDependency("texture", H.index).then(function(r) {
1268
- if (!r) return null;
1269
- if (H.texCoord !== void 0 && H.texCoord > 0 && (r = r.clone(), r.channel = H.texCoord), b.extensions[x.KHR_TEXTURE_TRANSFORM]) {
1266
+ const r = this;
1267
+ return this.getDependency("texture", H.index).then(function(b) {
1268
+ if (!b) return null;
1269
+ if (H.texCoord !== void 0 && H.texCoord > 0 && (b = b.clone(), b.channel = H.texCoord), r.extensions[x.KHR_TEXTURE_TRANSFORM]) {
1270
1270
  const f = H.extensions !== void 0 ? H.extensions[x.KHR_TEXTURE_TRANSFORM] : void 0;
1271
1271
  if (f) {
1272
- const c = b.associations.get(r);
1273
- r = b.extensions[x.KHR_TEXTURE_TRANSFORM].extendTexture(r, f), b.associations.set(r, c);
1272
+ const c = r.associations.get(b);
1273
+ b = r.extensions[x.KHR_TEXTURE_TRANSFORM].extendTexture(b, f), r.associations.set(b, c);
1274
1274
  }
1275
1275
  }
1276
- return i !== void 0 && (r.colorSpace = i), a[e] = r, r;
1276
+ return i !== void 0 && (b.colorSpace = i), a[e] = b, b;
1277
1277
  });
1278
1278
  }
1279
1279
  /**
@@ -1289,26 +1289,26 @@ class tb {
1289
1289
  assignFinalMaterial(a) {
1290
1290
  const e = a.geometry;
1291
1291
  let H = a.material;
1292
- const i = e.attributes.tangent === void 0, b = e.attributes.color !== void 0, r = e.attributes.normal === void 0;
1292
+ const i = e.attributes.tangent === void 0, r = e.attributes.color !== void 0, b = e.attributes.normal === void 0;
1293
1293
  if (a.isPoints) {
1294
1294
  const f = "PointsMaterial:" + H.uuid;
1295
1295
  let c = this.cache.get(f);
1296
- c || (c = new B2(), L0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, c.sizeAttenuation = !1, this.cache.add(f, c)), H = c;
1296
+ c || (c = new B2(), z0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, c.sizeAttenuation = !1, this.cache.add(f, c)), H = c;
1297
1297
  } else if (a.isLine) {
1298
1298
  const f = "LineBasicMaterial:" + H.uuid;
1299
1299
  let c = this.cache.get(f);
1300
- c || (c = new q2(), L0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, this.cache.add(f, c)), H = c;
1300
+ c || (c = new q2(), z0.prototype.copy.call(c, H), c.color.copy(H.color), c.map = H.map, this.cache.add(f, c)), H = c;
1301
1301
  }
1302
- if (i || b || r) {
1302
+ if (i || r || b) {
1303
1303
  let f = "ClonedMaterial:" + H.uuid + ":";
1304
- i && (f += "derivative-tangents:"), b && (f += "vertex-colors:"), r && (f += "flat-shading:");
1304
+ i && (f += "derivative-tangents:"), r && (f += "vertex-colors:"), b && (f += "flat-shading:");
1305
1305
  let c = this.cache.get(f);
1306
- c || (c = H.clone(), b && (c.vertexColors = !0), r && (c.flatShading = !0), i && (c.normalScale && (c.normalScale.y *= -1), c.clearcoatNormalScale && (c.clearcoatNormalScale.y *= -1)), this.cache.add(f, c), this.associations.set(c, this.associations.get(H))), H = c;
1306
+ c || (c = H.clone(), r && (c.vertexColors = !0), b && (c.flatShading = !0), i && (c.normalScale && (c.normalScale.y *= -1), c.clearcoatNormalScale && (c.clearcoatNormalScale.y *= -1)), this.cache.add(f, c), this.associations.set(c, this.associations.get(H))), H = c;
1307
1307
  }
1308
1308
  a.material = H;
1309
1309
  }
1310
1310
  getMaterialType() {
1311
- return b2;
1311
+ return r2;
1312
1312
  }
1313
1313
  /**
1314
1314
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1318,37 +1318,37 @@ class tb {
1318
1318
  * @return {Promise<Material>}
1319
1319
  */
1320
1320
  loadMaterial(a) {
1321
- const e = this, H = this.json, i = this.extensions, b = H.materials[a];
1322
- let r;
1323
- const f = {}, c = b.extensions || {}, t = [];
1321
+ const e = this, H = this.json, i = this.extensions, r = H.materials[a];
1322
+ let b;
1323
+ const f = {}, c = r.extensions || {}, t = [];
1324
1324
  if (c[x.KHR_MATERIALS_UNLIT]) {
1325
1325
  const d = i[x.KHR_MATERIALS_UNLIT];
1326
- r = d.getMaterialType(), t.push(d.extendParams(f, b, e));
1326
+ b = d.getMaterialType(), t.push(d.extendParams(f, r, e));
1327
1327
  } else {
1328
- const d = b.pbrMetallicRoughness || {};
1329
- if (f.color = new Ue(1, 1, 1), f.opacity = 1, Array.isArray(d.baseColorFactor)) {
1328
+ const d = r.pbrMetallicRoughness || {};
1329
+ if (f.color = new Ge(1, 1, 1), f.opacity = 1, Array.isArray(d.baseColorFactor)) {
1330
1330
  const s = d.baseColorFactor;
1331
- f.color.setRGB(s[0], s[1], s[2], xe), f.opacity = s[3];
1331
+ f.color.setRGB(s[0], s[1], s[2], Ue), f.opacity = s[3];
1332
1332
  }
1333
- d.baseColorTexture !== void 0 && t.push(e.assignTexture(f, "map", d.baseColorTexture, Xe)), f.metalness = d.metallicFactor !== void 0 ? d.metallicFactor : 1, f.roughness = d.roughnessFactor !== void 0 ? d.roughnessFactor : 1, d.metallicRoughnessTexture !== void 0 && (t.push(e.assignTexture(f, "metalnessMap", d.metallicRoughnessTexture)), t.push(e.assignTexture(f, "roughnessMap", d.metallicRoughnessTexture))), r = this._invokeOne(function(s) {
1333
+ d.baseColorTexture !== void 0 && t.push(e.assignTexture(f, "map", d.baseColorTexture, Ke)), f.metalness = d.metallicFactor !== void 0 ? d.metallicFactor : 1, f.roughness = d.roughnessFactor !== void 0 ? d.roughnessFactor : 1, d.metallicRoughnessTexture !== void 0 && (t.push(e.assignTexture(f, "metalnessMap", d.metallicRoughnessTexture)), t.push(e.assignTexture(f, "roughnessMap", d.metallicRoughnessTexture))), b = this._invokeOne(function(s) {
1334
1334
  return s.getMaterialType && s.getMaterialType(a);
1335
1335
  }), t.push(Promise.all(this._invokeAll(function(s) {
1336
1336
  return s.extendMaterialParams && s.extendMaterialParams(a, f);
1337
1337
  })));
1338
1338
  }
1339
- b.doubleSided === !0 && (f.side = W2);
1340
- const o = b.alphaMode || Q0.OPAQUE;
1341
- if (o === Q0.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, o === Q0.MASK && (f.alphaTest = b.alphaCutoff !== void 0 ? b.alphaCutoff : 0.5)), b.normalTexture !== void 0 && r !== _0 && (t.push(e.assignTexture(f, "normalMap", b.normalTexture)), f.normalScale = new ca(1, 1), b.normalTexture.scale !== void 0)) {
1342
- const d = b.normalTexture.scale;
1339
+ r.doubleSided === !0 && (f.side = W2);
1340
+ const o = r.alphaMode || J0.OPAQUE;
1341
+ if (o === J0.BLEND ? (f.transparent = !0, f.depthWrite = !1) : (f.transparent = !1, o === J0.MASK && (f.alphaTest = r.alphaCutoff !== void 0 ? r.alphaCutoff : 0.5)), r.normalTexture !== void 0 && b !== A0 && (t.push(e.assignTexture(f, "normalMap", r.normalTexture)), f.normalScale = new fa(1, 1), r.normalTexture.scale !== void 0)) {
1342
+ const d = r.normalTexture.scale;
1343
1343
  f.normalScale.set(d, d);
1344
1344
  }
1345
- if (b.occlusionTexture !== void 0 && r !== _0 && (t.push(e.assignTexture(f, "aoMap", b.occlusionTexture)), b.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = b.occlusionTexture.strength)), b.emissiveFactor !== void 0 && r !== _0) {
1346
- const d = b.emissiveFactor;
1347
- f.emissive = new Ue().setRGB(d[0], d[1], d[2], xe);
1345
+ if (r.occlusionTexture !== void 0 && b !== A0 && (t.push(e.assignTexture(f, "aoMap", r.occlusionTexture)), r.occlusionTexture.strength !== void 0 && (f.aoMapIntensity = r.occlusionTexture.strength)), r.emissiveFactor !== void 0 && b !== A0) {
1346
+ const d = r.emissiveFactor;
1347
+ f.emissive = new Ge().setRGB(d[0], d[1], d[2], Ue);
1348
1348
  }
1349
- return b.emissiveTexture !== void 0 && r !== _0 && t.push(e.assignTexture(f, "emissiveMap", b.emissiveTexture, Xe)), Promise.all(t).then(function() {
1350
- const d = new r(f);
1351
- return b.name && (d.name = b.name), Ce(d, b), e.associations.set(d, { materials: a }), b.extensions && i0(i, d, b), d;
1349
+ return r.emissiveTexture !== void 0 && b !== A0 && t.push(e.assignTexture(f, "emissiveMap", r.emissiveTexture, Ke)), Promise.all(t).then(function() {
1350
+ const d = new b(f);
1351
+ return r.name && (d.name = r.name), We(d, r), e.associations.set(d, { materials: a }), r.extensions && a0(i, d, r), d;
1352
1352
  });
1353
1353
  }
1354
1354
  /**
@@ -1373,22 +1373,22 @@ class tb {
1373
1373
  */
1374
1374
  loadGeometries(a) {
1375
1375
  const e = this, H = this.extensions, i = this.primitiveCache;
1376
- function b(f) {
1376
+ function r(f) {
1377
1377
  return H[x.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(f, e).then(function(c) {
1378
- return Wa(c, f, e);
1378
+ return Ca(c, f, e);
1379
1379
  });
1380
1380
  }
1381
- const r = [];
1381
+ const b = [];
1382
1382
  for (let f = 0, c = a.length; f < c; f++) {
1383
1383
  const t = a[f], o = Hb(t), d = i[o];
1384
1384
  if (d)
1385
- r.push(d.promise);
1385
+ b.push(d.promise);
1386
1386
  else {
1387
1387
  let s;
1388
- t.extensions && t.extensions[x.KHR_DRACO_MESH_COMPRESSION] ? s = b(t) : s = Wa(new r2(), t, e), i[o] = { primitive: t, promise: s }, r.push(s);
1388
+ t.extensions && t.extensions[x.KHR_DRACO_MESH_COMPRESSION] ? s = r(t) : s = Ca(new H2(), t, e), i[o] = { primitive: t, promise: s }, b.push(s);
1389
1389
  }
1390
1390
  }
1391
- return Promise.all(r);
1391
+ return Promise.all(b);
1392
1392
  }
1393
1393
  /**
1394
1394
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes
@@ -1398,42 +1398,42 @@ class tb {
1398
1398
  * @return {Promise<Group|Mesh|SkinnedMesh|Line|Points>}
1399
1399
  */
1400
1400
  loadMesh(a) {
1401
- const e = this, H = this.json, i = this.extensions, b = H.meshes[a], r = b.primitives, f = [];
1402
- for (let c = 0, t = r.length; c < t; c++) {
1403
- const o = r[c].material === void 0 ? ib(this.cache) : this.getDependency("material", r[c].material);
1401
+ const e = this, H = this.json, i = this.extensions, r = H.meshes[a], b = r.primitives, f = [];
1402
+ for (let c = 0, t = b.length; c < t; c++) {
1403
+ const o = b[c].material === void 0 ? ib(this.cache) : this.getDependency("material", b[c].material);
1404
1404
  f.push(o);
1405
1405
  }
1406
- return f.push(e.loadGeometries(r)), Promise.all(f).then(function(c) {
1406
+ return f.push(e.loadGeometries(b)), Promise.all(f).then(function(c) {
1407
1407
  const t = c.slice(0, c.length - 1), o = c[c.length - 1], d = [];
1408
- for (let k = 0, h = o.length; k < h; k++) {
1409
- const A = o[k], _ = r[k];
1408
+ for (let l = 0, h = o.length; l < h; l++) {
1409
+ const m = o[l], _ = b[l];
1410
1410
  let w;
1411
- const p = t[k];
1412
- if (_.mode === De.TRIANGLES || _.mode === De.TRIANGLE_STRIP || _.mode === De.TRIANGLE_FAN || _.mode === void 0)
1413
- w = b.isSkinnedMesh === !0 ? new V2(A, p) : new fa(A, p), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), _.mode === De.TRIANGLE_STRIP ? w.geometry = xa(w.geometry, Xa) : _.mode === De.TRIANGLE_FAN && (w.geometry = xa(w.geometry, $0));
1414
- else if (_.mode === De.LINES)
1415
- w = new L2(A, p);
1416
- else if (_.mode === De.LINE_STRIP)
1417
- w = new S2(A, p);
1418
- else if (_.mode === De.LINE_LOOP)
1419
- w = new z2(A, p);
1420
- else if (_.mode === De.POINTS)
1421
- w = new Q2(A, p);
1411
+ const p = t[l];
1412
+ if (_.mode === Me.TRIANGLES || _.mode === Me.TRIANGLE_STRIP || _.mode === Me.TRIANGLE_FAN || _.mode === void 0)
1413
+ w = r.isSkinnedMesh === !0 ? new V2(m, p) : new ta(m, p), w.isSkinnedMesh === !0 && w.normalizeSkinWeights(), _.mode === Me.TRIANGLE_STRIP ? w.geometry = Pa(w.geometry, $a) : _.mode === Me.TRIANGLE_FAN && (w.geometry = Pa(w.geometry, aa));
1414
+ else if (_.mode === Me.LINES)
1415
+ w = new L2(m, p);
1416
+ else if (_.mode === Me.LINE_STRIP)
1417
+ w = new S2(m, p);
1418
+ else if (_.mode === Me.LINE_LOOP)
1419
+ w = new z2(m, p);
1420
+ else if (_.mode === Me.POINTS)
1421
+ w = new Q2(m, p);
1422
1422
  else
1423
1423
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + _.mode);
1424
- Object.keys(w.geometry.morphAttributes).length > 0 && rb(w, b), w.name = e.createUniqueName(b.name || "mesh_" + a), Ce(w, b), _.extensions && i0(i, w, _), e.assignFinalMaterial(w), d.push(w);
1424
+ Object.keys(w.geometry.morphAttributes).length > 0 && rb(w, r), w.name = e.createUniqueName(r.name || "mesh_" + a), We(w, r), _.extensions && a0(i, w, _), e.assignFinalMaterial(w), d.push(w);
1425
1425
  }
1426
- for (let k = 0, h = d.length; k < h; k++)
1427
- e.associations.set(d[k], {
1426
+ for (let l = 0, h = d.length; l < h; l++)
1427
+ e.associations.set(d[l], {
1428
1428
  meshes: a,
1429
- primitives: k
1429
+ primitives: l
1430
1430
  });
1431
1431
  if (d.length === 1)
1432
- return b.extensions && i0(i, d[0], b), d[0];
1433
- const s = new S0();
1434
- b.extensions && i0(i, s, b), e.associations.set(s, { meshes: a });
1435
- for (let k = 0, h = d.length; k < h; k++)
1436
- s.add(d[k]);
1432
+ return r.extensions && a0(i, d[0], r), d[0];
1433
+ const s = new Q0();
1434
+ r.extensions && a0(i, s, r), e.associations.set(s, { meshes: a });
1435
+ for (let l = 0, h = d.length; l < h; l++)
1436
+ s.add(d[l]);
1437
1437
  return s;
1438
1438
  });
1439
1439
  }
@@ -1451,7 +1451,7 @@ class tb {
1451
1451
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1452
1452
  return;
1453
1453
  }
1454
- return H.type === "perspective" ? e = new Z2(J2.radToDeg(i.yfov), i.aspectRatio || 1, i.znear || 1, i.zfar || 2e6) : H.type === "orthographic" && (e = new Y2(-i.xmag, i.xmag, i.ymag, -i.ymag, i.znear, i.zfar)), H.name && (e.name = this.createUniqueName(H.name)), Ce(e, H), Promise.resolve(e);
1454
+ return H.type === "perspective" ? e = new Z2(J2.radToDeg(i.yfov), i.aspectRatio || 1, i.znear || 1, i.zfar || 2e6) : H.type === "orthographic" && (e = new Y2(-i.xmag, i.xmag, i.ymag, -i.ymag, i.znear, i.zfar)), H.name && (e.name = this.createUniqueName(H.name)), We(e, H), Promise.resolve(e);
1455
1455
  }
1456
1456
  /**
1457
1457
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1462,16 +1462,16 @@ class tb {
1462
1462
  */
1463
1463
  loadSkin(a) {
1464
1464
  const e = this.json.skins[a], H = [];
1465
- for (let i = 0, b = e.joints.length; i < b; i++)
1465
+ for (let i = 0, r = e.joints.length; i < r; i++)
1466
1466
  H.push(this._loadNodeShallow(e.joints[i]));
1467
1467
  return e.inverseBindMatrices !== void 0 ? H.push(this.getDependency("accessor", e.inverseBindMatrices)) : H.push(null), Promise.all(H).then(function(i) {
1468
- const b = i.pop(), r = i, f = [], c = [];
1469
- for (let t = 0, o = r.length; t < o; t++) {
1470
- const d = r[t];
1468
+ const r = i.pop(), b = i, f = [], c = [];
1469
+ for (let t = 0, o = b.length; t < o; t++) {
1470
+ const d = b[t];
1471
1471
  if (d) {
1472
1472
  f.push(d);
1473
- const s = new x0();
1474
- b !== null && s.fromArray(b.array, t * 16), c.push(s);
1473
+ const s = new B0();
1474
+ r !== null && s.fromArray(r.array, t * 16), c.push(s);
1475
1475
  } else
1476
1476
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[t]);
1477
1477
  }
@@ -1486,40 +1486,40 @@ class tb {
1486
1486
  * @return {Promise<AnimationClip>}
1487
1487
  */
1488
1488
  loadAnimation(a) {
1489
- const e = this.json, H = this, i = e.animations[a], b = i.name ? i.name : "animation_" + a, r = [], f = [], c = [], t = [], o = [];
1489
+ const e = this.json, H = this, i = e.animations[a], r = i.name ? i.name : "animation_" + a, b = [], f = [], c = [], t = [], o = [];
1490
1490
  for (let d = 0, s = i.channels.length; d < s; d++) {
1491
- const k = i.channels[d], h = i.samplers[k.sampler], A = k.target, _ = A.node, w = i.parameters !== void 0 ? i.parameters[h.input] : h.input, p = i.parameters !== void 0 ? i.parameters[h.output] : h.output;
1492
- A.node !== void 0 && (r.push(this.getDependency("node", _)), f.push(this.getDependency("accessor", w)), c.push(this.getDependency("accessor", p)), t.push(h), o.push(A));
1491
+ const l = i.channels[d], h = i.samplers[l.sampler], m = l.target, _ = m.node, w = i.parameters !== void 0 ? i.parameters[h.input] : h.input, p = i.parameters !== void 0 ? i.parameters[h.output] : h.output;
1492
+ m.node !== void 0 && (b.push(this.getDependency("node", _)), f.push(this.getDependency("accessor", w)), c.push(this.getDependency("accessor", p)), t.push(h), o.push(m));
1493
1493
  }
1494
1494
  return Promise.all([
1495
- Promise.all(r),
1495
+ Promise.all(b),
1496
1496
  Promise.all(f),
1497
1497
  Promise.all(c),
1498
1498
  Promise.all(t),
1499
1499
  Promise.all(o)
1500
1500
  ]).then(function(d) {
1501
- const s = d[0], k = d[1], h = d[2], A = d[3], _ = d[4], w = [];
1502
- for (let p = 0, m = s.length; p < m; p++) {
1503
- const I = s[p], G = k[p], C = h[p], S = A[p], ye = _[p];
1501
+ const s = d[0], l = d[1], h = d[2], m = d[3], _ = d[4], w = [];
1502
+ for (let p = 0, A = s.length; p < A; p++) {
1503
+ const I = s[p], O = l[p], q = h[p], z = m[p], ye = _[p];
1504
1504
  if (I === void 0) continue;
1505
1505
  I.updateMatrix && I.updateMatrix();
1506
- const le = H._createAnimationTracks(I, G, C, S, ye);
1507
- if (le)
1508
- for (let ge = 0; ge < le.length; ge++)
1509
- w.push(le[ge]);
1506
+ const ke = H._createAnimationTracks(I, O, q, z, ye);
1507
+ if (ke)
1508
+ for (let ge = 0; ge < ke.length; ge++)
1509
+ w.push(ke[ge]);
1510
1510
  }
1511
- return new X2(b, void 0, w);
1511
+ return new X2(r, void 0, w);
1512
1512
  });
1513
1513
  }
1514
1514
  createNodeMesh(a) {
1515
1515
  const e = this.json, H = this, i = e.nodes[a];
1516
- return i.mesh === void 0 ? null : H.getDependency("mesh", i.mesh).then(function(b) {
1517
- const r = H._getNodeRef(H.meshCache, i.mesh, b);
1518
- return i.weights !== void 0 && r.traverse(function(f) {
1516
+ return i.mesh === void 0 ? null : H.getDependency("mesh", i.mesh).then(function(r) {
1517
+ const b = H._getNodeRef(H.meshCache, i.mesh, r);
1518
+ return i.weights !== void 0 && b.traverse(function(f) {
1519
1519
  if (f.isMesh)
1520
1520
  for (let c = 0, t = i.weights.length; c < t; c++)
1521
1521
  f.morphTargetInfluences[c] = i.weights[c];
1522
- }), r;
1522
+ }), b;
1523
1523
  });
1524
1524
  }
1525
1525
  /**
@@ -1530,21 +1530,21 @@ class tb {
1530
1530
  * @return {Promise<Object3D>}
1531
1531
  */
1532
1532
  loadNode(a) {
1533
- const e = this.json, H = this, i = e.nodes[a], b = H._loadNodeShallow(a), r = [], f = i.children || [];
1533
+ const e = this.json, H = this, i = e.nodes[a], r = H._loadNodeShallow(a), b = [], f = i.children || [];
1534
1534
  for (let t = 0, o = f.length; t < o; t++)
1535
- r.push(H.getDependency("node", f[t]));
1535
+ b.push(H.getDependency("node", f[t]));
1536
1536
  const c = i.skin === void 0 ? Promise.resolve(null) : H.getDependency("skin", i.skin);
1537
1537
  return Promise.all([
1538
- b,
1539
- Promise.all(r),
1538
+ r,
1539
+ Promise.all(b),
1540
1540
  c
1541
1541
  ]).then(function(t) {
1542
1542
  const o = t[0], d = t[1], s = t[2];
1543
- s !== null && o.traverse(function(k) {
1544
- k.isSkinnedMesh && k.bind(s, fb);
1543
+ s !== null && o.traverse(function(l) {
1544
+ l.isSkinnedMesh && l.bind(s, fb);
1545
1545
  });
1546
- for (let k = 0, h = d.length; k < h; k++)
1547
- o.add(d[k]);
1546
+ for (let l = 0, h = d.length; l < h; l++)
1547
+ o.add(d[l]);
1548
1548
  return o;
1549
1549
  });
1550
1550
  }
@@ -1554,28 +1554,28 @@ class tb {
1554
1554
  const e = this.json, H = this.extensions, i = this;
1555
1555
  if (this.nodeCache[a] !== void 0)
1556
1556
  return this.nodeCache[a];
1557
- const b = e.nodes[a], r = b.name ? i.createUniqueName(b.name) : "", f = [], c = i._invokeOne(function(t) {
1557
+ const r = e.nodes[a], b = r.name ? i.createUniqueName(r.name) : "", f = [], c = i._invokeOne(function(t) {
1558
1558
  return t.createNodeMesh && t.createNodeMesh(a);
1559
1559
  });
1560
- return c && f.push(c), b.camera !== void 0 && f.push(i.getDependency("camera", b.camera).then(function(t) {
1561
- return i._getNodeRef(i.cameraCache, b.camera, t);
1560
+ return c && f.push(c), r.camera !== void 0 && f.push(i.getDependency("camera", r.camera).then(function(t) {
1561
+ return i._getNodeRef(i.cameraCache, r.camera, t);
1562
1562
  })), i._invokeAll(function(t) {
1563
1563
  return t.createNodeAttachment && t.createNodeAttachment(a);
1564
1564
  }).forEach(function(t) {
1565
1565
  f.push(t);
1566
1566
  }), this.nodeCache[a] = Promise.all(f).then(function(t) {
1567
1567
  let o;
1568
- if (b.isBone === !0 ? o = new $2() : t.length > 1 ? o = new S0() : t.length === 1 ? o = t[0] : o = new e2(), o !== t[0])
1568
+ if (r.isBone === !0 ? o = new $2() : t.length > 1 ? o = new Q0() : t.length === 1 ? o = t[0] : o = new a2(), o !== t[0])
1569
1569
  for (let d = 0, s = t.length; d < s; d++)
1570
1570
  o.add(t[d]);
1571
- if (b.name && (o.userData.name = b.name, o.name = r), Ce(o, b), b.extensions && i0(H, o, b), b.matrix !== void 0) {
1572
- const d = new x0();
1573
- d.fromArray(b.matrix), o.applyMatrix4(d);
1571
+ if (r.name && (o.userData.name = r.name, o.name = b), We(o, r), r.extensions && a0(H, o, r), r.matrix !== void 0) {
1572
+ const d = new B0();
1573
+ d.fromArray(r.matrix), o.applyMatrix4(d);
1574
1574
  } else
1575
- b.translation !== void 0 && o.position.fromArray(b.translation), b.rotation !== void 0 && o.quaternion.fromArray(b.rotation), b.scale !== void 0 && o.scale.fromArray(b.scale);
1575
+ r.translation !== void 0 && o.position.fromArray(r.translation), r.rotation !== void 0 && o.quaternion.fromArray(r.rotation), r.scale !== void 0 && o.scale.fromArray(r.scale);
1576
1576
  if (!i.associations.has(o))
1577
1577
  i.associations.set(o, {});
1578
- else if (b.mesh !== void 0 && i.meshCache.refs[b.mesh] > 1) {
1578
+ else if (r.mesh !== void 0 && i.meshCache.refs[r.mesh] > 1) {
1579
1579
  const d = i.associations.get(o);
1580
1580
  i.associations.set(o, { ...d });
1581
1581
  }
@@ -1590,87 +1590,87 @@ class tb {
1590
1590
  * @return {Promise<Group>}
1591
1591
  */
1592
1592
  loadScene(a) {
1593
- const e = this.extensions, H = this.json.scenes[a], i = this, b = new S0();
1594
- H.name && (b.name = i.createUniqueName(H.name)), Ce(b, H), H.extensions && i0(e, b, H);
1595
- const r = H.nodes || [], f = [];
1596
- for (let c = 0, t = r.length; c < t; c++)
1597
- f.push(i.getDependency("node", r[c]));
1593
+ const e = this.extensions, H = this.json.scenes[a], i = this, r = new Q0();
1594
+ H.name && (r.name = i.createUniqueName(H.name)), We(r, H), H.extensions && a0(e, r, H);
1595
+ const b = H.nodes || [], f = [];
1596
+ for (let c = 0, t = b.length; c < t; c++)
1597
+ f.push(i.getDependency("node", b[c]));
1598
1598
  return Promise.all(f).then(function(c) {
1599
1599
  for (let o = 0, d = c.length; o < d; o++)
1600
- b.add(c[o]);
1600
+ r.add(c[o]);
1601
1601
  const t = (o) => {
1602
1602
  const d = /* @__PURE__ */ new Map();
1603
- for (const [s, k] of i.associations)
1604
- (s instanceof L0 || s instanceof Ma) && d.set(s, k);
1603
+ for (const [s, l] of i.associations)
1604
+ (s instanceof z0 || s instanceof Da) && d.set(s, l);
1605
1605
  return o.traverse((s) => {
1606
- const k = i.associations.get(s);
1607
- k != null && d.set(s, k);
1606
+ const l = i.associations.get(s);
1607
+ l != null && d.set(s, l);
1608
1608
  }), d;
1609
1609
  };
1610
- return i.associations = t(b), b;
1610
+ return i.associations = t(r), r;
1611
1611
  });
1612
1612
  }
1613
- _createAnimationTracks(a, e, H, i, b) {
1614
- const r = [], f = a.name ? a.name : a.uuid, c = [];
1615
- Ye[b.path] === Ye.weights ? a.traverse(function(s) {
1613
+ _createAnimationTracks(a, e, H, i, r) {
1614
+ const b = [], f = a.name ? a.name : a.uuid, c = [];
1615
+ Je[r.path] === Je.weights ? a.traverse(function(s) {
1616
1616
  s.morphTargetInfluences && c.push(s.name ? s.name : s.uuid);
1617
1617
  }) : c.push(f);
1618
1618
  let t;
1619
- switch (Ye[b.path]) {
1620
- case Ye.weights:
1621
- t = Oa;
1622
- break;
1623
- case Ye.rotation:
1619
+ switch (Je[r.path]) {
1620
+ case Je.weights:
1624
1621
  t = Ea;
1625
1622
  break;
1626
- case Ye.translation:
1627
- case Ye.scale:
1628
- t = Da;
1623
+ case Je.rotation:
1624
+ t = Ga;
1625
+ break;
1626
+ case Je.translation:
1627
+ case Je.scale:
1628
+ t = Oa;
1629
1629
  break;
1630
1630
  default:
1631
1631
  switch (H.itemSize) {
1632
1632
  case 1:
1633
- t = Oa;
1633
+ t = Ea;
1634
1634
  break;
1635
1635
  case 2:
1636
1636
  case 3:
1637
1637
  default:
1638
- t = Da;
1638
+ t = Oa;
1639
1639
  break;
1640
1640
  }
1641
1641
  break;
1642
1642
  }
1643
- const o = i.interpolation !== void 0 ? ab[i.interpolation] : H2, d = this._getArrayFromAccessor(H);
1644
- for (let s = 0, k = c.length; s < k; s++) {
1643
+ const o = i.interpolation !== void 0 ? ab[i.interpolation] : c2, d = this._getArrayFromAccessor(H);
1644
+ for (let s = 0, l = c.length; s < l; s++) {
1645
1645
  const h = new t(
1646
- c[s] + "." + Ye[b.path],
1646
+ c[s] + "." + Je[r.path],
1647
1647
  e.array,
1648
1648
  d,
1649
1649
  o
1650
1650
  );
1651
- i.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(h), r.push(h);
1651
+ i.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(h), b.push(h);
1652
1652
  }
1653
- return r;
1653
+ return b;
1654
1654
  }
1655
1655
  _getArrayFromAccessor(a) {
1656
1656
  let e = a.array;
1657
1657
  if (a.normalized) {
1658
- const H = ra(e.constructor), i = new Float32Array(e.length);
1659
- for (let b = 0, r = e.length; b < r; b++)
1660
- i[b] = e[b] * H;
1658
+ const H = ca(e.constructor), i = new Float32Array(e.length);
1659
+ for (let r = 0, b = e.length; r < b; r++)
1660
+ i[r] = e[r] * H;
1661
1661
  e = i;
1662
1662
  }
1663
1663
  return e;
1664
1664
  }
1665
1665
  _createCubicSplineTrackInterpolant(a) {
1666
1666
  a.createInterpolant = function(H) {
1667
- const i = this instanceof Ea ? eb : f2;
1667
+ const i = this instanceof Ga ? eb : t2;
1668
1668
  return new i(this.times, this.values, this.getValueSize() / 3, H);
1669
1669
  }, a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1670
1670
  }
1671
1671
  }
1672
1672
  function nb(n, a, e) {
1673
- const H = a.attributes, i = new j0();
1673
+ const H = a.attributes, i = new I0();
1674
1674
  if (H.POSITION !== void 0) {
1675
1675
  const f = e.json.accessors[H.POSITION], c = f.min, t = f.max;
1676
1676
  if (c !== void 0 && t !== void 0) {
@@ -1678,7 +1678,7 @@ function nb(n, a, e) {
1678
1678
  new j(c[0], c[1], c[2]),
1679
1679
  new j(t[0], t[1], t[2])
1680
1680
  ), f.normalized) {
1681
- const o = ra(n0[f.componentType]);
1681
+ const o = ca(t0[f.componentType]);
1682
1682
  i.min.multiplyScalar(o), i.max.multiplyScalar(o);
1683
1683
  }
1684
1684
  } else {
@@ -1687,17 +1687,17 @@ function nb(n, a, e) {
1687
1687
  }
1688
1688
  } else
1689
1689
  return;
1690
- const b = a.targets;
1691
- if (b !== void 0) {
1690
+ const r = a.targets;
1691
+ if (r !== void 0) {
1692
1692
  const f = new j(), c = new j();
1693
- for (let t = 0, o = b.length; t < o; t++) {
1694
- const d = b[t];
1693
+ for (let t = 0, o = r.length; t < o; t++) {
1694
+ const d = r[t];
1695
1695
  if (d.POSITION !== void 0) {
1696
- const s = e.json.accessors[d.POSITION], k = s.min, h = s.max;
1697
- if (k !== void 0 && h !== void 0) {
1698
- if (c.setX(Math.max(Math.abs(k[0]), Math.abs(h[0]))), c.setY(Math.max(Math.abs(k[1]), Math.abs(h[1]))), c.setZ(Math.max(Math.abs(k[2]), Math.abs(h[2]))), s.normalized) {
1699
- const A = ra(n0[s.componentType]);
1700
- c.multiplyScalar(A);
1696
+ const s = e.json.accessors[d.POSITION], l = s.min, h = s.max;
1697
+ if (l !== void 0 && h !== void 0) {
1698
+ if (c.setX(Math.max(Math.abs(l[0]), Math.abs(h[0]))), c.setY(Math.max(Math.abs(l[1]), Math.abs(h[1]))), c.setZ(Math.max(Math.abs(l[2]), Math.abs(h[2]))), s.normalized) {
1699
+ const m = ca(t0[s.componentType]);
1700
+ c.multiplyScalar(m);
1701
1701
  }
1702
1702
  f.max(c);
1703
1703
  } else
@@ -1707,32 +1707,32 @@ function nb(n, a, e) {
1707
1707
  i.expandByVector(f);
1708
1708
  }
1709
1709
  n.boundingBox = i;
1710
- const r = new ri();
1711
- i.getCenter(r.center), r.radius = i.min.distanceTo(i.max) / 2, n.boundingSphere = r;
1710
+ const b = new ri();
1711
+ i.getCenter(b.center), b.radius = i.min.distanceTo(i.max) / 2, n.boundingSphere = b;
1712
1712
  }
1713
- function Wa(n, a, e) {
1713
+ function Ca(n, a, e) {
1714
1714
  const H = a.attributes, i = [];
1715
- function b(r, f) {
1716
- return e.getDependency("accessor", r).then(function(c) {
1715
+ function r(b, f) {
1716
+ return e.getDependency("accessor", b).then(function(c) {
1717
1717
  n.setAttribute(f, c);
1718
1718
  });
1719
1719
  }
1720
- for (const r in H) {
1721
- const f = ba[r] || r.toLowerCase();
1722
- f in n.attributes || i.push(b(H[r], f));
1720
+ for (const b in H) {
1721
+ const f = Ha[b] || b.toLowerCase();
1722
+ f in n.attributes || i.push(r(H[b], f));
1723
1723
  }
1724
1724
  if (a.indices !== void 0 && !n.index) {
1725
- const r = e.getDependency("accessor", a.indices).then(function(f) {
1725
+ const b = e.getDependency("accessor", a.indices).then(function(f) {
1726
1726
  n.setIndex(f);
1727
1727
  });
1728
- i.push(r);
1728
+ i.push(b);
1729
1729
  }
1730
- return ia.workingColorSpace !== xe && "COLOR_0" in H && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ia.workingColorSpace}" not supported.`), Ce(n, a), nb(n, a, e), Promise.all(i).then(function() {
1730
+ return ra.workingColorSpace !== Ue && "COLOR_0" in H && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ra.workingColorSpace}" not supported.`), We(n, a), nb(n, a, e), Promise.all(i).then(function() {
1731
1731
  return a.targets !== void 0 ? bb(n, a.targets, e) : n;
1732
1732
  });
1733
1733
  }
1734
- const J0 = /* @__PURE__ */ new WeakMap();
1735
- class db extends $a {
1734
+ const K0 = /* @__PURE__ */ new WeakMap();
1735
+ class db extends e2 {
1736
1736
  /**
1737
1737
  * Constructs a new Draco loader.
1738
1738
  *
@@ -1789,9 +1789,9 @@ class db extends $a {
1789
1789
  * @param {onErrorCallback} onError - Executed when errors occur.
1790
1790
  */
1791
1791
  load(a, e, H, i) {
1792
- const b = new U0(this.manager);
1793
- b.setPath(this.path), b.setResponseType("arraybuffer"), b.setRequestHeader(this.requestHeader), b.setWithCredentials(this.withCredentials), b.load(a, (r) => {
1794
- this.parse(r, e, i);
1792
+ const r = new P0(this.manager);
1793
+ r.setPath(this.path), r.setResponseType("arraybuffer"), r.setRequestHeader(this.requestHeader), r.setWithCredentials(this.withCredentials), r.load(a, (b) => {
1794
+ this.parse(b, e, i);
1795
1795
  }, H, i);
1796
1796
  }
1797
1797
  /**
@@ -1803,23 +1803,23 @@ class db extends $a {
1803
1803
  */
1804
1804
  parse(a, e, H = () => {
1805
1805
  }) {
1806
- this.decodeDracoFile(a, e, null, null, Xe, H).catch(H);
1806
+ this.decodeDracoFile(a, e, null, null, Ke, H).catch(H);
1807
1807
  }
1808
1808
  //
1809
- decodeDracoFile(a, e, H, i, b = xe, r = () => {
1809
+ decodeDracoFile(a, e, H, i, r = Ue, b = () => {
1810
1810
  }) {
1811
1811
  const f = {
1812
1812
  attributeIDs: H || this.defaultAttributeIDs,
1813
1813
  attributeTypes: i || this.defaultAttributeTypes,
1814
1814
  useUniqueIDs: !!H,
1815
- vertexColorSpace: b
1815
+ vertexColorSpace: r
1816
1816
  };
1817
- return this.decodeGeometry(a, f).then(e).catch(r);
1817
+ return this.decodeGeometry(a, f).then(e).catch(b);
1818
1818
  }
1819
1819
  decodeGeometry(a, e) {
1820
1820
  const H = JSON.stringify(e);
1821
- if (J0.has(a)) {
1822
- const c = J0.get(a);
1821
+ if (K0.has(a)) {
1822
+ const c = K0.get(a);
1823
1823
  if (c.key === H)
1824
1824
  return c.promise;
1825
1825
  if (a.byteLength === 0)
@@ -1828,35 +1828,35 @@ class db extends $a {
1828
1828
  );
1829
1829
  }
1830
1830
  let i;
1831
- const b = this.workerNextTaskID++, r = a.byteLength, f = this._getWorker(b, r).then((c) => (i = c, new Promise((t, o) => {
1832
- i._callbacks[b] = { resolve: t, reject: o }, i.postMessage({ type: "decode", id: b, taskConfig: e, buffer: a }, [a]);
1831
+ const r = this.workerNextTaskID++, b = a.byteLength, f = this._getWorker(r, b).then((c) => (i = c, new Promise((t, o) => {
1832
+ i._callbacks[r] = { resolve: t, reject: o }, i.postMessage({ type: "decode", id: r, taskConfig: e, buffer: a }, [a]);
1833
1833
  }))).then((c) => this._createGeometry(c.geometry));
1834
1834
  return f.catch(() => !0).then(() => {
1835
- i && b && this._releaseTask(i, b);
1836
- }), J0.set(a, {
1835
+ i && r && this._releaseTask(i, r);
1836
+ }), K0.set(a, {
1837
1837
  key: H,
1838
1838
  promise: f
1839
1839
  }), f;
1840
1840
  }
1841
1841
  _createGeometry(a) {
1842
- const e = new r2();
1843
- a.index && e.setIndex(new p0(a.index.array, 1));
1842
+ const e = new H2();
1843
+ a.index && e.setIndex(new m0(a.index.array, 1));
1844
1844
  for (let H = 0; H < a.attributes.length; H++) {
1845
- const i = a.attributes[H], b = i.name, r = i.array, f = i.itemSize, c = new p0(r, f);
1846
- b === "color" && (this._assignVertexColorSpace(c, i.vertexColorSpace), c.normalized = !(r instanceof Float32Array)), e.setAttribute(b, c);
1845
+ const i = a.attributes[H], r = i.name, b = i.array, f = i.itemSize, c = new m0(b, f);
1846
+ r === "color" && (this._assignVertexColorSpace(c, i.vertexColorSpace), c.normalized = !(b instanceof Float32Array)), e.setAttribute(r, c);
1847
1847
  }
1848
1848
  return e;
1849
1849
  }
1850
1850
  _assignVertexColorSpace(a, e) {
1851
- if (e !== Xe) return;
1852
- const H = new Ue();
1853
- for (let i = 0, b = a.count; i < b; i++)
1854
- H.fromBufferAttribute(a, i), ia.colorSpaceToWorking(H, Xe), a.setXYZ(i, H.r, H.g, H.b);
1851
+ if (e !== Ke) return;
1852
+ const H = new Ge();
1853
+ for (let i = 0, r = a.count; i < r; i++)
1854
+ H.fromBufferAttribute(a, i), ra.colorSpaceToWorking(H, Ke), a.setXYZ(i, H.r, H.g, H.b);
1855
1855
  }
1856
1856
  _loadLibrary(a, e) {
1857
- const H = new U0(this.manager);
1858
- return H.setPath(this.decoderPath), H.setResponseType(e), H.setWithCredentials(this.withCredentials), new Promise((i, b) => {
1859
- H.load(a, i, void 0, b);
1857
+ const H = new P0(this.manager);
1858
+ return H.setPath(this.decoderPath), H.setResponseType(e), H.setWithCredentials(this.withCredentials), new Promise((i, r) => {
1859
+ H.load(a, i, void 0, r);
1860
1860
  });
1861
1861
  }
1862
1862
  preload() {
@@ -1868,37 +1868,37 @@ class db extends $a {
1868
1868
  return a ? e.push(this._loadLibrary("draco_decoder.js", "text")) : (e.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), e.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(e).then((H) => {
1869
1869
  const i = H[0];
1870
1870
  a || (this.decoderConfig.wasmBinary = H[1]);
1871
- const b = ob.toString(), r = [
1871
+ const r = ob.toString(), b = [
1872
1872
  "/* draco decoder */",
1873
1873
  i,
1874
1874
  "",
1875
1875
  "/* worker */",
1876
- b.substring(b.indexOf("{") + 1, b.lastIndexOf("}"))
1876
+ r.substring(r.indexOf("{") + 1, r.lastIndexOf("}"))
1877
1877
  ].join(`
1878
1878
  `);
1879
- this.workerSourceURL = URL.createObjectURL(new Blob([r]));
1879
+ this.workerSourceURL = URL.createObjectURL(new Blob([b]));
1880
1880
  }), this.decoderPending;
1881
1881
  }
1882
1882
  _getWorker(a, e) {
1883
1883
  return this._initDecoder().then(() => {
1884
1884
  if (this.workerPool.length < this.workerLimit) {
1885
1885
  const i = new Worker(this.workerSourceURL);
1886
- i._callbacks = {}, i._taskCosts = {}, i._taskLoad = 0, i.postMessage({ type: "init", decoderConfig: this.decoderConfig }), i.onmessage = function(b) {
1887
- const r = b.data;
1888
- switch (r.type) {
1886
+ i._callbacks = {}, i._taskCosts = {}, i._taskLoad = 0, i.postMessage({ type: "init", decoderConfig: this.decoderConfig }), i.onmessage = function(r) {
1887
+ const b = r.data;
1888
+ switch (b.type) {
1889
1889
  case "decode":
1890
- i._callbacks[r.id].resolve(r);
1890
+ i._callbacks[b.id].resolve(b);
1891
1891
  break;
1892
1892
  case "error":
1893
- i._callbacks[r.id].reject(r);
1893
+ i._callbacks[b.id].reject(b);
1894
1894
  break;
1895
1895
  default:
1896
- console.error('THREE.DRACOLoader: Unexpected message, "' + r.type + '"');
1896
+ console.error('THREE.DRACOLoader: Unexpected message, "' + b.type + '"');
1897
1897
  }
1898
1898
  }, this.workerPool.push(i);
1899
1899
  } else
1900
- this.workerPool.sort(function(i, b) {
1901
- return i._taskLoad > b._taskLoad ? -1 : 1;
1900
+ this.workerPool.sort(function(i, r) {
1901
+ return i._taskLoad > r._taskLoad ? -1 : 1;
1902
1902
  });
1903
1903
  const H = this.workerPool[this.workerPool.length - 1];
1904
1904
  return H._taskCosts[a] = e, H._taskLoad += e, H;
@@ -1918,8 +1918,8 @@ class db extends $a {
1918
1918
  }
1919
1919
  function ob() {
1920
1920
  let n, a;
1921
- onmessage = function(r) {
1922
- const f = r.data;
1921
+ onmessage = function(b) {
1922
+ const f = b.data;
1923
1923
  switch (f.type) {
1924
1924
  case "init":
1925
1925
  n = f.decoderConfig, a = new Promise(function(o) {
@@ -1933,10 +1933,10 @@ function ob() {
1933
1933
  a.then((o) => {
1934
1934
  const d = o.draco, s = new d.Decoder();
1935
1935
  try {
1936
- const k = e(d, s, new Int8Array(c), t), h = k.attributes.map((A) => A.array.buffer);
1937
- k.index && h.push(k.index.array.buffer), self.postMessage({ type: "decode", id: f.id, geometry: k }, h);
1938
- } catch (k) {
1939
- console.error(k), self.postMessage({ type: "error", id: f.id, error: k.message });
1936
+ const l = e(d, s, new Int8Array(c), t), h = l.attributes.map((m) => m.array.buffer);
1937
+ l.index && h.push(l.index.array.buffer), self.postMessage({ type: "decode", id: f.id, geometry: l }, h);
1938
+ } catch (l) {
1939
+ console.error(l), self.postMessage({ type: "error", id: f.id, error: l.message });
1940
1940
  } finally {
1941
1941
  d.destroy(s);
1942
1942
  }
@@ -1944,65 +1944,65 @@ function ob() {
1944
1944
  break;
1945
1945
  }
1946
1946
  };
1947
- function e(r, f, c, t) {
1947
+ function e(b, f, c, t) {
1948
1948
  const o = t.attributeIDs, d = t.attributeTypes;
1949
- let s, k;
1949
+ let s, l;
1950
1950
  const h = f.GetEncodedGeometryType(c);
1951
- if (h === r.TRIANGULAR_MESH)
1952
- s = new r.Mesh(), k = f.DecodeArrayToMesh(c, c.byteLength, s);
1953
- else if (h === r.POINT_CLOUD)
1954
- s = new r.PointCloud(), k = f.DecodeArrayToPointCloud(c, c.byteLength, s);
1951
+ if (h === b.TRIANGULAR_MESH)
1952
+ s = new b.Mesh(), l = f.DecodeArrayToMesh(c, c.byteLength, s);
1953
+ else if (h === b.POINT_CLOUD)
1954
+ s = new b.PointCloud(), l = f.DecodeArrayToPointCloud(c, c.byteLength, s);
1955
1955
  else
1956
1956
  throw new Error("THREE.DRACOLoader: Unexpected geometry type.");
1957
- if (!k.ok() || s.ptr === 0)
1958
- throw new Error("THREE.DRACOLoader: Decoding failed: " + k.error_msg());
1959
- const A = { index: null, attributes: [] };
1957
+ if (!l.ok() || s.ptr === 0)
1958
+ throw new Error("THREE.DRACOLoader: Decoding failed: " + l.error_msg());
1959
+ const m = { index: null, attributes: [] };
1960
1960
  for (const _ in o) {
1961
1961
  const w = self[d[_]];
1962
- let p, m;
1962
+ let p, A;
1963
1963
  if (t.useUniqueIDs)
1964
- m = o[_], p = f.GetAttributeByUniqueId(s, m);
1964
+ A = o[_], p = f.GetAttributeByUniqueId(s, A);
1965
1965
  else {
1966
- if (m = f.GetAttributeId(s, r[o[_]]), m === -1) continue;
1967
- p = f.GetAttribute(s, m);
1966
+ if (A = f.GetAttributeId(s, b[o[_]]), A === -1) continue;
1967
+ p = f.GetAttribute(s, A);
1968
1968
  }
1969
- const I = i(r, f, s, _, w, p);
1970
- _ === "color" && (I.vertexColorSpace = t.vertexColorSpace), A.attributes.push(I);
1969
+ const I = i(b, f, s, _, w, p);
1970
+ _ === "color" && (I.vertexColorSpace = t.vertexColorSpace), m.attributes.push(I);
1971
1971
  }
1972
- return h === r.TRIANGULAR_MESH && (A.index = H(r, f, s)), r.destroy(s), A;
1972
+ return h === b.TRIANGULAR_MESH && (m.index = H(b, f, s)), b.destroy(s), m;
1973
1973
  }
1974
- function H(r, f, c) {
1975
- const o = c.num_faces() * 3, d = o * 4, s = r._malloc(d);
1974
+ function H(b, f, c) {
1975
+ const o = c.num_faces() * 3, d = o * 4, s = b._malloc(d);
1976
1976
  f.GetTrianglesUInt32Array(c, d, s);
1977
- const k = new Uint32Array(r.HEAPF32.buffer, s, o).slice();
1978
- return r._free(s), { array: k, itemSize: 1 };
1979
- }
1980
- function i(r, f, c, t, o, d) {
1981
- const s = d.num_components(), h = c.num_points() * s, A = h * o.BYTES_PER_ELEMENT, _ = b(r, o), w = r._malloc(A);
1982
- f.GetAttributeDataArrayForAllPoints(c, d, _, A, w);
1983
- const p = new o(r.HEAPF32.buffer, w, h).slice();
1984
- return r._free(w), {
1977
+ const l = new Uint32Array(b.HEAPF32.buffer, s, o).slice();
1978
+ return b._free(s), { array: l, itemSize: 1 };
1979
+ }
1980
+ function i(b, f, c, t, o, d) {
1981
+ const s = d.num_components(), h = c.num_points() * s, m = h * o.BYTES_PER_ELEMENT, _ = r(b, o), w = b._malloc(m);
1982
+ f.GetAttributeDataArrayForAllPoints(c, d, _, m, w);
1983
+ const p = new o(b.HEAPF32.buffer, w, h).slice();
1984
+ return b._free(w), {
1985
1985
  name: t,
1986
1986
  array: p,
1987
1987
  itemSize: s
1988
1988
  };
1989
1989
  }
1990
- function b(r, f) {
1990
+ function r(b, f) {
1991
1991
  switch (f) {
1992
1992
  case Float32Array:
1993
- return r.DT_FLOAT32;
1993
+ return b.DT_FLOAT32;
1994
1994
  case Int8Array:
1995
- return r.DT_INT8;
1995
+ return b.DT_INT8;
1996
1996
  case Int16Array:
1997
- return r.DT_INT16;
1997
+ return b.DT_INT16;
1998
1998
  case Int32Array:
1999
- return r.DT_INT32;
1999
+ return b.DT_INT32;
2000
2000
  case Uint8Array:
2001
- return r.DT_UINT8;
2001
+ return b.DT_UINT8;
2002
2002
  case Uint16Array:
2003
- return r.DT_UINT16;
2003
+ return b.DT_UINT16;
2004
2004
  case Uint32Array:
2005
- return r.DT_UINT32;
2005
+ return b.DT_UINT32;
2006
2006
  }
2007
2007
  }
2008
2008
  }
@@ -2041,8 +2041,8 @@ else if (typeof define === 'function' && define['amd'])
2041
2041
  else if (typeof exports === 'object')
2042
2042
  exports["DracoDecoderModule"] = DracoDecoderModule;
2043
2043
  `;
2044
- function kb() {
2045
- const n = ne(!1), a = ne(""), e = g2([]), H = ne(null), i = new ki(), b = new li(), r = new ui(), f = new Ti();
2044
+ function lb() {
2045
+ const n = de(!1), a = de(""), e = g2([]), H = de(null), i = new li(), r = new ki(), b = new ui(), f = new Ti();
2046
2046
  let c = null;
2047
2047
  return {
2048
2048
  isLoading: n,
@@ -2057,61 +2057,61 @@ function kb() {
2057
2057
  }
2058
2058
  n.value = !0, a.value = "准备加载...", e.value = [], H.value = null;
2059
2059
  const d = /* @__PURE__ */ new Map();
2060
- o.forEach((A) => {
2061
- A instanceof File && d.set(A.name.toLowerCase(), A);
2060
+ o.forEach((m) => {
2061
+ m instanceof File && d.set(m.name.toLowerCase(), m);
2062
2062
  });
2063
- const s = [], k = [];
2063
+ const s = [], l = [];
2064
2064
  try {
2065
- for (const A of o) {
2066
- const _ = A.name || "unknown_file", w = (h = _.split(".").pop()) == null ? void 0 : h.toLowerCase();
2065
+ for (const m of o) {
2066
+ const _ = m.name || "unknown_file", w = (h = _.split(".").pop()) == null ? void 0 : h.toLowerCase();
2067
2067
  if (w === "mtl") continue;
2068
- const p = URL.createObjectURL(A);
2068
+ const p = URL.createObjectURL(m);
2069
2069
  s.push(p);
2070
- let m = null;
2071
- const I = (G) => {
2072
- const C = G.lengthComputable ? G.loaded / G.total * 100 : 0;
2073
- a.value = `正在加载 ${_}... ${Math.round(C)}%`;
2070
+ let A = null;
2071
+ const I = (O) => {
2072
+ const q = O.lengthComputable ? O.loaded / O.total * 100 : 0;
2073
+ a.value = `正在加载 ${_}... ${Math.round(q)}%`;
2074
2074
  };
2075
2075
  switch (a.value = `正在加载 ${_}... 0%`, w) {
2076
2076
  case "obj":
2077
- const G = _.replace(/\.obj$/i, ".mtl").toLowerCase();
2078
- if (d.has(G)) {
2079
- const ge = d.get(G), Ge = URL.createObjectURL(ge);
2080
- s.push(Ge);
2081
- const Le = await i.loadAsync(Ge);
2082
- Le.preload(), b.setMaterials(Le);
2077
+ const O = _.replace(/\.obj$/i, ".mtl").toLowerCase();
2078
+ if (d.has(O)) {
2079
+ const ge = d.get(O), Ee = URL.createObjectURL(ge);
2080
+ s.push(Ee);
2081
+ const Ve = await i.loadAsync(Ee);
2082
+ Ve.preload(), r.setMaterials(Ve);
2083
2083
  } else
2084
- b.setMaterials(null);
2085
- m = await b.loadAsync(p, I);
2084
+ r.setMaterials(null);
2085
+ A = await r.loadAsync(p, I);
2086
2086
  break;
2087
2087
  case "stl":
2088
- const C = await r.loadAsync(p, I), S = new Hi({ color: 11184810, specular: 1118481, shininess: 200 });
2089
- m = new fa(C, S);
2088
+ const q = await b.loadAsync(p, I), z = new Hi({ color: 11184810, specular: 1118481, shininess: 200 });
2089
+ A = new ta(q, z);
2090
2090
  break;
2091
2091
  case "gltf":
2092
- m = (await f.loadAsync(p, I)).scene;
2092
+ A = (await f.loadAsync(p, I)).scene;
2093
2093
  break;
2094
2094
  case "glb":
2095
- c || (c = new db(), c._loadLibrary = function(ge, Ge) {
2096
- return ge === "draco_decoder.js" && Ge === "text" ? Promise.resolve(sb) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${ge}`));
2097
- }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), m = (await f.loadAsync(p, I)).scene;
2095
+ c || (c = new db(), c._loadLibrary = function(ge, Ee) {
2096
+ return ge === "draco_decoder.js" && Ee === "text" ? Promise.resolve(sb) : Promise.reject(new Error(`DRACOLoader: 未预期的库请求 ${ge}`));
2097
+ }, c.setDecoderConfig({ type: "js" }), c.preload()), f.setDRACOLoader(c), A = (await f.loadAsync(p, I)).scene;
2098
2098
  break;
2099
2099
  default:
2100
2100
  console.warn(`不支持的文件类型: .${w}`), a.value = `不支持的文件类型: ${_}`;
2101
2101
  continue;
2102
2102
  }
2103
- m && (m.userData.boundingBox = new j0().setFromObject(m), k.push(m));
2103
+ A && (A.userData.boundingBox = new I0().setFromObject(A), l.push(A));
2104
2104
  }
2105
- e.value = k, a.value = "加载完成!";
2106
- } catch (A) {
2107
- throw console.error("加载模型时出错:", A), H.value = `加载失败: ${A.message || "未知错误"}`, a.value = "加载失败!", e.value = [], A;
2105
+ e.value = l, a.value = "加载完成!";
2106
+ } catch (m) {
2107
+ throw console.error("加载模型时出错:", m), H.value = `加载失败: ${m.message || "未知错误"}`, a.value = "加载失败!", e.value = [], m;
2108
2108
  } finally {
2109
- n.value = !1, s.forEach((A) => URL.revokeObjectURL(A));
2109
+ n.value = !1, s.forEach((m) => URL.revokeObjectURL(m));
2110
2110
  }
2111
2111
  }
2112
2112
  };
2113
2113
  }
2114
- function lb(n, a = {}) {
2114
+ function kb(n, a = {}) {
2115
2115
  const e = {
2116
2116
  threeInfo: {},
2117
2117
  modelLoader: {},
@@ -2121,12 +2121,12 @@ function lb(n, a = {}) {
2121
2121
  millPivotAnimation: {}
2122
2122
  }, H = ni(n);
2123
2123
  e.threeInfo = H;
2124
- const { currentModels: i, getThreeJSObjects: b, addBeforeRenderCallback: r, removeBeforeRenderCallback: f } = H, { useModelLoaderHook: c, useAnimationHook: t, useClippingHook: o, usePartAnimationHook: d } = a;
2125
- if (c && (e.modelLoader = kb()), t && (e.animation = di(b, i)), o && (e.clipping = oi(b, i)), d) {
2126
- const s = ub(b, i, r, f);
2124
+ const { currentModels: i, getThreeJSObjects: r, addBeforeRenderCallback: b, removeBeforeRenderCallback: f } = H, { useModelLoaderHook: c, useAnimationHook: t, useClippingHook: o, usePartAnimationHook: d } = a;
2125
+ if (c && (e.modelLoader = lb()), t && (e.animation = di(r, i)), o && (e.clipping = oi(r, i)), d) {
2126
+ const s = ub(r, i, b, f);
2127
2127
  e.partAnimation = s, e.millPivotAnimation = Mb(
2128
2128
  i,
2129
- b,
2129
+ r,
2130
2130
  s.setPartRotation,
2131
2131
  s.setPartRotationPivotByObject
2132
2132
  );
@@ -2134,93 +2134,93 @@ function lb(n, a = {}) {
2134
2134
  return e;
2135
2135
  }
2136
2136
  function ub(n, a, e, H) {
2137
- const i = ne(!1), b = /* @__PURE__ */ new Map();
2138
- let r = null;
2137
+ const i = de(!1), r = /* @__PURE__ */ new Map();
2138
+ let b = null;
2139
2139
  function f(p) {
2140
- const m = /* @__PURE__ */ new Set([p]);
2141
- m.add(p.replace(/\./g, ""));
2142
- for (const G of a.value)
2143
- if (G)
2144
- for (const C of m) {
2145
- const S = G.getObjectByName(C);
2146
- if (S) return S;
2140
+ const A = /* @__PURE__ */ new Set([p]);
2141
+ A.add(p.replace(/\./g, ""));
2142
+ for (const O of a.value)
2143
+ if (O)
2144
+ for (const q of A) {
2145
+ const z = O.getObjectByName(q);
2146
+ if (z) return z;
2147
2147
  }
2148
2148
  const { scene: I } = n();
2149
2149
  if (I)
2150
- for (const G of m) {
2151
- const C = I.getObjectByName(G);
2152
- if (C) return C;
2150
+ for (const O of A) {
2151
+ const q = I.getObjectByName(O);
2152
+ if (q) return q;
2153
2153
  }
2154
2154
  return null;
2155
2155
  }
2156
2156
  function c(p) {
2157
- return p.map((m) => {
2158
- const I = f(m);
2159
- return { name: m, object: I, found: !!I };
2157
+ return p.map((A) => {
2158
+ const I = f(A);
2159
+ return { name: A, object: I, found: !!I };
2160
2160
  });
2161
2161
  }
2162
- function t(p, m) {
2162
+ function t(p, A) {
2163
2163
  const I = f(p);
2164
- return I ? (b.set(p, {
2164
+ return I ? (r.set(p, {
2165
2165
  object: I,
2166
- axis: m.axis,
2167
- speed: m.speed,
2168
- direction: m.direction ?? 1
2166
+ axis: A.axis,
2167
+ speed: A.speed,
2168
+ direction: A.direction ?? 1
2169
2169
  }), !0) : (console.warn(`[usePartAnimation] 未找到部件: "${p}"`), !1);
2170
2170
  }
2171
- function o(p, m, I, G) {
2172
- return m ? I ? (b.set(p, {
2173
- object: m,
2174
- axis: G.axis,
2175
- speed: G.speed,
2176
- direction: G.direction ?? 1,
2171
+ function o(p, A, I, O) {
2172
+ return A ? I ? (r.set(p, {
2173
+ object: A,
2174
+ axis: O.axis,
2175
+ speed: O.speed,
2176
+ direction: O.direction ?? 1,
2177
2177
  pivot: I
2178
2178
  }), !0) : (console.warn(`[usePartAnimation] pivot 为空: "${p}"`), !1) : (console.warn(`[usePartAnimation] 未找到部件: "${p}"`), !1);
2179
2179
  }
2180
2180
  function d(p) {
2181
- let m = 0;
2182
- return p.forEach(({ partName: I, axis: G, speed: C, direction: S }) => {
2183
- t(I, { axis: G, speed: C, direction: S }) && m++;
2184
- }), m;
2181
+ let A = 0;
2182
+ return p.forEach(({ partName: I, axis: O, speed: q, direction: z }) => {
2183
+ t(I, { axis: O, speed: q, direction: z }) && A++;
2184
+ }), A;
2185
2185
  }
2186
2186
  function s(p) {
2187
- b.delete(p);
2187
+ r.delete(p);
2188
2188
  }
2189
- function k() {
2190
- b.clear();
2189
+ function l() {
2190
+ r.clear();
2191
2191
  }
2192
2192
  function h() {
2193
2193
  const p = [];
2194
- return b.forEach((m, I) => {
2194
+ return r.forEach((A, I) => {
2195
2195
  p.push({
2196
2196
  name: I,
2197
- axis: m.axis,
2198
- speed: m.speed,
2199
- direction: m.direction,
2200
- found: !!m.object
2197
+ axis: A.axis,
2198
+ speed: A.speed,
2199
+ direction: A.direction,
2200
+ found: !!A.object
2201
2201
  });
2202
2202
  }), p;
2203
2203
  }
2204
- function A() {
2204
+ function m() {
2205
2205
  if (!i.value) {
2206
- if (b.size === 0) {
2206
+ if (r.size === 0) {
2207
2207
  console.warn("[usePartAnimation] 没有配置任何部件旋转");
2208
2208
  return;
2209
2209
  }
2210
- i.value = !0, r = (p) => {
2211
- i.value && b.forEach((m) => {
2212
- if (!m.object) return;
2213
- const I = m.pivot ?? m.object, G = m.axis;
2214
- I.rotation[G] += m.direction * m.speed * p;
2210
+ i.value = !0, b = (p) => {
2211
+ i.value && r.forEach((A) => {
2212
+ if (!A.object) return;
2213
+ const I = A.pivot ?? A.object, O = A.axis;
2214
+ I.rotation[O] += A.direction * A.speed * p;
2215
2215
  });
2216
- }, e(r);
2216
+ }, e(b);
2217
2217
  }
2218
2218
  }
2219
2219
  function _() {
2220
- i.value = !1, r && (H(r), r = null);
2220
+ i.value = !1, b && (H(b), b = null);
2221
2221
  }
2222
2222
  function w() {
2223
- i.value ? _() : A();
2223
+ i.value ? _() : m();
2224
2224
  }
2225
2225
  return {
2226
2226
  isPartAnimating: i,
@@ -2230,9 +2230,9 @@ function ub(n, a, e, H) {
2230
2230
  setPartRotationPivotByObject: o,
2231
2231
  setPartRotations: d,
2232
2232
  removePartRotation: s,
2233
- clearAllPartRotations: k,
2233
+ clearAllPartRotations: l,
2234
2234
  getPartAnimationStatus: h,
2235
- startPartAnimations: A,
2235
+ startPartAnimations: m,
2236
2236
  stopPartAnimations: _,
2237
2237
  togglePartAnimations: w
2238
2238
  };
@@ -2246,355 +2246,355 @@ const hb = {
2246
2246
  "轧辊整体-1": ["轧辊整体-1", "上轧辊000-3"],
2247
2247
  "下轧辊-1": ["下轧辊-1", "下轧辊000-3"]
2248
2248
  };
2249
- function We(n, a, e) {
2250
- const H = hb[n] ?? [n], i = (b) => {
2251
- if (!b) return null;
2252
- for (const r of H) {
2253
- const f = b.getObjectByName(r);
2249
+ function qe(n, a, e) {
2250
+ const H = hb[n] ?? [n], i = (r) => {
2251
+ if (!r) return null;
2252
+ for (const b of H) {
2253
+ const f = r.getObjectByName(b);
2254
2254
  if (f) return f;
2255
2255
  }
2256
2256
  return null;
2257
2257
  };
2258
- for (const b of a.value) {
2259
- if (!b) continue;
2260
- const r = i(b);
2261
- if (r) return r;
2258
+ for (const r of a.value) {
2259
+ if (!r) continue;
2260
+ const b = i(r);
2261
+ if (b) return b;
2262
2262
  }
2263
2263
  return i(e);
2264
2264
  }
2265
- function gb(n, a, e, H, i = null, b = null, r = null, f = null) {
2266
- const c = ne(!1), t = [
2265
+ function gb(n, a, e, H, i = null, r = null, b = null, f = null) {
2266
+ const c = de(!1), t = [
2267
2267
  ["夹具5倍-3", "夹具5倍-7"],
2268
2268
  ["夹具5倍-5", "夹具5倍-8"]
2269
2269
  ];
2270
2270
  let o = !1, d = -1;
2271
- const s = 0.6, k = 5, h = 0.5, A = 2, _ = -0.1, w = 0.8, p = -0.48, m = 30, I = 2, G = 2, C = 1.5, S = 3, ye = 0.6, le = 0.5, ge = 0.4, Ge = 0.4, Le = 1, d0 = 2, o0 = 150 * Math.PI / 180, s0 = 100 * Math.PI / 180, Z = 0.25, ue = 1, J = 270 * Math.PI / 180, q = 0.5, V = 150 * Math.PI / 180, Y = 100 * Math.PI / 180, de = 0.25, K = 1, ee = 270 * Math.PI / 180, ke = 0.5;
2272
- let M = "idle", y = 0, E = new j(), B = new j(), u = null, L = null, ie = null, ae = null, oe = null, pe = null, we = null, Fe = null, ve = null, k0 = null, b0 = null, Se = null, R = null, U = null, He = null, W = null, ce = null, be = null, Ne = null, r0 = null, na = 0, fe = null, I0 = null;
2273
- const da = new j(), oa = new $();
2274
- let H0 = [];
2275
- const y0 = 10, ze = new Array(y0).fill(1), l0 = [];
2276
- let u0 = null;
2277
- const me = new j(), sa = new j();
2278
- function c0(g, l, F) {
2271
+ const s = 0.6, l = 5, h = 0.5, m = 2, _ = -0.1, w = 0.8, p = -0.48, A = 30, I = 2, O = 2, q = 1.5, z = 3, ye = 0.6, ke = 0.5, ge = 0.4, Ee = 0.4, Ve = 1, n0 = 2, d0 = 150 * Math.PI / 180, o0 = 100 * Math.PI / 180, J = 0.25, ue = 1, Y = 270 * Math.PI / 180, W = 0.5, L = 150 * Math.PI / 180, K = 100 * Math.PI / 180, oe = 0.25, X = 1, ae = 270 * Math.PI / 180, le = 0.5;
2272
+ let M = "idle", y = 0, G = new j(), P = new j(), u = null, S = null, ie = null, be = null, ce = null, pe = null, we = null, Fe = null, ve = null, s0 = null, l0 = null, i0 = null, Le = null, R = null, U = null, fe = null, C = null, V = null, re = null, b0 = null, k0 = 0, te = null, y0 = null;
2273
+ const oa = new j(), sa = new ee();
2274
+ let r0 = [];
2275
+ const w0 = 10, Se = new Array(w0).fill(1), u0 = [];
2276
+ let h0 = null;
2277
+ const me = new j(), la = new j();
2278
+ function H0(g, k, F) {
2279
2279
  if (!g) return;
2280
- const N = new $();
2280
+ const N = new ee();
2281
2281
  g.getWorldQuaternion(N);
2282
- const T = new j0().setFromObject(g), D = new j();
2283
- T.getCenter(D), sa.copy(l).applyQuaternion(N), F.copy(D).add(sa);
2282
+ const T = new I0().setFromObject(g), D = new j();
2283
+ T.getCenter(D), la.copy(k).applyQuaternion(N), F.copy(D).add(la);
2284
2284
  }
2285
2285
  function o2() {
2286
2286
  const g = n.value;
2287
2287
  if (!g || g.length === 0) return !1;
2288
- fe = H().scene;
2288
+ te = H().scene;
2289
2289
  const F = (v) => v ?? null;
2290
2290
  for (const v of g) {
2291
2291
  if (!v) continue;
2292
- const O = v.getObjectByName("机器人-2");
2293
- if (O && (u = F(O.getObjectByName("坯料-1")), u))
2292
+ const E = v.getObjectByName("机器人-2");
2293
+ if (E && (u = F(E.getObjectByName("坯料-1")), u))
2294
2294
  break;
2295
2295
  }
2296
2296
  if (!u)
2297
2297
  return console.warn("[useBilletAnimation] 未找到部件: 坯料-1 (在 机器人-2 下)"), !1;
2298
- L = We("轧辊整体-1001", n, fe), L || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), ie = We("下轧辊-1001", n, fe), ie || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1001 / 下轧辊000-1"), pe = We("联轴器上-1001", n, fe), we = We("联轴器下-2001", n, fe), L = We("轧辊整体-1001", n, fe), L || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1");
2298
+ S = qe("轧辊整体-1001", n, te), S || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1"), ie = qe("下轧辊-1001", n, te), ie || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1001 / 下轧辊000-1"), pe = qe("联轴器上-1001", n, te), we = qe("联轴器下-2001", n, te), S = qe("轧辊整体-1001", n, te), S || console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1001 / 上轧辊000-1");
2299
2299
  let N = null, T = null;
2300
2300
  for (const v of g)
2301
2301
  if (v && (N || (N = F(v.getObjectByName("下输送台板-1"))), T || (T = F(v.getObjectByName("下输送台板-2"))), N && T))
2302
2302
  break;
2303
- if ((!N || !T) && fe && (N || (N = F(fe.getObjectByName("下输送台板-1"))), T || (T = F(fe.getObjectByName("下输送台板-2")))), N || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), T || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), N && T) {
2303
+ if ((!N || !T) && te && (N || (N = F(te.getObjectByName("下输送台板-1"))), T || (T = F(te.getObjectByName("下输送台板-2")))), N || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-1"), T || console.warn("[useBilletAnimation] 未找到部件: 下输送台板-2"), N && T) {
2304
2304
  const v = new j();
2305
2305
  N.getWorldPosition(v);
2306
- const O = new j();
2307
- T.getWorldPosition(O), be = new j().copy(v).add(O).multiplyScalar(0.5), be.y = Math.max(v.y, O.y) + 0.05;
2306
+ const E = new j();
2307
+ T.getWorldPosition(E), V = new j().copy(v).add(E).multiplyScalar(0.5), V.y = Math.max(v.y, E.y) + 0.05;
2308
2308
  }
2309
2309
  let D = null;
2310
2310
  for (const v of g)
2311
2311
  if (v && (D = F(v.getObjectByName("上输送台-3")), D))
2312
2312
  break;
2313
- if (!D && fe && (D = F(fe.getObjectByName("上输送台-3"))), D) {
2313
+ if (!D && te && (D = F(te.getObjectByName("上输送台-3"))), D) {
2314
2314
  const v = new j();
2315
- D.getWorldPosition(v), Ne = new j(v.x, v.y + 0.1, v.z);
2315
+ D.getWorldPosition(v), re = new j(v.x, v.y + 0.1, v.z);
2316
2316
  } else
2317
2317
  console.warn("[useBilletAnimation] 未找到部件: 上输送台-3");
2318
- if (ae = We("轧辊整体-1", n, fe), ae) {
2318
+ if (be = qe("轧辊整体-1", n, te), be) {
2319
2319
  const v = new j();
2320
- ae.getWorldPosition(v), new j(v.x, v.y + 0.5, v.z);
2320
+ be.getWorldPosition(v), new j(v.x, v.y + 0.5, v.z);
2321
2321
  } else
2322
2322
  console.warn("[useBilletAnimation] 未找到部件: 轧辊整体-1 / 上轧辊000-3");
2323
- if (oe = We("下轧辊-1", n, fe), oe && ae) {
2323
+ if (ce = qe("下轧辊-1", n, te), ce && be) {
2324
2324
  const v = new j();
2325
- oe.getWorldPosition(v);
2326
- const O = new j();
2327
- ae.getWorldPosition(O), r0 = new j().copy(v).add(O).multiplyScalar(0.5), r0.y -= 0.313;
2328
- } else oe || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2329
- Fe = We("联轴器上-1", n, fe), ve = We("联轴器下-2", n, fe);
2330
- let P = null;
2325
+ ce.getWorldPosition(v);
2326
+ const E = new j();
2327
+ be.getWorldPosition(E), b0 = new j().copy(v).add(E).multiplyScalar(0.5), b0.y -= 0.313;
2328
+ } else ce || console.warn("[useBilletAnimation] 未找到部件: 下轧辊-1 / 下轧辊000-3");
2329
+ Fe = qe("联轴器上-1", n, te), ve = qe("联轴器下-2", n, te);
2330
+ let B = null;
2331
2331
  for (const v of g)
2332
- if (v && (P = F(v.getObjectByName("底板-1")), P))
2332
+ if (v && (B = F(v.getObjectByName("底板-1")), B))
2333
2333
  break;
2334
- if (!P && fe && (P = F(fe.getObjectByName("底板-1"))), P) {
2334
+ if (!B && te && (B = F(te.getObjectByName("底板-1"))), B) {
2335
2335
  const v = new j();
2336
- P.getWorldPosition(v), na = v.y;
2336
+ B.getWorldPosition(v), k0 = v.y;
2337
2337
  } else
2338
2338
  console.warn("[useBilletAnimation] 未找到部件: 底板-1");
2339
- const X = u.parent;
2340
- if (!X)
2339
+ const $ = u.parent;
2340
+ if (!$)
2341
2341
  return console.warn("[useBilletAnimation] 坯料没有父节点 (机器人-2 应作为父节点)"), !1;
2342
- l0.length = 0;
2343
- const z = [
2342
+ u0.length = 0;
2343
+ const Q = [
2344
2344
  "Crab_Finger_Right-1",
2345
2345
  "Crab_Finger_Right-2",
2346
2346
  "Crab_Finger_Right-3",
2347
2347
  "Crab_Finger_Right-4"
2348
- ], re = u.position.y;
2349
- for (const v of z) {
2350
- const O = X.getObjectByName(v);
2351
- O ? l0.push({ obj: O, origQuat: O.quaternion.clone(), direction: O.position.y > re ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${v}`);
2348
+ ], He = u.position.y;
2349
+ for (const v of Q) {
2350
+ const E = $.getObjectByName(v);
2351
+ E ? u0.push({ obj: E, origQuat: E.quaternion.clone(), direction: E.position.y > He ? 1 : -1 }) : console.warn(`[useBilletAnimation] 未找到手指部件: ${v}`);
2352
2352
  }
2353
- if (l0.length === 0)
2353
+ if (u0.length === 0)
2354
2354
  return console.warn("[useBilletAnimation] 未找到任何 Crab_Finger_Right-* 手指部件"), !1;
2355
- const Q = (v) => v ? { pos: v.position.clone(), quat: v.quaternion.clone() } : null;
2356
- return k0 = Q(L), b0 = Q(ie), Se = Q(ae), R = Q(oe), U = Q(pe), He = Q(we), W = Q(Fe), ce = Q(ve), l2(), !0;
2355
+ const Z = (v) => v ? { pos: v.position.clone(), quat: v.quaternion.clone() } : null;
2356
+ return s0 = Z(S), l0 = Z(ie), i0 = Z(be), Le = Z(ce), R = Z(pe), U = Z(we), fe = Z(Fe), C = Z(ve), k2(), !0;
2357
2357
  }
2358
2358
  function s2() {
2359
- if (!u || !fe) return;
2360
- u.getWorldPosition(E);
2361
- const g = new $();
2359
+ if (!u || !te) return;
2360
+ u.getWorldPosition(G);
2361
+ const g = new ee();
2362
2362
  u.getWorldQuaternion(g);
2363
- const l = new j();
2364
- u.getWorldScale(l), u.parent && u.removeFromParent(), fe.add(u), u.position.copy(E), u.quaternion.copy(g), u.scale.copy(l);
2363
+ const k = new j();
2364
+ u.getWorldScale(k), u.parent && u.removeFromParent(), te.add(u), u.position.copy(G), u.quaternion.copy(g), u.scale.copy(k);
2365
2365
  }
2366
- function h0(g) {
2367
- for (const l of l0) {
2368
- l.obj.quaternion.copy(l.origQuat);
2369
- const F = new $().setFromAxisAngle(new j(1, 0, 0), le * g * l.direction);
2370
- l.obj.quaternion.premultiply(F);
2366
+ function g0(g) {
2367
+ for (const k of u0) {
2368
+ k.obj.quaternion.copy(k.origQuat);
2369
+ const F = new ee().setFromAxisAngle(new j(1, 0, 0), ke * g * k.direction);
2370
+ k.obj.quaternion.premultiply(F);
2371
2371
  }
2372
2372
  }
2373
2373
  new j();
2374
- const Te = new $(), Re = new j();
2374
+ const Ne = new ee(), Te = new j();
2375
2375
  new j();
2376
- const _e = new j(), te = new $(), Ae = new $(), w0 = 0.8, F0 = { value: 0 }, f0 = new j(0, 0, 1), v0 = new j(), N0 = new $(), T0 = new j();
2377
- let Oe = !1, $e = !1;
2376
+ const _e = new j(), ne = new ee(), Ae = new ee(), F0 = 0.8, v0 = { value: 0 }, c0 = new j(0, 0, 1), N0 = new j(), T0 = new ee(), R0 = new j();
2377
+ let De = !1, Xe = !1;
2378
2378
  new j();
2379
- const t0 = new j(), R0 = new $(), Qe = new j(), Ze = new j(), Ee = { value: 0 }, M0 = new j(), D0 = new $(), O0 = new j();
2380
- let Be = !1;
2381
- function ka(g, l, F, N, T, D, P, X, z, re) {
2382
- const Q = N;
2383
- Oe || (g.updateMatrixWorld(!0), g.getWorldPosition(v0), g.getWorldQuaternion(N0), T0.copy(v0).sub(Q), D.value = 0, Oe = !0), D.value += P * z, Te.setFromAxisAngle(f0, D.value), _e.copy(T0).applyQuaternion(Te).add(Q), te.copy(Te).multiply(N0);
2379
+ const f0 = new j(), M0 = new ee(), ze = new j(), Qe = new j(), Oe = { value: 0 }, D0 = new j(), O0 = new ee(), E0 = new j();
2380
+ let Pe = !1;
2381
+ function ka(g, k, F, N, T, D, B, $, Q, He) {
2382
+ const Z = N;
2383
+ De || (g.updateMatrixWorld(!0), g.getWorldPosition(N0), g.getWorldQuaternion(T0), R0.copy(N0).sub(Z), D.value = 0, De = !0), D.value += B * Q, Ne.setFromAxisAngle(c0, D.value), _e.copy(R0).applyQuaternion(Ne).add(Z), ne.copy(Ne).multiply(T0);
2384
2384
  const v = g.parent;
2385
- if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), _e.clone(), v.worldToLocal(_e), v.getWorldQuaternion(Ae), te.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(te), g.updateMatrixWorld(!0), T) {
2386
- const O = T.parent;
2387
- O && O.type !== "Scene" ? (O.getWorldQuaternion(Ae), T.quaternion.copy(Ae.clone().invert()).multiply(te)) : T.quaternion.copy(te), T.updateMatrixWorld(!0);
2385
+ if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), _e.clone(), v.worldToLocal(_e), v.getWorldQuaternion(Ae), ne.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(ne), g.updateMatrixWorld(!0), T) {
2386
+ const E = T.parent;
2387
+ E && E.type !== "Scene" ? (E.getWorldQuaternion(Ae), T.quaternion.copy(Ae.clone().invert()).multiply(ne)) : T.quaternion.copy(ne), T.updateMatrixWorld(!0);
2388
2388
  }
2389
- return c0(g, F, l.position), D.value >= X;
2389
+ return H0(g, F, k.position), D.value >= $;
2390
2390
  }
2391
- function la(g, l, F, N, T, D, P, X, z, re) {
2392
- const Q = N;
2393
- Be || (g.updateMatrixWorld(!0), g.getWorldPosition(M0), g.getWorldQuaternion(D0), O0.copy(M0).sub(Q), D.value = 0, Be = !0), D.value += P * z, Te.setFromAxisAngle(f0, -D.value), _e.copy(O0).applyQuaternion(Te).add(Q), te.copy(Te).multiply(D0);
2391
+ function ua(g, k, F, N, T, D, B, $, Q, He) {
2392
+ const Z = N;
2393
+ Pe || (g.updateMatrixWorld(!0), g.getWorldPosition(D0), g.getWorldQuaternion(O0), E0.copy(D0).sub(Z), D.value = 0, Pe = !0), D.value += B * Q, Ne.setFromAxisAngle(c0, -D.value), _e.copy(E0).applyQuaternion(Ne).add(Z), ne.copy(Ne).multiply(O0);
2394
2394
  const v = g.parent;
2395
- if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), _e.clone(), v.worldToLocal(_e), v.getWorldQuaternion(Ae), te.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(te), g.updateMatrixWorld(!0), T) {
2396
- const O = T.parent;
2397
- O && O.type !== "Scene" ? (O.getWorldQuaternion(Ae), T.quaternion.copy(Ae.clone().invert()).multiply(te)) : T.quaternion.copy(te), T.updateMatrixWorld(!0);
2395
+ if (v && v.type !== "Scene" && (v.updateMatrixWorld(!0), _e.clone(), v.worldToLocal(_e), v.getWorldQuaternion(Ae), ne.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(ne), g.updateMatrixWorld(!0), T) {
2396
+ const E = T.parent;
2397
+ E && E.type !== "Scene" ? (E.getWorldQuaternion(Ae), T.quaternion.copy(Ae.clone().invert()).multiply(ne)) : T.quaternion.copy(ne), T.updateMatrixWorld(!0);
2398
2398
  }
2399
- return c0(g, F, l.position), D.value >= X;
2399
+ return H0(g, F, k.position), D.value >= $;
2400
2400
  }
2401
- function ua(g, l, F, N, T, D, P) {
2402
- const X = P ?? l;
2403
- Oe || (g.updateMatrixWorld(!0), g.getWorldPosition(v0), g.getWorldQuaternion(N0), T0.copy(v0).sub(X), N.value = 0, Oe = !0), N.value += T * D, Te.setFromAxisAngle(f0, N.value), _e.copy(T0).applyQuaternion(Te).add(X), te.copy(Te).multiply(N0);
2404
- const z = g.parent;
2405
- if (z && z.type !== "Scene" && (z.updateMatrixWorld(!0), _e.clone(), z.worldToLocal(_e), z.getWorldQuaternion(Ae), te.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(te), g.updateMatrixWorld(!0), F) {
2406
- const re = F.parent;
2407
- re && re.type !== "Scene" ? (re.getWorldQuaternion(Ae), F.quaternion.copy(Ae.clone().invert()).multiply(te)) : F.quaternion.copy(te), F.updateMatrixWorld(!0);
2401
+ function ha(g, k, F, N, T, D, B) {
2402
+ const $ = B ?? k;
2403
+ De || (g.updateMatrixWorld(!0), g.getWorldPosition(N0), g.getWorldQuaternion(T0), R0.copy(N0).sub($), N.value = 0, De = !0), N.value += T * D, Ne.setFromAxisAngle(c0, N.value), _e.copy(R0).applyQuaternion(Ne).add($), ne.copy(Ne).multiply(T0);
2404
+ const Q = g.parent;
2405
+ if (Q && Q.type !== "Scene" && (Q.updateMatrixWorld(!0), _e.clone(), Q.worldToLocal(_e), Q.getWorldQuaternion(Ae), ne.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(ne), g.updateMatrixWorld(!0), F) {
2406
+ const He = F.parent;
2407
+ He && He.type !== "Scene" ? (He.getWorldQuaternion(Ae), F.quaternion.copy(Ae.clone().invert()).multiply(ne)) : F.quaternion.copy(ne), F.updateMatrixWorld(!0);
2408
2408
  }
2409
2409
  }
2410
- function ha(g, l, F, N, T, D, P) {
2411
- const X = P ?? l;
2412
- Be || (g.updateMatrixWorld(!0), g.getWorldPosition(M0), g.getWorldQuaternion(D0), O0.copy(M0).sub(X), Be = !0), N.value += T * D, Te.setFromAxisAngle(f0, N.value), _e.copy(O0).applyQuaternion(Te).add(X), te.copy(Te).multiply(D0);
2413
- const z = g.parent;
2414
- if (z && z.type !== "Scene" && (z.updateMatrixWorld(!0), _e.clone(), z.worldToLocal(_e), z.getWorldQuaternion(Ae), te.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(te), g.updateMatrixWorld(!0), F) {
2415
- const re = F.parent;
2416
- re && re.type !== "Scene" ? (re.getWorldQuaternion(Ae), F.quaternion.copy(Ae.clone().invert()).multiply(te)) : F.quaternion.copy(te), F.updateMatrixWorld(!0);
2410
+ function ga(g, k, F, N, T, D, B) {
2411
+ const $ = B ?? k;
2412
+ Pe || (g.updateMatrixWorld(!0), g.getWorldPosition(D0), g.getWorldQuaternion(O0), E0.copy(D0).sub($), Pe = !0), N.value += T * D, Ne.setFromAxisAngle(c0, N.value), _e.copy(E0).applyQuaternion(Ne).add($), ne.copy(Ne).multiply(O0);
2413
+ const Q = g.parent;
2414
+ if (Q && Q.type !== "Scene" && (Q.updateMatrixWorld(!0), _e.clone(), Q.worldToLocal(_e), Q.getWorldQuaternion(Ae), ne.premultiply(Ae.clone().invert())), g.position.copy(_e), g.quaternion.copy(ne), g.updateMatrixWorld(!0), F) {
2415
+ const He = F.parent;
2416
+ He && He.type !== "Scene" ? (He.getWorldQuaternion(Ae), F.quaternion.copy(Ae.clone().invert()).multiply(ne)) : F.quaternion.copy(ne), F.updateMatrixWorld(!0);
2417
2417
  }
2418
2418
  }
2419
- const k2 = 0.5;
2420
- let B0 = "idle";
2419
+ const l2 = 0.5;
2420
+ let W0 = "idle";
2421
2421
  function je(g) {
2422
- B0 = g, M = "pausing", y = 0;
2422
+ W0 = g, M = "pausing", y = 0;
2423
2423
  }
2424
- const ga = new j(), _a = new j(), Aa = new j(), pa = new j();
2424
+ const _a = new j(), Aa = new j(), pa = new j(), ma = new j();
2425
2425
  new j();
2426
- const ma = new j(0.63, -0.52, 0.45), ja = new j(0.55, 0.6, 0.2), Ia = new j(0.69, -0.48, 0.45), ya = new j(0.65, 0.58, 0.2);
2427
- let wa = !1, Fa = !1;
2428
- function l2() {
2429
- H0 = [], u && (u.updateMatrixWorld(!0), u.traverse((g) => {
2430
- if (!(g instanceof fa) || !g.geometry) return;
2431
- const l = g.geometry;
2432
- if (!l.attributes.position) return;
2433
- l.computeBoundingBox();
2434
- const N = l.boundingBox, T = N.getSize(new j()), D = N.getCenter(new j());
2435
- let P, X, z, re, Q, v, O, e0, Je;
2436
- T.x >= T.y && T.x >= T.z ? (P = 0, X = 1, z = 2, re = T.x, Q = Math.max(T.y, T.z) / 2, v = N.min.x, O = N.max.x, e0 = D.y, Je = D.z) : T.y >= T.x && T.y >= T.z ? (P = 1, X = 0, z = 2, re = T.y, Q = Math.max(T.x, T.z) / 2, v = N.min.y, O = N.max.y, e0 = D.x, Je = D.z) : (P = 2, X = 0, z = 1, re = T.z, Q = Math.max(T.x, T.y) / 2, v = N.min.z, O = N.max.z, e0 = D.x, Je = D.y);
2437
- const qe = new ci(Q, Q, re, 32, 20);
2438
- P === 0 ? qe.rotateZ(-Math.PI / 2) : P === 2 && qe.rotateX(Math.PI / 2), qe.translate(D.x, D.y, D.z);
2439
- const W0 = l;
2440
- g.geometry = qe;
2441
- const C0 = new Float32Array(
2442
- qe.attributes.position.array
2426
+ const ja = new j(0.63, -0.52, 0.45), Ia = new j(0.55, 0.6, 0.2), ya = new j(0.69, -0.48, 0.45), wa = new j(0.65, 0.58, 0.2);
2427
+ let Fa = !1, va = !1;
2428
+ function k2() {
2429
+ r0 = [], u && (u.updateMatrixWorld(!0), u.traverse((g) => {
2430
+ if (!(g instanceof ta) || !g.geometry) return;
2431
+ const k = g.geometry;
2432
+ if (!k.attributes.position) return;
2433
+ k.computeBoundingBox();
2434
+ const N = k.boundingBox, T = N.getSize(new j()), D = N.getCenter(new j());
2435
+ let B, $, Q, He, Z, v, E, $e, Ze;
2436
+ T.x >= T.y && T.x >= T.z ? (B = 0, $ = 1, Q = 2, He = T.x, Z = Math.max(T.y, T.z) / 2, v = N.min.x, E = N.max.x, $e = D.y, Ze = D.z) : T.y >= T.x && T.y >= T.z ? (B = 1, $ = 0, Q = 2, He = T.y, Z = Math.max(T.x, T.z) / 2, v = N.min.y, E = N.max.y, $e = D.x, Ze = D.z) : (B = 2, $ = 0, Q = 1, He = T.z, Z = Math.max(T.x, T.y) / 2, v = N.min.z, E = N.max.z, $e = D.x, Ze = D.y);
2437
+ const Be = new ci(Z, Z, He, 32, 20);
2438
+ B === 0 ? Be.rotateZ(-Math.PI / 2) : B === 2 && Be.rotateX(Math.PI / 2), Be.translate(D.x, D.y, D.z);
2439
+ const V0 = k;
2440
+ g.geometry = Be;
2441
+ const L0 = new Float32Array(
2442
+ Be.attributes.position.array
2443
2443
  );
2444
- H0.push({
2444
+ r0.push({
2445
2445
  mesh: g,
2446
- originalGeometry: W0,
2447
- originalPositions: C0,
2448
- aIdx: P,
2449
- uIdx: X,
2450
- vIdx: z,
2446
+ originalGeometry: V0,
2447
+ originalPositions: L0,
2448
+ aIdx: B,
2449
+ uIdx: $,
2450
+ vIdx: Q,
2451
2451
  axisMin: v,
2452
- axisMax: O,
2453
- centerU: e0,
2454
- centerV: Je
2452
+ axisMax: E,
2453
+ centerU: $e,
2454
+ centerV: Ze
2455
2455
  });
2456
2456
  }));
2457
2457
  }
2458
- function q0() {
2459
- for (let g = 0; g < y0; g++) ze[g] = 1;
2460
- for (const g of H0) {
2461
- const l = g.mesh.geometry.attributes.position;
2462
- l.array.set(g.originalPositions), l.needsUpdate = !0, g.mesh.geometry.computeVertexNormals();
2458
+ function C0() {
2459
+ for (let g = 0; g < w0; g++) Se[g] = 1;
2460
+ for (const g of r0) {
2461
+ const k = g.mesh.geometry.attributes.position;
2462
+ k.array.set(g.originalPositions), k.needsUpdate = !0, g.mesh.geometry.computeVertexNormals();
2463
2463
  }
2464
2464
  }
2465
- function E0() {
2466
- for (const g of H0) {
2467
- const l = g.mesh.geometry.attributes.position, F = l.array, { originalPositions: N, aIdx: T, uIdx: D, vIdx: P, axisMin: X, axisMax: z, centerU: re, centerV: Q } = g, v = z - X;
2465
+ function G0() {
2466
+ for (const g of r0) {
2467
+ const k = g.mesh.geometry.attributes.position, F = k.array, { originalPositions: N, aIdx: T, uIdx: D, vIdx: B, axisMin: $, axisMax: Q, centerU: He, centerV: Z } = g, v = Q - $;
2468
2468
  if (!(v <= 0)) {
2469
- for (let O = 0; O < F.length; O += 3) {
2470
- const e0 = N[O + T];
2471
- let Je = Math.floor((e0 - X) / v * y0);
2472
- Je = Math.min(Math.max(Je, 0), y0 - 1);
2473
- const qe = ze[Je];
2474
- if (qe < 1) {
2475
- const W0 = N[O + D], C0 = N[O + P];
2476
- F[O + D] = re + (W0 - re) * qe, F[O + P] = Q + (C0 - Q) * qe, F[O + T] = e0;
2469
+ for (let E = 0; E < F.length; E += 3) {
2470
+ const $e = N[E + T];
2471
+ let Ze = Math.floor(($e - $) / v * w0);
2472
+ Ze = Math.min(Math.max(Ze, 0), w0 - 1);
2473
+ const Be = Se[Ze];
2474
+ if (Be < 1) {
2475
+ const V0 = N[E + D], L0 = N[E + B];
2476
+ F[E + D] = He + (V0 - He) * Be, F[E + B] = Z + (L0 - Z) * Be, F[E + T] = $e;
2477
2477
  } else
2478
- F[O] = N[O], F[O + 1] = N[O + 1], F[O + 2] = N[O + 2];
2478
+ F[E] = N[E], F[E + 1] = N[E + 1], F[E + 2] = N[E + 2];
2479
2479
  }
2480
- l.needsUpdate = !0, g.mesh.geometry.computeVertexNormals();
2480
+ k.needsUpdate = !0, g.mesh.geometry.computeVertexNormals();
2481
2481
  }
2482
2482
  }
2483
2483
  }
2484
2484
  function u2() {
2485
- c.value || o2() && (q0(), I0 = u.parent, da.copy(u.position), oa.copy(u.quaternion), c.value = !0, M = "opening", y = 0, wa = !L || !ie, Fa = !ae || !r0, u0 = (g) => {
2485
+ c.value || o2() && (C0(), y0 = u.parent, oa.copy(u.position), sa.copy(u.quaternion), c.value = !0, M = "opening", y = 0, Fa = !S || !ie, va = !be || !b0, h0 = (g) => {
2486
2486
  if (!(!c.value || !u))
2487
2487
  switch (y += g, M) {
2488
2488
  // ========== 阶段间统一延时 ==========
2489
2489
  case "pausing": {
2490
- y >= k2 && (M = B0, y = 0, B0 = "idle");
2490
+ y >= l2 && (M = W0, y = 0, W0 = "idle");
2491
2491
  break;
2492
2492
  }
2493
2493
  // ========== 手指张开 ==========
2494
2494
  case "opening": {
2495
- const l = Math.min(y / s, 1);
2496
- h0(he(l)), l >= 1 && (q0(), s2(), je(wa ? "toRollGap" : "toMill1UpperGap"), y = 0);
2495
+ const k = Math.min(y / s, 1);
2496
+ g0(he(k)), k >= 1 && (C0(), s2(), je(Fa ? "toRollGap" : "toMill1UpperGap"), y = 0);
2497
2497
  break;
2498
2498
  }
2499
2499
  // ========== 第一轧机:空隙姿态驱动流程 ==========
2500
2500
  // --- 1. 到第一轧机上辊空隙 ---
2501
2501
  case "toMill1UpperGap": {
2502
- c0(L, ma, ga);
2503
- const l = Math.min(y / Le, 1);
2504
- u.position.lerpVectors(E, ga, he(l)), l >= 1 && (je("closing1"), y = 0, Oe = !1);
2502
+ H0(S, ja, _a);
2503
+ const k = Math.min(y / Ve, 1);
2504
+ u.position.lerpVectors(G, _a, he(k)), k >= 1 && (je("closing1"), y = 0, De = !1);
2505
2505
  break;
2506
2506
  }
2507
2507
  case "closing1": {
2508
- const l = Math.min(y / ye, 1);
2509
- h0(1 - he(l)), l >= 1 && (h0(0), M = "ridingMill1UpperGap", y = 0);
2508
+ const k = Math.min(y / ye, 1);
2509
+ g0(1 - he(k)), k >= 1 && (g0(0), M = "ridingMill1UpperGap", y = 0);
2510
2510
  break;
2511
2511
  }
2512
2512
  // --- 2. 联轴器上辊与胚料一同逆时针转动,等待w达到目标值 ---
2513
2513
  case "ridingMill1UpperGap": {
2514
- L && u && (pe ? pe.getWorldPosition(Re) : L.getWorldPosition(Re), ka(
2515
- L,
2514
+ S && u && (pe ? pe.getWorldPosition(Te) : S.getWorldPosition(Te), ka(
2515
+ S,
2516
2516
  u,
2517
- ma,
2518
- Re,
2517
+ ja,
2518
+ Te,
2519
2519
  pe,
2520
+ v0,
2520
2521
  F0,
2521
- w0,
2522
- o0,
2522
+ d0,
2523
2523
  g
2524
- ) && (je("mill1Drop"), y = 0, E.copy(u.position), t0.set(E.x, E.y - Z, E.z)));
2524
+ ) && (je("mill1Drop"), y = 0, G.copy(u.position), f0.set(G.x, G.y - J, G.z)));
2525
2525
  break;
2526
2526
  }
2527
2527
  // --- 3a. 胚料垂直下落配置距离 ---
2528
2528
  case "mill1Drop": {
2529
- const l = Math.min(y / ue, 1);
2530
- u.position.lerpVectors(E, t0, he(l)), l >= 1 && (u.position.copy(t0), u.getWorldQuaternion(R0), je("mill1CoRotate"), y = 0, Oe = !1, $e = !1);
2529
+ const k = Math.min(y / ue, 1);
2530
+ u.position.lerpVectors(G, f0, he(k)), k >= 1 && (u.position.copy(f0), u.getWorldQuaternion(M0), je("mill1CoRotate"), y = 0, De = !1, Xe = !1);
2531
2531
  break;
2532
2532
  }
2533
2533
  case "mill1CoRotate": {
2534
- if (L && ie && u) {
2535
- $e || (pe ? pe.getWorldPosition(Qe) : L.getWorldPosition(Qe), we ? we.getWorldPosition(Ze) : ie.getWorldPosition(Ze), $e = !0, Oe = !1, Be = !1), ua(L, Qe, pe, Ee, q, g, Qe), ha(ie, Ze, we, Ee, q, g, Ze), u.quaternion.copy(R0), u.quaternion.premultiply(new $().setFromAxisAngle(f0, -Ee.value));
2536
- const l = Math.min(Ee.value / J, 1), F = 1 - 0.25 * he(l);
2537
- for (let N = 3; N <= 7; N++) ze[N] = F;
2538
- if (E0(), Ee.value >= J) {
2539
- for (let N = 3; N <= 7; N++) ze[N] = 0.75;
2540
- E0(), je("fallToMill1LowerGap"), y = 0, E.copy(u.position);
2534
+ if (S && ie && u) {
2535
+ Xe || (pe ? pe.getWorldPosition(ze) : S.getWorldPosition(ze), we ? we.getWorldPosition(Qe) : ie.getWorldPosition(Qe), Xe = !0, De = !1, Pe = !1), ha(S, ze, pe, Oe, W, g, ze), ga(ie, Qe, we, Oe, W, g, Qe), u.quaternion.copy(M0), u.quaternion.premultiply(new ee().setFromAxisAngle(c0, -Oe.value));
2536
+ const k = Math.min(Oe.value / Y, 1), F = 1 - 0.25 * he(k);
2537
+ for (let N = 3; N <= 7; N++) Se[N] = F;
2538
+ if (G0(), Oe.value >= Y) {
2539
+ for (let N = 3; N <= 7; N++) Se[N] = 0.75;
2540
+ G0(), je("fallToMill1LowerGap"), y = 0, G.copy(u.position);
2541
2541
  }
2542
2542
  }
2543
2543
  break;
2544
2544
  }
2545
2545
  // --- 4. 落入第一轧机下辊空隙 ---
2546
2546
  case "fallToMill1LowerGap": {
2547
- c0(ie, ja, _a);
2548
- const l = Math.min(y / ge, 1);
2549
- u.position.lerpVectors(E, _a, he(l)), l >= 1 && (je("ridingMill1LowerGap"), y = 0, Be = !1);
2547
+ H0(ie, Ia, Aa);
2548
+ const k = Math.min(y / ge, 1);
2549
+ u.position.lerpVectors(G, Aa, he(k)), k >= 1 && (je("ridingMill1LowerGap"), y = 0, Pe = !1);
2550
2550
  break;
2551
2551
  }
2552
2552
  // --- 4. 随第一轧机下辊空隙转动(顺时针),等待达到目标角度后送出 ---
2553
2553
  case "ridingMill1LowerGap": {
2554
- ie && u && (we ? we.getWorldPosition(Re) : ie.getWorldPosition(Re), la(
2554
+ ie && u && (we ? we.getWorldPosition(Te) : ie.getWorldPosition(Te), ua(
2555
2555
  ie,
2556
2556
  u,
2557
- ja,
2558
- Re,
2557
+ Ia,
2558
+ Te,
2559
2559
  we,
2560
+ v0,
2560
2561
  F0,
2561
- w0,
2562
- s0,
2562
+ o0,
2563
2563
  g
2564
- ) && (E.copy(u.position), je("exitMill1LowerGap"), y = 0));
2564
+ ) && (G.copy(u.position), je("exitMill1LowerGap"), y = 0));
2565
2565
  break;
2566
2566
  }
2567
2567
  // --- 5. 随第一轧机下辊送出(移动到下输送台板表面并沿表面移动) ---
2568
2568
  case "exitMill1LowerGap": {
2569
- if (be) {
2570
- const l = new j(
2571
- E.x + 0.3,
2572
- be.y + 0.02,
2573
- E.z
2569
+ if (V) {
2570
+ const k = new j(
2571
+ G.x + 0.3,
2572
+ V.y + 0.02,
2573
+ G.z
2574
2574
  ), F = new j(
2575
- be.x + 0.38,
2576
- be.y + 0.05,
2577
- be.z
2578
- ), N = G * 2, T = Math.min(y / N, 1);
2575
+ V.x + 0.38,
2576
+ V.y + 0.05,
2577
+ V.z
2578
+ ), N = O * 2, T = Math.min(y / N, 1);
2579
2579
  if (T <= 0.5) {
2580
2580
  const D = T * 2;
2581
- u.position.lerpVectors(E, l, he(D));
2581
+ u.position.lerpVectors(G, k, he(D));
2582
2582
  } else {
2583
2583
  const D = (T - 0.5) * 2;
2584
- u.position.lerpVectors(l, F, he(D));
2584
+ u.position.lerpVectors(k, F, he(D));
2585
2585
  }
2586
2586
  if (T >= 1) {
2587
- if (u.position.copy(F), !o && b) {
2588
- b(), o = !0;
2589
- let D = 1 / 0, P = -1;
2590
- for (let X = 0; X < t.length; X++) {
2591
- const [z, re] = t[X];
2592
- if (r && r(z, re, me)) {
2593
- const Q = me.distanceTo(F);
2594
- Q < D && (D = Q, P = X);
2587
+ if (u.position.copy(F), !o && r) {
2588
+ r(), o = !0;
2589
+ let D = 1 / 0, B = -1;
2590
+ for (let $ = 0; $ < t.length; $++) {
2591
+ const [Q, He] = t[$];
2592
+ if (b && b(Q, He, me)) {
2593
+ const Z = me.distanceTo(F);
2594
+ Z < D && (D = Z, B = $);
2595
2595
  }
2596
2596
  }
2597
- P >= 0 ? (d = P, E.copy(u.position), M = "liftToClamp") : M = "conveyorWait";
2597
+ B >= 0 ? (d = B, G.copy(u.position), M = "liftToClamp") : M = "conveyorWait";
2598
2598
  } else
2599
2599
  M = "conveyorWait";
2600
2600
  y = 0;
@@ -2606,163 +2606,163 @@ function gb(n, a, e, H, i = null, b = null, r = null, f = null) {
2606
2606
  // ========== 输送台阶段 ==========
2607
2607
  // --- 胚料向输送台移动 ---
2608
2608
  case "toConveyor": {
2609
- const l = Math.min(y / k, 1);
2610
- u.position.lerpVectors(E, B, he(l)), be && u.position.y <= be.y + 0.1 && (u.position.copy(B), M = "liftToClamp", y = 0), y >= k && (u.position.copy(B), M = "liftToClamp", y = 0);
2609
+ const k = Math.min(y / l, 1);
2610
+ u.position.lerpVectors(G, P, he(k)), V && u.position.y <= V.y + 0.1 && (u.position.copy(P), M = "liftToClamp", y = 0), y >= l && (u.position.copy(P), M = "liftToClamp", y = 0);
2611
2611
  break;
2612
2612
  }
2613
2613
  // --- 等待夹具到达下输送台接料点(使用 pair 中点) ---
2614
2614
  case "conveyorWait": {
2615
- if (!be) {
2615
+ if (!V) {
2616
2616
  M = "upperWait", y = 0;
2617
2617
  break;
2618
2618
  }
2619
- let l = 1 / 0, F = -1;
2619
+ let k = 1 / 0, F = -1;
2620
2620
  for (let N = 0; N < t.length; N++) {
2621
2621
  const [T, D] = t[N];
2622
- if (r && r(T, D, me)) {
2623
- const P = me.distanceTo(be);
2624
- P < w && P < l && (l = P, F = N);
2622
+ if (b && b(T, D, me)) {
2623
+ const B = me.distanceTo(V);
2624
+ B < w && B < k && (k = B, F = N);
2625
2625
  }
2626
2626
  }
2627
- F >= 0 && (d = F, E.copy(u.position), M = "liftToClamp", y = 0), y >= m && (M = "upperWait", y = 0);
2627
+ F >= 0 && (d = F, G.copy(u.position), M = "liftToClamp", y = 0), y >= A && (M = "upperWait", y = 0);
2628
2628
  break;
2629
2629
  }
2630
2630
  // --- 胚料升到夹具上方(使用 pair 中点) ---
2631
2631
  case "liftToClamp": {
2632
- const l = Math.min(y / h, 1), F = t[d];
2633
- r(F[0], F[1], me), me.y += 0.13, me.x += _, u.position.lerpVectors(E, me, he(l)), l >= 1 && (u.position.copy(me), M = "ridingChain", y = 0);
2632
+ const k = Math.min(y / h, 1), F = t[d];
2633
+ b(F[0], F[1], me), me.y += 0.13, me.x += _, u.position.lerpVectors(G, me, he(k)), k >= 1 && (u.position.copy(me), M = "ridingChain", y = 0);
2634
2634
  break;
2635
2635
  }
2636
2636
  // --- 跟随夹具随链条滚动(使用 pair 中点) ---
2637
2637
  case "ridingChain": {
2638
- const l = t[d];
2639
- if (!r || !r(l[0], l[1], me)) {
2640
- Ne && u.position.copy(Ne), M = "upperWait", y = 0;
2638
+ const k = t[d];
2639
+ if (!b || !b(k[0], k[1], me)) {
2640
+ re && u.position.copy(re), M = "upperWait", y = 0;
2641
2641
  break;
2642
2642
  }
2643
- me.y += 0.13, me.x += _, u.position.copy(me), Ne && me.y >= Ne.y - p && (E.copy(u.position), B.copy(Ne), B.y += 0.05, M = "dropToUpperConveyor", y = 0), y >= 60 && (Ne && u.position.copy(Ne), M = "upperWait", y = 0);
2643
+ me.y += 0.13, me.x += _, u.position.copy(me), re && me.y >= re.y - p && (G.copy(u.position), P.copy(re), P.y += 0.05, M = "dropToUpperConveyor", y = 0), y >= 60 && (re && u.position.copy(re), M = "upperWait", y = 0);
2644
2644
  break;
2645
2645
  }
2646
2646
  // --- 从夹具平滑过渡到上输送台(避免瞬移) ---
2647
2647
  case "dropToUpperConveyor": {
2648
- if (!Ne) {
2648
+ if (!re) {
2649
2649
  M = "upperWait", y = 0;
2650
2650
  break;
2651
2651
  }
2652
- const l = Math.min(y / A, 1);
2653
- u.position.lerpVectors(E, B, he(l)), l >= 1 && (u.position.copy(B), M = "upperWait", y = 0);
2652
+ const k = Math.min(y / m, 1);
2653
+ u.position.lerpVectors(G, P, he(k)), k >= 1 && (u.position.copy(P), M = "upperWait", y = 0);
2654
2654
  break;
2655
2655
  }
2656
2656
  // --- 上输送台等待2s ---
2657
2657
  case "upperWait": {
2658
- y >= I && (M = Fa ? "toMill2RollTop" : "toMill2UpperGap", y = 0);
2658
+ y >= I && (M = va ? "toMill2RollTop" : "toMill2UpperGap", y = 0);
2659
2659
  break;
2660
2660
  }
2661
2661
  // ========== 第二轧机:空隙姿态驱动流程(与第一轧机对称) ==========
2662
2662
  // --- 1. 到第二轧机上辊空隙 ---
2663
2663
  case "toMill2UpperGap": {
2664
- c0(ae, Ia, Aa);
2665
- const l = Math.min(y / d0, 1);
2666
- u.position.lerpVectors(B, Aa, he(l)), l >= 1 && (je("ridingMill2UpperGap"), y = 0, Oe = !1);
2664
+ H0(be, ya, pa);
2665
+ const k = Math.min(y / n0, 1);
2666
+ u.position.lerpVectors(P, pa, he(k)), k >= 1 && (je("ridingMill2UpperGap"), y = 0, De = !1);
2667
2667
  break;
2668
2668
  }
2669
2669
  // --- 2. 联轴器上辊与胚料一同逆时针转动,等待达到目标角度 ---
2670
2670
  case "ridingMill2UpperGap": {
2671
- ae && u && (Fe ? Fe.getWorldPosition(Re) : ae.getWorldPosition(Re), ka(
2672
- ae,
2671
+ be && u && (Fe ? Fe.getWorldPosition(Te) : be.getWorldPosition(Te), ka(
2672
+ be,
2673
2673
  u,
2674
- Ia,
2675
- Re,
2674
+ ya,
2675
+ Te,
2676
2676
  Fe,
2677
+ v0,
2677
2678
  F0,
2678
- w0,
2679
- V,
2679
+ L,
2680
2680
  g
2681
- ) && (je("mill2Drop"), y = 0, E.copy(u.position), t0.set(E.x, E.y - de, E.z)));
2681
+ ) && (je("mill2Drop"), y = 0, G.copy(u.position), f0.set(G.x, G.y - oe, G.z)));
2682
2682
  break;
2683
2683
  }
2684
2684
  // --- 3a. 胚料垂直下落配置距离 ---
2685
2685
  case "mill2Drop": {
2686
- const l = Math.min(y / K, 1);
2687
- u.position.lerpVectors(E, t0, he(l)), l >= 1 && (u.position.copy(t0), u.getWorldQuaternion(R0), je("mill2CoRotate"), y = 0, Oe = !1, $e = !1);
2686
+ const k = Math.min(y / X, 1);
2687
+ u.position.lerpVectors(G, f0, he(k)), k >= 1 && (u.position.copy(f0), u.getWorldQuaternion(M0), je("mill2CoRotate"), y = 0, De = !1, Xe = !1);
2688
2688
  break;
2689
2689
  }
2690
2690
  // --- 3b. 上下辊同速率逆时针共转 ---
2691
2691
  case "mill2CoRotate": {
2692
- if (ae && oe && u) {
2693
- $e || (Fe ? Fe.getWorldPosition(Qe) : ae.getWorldPosition(Qe), ve ? ve.getWorldPosition(Ze) : oe.getWorldPosition(Ze), $e = !0, Oe = !1, Be = !1), ua(ae, Qe, Fe, Ee, ke, g, Qe), ha(oe, Ze, ve, Ee, ke, g, Ze), u.quaternion.copy(R0), u.quaternion.premultiply(new $().setFromAxisAngle(f0, -Ee.value));
2694
- const l = Math.min(Ee.value / ee, 1), F = 1 - 0.25 * he(l);
2695
- ze[0] = F, ze[9] = F, E0(), Ee.value >= ee && (ze[0] = 0.75, ze[9] = 0.75, E0(), je("fallToMill2LowerGap"), y = 0, E.copy(u.position));
2692
+ if (be && ce && u) {
2693
+ Xe || (Fe ? Fe.getWorldPosition(ze) : be.getWorldPosition(ze), ve ? ve.getWorldPosition(Qe) : ce.getWorldPosition(Qe), Xe = !0, De = !1, Pe = !1), ha(be, ze, Fe, Oe, le, g, ze), ga(ce, Qe, ve, Oe, le, g, Qe), u.quaternion.copy(M0), u.quaternion.premultiply(new ee().setFromAxisAngle(c0, -Oe.value));
2694
+ const k = Math.min(Oe.value / ae, 1), F = 1 - 0.25 * he(k);
2695
+ Se[0] = F, Se[9] = F, G0(), Oe.value >= ae && (Se[0] = 0.75, Se[9] = 0.75, G0(), je("fallToMill2LowerGap"), y = 0, G.copy(u.position));
2696
2696
  }
2697
2697
  break;
2698
2698
  }
2699
2699
  // --- 4. 落入第二轧机下辊空隙 ---
2700
2700
  case "fallToMill2LowerGap": {
2701
- c0(oe, ya, pa);
2702
- const l = Math.min(y / Ge, 1);
2703
- u.position.lerpVectors(E, pa, he(l)), l >= 1 && (je("ridingMill2LowerGap"), y = 0, Be = !1);
2701
+ H0(ce, wa, ma);
2702
+ const k = Math.min(y / Ee, 1);
2703
+ u.position.lerpVectors(G, ma, he(k)), k >= 1 && (je("ridingMill2LowerGap"), y = 0, Pe = !1);
2704
2704
  break;
2705
2705
  }
2706
2706
  // --- 5. 随第二轧机下辊空隙转动(顺时针),等待达到目标角度后送出 ---
2707
2707
  case "ridingMill2LowerGap": {
2708
- oe && u && (ve ? ve.getWorldPosition(Re) : oe.getWorldPosition(Re), la(
2709
- oe,
2708
+ ce && u && (ve ? ve.getWorldPosition(Te) : ce.getWorldPosition(Te), ua(
2709
+ ce,
2710
2710
  u,
2711
- ya,
2712
- Re,
2711
+ wa,
2712
+ Te,
2713
2713
  ve,
2714
+ v0,
2714
2715
  F0,
2715
- w0,
2716
- Y,
2716
+ K,
2717
2717
  g
2718
- ) && (E.copy(u.position), je("exitMill2LowerGap"), y = 0));
2718
+ ) && (G.copy(u.position), je("exitMill2LowerGap"), y = 0));
2719
2719
  break;
2720
2720
  }
2721
2721
  // --- 6. 随第二轧机下辊送出(移动到地面) ---
2722
2722
  case "exitMill2LowerGap": {
2723
- B.set(
2724
- E.x + 3,
2725
- na,
2726
- E.z
2723
+ P.set(
2724
+ G.x + 3,
2725
+ k0,
2726
+ G.z
2727
2727
  );
2728
- const l = G * 2, F = Math.min(y / l, 1);
2729
- u.position.lerpVectors(E, B, he(F)), F >= 1 && (u.position.copy(B), M = "groundWait", y = 0);
2728
+ const k = O * 2, F = Math.min(y / k, 1);
2729
+ u.position.lerpVectors(G, P, he(F)), F >= 1 && (u.position.copy(P), M = "groundWait", y = 0);
2730
2730
  break;
2731
2731
  }
2732
2732
  // --- 掉落地面 ---
2733
2733
  case "fallToGround": {
2734
- const l = Math.min(y / C, 1);
2735
- u.position.lerpVectors(E, B, he(l)), l >= 1 && (u.position.copy(B), M = "groundWait", y = 0);
2734
+ const k = Math.min(y / q, 1);
2735
+ u.position.lerpVectors(G, P, he(k)), k >= 1 && (u.position.copy(P), M = "groundWait", y = 0);
2736
2736
  break;
2737
2737
  }
2738
2738
  // --- 地面停留3s后全量初始化并重新开始 ---
2739
2739
  case "groundWait": {
2740
- if (y >= S) {
2741
- f && f(), o = !1, d = -1, u && I0 && (u.removeFromParent(), I0.add(u), u.position.copy(da), u.quaternion.copy(oa)), q0(), h0(0);
2742
- const l = (F, N) => {
2740
+ if (y >= z) {
2741
+ f && f(), o = !1, d = -1, u && y0 && (u.removeFromParent(), y0.add(u), u.position.copy(oa), u.quaternion.copy(sa)), C0(), g0(0);
2742
+ const k = (F, N) => {
2743
2743
  F && N && (F.position.copy(N.pos), F.quaternion.copy(N.quat), F.updateMatrixWorld(!0));
2744
2744
  };
2745
- l(L, k0), l(ie, b0), l(ae, Se), l(oe, R), l(pe, U), l(we, He), l(Fe, W), l(ve, ce), Ee.value = 0, $e = !1, Oe = !1, Be = !1, M = "opening", y = 0;
2745
+ k(S, s0), k(ie, l0), k(be, i0), k(ce, Le), k(pe, R), k(we, U), k(Fe, fe), k(ve, C), Oe.value = 0, Xe = !1, De = !1, Pe = !1, M = "opening", y = 0;
2746
2746
  }
2747
2747
  break;
2748
2748
  }
2749
2749
  }
2750
- }, a(u0));
2750
+ }, a(h0));
2751
2751
  }
2752
- function va() {
2753
- c.value = !1, u0 && (e(u0), u0 = null), M = "idle", o = !1, d = -1, h0(0), l0.length = 0, I0 = null;
2752
+ function Na() {
2753
+ c.value = !1, h0 && (e(h0), h0 = null), M = "idle", o = !1, d = -1, g0(0), u0.length = 0, y0 = null;
2754
2754
  }
2755
2755
  function h2() {
2756
- va();
2757
- for (const g of H0)
2756
+ Na();
2757
+ for (const g of r0)
2758
2758
  g.mesh.geometry = g.originalGeometry;
2759
- H0 = [], u = null, L = null, ie = null, ae = null, oe = null, pe = null, we = null, Fe = null, ve = null, k0 = null, b0 = null, Se = null, R = null, U = null, He = null, W = null, ce = null, fe = null;
2759
+ r0 = [], u = null, S = null, ie = null, be = null, ce = null, pe = null, we = null, Fe = null, ve = null, s0 = null, l0 = null, i0 = null, Le = null, R = null, U = null, fe = null, C = null, te = null;
2760
2760
  }
2761
- return { isBilletAnimating: c, startBilletDelivery: u2, stopBilletDelivery: va, dispose: h2 };
2761
+ return { isBilletAnimating: c, startBilletDelivery: u2, stopBilletDelivery: Na, dispose: h2 };
2762
2762
  }
2763
2763
  function _b(n, a, e, H = null) {
2764
- const i = ne(!1);
2765
- let b = [], r = [];
2764
+ const i = de(!1);
2765
+ let r = [], b = [];
2766
2766
  const f = [
2767
2767
  ["夹具5倍-7", "夹具5倍-8"],
2768
2768
  ["夹具5倍-3", "夹具5倍-5"]
@@ -2770,165 +2770,165 @@ function _b(n, a, e, H = null) {
2770
2770
  let c = null, t = 0;
2771
2771
  const o = 6;
2772
2772
  let d = null;
2773
- const s = new $(), k = new j(), h = new j(), A = new j(), _ = new j(), w = new $(), p = new $(), m = new $(), I = new $(), G = new $(), C = new j(), S = new j();
2773
+ const s = new ee(), l = new j(), h = new j(), m = new j(), _ = new j(), w = new ee(), p = new ee(), A = new ee(), I = new ee(), O = new ee(), q = new j(), z = new j();
2774
2774
  function ye() {
2775
- const Z = n.value;
2776
- if (!Z || Z.length === 0) return !1;
2777
- for (const K of Z)
2778
- K && K.updateMatrixWorld(!0);
2779
- for (const K of Z)
2780
- if (K && (c = K.getObjectByName("整体1-6"), c))
2775
+ const J = n.value;
2776
+ if (!J || J.length === 0) return !1;
2777
+ for (const X of J)
2778
+ X && X.updateMatrixWorld(!0);
2779
+ for (const X of J)
2780
+ if (X && (c = X.getObjectByName("整体1-6"), c))
2781
2781
  break;
2782
2782
  if (!c) return !1;
2783
- const ue = c.getObjectByName("链条5倍-1"), J = c.getObjectByName("链条5倍-2");
2784
- if (!ue || !J) return !1;
2785
- const q = [ue, J];
2786
- b = [];
2787
- for (const K of q) {
2788
- const ee = [];
2789
- if (K.children.forEach((B) => {
2790
- B.name.startsWith("链节5倍") && ee.push(B);
2791
- }), ee.length === 0) return !1;
2792
- const ke = [];
2793
- if (K.children.forEach((B) => {
2794
- B.name.includes("主动链轮10倍") && ke.push(B.position.clone());
2795
- }), ke.length < 2) return !1;
2796
- const M = new j().addVectors(ke[0], ke[1]).multiplyScalar(0.5);
2797
- ee.sort((B, u) => {
2798
- const L = Math.atan2(B.position.y - M.y, B.position.x - M.x), ie = Math.atan2(u.position.y - M.y, u.position.x - M.x);
2799
- return (L < 0 ? L + 2 * Math.PI : L) - (ie < 0 ? ie + 2 * Math.PI : ie);
2783
+ const ue = c.getObjectByName("链条5倍-1"), Y = c.getObjectByName("链条5倍-2");
2784
+ if (!ue || !Y) return !1;
2785
+ const W = [ue, Y];
2786
+ r = [];
2787
+ for (const X of W) {
2788
+ const ae = [];
2789
+ if (X.children.forEach((P) => {
2790
+ P.name.startsWith("链节5倍") && ae.push(P);
2791
+ }), ae.length === 0) return !1;
2792
+ const le = [];
2793
+ if (X.children.forEach((P) => {
2794
+ P.name.includes("主动链轮10倍") && le.push(P.position.clone());
2795
+ }), le.length < 2) return !1;
2796
+ const M = new j().addVectors(le[0], le[1]).multiplyScalar(0.5);
2797
+ ae.sort((P, u) => {
2798
+ const S = Math.atan2(P.position.y - M.y, P.position.x - M.x), ie = Math.atan2(u.position.y - M.y, u.position.x - M.x);
2799
+ return (S < 0 ? S + 2 * Math.PI : S) - (ie < 0 ? ie + 2 * Math.PI : ie);
2800
2800
  });
2801
- const y = ee.map((B) => B.position.clone()), E = ee.map((B) => B.quaternion.clone());
2802
- b.push({ group: K, links: ee, origPositions: y, origQuaternions: E });
2801
+ const y = ae.map((P) => P.position.clone()), G = ae.map((P) => P.quaternion.clone());
2802
+ r.push({ group: X, links: ae, origPositions: y, origQuaternions: G });
2803
2803
  }
2804
- r = [];
2805
- const V = ["夹具5倍-7", "夹具5倍-8", "夹具5倍-3", "夹具5倍-5"], Y = new $(), de = new $();
2806
- for (const K of V) {
2807
- const ee = c.getObjectByName(K);
2808
- if (!ee) continue;
2809
- const ke = new j();
2810
- ee.getWorldPosition(ke);
2811
- let M = -1, y = -1, E = 1 / 0, B = new j();
2812
- for (let u = 0; u < b.length; u++) {
2813
- const L = b[u], ie = new j();
2814
- L.group.worldToLocal(ie.copy(ke));
2815
- for (let ae = 0; ae < L.links.length; ae++) {
2816
- const oe = L.origPositions[ae], pe = ie.distanceTo(oe);
2817
- pe < E && (E = pe, M = u, y = ae, B = new j().subVectors(ie, oe));
2804
+ b = [];
2805
+ const L = ["夹具5倍-7", "夹具5倍-8", "夹具5倍-3", "夹具5倍-5"], K = new ee(), oe = new ee();
2806
+ for (const X of L) {
2807
+ const ae = c.getObjectByName(X);
2808
+ if (!ae) continue;
2809
+ const le = new j();
2810
+ ae.getWorldPosition(le);
2811
+ let M = -1, y = -1, G = 1 / 0, P = new j();
2812
+ for (let u = 0; u < r.length; u++) {
2813
+ const S = r[u], ie = new j();
2814
+ S.group.worldToLocal(ie.copy(le));
2815
+ for (let be = 0; be < S.links.length; be++) {
2816
+ const ce = S.origPositions[be], pe = ie.distanceTo(ce);
2817
+ pe < G && (G = pe, M = u, y = be, P = new j().subVectors(ie, ce));
2818
2818
  }
2819
2819
  }
2820
2820
  if (M >= 0) {
2821
- b[M].links[y].getWorldQuaternion(Y), ee.getWorldQuaternion(de);
2822
- const L = new $().copy(Y).invert().multiply(de);
2823
- r.push({
2824
- object: ee,
2821
+ r[M].links[y].getWorldQuaternion(K), ae.getWorldQuaternion(oe);
2822
+ const S = new ee().copy(K).invert().multiply(oe);
2823
+ b.push({
2824
+ object: ae,
2825
2825
  chainIdx: M,
2826
2826
  linkIdx: y,
2827
- localOffset: B,
2828
- quatOffset: L,
2829
- origPosition: ee.position.clone(),
2830
- origQuaternion: ee.quaternion.clone()
2827
+ localOffset: P,
2828
+ quatOffset: S,
2829
+ origPosition: ae.position.clone(),
2830
+ origQuaternion: ae.quaternion.clone()
2831
2831
  });
2832
2832
  }
2833
2833
  }
2834
2834
  return !0;
2835
2835
  }
2836
- function le() {
2837
- i.value || ye() && (i.value = !0, t = 0, d = (Z) => {
2838
- var J;
2836
+ function ke() {
2837
+ i.value || ye() && (i.value = !0, t = 0, d = (J) => {
2838
+ var Y;
2839
2839
  if (!i.value) return;
2840
- t += o * Z;
2841
- const ue = ((J = b[0]) == null ? void 0 : J.links.length) ?? 0;
2840
+ t += o * J;
2841
+ const ue = ((Y = r[0]) == null ? void 0 : Y.links.length) ?? 0;
2842
2842
  if (ue > 0 && t >= ue) {
2843
2843
  t = ue, ge(), H && H();
2844
2844
  return;
2845
2845
  }
2846
- for (const q of b) {
2847
- const V = q.links.length, Y = Math.floor(t), de = t - Y;
2848
- for (let K = 0; K < V; K++) {
2849
- const ee = ((K + Y) % V + V) % V, ke = ((K + Y + 1) % V + V) % V, M = q.links[K];
2846
+ for (const W of r) {
2847
+ const L = W.links.length, K = Math.floor(t), oe = t - K;
2848
+ for (let X = 0; X < L; X++) {
2849
+ const ae = ((X + K) % L + L) % L, le = ((X + K + 1) % L + L) % L, M = W.links[X];
2850
2850
  M.position.lerpVectors(
2851
- q.origPositions[ee],
2852
- q.origPositions[ke],
2853
- de
2851
+ W.origPositions[ae],
2852
+ W.origPositions[le],
2853
+ oe
2854
2854
  ), s.slerpQuaternions(
2855
- q.origQuaternions[ee],
2856
- q.origQuaternions[ke],
2857
- de
2855
+ W.origQuaternions[ae],
2856
+ W.origQuaternions[le],
2857
+ oe
2858
2858
  ), M.quaternion.copy(s);
2859
2859
  }
2860
2860
  }
2861
- c.getWorldQuaternion(m), I.copy(m).invert();
2862
- for (const q of r) {
2863
- const V = b[q.chainIdx], Y = V.links.length, de = Math.floor(t), K = t - de, ee = ((q.linkIdx + de) % Y + Y) % Y, ke = ((q.linkIdx + de + 1) % Y + Y) % Y;
2864
- k.lerpVectors(
2865
- V.origPositions[ee],
2866
- V.origPositions[ke],
2867
- K
2868
- ), h.copy(k).add(q.localOffset), V.group.localToWorld(A.copy(h)), c.worldToLocal(_.copy(A)), q.object.position.copy(_), V.group.getWorldQuaternion(p), w.slerpQuaternions(
2869
- V.origQuaternions[ee],
2870
- V.origQuaternions[ke],
2871
- K
2872
- ), G.copy(p).multiply(w).multiply(q.quatOffset), G.premultiply(I), q.object.quaternion.copy(G);
2861
+ c.getWorldQuaternion(A), I.copy(A).invert();
2862
+ for (const W of b) {
2863
+ const L = r[W.chainIdx], K = L.links.length, oe = Math.floor(t), X = t - oe, ae = ((W.linkIdx + oe) % K + K) % K, le = ((W.linkIdx + oe + 1) % K + K) % K;
2864
+ l.lerpVectors(
2865
+ L.origPositions[ae],
2866
+ L.origPositions[le],
2867
+ X
2868
+ ), h.copy(l).add(W.localOffset), L.group.localToWorld(m.copy(h)), c.worldToLocal(_.copy(m)), W.object.position.copy(_), L.group.getWorldQuaternion(p), w.slerpQuaternions(
2869
+ L.origQuaternions[ae],
2870
+ L.origQuaternions[le],
2871
+ X
2872
+ ), O.copy(p).multiply(w).multiply(W.quatOffset), O.premultiply(I), W.object.quaternion.copy(O);
2873
2873
  }
2874
2874
  }, a(d));
2875
2875
  }
2876
2876
  function ge() {
2877
2877
  i.value = !1, d && (e(d), d = null);
2878
- for (const Z of b)
2879
- Z.links.forEach((ue, J) => {
2880
- ue.position.copy(Z.origPositions[J]), ue.quaternion.copy(Z.origQuaternions[J]);
2878
+ for (const J of r)
2879
+ J.links.forEach((ue, Y) => {
2880
+ ue.position.copy(J.origPositions[Y]), ue.quaternion.copy(J.origQuaternions[Y]);
2881
2881
  });
2882
- for (const Z of r)
2883
- Z.object.position.copy(Z.origPosition), Z.object.quaternion.copy(Z.origQuaternion);
2882
+ for (const J of b)
2883
+ J.object.position.copy(J.origPosition), J.object.quaternion.copy(J.origQuaternion);
2884
2884
  }
2885
- function Ge() {
2886
- ge(), b = [], r = [];
2885
+ function Ee() {
2886
+ ge(), r = [], b = [];
2887
2887
  }
2888
- function Le(Z, ue) {
2889
- const J = r.find((q) => q.object.name === Z);
2890
- return J ? (J.object.getWorldPosition(ue), !0) : !1;
2888
+ function Ve(J, ue) {
2889
+ const Y = b.find((W) => W.object.name === J);
2890
+ return Y ? (Y.object.getWorldPosition(ue), !0) : !1;
2891
2891
  }
2892
- function d0(Z, ue, J) {
2893
- const q = r.find((de) => de.object.name === Z), V = r.find((de) => de.object.name === ue);
2894
- if (!q && !V) return !1;
2895
- let Y = !1;
2896
- return q && (q.object.getWorldPosition(C), Y = !0), V && (V.object.getWorldPosition(S), Y = !0), q && V ? J.copy(C).add(S).multiplyScalar(0.5) : q ? J.copy(C) : J.copy(S), Y;
2892
+ function n0(J, ue, Y) {
2893
+ const W = b.find((oe) => oe.object.name === J), L = b.find((oe) => oe.object.name === ue);
2894
+ if (!W && !L) return !1;
2895
+ let K = !1;
2896
+ return W && (W.object.getWorldPosition(q), K = !0), L && (L.object.getWorldPosition(z), K = !0), W && L ? Y.copy(q).add(z).multiplyScalar(0.5) : W ? Y.copy(q) : Y.copy(z), K;
2897
2897
  }
2898
- function o0() {
2899
- return r.map((Z) => Z.object.name);
2898
+ function d0() {
2899
+ return b.map((J) => J.object.name);
2900
2900
  }
2901
- function s0() {
2901
+ function o0() {
2902
2902
  return f.slice();
2903
2903
  }
2904
- return { isChainAnimating: i, startChainAnimation: le, stopChainAnimation: ge, dispose: Ge, getClampWorldPosition: Le, getClampPairWorldPosition: d0, getClampNames: o0, getClampPairs: s0 };
2904
+ return { isChainAnimating: i, startChainAnimation: ke, stopChainAnimation: ge, dispose: Ee, getClampWorldPosition: Ve, getClampPairWorldPosition: n0, getClampNames: d0, getClampPairs: o0 };
2905
2905
  }
2906
- const Ab = 16776960, pb = 65280, Ca = "pickHighlightRoot", mb = "partType";
2906
+ const Ab = 16776960, pb = 65280, Va = "pickHighlightRoot", mb = "partType";
2907
2907
  function jb() {
2908
2908
  return {
2909
2909
  raycaster: new fi(),
2910
- mouse: new ca(),
2910
+ mouse: new fa(),
2911
2911
  lastMeshes: /* @__PURE__ */ new Set(),
2912
2912
  originalEmissive: /* @__PURE__ */ new Map()
2913
2913
  };
2914
2914
  }
2915
- function t2(n, a) {
2915
+ function n2(n, a) {
2916
2916
  const e = [...a];
2917
2917
  return n.traverse((H) => {
2918
2918
  H.type === "Group" && H.name.endsWith("-pivot") && e.push(H);
2919
2919
  }), e;
2920
2920
  }
2921
2921
  function Ib(n, a) {
2922
- var i, b;
2922
+ var i, r;
2923
2923
  const e = a.originalEmissive.get(n), H = n.material;
2924
- e ? (i = H.emissive) == null || i.copy(e) : (b = H.emissive) == null || b.setHex(0);
2924
+ e ? (i = H.emissive) == null || i.copy(e) : (r = H.emissive) == null || r.setHex(0);
2925
2925
  }
2926
- function n2(n) {
2927
- const a = n.userData[Ca];
2926
+ function da(n) {
2927
+ const a = n.userData[Va];
2928
2928
  if (a && a.isObject3D) return a;
2929
2929
  let e = n.parent, H = null;
2930
2930
  for (; e; ) {
2931
- const i = e.userData[Ca];
2931
+ const i = e.userData[Va];
2932
2932
  if (i && i.isObject3D) return i;
2933
2933
  if (e.name && e.name.includes("联轴器")) return e;
2934
2934
  !e.isMesh && H === null && (H = e), e = e.parent;
@@ -2942,31 +2942,31 @@ function yb(n) {
2942
2942
  }), a;
2943
2943
  }
2944
2944
  function d2(n) {
2945
- const a = n2(n);
2945
+ const a = da(n);
2946
2946
  if (a) {
2947
2947
  const e = yb(a);
2948
2948
  if (e.length > 0) return e;
2949
2949
  }
2950
2950
  return [n];
2951
2951
  }
2952
- function Va(n) {
2952
+ function La(n) {
2953
2953
  n.lastMeshes.forEach((a) => Ib(a, n)), n.lastMeshes.clear();
2954
2954
  }
2955
- function wb(n, a, e, H, i, b, r = {}) {
2956
- var s, k;
2955
+ function wb(n, a, e, H, i, r, b = {}) {
2956
+ var s, l;
2957
2957
  const f = a.getBoundingClientRect();
2958
- b.mouse.x = (n.clientX - f.left) / f.width * 2 - 1, b.mouse.y = -((n.clientY - f.top) / f.height) * 2 + 1, b.raycaster.setFromCamera(b.mouse, e);
2959
- const c = t2(H, i), t = b.raycaster.intersectObjects(c, !0);
2958
+ r.mouse.x = (n.clientX - f.left) / f.width * 2 - 1, r.mouse.y = -((n.clientY - f.top) / f.height) * 2 + 1, r.raycaster.setFromCamera(r.mouse, e);
2959
+ const c = n2(H, i), t = r.raycaster.intersectObjects(c, !0);
2960
2960
  if (t.length === 0) {
2961
- b.lastMeshes.size > 0 && Va(b), (s = r.onMiss) == null || s.call(r);
2961
+ r.lastMeshes.size > 0 && La(r), (s = b.onMiss) == null || s.call(b);
2962
2962
  return;
2963
2963
  }
2964
2964
  const o = t[0].object, d = d2(o);
2965
- Va(b), d.forEach((h) => {
2965
+ La(r), d.forEach((h) => {
2966
2966
  var _, w;
2967
- const A = h.material;
2968
- b.originalEmissive.has(h) || b.originalEmissive.set(h, ((_ = A.emissive) == null ? void 0 : _.clone()) ?? new Ue(0)), h.material = A.clone(), (w = h.material.emissive) == null || w.setHex(Ab), b.lastMeshes.add(h);
2969
- }), (k = r.onHit) == null || k.call(r, o);
2967
+ const m = h.material;
2968
+ r.originalEmissive.has(h) || r.originalEmissive.set(h, ((_ = m.emissive) == null ? void 0 : _.clone()) ?? new Ge(0)), h.material = m.clone(), (w = h.material.emissive) == null || w.setHex(Ab), r.lastMeshes.add(h);
2969
+ }), (l = b.onHit) == null || l.call(b, o);
2970
2970
  }
2971
2971
  function Fb(n) {
2972
2972
  var H;
@@ -2985,18 +2985,18 @@ function vb() {
2985
2985
  }
2986
2986
  function Nb(n) {
2987
2987
  var c, t;
2988
- const a = n2(n), e = new j0().setFromObject(a || n), H = new j(), i = new j();
2988
+ const a = da(n), e = new I0().setFromObject(a || n), H = new j(), i = new j();
2989
2989
  e.getCenter(H), e.getSize(i);
2990
- const b = new j();
2991
- n.getWorldPosition(b);
2992
- const r = n.material, f = (r == null ? void 0 : r.name) || ((c = r == null ? void 0 : r.constructor) == null ? void 0 : c.name) || "Unknown";
2990
+ const r = new j();
2991
+ n.getWorldPosition(r);
2992
+ const b = n.material, f = (b == null ? void 0 : b.name) || ((c = b == null ? void 0 : b.constructor) == null ? void 0 : c.name) || "Unknown";
2993
2993
  return {
2994
2994
  name: (a == null ? void 0 : a.name) || n.name,
2995
2995
  meshName: n.name,
2996
2996
  meshUuid: n.uuid,
2997
2997
  parentName: ((t = n.parent) == null ? void 0 : t.name) || null,
2998
2998
  partType: n.userData[mb] || null,
2999
- worldPosition: b,
2999
+ worldPosition: r,
3000
3000
  materialName: f,
3001
3001
  boundingBox: {
3002
3002
  min: e.min.clone(),
@@ -3007,33 +3007,39 @@ function Nb(n) {
3007
3007
  };
3008
3008
  }
3009
3009
  function Tb(n, a) {
3010
- var i, b;
3010
+ var i, r;
3011
3011
  const e = a.originalEmissive.get(n), H = n.material;
3012
- e ? (i = H.emissive) == null || i.copy(e) : (b = H.emissive) == null || b.setHex(0);
3012
+ e ? (i = H.emissive) == null || i.copy(e) : (r = H.emissive) == null || r.setHex(0);
3013
3013
  }
3014
- function Ha(n) {
3014
+ function U0(n) {
3015
3015
  n.selectedMeshes.forEach((a) => Tb(a, n)), n.selectedMeshes.clear();
3016
3016
  }
3017
- function Rb(n, a, e, H, i, b, r = {}) {
3018
- var k, h;
3017
+ function Rb(n, a, e, H, i, r, b = {}) {
3018
+ var _, w, p;
3019
3019
  const f = a.getBoundingClientRect();
3020
- b.mouse.x = (n.clientX - f.left) / f.width * 2 - 1, b.mouse.y = -((n.clientY - f.top) / f.height) * 2 + 1, b.raycaster.setFromCamera(b.mouse, e);
3021
- const c = t2(H, i), t = b.raycaster.intersectObjects(c, !0);
3020
+ r.mouse.x = (n.clientX - f.left) / f.width * 2 - 1, r.mouse.y = -((n.clientY - f.top) / f.height) * 2 + 1, r.raycaster.setFromCamera(r.mouse, e);
3021
+ const c = n2(H, i), t = r.raycaster.intersectObjects(c, !0);
3022
3022
  if (t.length === 0) {
3023
- b.selectedMeshes.size > 0 && (Ha(b), b.selectedMesh = null), (k = r.onMiss) == null || k.call(r);
3023
+ r.selectedMeshes.size > 0 && (U0(r), r.selectedMesh = null), (_ = b.onMiss) == null || _.call(b);
3024
3024
  return;
3025
3025
  }
3026
- const o = t[0].object, d = d2(o);
3027
- Ha(b), d.forEach((A) => {
3028
- var w, p;
3029
- const _ = A.material;
3030
- b.originalEmissive.has(A) || b.originalEmissive.set(A, ((w = _.emissive) == null ? void 0 : w.clone()) ?? new Ue(0)), A.material = _.clone(), (p = A.material.emissive) == null || p.setHex(pb), b.selectedMeshes.add(A);
3031
- }), b.selectedMesh = o;
3032
- const s = Nb(o);
3033
- (h = r.onSelect) == null || h.call(r, o, s);
3026
+ const o = t[0].object, d = da(o), s = (d == null ? void 0 : d.name) || o.name;
3027
+ let l = !0;
3028
+ if (b.nameFilter ? l = b.nameFilter(s) : b.allowedNames && b.allowedNames.length > 0 && (l = b.allowedNames.includes(s)), !l) {
3029
+ r.selectedMeshes.size > 0 && (U0(r), r.selectedMesh = null), (w = b.onMiss) == null || w.call(b);
3030
+ return;
3031
+ }
3032
+ const h = d2(o);
3033
+ U0(r), h.forEach((A) => {
3034
+ var O, q;
3035
+ const I = A.material;
3036
+ r.originalEmissive.has(A) || r.originalEmissive.set(A, ((O = I.emissive) == null ? void 0 : O.clone()) ?? new Ge(0)), A.material = I.clone(), (q = A.material.emissive) == null || q.setHex(pb), r.selectedMeshes.add(A);
3037
+ }), r.selectedMesh = o;
3038
+ const m = Nb(o);
3039
+ (p = b.onSelect) == null || p.call(b, o, m);
3034
3040
  }
3035
- function La(n) {
3036
- n.selectedMeshes.size > 0 && Ha(n), n.originalEmissive.clear(), n.selectedMeshes.clear(), n.selectedMesh = null;
3041
+ function Sa(n) {
3042
+ n.selectedMeshes.size > 0 && U0(n), n.originalEmissive.clear(), n.selectedMeshes.clear(), n.selectedMesh = null;
3037
3043
  }
3038
3044
  function Mb(n, a, e, H) {
3039
3045
  function i() {
@@ -3042,63 +3048,65 @@ function Mb(n, a, e, H) {
3042
3048
  }
3043
3049
  function Db(n) {
3044
3050
  let a = null;
3045
- const e = ne(!1), H = ne(null), i = ne(null);
3046
- function b() {
3051
+ const e = de(!1), H = de(null), i = de(null);
3052
+ function r() {
3047
3053
  if (!H.value || !n.threejsContainer.value) {
3048
3054
  i.value = null;
3049
3055
  return;
3050
3056
  }
3051
- const { camera: k } = n.getThreeJSObjects();
3052
- if (!k) return;
3053
- const A = H.value.worldPosition.clone();
3054
- A.project(k);
3055
- const _ = n.threejsContainer.value.getBoundingClientRect(), w = _.left + (A.x * 0.5 + 0.5) * _.width + (n.offsetX ?? 15), p = _.top + (-(A.y * 0.5) + 0.5) * _.height + (n.offsetY ?? 15);
3057
+ const { camera: l } = n.getThreeJSObjects();
3058
+ if (!l) return;
3059
+ const m = H.value.worldPosition.clone();
3060
+ m.project(l);
3061
+ const _ = n.threejsContainer.value.getBoundingClientRect(), w = _.left + (m.x * 0.5 + 0.5) * _.width + (n.offsetX ?? 15), p = _.top + (-(m.y * 0.5) + 0.5) * _.height + (n.offsetY ?? 15);
3056
3062
  i.value = { x: w, y: p };
3057
3063
  }
3058
- function r(k) {
3064
+ function b(l) {
3059
3065
  if (!a || !n.threejsContainer.value) return;
3060
- const { camera: h, scene: A } = n.getThreeJSObjects();
3061
- if (!h || !A) return;
3066
+ const { camera: h, scene: m } = n.getThreeJSObjects();
3067
+ if (!h || !m) return;
3062
3068
  const _ = n.offsetX ?? 15, w = n.offsetY ?? 15;
3063
- i.value = { x: k.clientX + _, y: k.clientY + w }, Rb(
3064
- k,
3069
+ i.value = { x: l.clientX + _, y: l.clientY + w }, Rb(
3070
+ l,
3065
3071
  n.threejsContainer.value,
3066
3072
  h,
3067
- A,
3073
+ m,
3068
3074
  n.currentModels.value,
3069
3075
  a,
3070
3076
  {
3071
- onSelect: (p, m) => {
3077
+ onSelect: (p, A) => {
3072
3078
  var I;
3073
- H.value = m, e.value = !0, b(), (I = n.onSelect) == null || I.call(n, p, m);
3079
+ H.value = A, r(), (I = n.onSelect) == null || I.call(n, p, A);
3074
3080
  },
3075
3081
  onMiss: () => {
3076
3082
  var p;
3077
- b(), (p = n.onMiss) == null || p.call(n);
3078
- }
3083
+ r(), (p = n.onMiss) == null || p.call(n);
3084
+ },
3085
+ allowedNames: n.allowedNames,
3086
+ nameFilter: n.nameFilter
3079
3087
  }
3080
3088
  );
3081
3089
  }
3082
3090
  function f() {
3083
- var k;
3084
- a && La(a), a = vb(), (k = n.threejsContainer.value) == null || k.addEventListener("click", r);
3091
+ var l;
3092
+ a && Sa(a), a = vb(), (l = n.threejsContainer.value) == null || l.addEventListener("click", b);
3085
3093
  }
3086
3094
  function c() {
3087
- d(), n.threejsContainer.value && a && (n.threejsContainer.value.removeEventListener("click", r), La(a), a = null);
3095
+ d(), n.threejsContainer.value && a && (n.threejsContainer.value.removeEventListener("click", b), Sa(a), a = null);
3088
3096
  }
3089
3097
  let t = null;
3090
3098
  function o() {
3091
- const k = () => {
3092
- e.value && H.value && b(), t = requestAnimationFrame(k);
3099
+ const l = () => {
3100
+ e.value && H.value && r(), t = requestAnimationFrame(l);
3093
3101
  };
3094
- k();
3102
+ l();
3095
3103
  }
3096
3104
  function d() {
3097
3105
  t !== null && (cancelAnimationFrame(t), t = null);
3098
3106
  }
3099
- Ke(e, (k) => {
3100
- k ? o() : d();
3101
- }), Sa(() => {
3107
+ Ye(e, (l) => {
3108
+ l ? o() : d();
3109
+ }), za(() => {
3102
3110
  c();
3103
3111
  });
3104
3112
  function s() {
@@ -3111,7 +3119,7 @@ function Db(n) {
3111
3119
  init: f,
3112
3120
  dispose: c,
3113
3121
  closePanel: s,
3114
- updatePopupPosition: b
3122
+ updatePopupPosition: r
3115
3123
  };
3116
3124
  }
3117
3125
  function Ob(n) {
@@ -3120,40 +3128,40 @@ function Ob(n) {
3120
3128
  baseURL: e,
3121
3129
  onMessage: H,
3122
3130
  onError: i
3123
- } = n, b = ne(!1), r = ne(null);
3131
+ } = n, r = de(!1), b = de(null);
3124
3132
  let f = null;
3125
3133
  const c = (s) => `${e}?action=${s}&platId=${a}`, t = () => {
3126
- if (b.value) {
3134
+ if (r.value) {
3127
3135
  console.log("[SSE] 已经连接,无需重复连接");
3128
3136
  return;
3129
3137
  }
3130
3138
  const s = c("connect");
3131
3139
  f = new EventSource(s), f.onopen = () => {
3132
- b.value = !0;
3133
- }, f.onmessage = (k) => {
3140
+ r.value = !0;
3141
+ }, f.onmessage = (l) => {
3134
3142
  try {
3135
- const h = JSON.parse(k.data);
3136
- r.value = h, H == null || H(h);
3143
+ const h = JSON.parse(l.data);
3144
+ b.value = h, H == null || H(h);
3137
3145
  } catch {
3138
- r.value = k.data, H == null || H(k.data);
3146
+ b.value = l.data, H == null || H(l.data);
3139
3147
  }
3140
- }, f.onerror = (k) => {
3141
- b.value = !1, i == null || i(k);
3148
+ }, f.onerror = (l) => {
3149
+ r.value = !1, i == null || i(l);
3142
3150
  };
3143
3151
  }, o = () => {
3144
- f && (f.close(), f = null), b.value = !1, fetch(e, {
3152
+ f && (f.close(), f = null), r.value = !1, fetch(e, {
3145
3153
  method: "POST",
3146
3154
  headers: { "Content-Type": "application/json" },
3147
3155
  body: JSON.stringify({ action: "disconnect", platId: a })
3148
3156
  }).catch((s) => console.warn("[SSE] 断开请求失败:", s));
3149
3157
  }, d = () => {
3150
- b.value ? o() : t();
3158
+ r.value ? o() : t();
3151
3159
  };
3152
- return za(() => {
3160
+ return Qa(() => {
3153
3161
  o();
3154
3162
  }), {
3155
- isConnected: b,
3156
- lastData: r,
3163
+ isConnected: r,
3164
+ lastData: b,
3157
3165
  connect: t,
3158
3166
  // 手动连接
3159
3167
  disconnect: o,
@@ -3162,7 +3170,7 @@ function Ob(n) {
3162
3170
  // 切换连接状态
3163
3171
  };
3164
3172
  }
3165
- const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { class: "popup-body" }, xb = /* @__PURE__ */ P0({
3173
+ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { class: "popup-body" }, xb = /* @__PURE__ */ q0({
3166
3174
  __name: "threeModelInfoPanel",
3167
3175
  props: {
3168
3176
  modelValue: { type: Boolean },
@@ -3171,13 +3179,13 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3171
3179
  },
3172
3180
  emits: ["update:modelValue", "close"],
3173
3181
  setup(n, { emit: a }) {
3174
- const e = n, H = a, i = ne(e.modelValue);
3175
- Ke(() => e.modelValue, (t) => {
3182
+ const e = n, H = a, i = de(e.modelValue);
3183
+ Ye(() => e.modelValue, (t) => {
3176
3184
  i.value = t;
3177
- }), Ke(i, (t) => {
3185
+ }), Ye(i, (t) => {
3178
3186
  H("update:modelValue", t);
3179
3187
  });
3180
- const b = V0(() => {
3188
+ const r = S0(() => {
3181
3189
  const t = e.screenPosition;
3182
3190
  return t ? {
3183
3191
  left: `${t.x + 15}px`,
@@ -3187,7 +3195,7 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3187
3195
  top: "50%",
3188
3196
  transform: "translate(-50%, -50%)"
3189
3197
  };
3190
- }), r = V0(() => {
3198
+ }), b = S0(() => {
3191
3199
  if (!e.partInfo) return [];
3192
3200
  const t = e.partInfo;
3193
3201
  return [
@@ -3218,24 +3226,24 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3218
3226
  value: `W:${t.boundingBox.size.x.toFixed(2)} H:${t.boundingBox.size.y.toFixed(2)} D:${t.boundingBox.size.z.toFixed(2)}`
3219
3227
  }
3220
3228
  ];
3221
- }), f = V0(() => {
3229
+ }), f = S0(() => {
3222
3230
  const t = {};
3223
- return r.value.forEach((o) => {
3231
+ return b.value.forEach((o) => {
3224
3232
  t[o.prop] = o.value;
3225
3233
  }), t;
3226
3234
  }), c = () => {
3227
3235
  H("update:modelValue", !1), H("close");
3228
3236
  };
3229
- return (t, o) => (Ve(), G0(Qa, { to: "body" }, [
3230
- i.value && t.partInfo ? (Ve(), m0("div", {
3237
+ return (t, o) => (Ce(), x0(Za, { to: "body" }, [
3238
+ i.value && t.partInfo ? (Ce(), j0("div", {
3231
3239
  key: 0,
3232
3240
  class: "info-popup",
3233
- style: A2(b.value),
3241
+ style: A2(r.value),
3234
3242
  onClick: o[0] || (o[0] = _2(() => {
3235
3243
  }, ["stop"]))
3236
3244
  }, [
3237
3245
  se("div", Eb, [
3238
- se("span", Gb, X0(t.partInfo.name), 1),
3246
+ se("span", Gb, ea(t.partInfo.name), 1),
3239
3247
  se("span", {
3240
3248
  class: "popup-close",
3241
3249
  onClick: c
@@ -3243,16 +3251,16 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3243
3251
  ]),
3244
3252
  se("div", Ub, [
3245
3253
  Ie(hi, {
3246
- "row-contents": r.value,
3254
+ "row-contents": b.value,
3247
3255
  "row-values": f.value,
3248
3256
  "form-disabled": !0,
3249
3257
  "is-edit": !1
3250
3258
  }, null, 8, ["row-contents", "row-values"])
3251
3259
  ])
3252
- ], 4)) : K0("", !0)
3260
+ ], 4)) : $0("", !0)
3253
3261
  ]));
3254
3262
  }
3255
- }), Pb = /* @__PURE__ */ ta(xb, [["__scopeId", "data-v-1ac66143"]]), Bb = { key: 1 }, Y0 = /* @__PURE__ */ P0({
3263
+ }), Pb = /* @__PURE__ */ na(xb, [["__scopeId", "data-v-1ac66143"]]), Bb = { key: 1 }, X0 = /* @__PURE__ */ q0({
3256
3264
  __name: "chartBox",
3257
3265
  props: {
3258
3266
  chartOption: {
@@ -3261,29 +3269,29 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3261
3269
  }
3262
3270
  },
3263
3271
  setup(n) {
3264
- const a = ne(null);
3272
+ const a = de(null);
3265
3273
  let e = null, H = {};
3266
- const i = n, b = async (r) => {
3267
- if (H = r, Ua(H)) {
3274
+ const i = n, r = async (b) => {
3275
+ if (H = b, xa(H)) {
3268
3276
  e == null || e.dispose(), e = null;
3269
3277
  return;
3270
3278
  }
3271
- await Za(), a.value && ((!e || e.isDisposed()) && (e = ti(a.value)), e.clear(), e.setOption(H, { notMerge: !0, lazyUpdate: !1 }), e.resize());
3279
+ await Ja(), a.value && ((!e || e.isDisposed()) && (e = ti(a.value)), e.clear(), e.setOption(H, { notMerge: !0, lazyUpdate: !1 }), e.resize());
3272
3280
  };
3273
- return Ke(
3281
+ return Ye(
3274
3282
  () => i.chartOption,
3275
- (r) => b(r),
3283
+ (b) => r(b),
3276
3284
  { deep: !0, immediate: !0 }
3277
- ), za(() => {
3285
+ ), Qa(() => {
3278
3286
  e && e.dispose();
3279
- }), (r, f) => Me(Ua)(i.chartOption) ? (Ve(), m0("div", Bb, "暂无数据")) : (Ve(), m0("div", {
3287
+ }), (b, f) => Re(xa)(i.chartOption) ? (Ce(), j0("div", Bb, "暂无数据")) : (Ce(), j0("div", {
3280
3288
  key: 0,
3281
3289
  ref_key: "chartDom",
3282
3290
  ref: a,
3283
3291
  style: { width: "100%", height: "100%" }
3284
3292
  }, null, 512));
3285
3293
  }
3286
- }), qb = { class: "chart" }, Wb = { class: "chart-box" }, Cb = { class: "chart-box" }, Vb = { class: "chart-box" }, Lb = /* @__PURE__ */ P0({
3294
+ }), qb = { class: "chart" }, Wb = { class: "chart-box" }, Cb = { class: "chart-box" }, Vb = { class: "chart-box" }, Lb = /* @__PURE__ */ q0({
3287
3295
  __name: "threeChartsInfo",
3288
3296
  props: {
3289
3297
  meshName: {
@@ -3292,9 +3300,9 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3292
3300
  }
3293
3301
  },
3294
3302
  setup(n) {
3295
- const a = I2(Ya), { systemUrl: e } = Ka(a);
3303
+ const a = I2(Ka), { systemUrl: e } = Xa(a);
3296
3304
  let H = e.value === "" || !e.value ? "http://222.92.178.198:63002" : e.value;
3297
- const i = n, b = ne({}), r = ne({}), f = ne({}), c = {
3305
+ const i = n, r = de({}), b = de({}), f = de({}), c = {
3298
3306
  title: { text: "示例图表", top: "3%", left: "1%" },
3299
3307
  xAxis: {
3300
3308
  show: !1,
@@ -3320,91 +3328,90 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3320
3328
  data: []
3321
3329
  }
3322
3330
  }, t = () => {
3323
- b.value = {}, r.value = {}, f.value = {};
3331
+ r.value = {}, b.value = {}, f.value = {};
3324
3332
  }, { connect: o } = Ob({
3325
3333
  platId: "",
3326
3334
  baseURL: `${H}/thirdparty/stream`,
3327
3335
  onMessage(d) {
3328
- console.log("收到 SSE 消息:", d);
3329
3336
  const s = i.meshName.split("_").length >= 3 ? [i.meshName.split("_")[0], i.meshName.split("_")[1]].join("_") : i.meshName;
3330
3337
  if (s === "") return;
3331
- const k = d.result.filter((h) => h.meshName === s);
3332
- if (k.length === 0) {
3338
+ const l = d.result.filter((h) => h.meshName === s);
3339
+ if (l.length === 0) {
3333
3340
  t();
3334
3341
  return;
3335
3342
  }
3336
- b.value = {
3343
+ r.value = {
3337
3344
  ...c,
3338
- title: { ...c.title, text: k[0].Name[0] },
3339
- series: { ...c.series, data: k[0].data[0] }
3340
- }, r.value = {
3345
+ title: { ...c.title, text: l[0].Name[0] },
3346
+ series: { ...c.series, data: l[0].data[0] }
3347
+ }, b.value = {
3341
3348
  ...c,
3342
- title: { ...c.title, text: k[0].Name[1] },
3343
- series: { ...c.series, data: k[0].data[1] }
3349
+ title: { ...c.title, text: l[0].Name[1] },
3350
+ series: { ...c.series, data: l[0].data[1] }
3344
3351
  }, f.value = {
3345
3352
  ...c,
3346
- title: { ...c.title, text: k[0].Name[2] },
3347
- series: { ...c.series, data: k[0].data[2] }
3353
+ title: { ...c.title, text: l[0].Name[2] },
3354
+ series: { ...c.series, data: l[0].data[2] }
3348
3355
  };
3349
3356
  },
3350
3357
  onError(d) {
3351
3358
  console.error("SSE 连接异常:", d);
3352
3359
  }
3353
3360
  });
3354
- return Ja(() => {
3361
+ return Ya(() => {
3355
3362
  o();
3356
- }), (d, s) => (Ve(), G0(Qa, { to: "body" }, [
3363
+ }), (d, s) => (Ce(), x0(Za, { to: "body" }, [
3357
3364
  se("div", qb, [
3358
3365
  se("div", Wb, [
3359
- Ie(Y0, { chartOption: b.value }, null, 8, ["chartOption"])
3366
+ Ie(X0, { chartOption: r.value }, null, 8, ["chartOption"])
3360
3367
  ]),
3361
3368
  se("div", Cb, [
3362
- Ie(Y0, { chartOption: r.value }, null, 8, ["chartOption"])
3369
+ Ie(X0, { chartOption: b.value }, null, 8, ["chartOption"])
3363
3370
  ]),
3364
3371
  se("div", Vb, [
3365
- Ie(Y0, { chartOption: f.value }, null, 8, ["chartOption"])
3372
+ Ie(X0, { chartOption: f.value }, null, 8, ["chartOption"])
3366
3373
  ])
3367
3374
  ])
3368
3375
  ]));
3369
3376
  }
3370
- }), Sb = /* @__PURE__ */ ta(Lb, [["__scopeId", "data-v-e3a96d1d"]]), zb = { class: "obj-viewer-container" }, Qb = { class: "buttonGroup-topLeft" }, Zb = { class: "buttonGroup-left" }, Jb = { class: "buttonGroup-right" }, Yb = { class: "buttonGroup-bottom" }, Kb = { class: "left-panel" }, Xb = { class: "panel-header" }, $b = {
3377
+ }), Sb = /* @__PURE__ */ na(Lb, [["__scopeId", "data-v-2f9a55fe"]]), zb = { class: "obj-viewer-container" }, Qb = { class: "buttonGroup-topLeft" }, Zb = { class: "buttonGroup-left" }, Jb = { class: "buttonGroup-right" }, Yb = { class: "buttonGroup-bottom" }, Kb = { class: "left-panel" }, Xb = { class: "panel-header" }, $b = {
3371
3378
  key: 0,
3372
3379
  class: "loading-overlay"
3373
- }, er = !0, ar = /* @__PURE__ */ P0({
3380
+ }, er = !0, ar = /* @__PURE__ */ q0({
3374
3381
  __name: "threePreview",
3375
3382
  props: {
3376
3383
  fileBlobs: { default: () => [] }
3377
3384
  },
3378
3385
  setup(n) {
3379
- const e = n, H = ne(null), i = ne(!1), b = ne("");
3380
- let r = null;
3386
+ const e = n, H = de(null), i = de(!1), r = de("");
3387
+ let b = null;
3381
3388
  function f(R) {
3382
- if (!r || !H.value) return;
3383
- const { camera: U, scene: He } = Y();
3384
- !U || !He || wb(
3389
+ if (!b || !H.value) return;
3390
+ const { camera: U, scene: fe } = K();
3391
+ !U || !fe || wb(
3385
3392
  R,
3386
3393
  H.value,
3387
3394
  U,
3388
- He,
3389
- J.value,
3390
- r,
3395
+ fe,
3396
+ Y.value,
3397
+ b,
3391
3398
  {
3392
- onHit: (W) => {
3393
- var ce;
3394
- 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:", (ce = W.parent) == null ? void 0 : ce.name), console.log("[PICK_DEBUG] 完整 mesh:", W);
3399
+ onHit: (C) => {
3400
+ var V;
3401
+ console.log("[PICK_DEBUG] 点击的 mesh 对象:", C), console.log("[PICK_DEBUG] mesh.name:", C.name), console.log("[PICK_DEBUG] mesh.uuid:", C.uuid), console.log("[PICK_DEBUG] parent.name:", (V = C.parent) == null ? void 0 : V.name), console.log("[PICK_DEBUG] 完整 mesh:", C);
3395
3402
  }
3396
3403
  }
3397
3404
  );
3398
3405
  }
3399
3406
  function c(R) {
3400
- if (!r || R.key !== "h" && R.key !== "H") return;
3407
+ if (!b || R.key !== "h" && R.key !== "H") return;
3401
3408
  const U = R.target;
3402
3409
  if (U) {
3403
- const W = U.tagName;
3404
- if (W === "INPUT" || W === "TEXTAREA" || U.isContentEditable) return;
3410
+ const C = U.tagName;
3411
+ if (C === "INPUT" || C === "TEXTAREA" || U.isContentEditable) return;
3405
3412
  }
3406
- const He = Fb(r);
3407
- He === null ? console.log("[PICK_DEBUG] 当前没有选中部件, H 快捷键无效") : (console.log(`[PICK_DEBUG] 已${He ? "显示" : "隐藏"}当前选中部件 (快捷键 H)`), R.preventDefault());
3413
+ const fe = Fb(b);
3414
+ fe === null ? console.log("[PICK_DEBUG] 当前没有选中部件, H 快捷键无效") : (console.log(`[PICK_DEBUG] 已${fe ? "显示" : "隐藏"}当前选中部件 (快捷键 H)`), R.preventDefault());
3408
3415
  }
3409
3416
  const {
3410
3417
  threeInfo: t,
@@ -3412,44 +3419,44 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3412
3419
  isLoading: o,
3413
3420
  loadingProgress: d,
3414
3421
  loadedModels: s,
3415
- error: k,
3422
+ error: l,
3416
3423
  loadModelsFromBlobs: h
3417
3424
  },
3418
- animation: { isAnimating: A, toggleAnimation: _, stopAnimation: w },
3425
+ animation: { isAnimating: m, toggleAnimation: _, stopAnimation: w },
3419
3426
  clipping: {
3420
3427
  isClipping: p,
3421
- activeClippingAxis: m,
3428
+ activeClippingAxis: A,
3422
3429
  toggleClipping: I,
3423
- updateClippingPlanes: G
3430
+ updateClippingPlanes: O
3424
3431
  },
3425
3432
  partAnimation: {
3426
- isPartAnimating: C,
3427
- setPartRotations: S,
3433
+ isPartAnimating: q,
3434
+ setPartRotations: z,
3428
3435
  startPartAnimations: ye,
3429
- stopPartAnimations: le
3436
+ stopPartAnimations: ke
3430
3437
  },
3431
3438
  millPivotAnimation: {
3432
3439
  setupMillAnimations: ge
3433
3440
  }
3434
- } = lb(H, {
3441
+ } = kb(H, {
3435
3442
  useModelLoaderHook: !0,
3436
3443
  useAnimationHook: !0,
3437
3444
  useClippingHook: !0,
3438
3445
  usePartAnimationHook: !0
3439
- }), { resetView: Ge, initThreeJS: Le, handleResize: d0, cleanup: o0, setAndFitModels: s0, axesHelperVisible: Z, toggleAxesVisibility: ue, currentModels: J, addBeforeRenderCallback: q, removeBeforeRenderCallback: V, getThreeJSObjects: Y, isBeforeRenderPaused: de, setBeforeRenderPaused: K, timeScale: ee } = t, ke = () => {
3440
- const R = !de.value;
3441
- K(R), console.log(`[DEBUG] 动画${R ? "已暂停" : "已恢复"}`);
3446
+ }), { resetView: Ee, initThreeJS: Ve, handleResize: n0, cleanup: d0, setAndFitModels: o0, axesHelperVisible: J, toggleAxesVisibility: ue, currentModels: Y, addBeforeRenderCallback: W, removeBeforeRenderCallback: L, getThreeJSObjects: K, isBeforeRenderPaused: oe, setBeforeRenderPaused: X, timeScale: ae } = t, le = () => {
3447
+ const R = !oe.value;
3448
+ X(R), console.log(`[DEBUG] 动画${R ? "已暂停" : "已恢复"}`);
3442
3449
  }, M = _b(
3443
- J,
3444
- q,
3445
- V,
3450
+ Y,
3451
+ W,
3452
+ L,
3446
3453
  // 夹具第一次回到初始位置(走完一整圈)时,同步停止链轮自转
3447
- () => le()
3454
+ () => ke()
3448
3455
  ), y = gb(
3449
- J,
3450
- q,
3451
- V,
3452
3456
  Y,
3457
+ W,
3458
+ L,
3459
+ K,
3453
3460
  // 传入单个链条夹具位置查询函数
3454
3461
  (R, U) => M.getClampWorldPosition(R, U),
3455
3462
  // 物料到达 conveyorSurfaceEnd 后同时启动链条流动与链轮自转
@@ -3457,217 +3464,233 @@ const Eb = { class: "popup-header" }, Gb = { class: "popup-title" }, Ub = { clas
3457
3464
  M.startChainAnimation(), ye();
3458
3465
  },
3459
3466
  // 传入一对夹具的中心点查询函数(两夹具共同夹持物料,取中点)
3460
- (R, U, He) => M.getClampPairWorldPosition(R, U, He),
3467
+ (R, U, fe) => M.getClampPairWorldPosition(R, U, fe),
3461
3468
  // 循环重置时停止链条流动与链轮自转
3462
3469
  () => {
3463
- M.stopChainAnimation(), le();
3470
+ M.stopChainAnimation(), ke();
3464
3471
  }
3465
- ), {
3466
- showPanel: E,
3467
- selectedPartInfo: B,
3468
- screenPosition: u,
3469
- init: L,
3470
- dispose: ie
3472
+ ), G = [
3473
+ "机架F1",
3474
+ "机架F2",
3475
+ "联轴器上-1001",
3476
+ "联轴器下-2001",
3477
+ "联轴器上-1",
3478
+ "联轴器下-2",
3479
+ "轴承座右侧有端盖版上侧-2001",
3480
+ "轴承座右侧有端盖版下侧-2001",
3481
+ "轴承座左侧有端盖版上侧-2001",
3482
+ "轴承座左侧有端盖版下侧-2001",
3483
+ "轴承座右侧有端盖版上侧-2",
3484
+ "轴承座右侧有端盖版下侧-2",
3485
+ "轴承座左侧有端盖版上侧-2",
3486
+ "轴承座左侧有端盖版下侧-2"
3487
+ ], {
3488
+ showPanel: P,
3489
+ selectedPartInfo: u,
3490
+ screenPosition: S,
3491
+ init: ie,
3492
+ dispose: be
3471
3493
  } = Db({
3472
3494
  threejsContainer: H,
3473
- getThreeJSObjects: Y,
3474
- currentModels: J,
3495
+ getThreeJSObjects: K,
3496
+ currentModels: Y,
3497
+ allowedNames: G,
3475
3498
  onSelect: (R, U) => {
3476
- console.log("[SELECT] mesh:", R), console.log("[SELECT] 点击的部件信息:", U), ae.value = U.meshName;
3499
+ console.log("[SELECT] mesh:", R), console.log("[SELECT] 点击的部件信息:", U), ce.value = U.meshName;
3477
3500
  }
3478
- }), ae = ne(""), oe = () => {
3501
+ }), ce = de(""), pe = () => {
3479
3502
  ue();
3480
- }, pe = (R) => {
3481
- m.value = R, G();
3482
- }, we = y2(Ya), { originalData: Fe } = Ka(we), ve = () => {
3503
+ }, we = (R) => {
3504
+ A.value = R, O();
3505
+ }, Fe = y2(Ka), { originalData: ve } = Xa(Fe), s0 = () => {
3483
3506
  if (localStorage.getItem("rotateSpeed"))
3484
3507
  return JSON.parse(localStorage.getItem("rotateSpeed") || "1.0");
3485
3508
  };
3486
- Ke(Fe, () => {
3487
- const R = ve();
3488
- ee.value = R, console.log("[DEBUG] 动画速度已更新:", R);
3509
+ Ye(ve, () => {
3510
+ const R = s0();
3511
+ ae.value = R, console.log("[DEBUG] 动画速度已更新:", R);
3489
3512
  }, { deep: !0, immediate: !0 });
3490
- const k0 = [
3513
+ const l0 = [
3491
3514
  { partName: "主动链轮10倍-1001", axis: "y", speed: 1, direction: -1 },
3492
3515
  { partName: "主动链轮10倍-2001", axis: "y", speed: 1, direction: -1 },
3493
3516
  { partName: "主动链轮10倍-1", axis: "y", speed: 1, direction: 1 },
3494
3517
  { partName: "主动链轮10倍-2", axis: "y", speed: 1, direction: 1 }
3495
3518
  ];
3496
- Ke(() => e.fileBlobs, (R) => {
3519
+ Ye(() => e.fileBlobs, (R) => {
3497
3520
  R && R.length > 0 && h(R).catch((U) => {
3498
3521
  console.error("加载错误:", U);
3499
3522
  });
3500
3523
  }, {
3501
3524
  immediate: !0,
3502
3525
  deep: !0
3503
- }), Ke(s, (R) => {
3504
- R && R.length > 0 && (s0(R), ge(), S(k0), y.startBilletDelivery());
3505
- }), Ke(k, (R) => {
3506
- R && Ga.error(`模型加载失败: ${R}`);
3526
+ }), Ye(s, (R) => {
3527
+ R && R.length > 0 && (o0(R), ge(), z(l0), y.startBilletDelivery());
3528
+ }), Ye(l, (R) => {
3529
+ R && Ua.error(`模型加载失败: ${R}`);
3507
3530
  });
3508
- const b0 = (R) => {
3509
- i.value = !0, b.value = R, R === "剖面视图" && !p.value && I();
3531
+ const i0 = (R) => {
3532
+ i.value = !0, r.value = R, R === "剖面视图" && !p.value && I();
3510
3533
  };
3511
- let Se = null;
3512
- return Ja(async () => {
3513
- await Za();
3534
+ let Le = null;
3535
+ return Ya(async () => {
3536
+ await Ja();
3514
3537
  try {
3515
- Le(), H.value && (Se = new ResizeObserver(d0), Se.observe(H.value)), er && (window.__threePreview__ = {
3538
+ Ve(), H.value && (Le = new ResizeObserver(n0), Le.observe(H.value)), er && (window.__threePreview__ = {
3516
3539
  threeInfo: t,
3517
- currentModels: J,
3540
+ currentModels: Y,
3518
3541
  loadedModels: s,
3519
- getThreeJSObjects: Y,
3542
+ getThreeJSObjects: K,
3520
3543
  billetAnimation: y,
3521
3544
  chainAnimation: M,
3522
- isBeforeRenderPaused: de,
3523
- setBeforeRenderPaused: K,
3545
+ isBeforeRenderPaused: oe,
3546
+ setBeforeRenderPaused: X,
3524
3547
  // 调试函数
3525
3548
  _logRollDetails: (R, U) => {
3526
- var He;
3549
+ var fe;
3527
3550
  if (U) {
3528
- const W = new j(), ce = new $(), be = new j(), Ne = new j(), r0 = new j0().setFromObject(U);
3529
- r0.getCenter(be), r0.getSize(Ne), U.getWorldPosition(W), U.getWorldQuaternion(ce), console.log(`[DEBUG] ${R}:`, {
3551
+ const C = new j(), V = new ee(), re = new j(), b0 = new j(), k0 = new I0().setFromObject(U);
3552
+ k0.getCenter(re), k0.getSize(b0), U.getWorldPosition(C), U.getWorldQuaternion(V), console.log(`[DEBUG] ${R}:`, {
3530
3553
  name: U.name,
3531
- parent: ((He = U.parent) == null ? void 0 : He.name) ?? "null",
3532
- worldPos: W,
3533
- bboxCenter: be,
3534
- bboxSize: Ne,
3535
- worldQuat: ce,
3536
- posVsBboxCenter: { dx: W.x - be.x, dy: W.y - be.y, dz: W.z - be.z }
3554
+ parent: ((fe = U.parent) == null ? void 0 : fe.name) ?? "null",
3555
+ worldPos: C,
3556
+ bboxCenter: re,
3557
+ bboxSize: b0,
3558
+ worldQuat: V,
3559
+ posVsBboxCenter: { dx: C.x - re.x, dy: C.y - re.y, dz: C.z - re.z }
3537
3560
  });
3538
3561
  }
3539
3562
  },
3540
3563
  // 快速打印所有轧辊状态
3541
3564
  _printAllRollStates: () => {
3542
- const { scene: R } = Y();
3565
+ const { scene: R } = K();
3543
3566
  if (!R) return;
3544
3567
  const U = ["轧辊整体-1001", "下轧辊-1001", "轧辊整体-1", "下轧辊-1"];
3545
- for (const He of U) {
3546
- let W = null;
3547
- for (const ce of J.value) {
3548
- if (!ce) continue;
3549
- const be = ce.getObjectByName(He);
3550
- if (be) {
3551
- W = be;
3568
+ for (const fe of U) {
3569
+ let C = null;
3570
+ for (const V of Y.value) {
3571
+ if (!V) continue;
3572
+ const re = V.getObjectByName(fe);
3573
+ if (re) {
3574
+ C = re;
3552
3575
  break;
3553
3576
  }
3554
3577
  }
3555
- if (!W) {
3556
- const ce = R.getObjectByName(He);
3557
- ce && (W = ce);
3578
+ if (!C) {
3579
+ const V = R.getObjectByName(fe);
3580
+ V && (C = V);
3558
3581
  }
3559
- if (W) {
3560
- const ce = new j(), be = new $();
3561
- W.getWorldPosition(ce), W.getWorldQuaternion(be), console.log(`[ROLL] ${He}: pos=${ce.x.toFixed(2)}, ${ce.y.toFixed(2)}, ${ce.z.toFixed(2)} | w=${be.w.toFixed(4)}`);
3582
+ if (C) {
3583
+ const V = new j(), re = new ee();
3584
+ C.getWorldPosition(V), C.getWorldQuaternion(re), console.log(`[ROLL] ${fe}: pos=${V.x.toFixed(2)}, ${V.y.toFixed(2)}, ${V.z.toFixed(2)} | w=${re.w.toFixed(4)}`);
3562
3585
  }
3563
3586
  }
3564
3587
  }
3565
- }), L(), console.log("[SELECT] 常驻部件选择已开启,点击模型显示部件信息");
3588
+ }), ie(), console.log("[SELECT] 常驻部件选择已开启,点击模型显示部件信息");
3566
3589
  } catch (R) {
3567
- console.error("Three.js 初始化失败:", R), Ga.error("渲染引擎初始化失败!");
3590
+ console.error("Three.js 初始化失败:", R), Ua.error("渲染引擎初始化失败!");
3568
3591
  }
3569
- }), Sa(() => {
3570
- b.value = "", Se && Se.disconnect(), ie(), A.value && w(), C.value && le(), y.dispose(), M.dispose(), o0();
3592
+ }), za(() => {
3593
+ r.value = "", Le && Le.disconnect(), be(), m.value && w(), q.value && ke(), y.dispose(), M.dispose(), d0();
3571
3594
  }), (R, U) => {
3572
- const He = p2("el-scrollbar");
3573
- return Ve(), m0("div", zb, [
3595
+ const fe = p2("el-scrollbar");
3596
+ return Ce(), j0("div", zb, [
3574
3597
  se("div", {
3575
3598
  ref_key: "threejsContainer",
3576
3599
  ref: H,
3577
3600
  class: "threejs-container"
3578
3601
  }, null, 512),
3579
- Na(se("div", Qb, [
3580
- Ie(a0, {
3602
+ Ta(se("div", Qb, [
3603
+ Ie(e0, {
3581
3604
  name: "viewReset",
3582
3605
  size: "24",
3583
- onClick: Me(Ge),
3606
+ onClick: Re(Ee),
3584
3607
  title: "重置"
3585
3608
  }, null, 8, ["onClick"]),
3586
- Ie(a0, {
3609
+ Ie(e0, {
3587
3610
  name: "fangda",
3588
3611
  size: "24",
3589
3612
  title: "放大"
3590
3613
  }),
3591
- Ie(a0, {
3614
+ Ie(e0, {
3592
3615
  name: "suoxiao",
3593
3616
  size: "24",
3594
3617
  title: "缩小"
3595
3618
  }),
3596
- Ie(a0, {
3619
+ Ie(e0, {
3597
3620
  name: "lookAround",
3598
3621
  size: "24",
3599
- onClick: Me(_),
3600
- title: Me(A) ? "停止动画" : "动画视图"
3622
+ onClick: Re(_),
3623
+ title: Re(m) ? "停止动画" : "动画视图"
3601
3624
  }, null, 8, ["onClick", "title"]),
3602
- Ie(a0, {
3625
+ Ie(e0, {
3603
3626
  name: "zuobiaoxi",
3604
3627
  size: "24",
3605
- active: Me(Z),
3606
- onClick: oe,
3628
+ active: Re(J),
3629
+ onClick: pe,
3607
3630
  title: "显隐坐标轴"
3608
3631
  }, null, 8, ["active"])
3609
3632
  ], 512), [
3610
- [Ta, !1]
3633
+ [Ra, !1]
3611
3634
  ]),
3612
3635
  se("div", Zb, [
3613
- Ra(R.$slots, "button-left", { switchRightPanel: b0 }, void 0, !0),
3614
- Ie(a0, {
3636
+ Ma(R.$slots, "button-left", { switchRightPanel: i0 }, void 0, !0),
3637
+ Ie(e0, {
3615
3638
  name: "clipping",
3616
3639
  size: "24",
3617
- onClick: U[0] || (U[0] = (W) => b0("剖面视图")),
3618
- active: i.value && b.value === "剖面视图",
3640
+ onClick: U[0] || (U[0] = (C) => i0("剖面视图")),
3641
+ active: i.value && r.value === "剖面视图",
3619
3642
  title: "剖面视图"
3620
3643
  }, null, 8, ["active"])
3621
3644
  ]),
3622
3645
  se("div", Jb, [
3623
- Ra(R.$slots, "button-right", {}, void 0, !0)
3646
+ Ma(R.$slots, "button-right", {}, void 0, !0)
3624
3647
  ]),
3625
3648
  se("div", Yb, [
3626
- (Ve(), G0(a0, {
3649
+ (Ce(), x0(e0, {
3627
3650
  key: 0,
3628
3651
  name: "zanting",
3629
3652
  size: "24",
3630
3653
  backgroundColor: "#ffffff",
3631
- title: Me(de) ? "恢复动画" : "暂停动画",
3632
- onClick: ke
3654
+ title: Re(oe) ? "恢复动画" : "暂停动画",
3655
+ onClick: le
3633
3656
  }, null, 8, ["title"]))
3634
3657
  ]),
3635
- Na(se("div", Kb, [
3658
+ Ta(se("div", Kb, [
3636
3659
  se("div", Xb, [
3637
- se("span", null, X0(b.value), 1),
3660
+ se("span", null, ea(r.value), 1),
3638
3661
  se("span", {
3639
3662
  class: "close",
3640
- onClick: U[1] || (U[1] = (W) => i.value = !1)
3663
+ onClick: U[1] || (U[1] = (C) => i.value = !1)
3641
3664
  }, " X ")
3642
3665
  ]),
3643
- Ie(He, { "max-height": "650px" }, {
3666
+ Ie(fe, { "max-height": "650px" }, {
3644
3667
  default: m2(() => [
3645
- b.value === "剖面视图" ? (Ve(), G0(si, {
3668
+ r.value === "剖面视图" ? (Ce(), x0(si, {
3646
3669
  key: 0,
3647
- value: Me(m),
3648
- onChange: pe
3649
- }, null, 8, ["value"])) : K0("", !0)
3670
+ value: Re(A),
3671
+ onChange: we
3672
+ }, null, 8, ["value"])) : $0("", !0)
3650
3673
  ]),
3651
3674
  _: 1
3652
3675
  })
3653
3676
  ], 512), [
3654
- [Ta, i.value]
3677
+ [Ra, i.value]
3655
3678
  ]),
3656
- Me(o) ? (Ve(), m0("div", $b, [
3679
+ Re(o) ? (Ce(), j0("div", $b, [
3657
3680
  U[3] || (U[3] = se("div", { class: "loading-spinner" }, null, -1)),
3658
- se("p", null, X0(Me(d)), 1)
3659
- ])) : K0("", !0),
3681
+ se("p", null, ea(Re(d)), 1)
3682
+ ])) : $0("", !0),
3660
3683
  Ie(Pb, {
3661
- modelValue: Me(E),
3662
- "onUpdate:modelValue": U[2] || (U[2] = (W) => j2(E) ? E.value = W : null),
3663
- "part-info": Me(B),
3664
- "screen-position": Me(u)
3684
+ modelValue: Re(P),
3685
+ "onUpdate:modelValue": U[2] || (U[2] = (C) => j2(P) ? P.value = C : null),
3686
+ "part-info": Re(u),
3687
+ "screen-position": Re(S)
3665
3688
  }, null, 8, ["modelValue", "part-info", "screen-position"]),
3666
- Ie(Sb, { meshName: ae.value }, null, 8, ["meshName"])
3689
+ Ie(Sb, { meshName: ce.value }, null, 8, ["meshName"])
3667
3690
  ]);
3668
3691
  };
3669
3692
  }
3670
- }), ir = /* @__PURE__ */ ta(ar, [["__scopeId", "data-v-efe6e875"]]), or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3693
+ }), ir = /* @__PURE__ */ na(ar, [["__scopeId", "data-v-964c6daa"]]), or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3671
3694
  __proto__: null,
3672
3695
  default: ir
3673
3696
  }, Symbol.toStringTag, { value: "Module" }));