ss-component-new 1.2.263 → 1.2.265

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/{MTLLoader-C60D0af6.js → MTLLoader-BeGEKyl0.js} +22 -22
  2. package/dist/{MTLLoader-BV5SUzmG.cjs → MTLLoader-CSt_lM1a.cjs} +1 -1
  3. package/dist/{OrbitControls-Dr_tJ4fZ.cjs → OrbitControls-BAomOOde.cjs} +1 -1
  4. package/dist/{OrbitControls-DiLJkuyu.js → OrbitControls-b-wV4y7B.js} +7 -7
  5. package/dist/{URDFLoader-DglI0gl1.cjs → URDFLoader-CaQU9gcS.cjs} +1 -1
  6. package/dist/{URDFLoader-Cbui5CYq.js → URDFLoader-D0dqTkPQ.js} +110 -110
  7. package/dist/{animationData-BS1KOggN.js → animationData-C9cYzIy2.js} +5 -5
  8. package/dist/{animationData-DAhPTTyV.cjs → animationData-Dxpc8KPf.cjs} +1 -1
  9. package/dist/{array-DQ3w0Sej.js → array-Bjd_S0qT.js} +1 -1
  10. package/dist/{array-DV4Y5Qdq.cjs → array-DZe2aNPv.cjs} +1 -1
  11. package/dist/{iconfont-C0xSkmDm.js → iconfont-BW4pTt1q.js} +2 -2
  12. package/dist/{iconfont-DFcKl5Tl.cjs → iconfont-BXXhBGTd.cjs} +1 -1
  13. package/dist/{index-7t6O2kDd.js → index--gTRHOTN.js} +1 -1
  14. package/dist/{index-6JiENohi.js → index--j26502g.js} +1 -1
  15. package/dist/{index-BzyaLKAO.js → index-60rkchWf.js} +1 -1
  16. package/dist/index-7hYDPFlh.js +4315 -0
  17. package/dist/{index-Cf8awUVC.cjs → index-B2ChFjMV.cjs} +1 -1
  18. package/dist/{index-0r9vJ4Dt.js → index-BMruW26T.js} +1444 -1441
  19. package/dist/{index-0yP57X4c.cjs → index-BV-u3HMZ.cjs} +1 -1
  20. package/dist/{index-DuvD2T3v.js → index-B_-MCkxg.js} +16 -16
  21. package/dist/{index-BupiwS6Q.cjs → index-Ba-ni2cO.cjs} +1 -1
  22. package/dist/{index-5ouuNlF1.cjs → index-BhDAfbms.cjs} +1 -1
  23. package/dist/{index-l5gyINj-.js → index-Bi2pb9yX.js} +2 -2
  24. package/dist/{index-DYoJ1b7h.cjs → index-Bow1V8h_.cjs} +1 -1
  25. package/dist/{index-D834bu6t.js → index-C2o_u0AH.js} +1 -1
  26. package/dist/{index-BoT93rBf.cjs → index-C5qN9fUM.cjs} +1 -1
  27. package/dist/{index-CorDLjba.js → index-C71Renv0.js} +3 -3
  28. package/dist/{index-Bw9Yt-ff.cjs → index-CB40iFsf.cjs} +1 -1
  29. package/dist/{index-CcFw88ze.js → index-CDTuNFPZ.js} +1 -1
  30. package/dist/{index-kxxFoQbl.cjs → index-CICDDGVv.cjs} +1 -1
  31. package/dist/index-CKgg9Qvo.cjs +13 -0
  32. package/dist/{index-C8cUTV0K.js → index-CRf5J2Wu.js} +8 -8
  33. package/dist/{index-CCf7B4w5.js → index-CTSigZhK.js} +1 -1
  34. package/dist/{index-DfsfEirQ.cjs → index-CaS3sMNl.cjs} +12 -12
  35. package/dist/{index-BDHuCtb0.cjs → index-CeD500Mv.cjs} +1 -1
  36. package/dist/{index-KIvXTS9h.cjs → index-CxGqNxZE.cjs} +1 -1
  37. package/dist/{index-D49CORoN.cjs → index-D-De5oRz.cjs} +1 -1
  38. package/dist/{index-C8BME0nI.js → index-DFwqzJD9.js} +4 -4
  39. package/dist/{index-5mUNsn1w.js → index-DP4Kj9oN.js} +7 -7
  40. package/dist/{index-DP6wFpRB.js → index-DPNHwVNI.js} +4 -4
  41. package/dist/{index-aZqbgOAP.cjs → index-DZQV0bN-.cjs} +1 -1
  42. package/dist/{index-CB_H_0Ax.cjs → index-D_FcHkhM.cjs} +1 -1
  43. package/dist/{index-DFo6JZEl.js → index-D_criQ2G.js} +1 -1
  44. package/dist/{index-U4C6FUfG.cjs → index-Da3kXPy3.cjs} +1 -1
  45. package/dist/{index-o4S-_Dke.js → index-DhdsYhJO.js} +1 -1
  46. package/dist/{index-BTXISKif.cjs → index-DpncZBPP.cjs} +1 -1
  47. package/dist/{index-D7lbCuzf.cjs → index-DqFG1hST.cjs} +1 -1
  48. package/dist/{index-Bp_tXnME.js → index-DtFiM--0.js} +4 -4
  49. package/dist/{index-DTepwcmD.js → index-DtS_0LMT.js} +1 -1
  50. package/dist/{index-CzIULOgN.cjs → index-FelWUHCZ.cjs} +1 -1
  51. package/dist/{index-CuPI2lqv.cjs → index-GjnMvmUL.cjs} +1 -1
  52. package/dist/{index-DLiNZrA6.js → index-WA32pMmJ.js} +1 -1
  53. package/dist/{index-C4a_MPf7.cjs → index-jOaHG_a9.cjs} +1 -1
  54. package/dist/{index-DOCv-LZh.cjs → index-k8bKRa4i.cjs} +1 -1
  55. package/dist/{index-DsbyRC2o.js → index-nQnxvxg4.js} +3 -3
  56. package/dist/{index-DahG36bO.js → index-rOvJXxJz.js} +2 -2
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-loW1NLVo.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BENhngvz.js} +5742 -5741
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DbvAKPju.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CBayycqn.cjs} +13 -13
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkIBFS4N.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B6LzqMjV.cjs} +407 -407
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D0rkC1Yq.js} +30455 -30331
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_20f284c2_lang-DJ8GnU9R.cjs → index.vue_vue_type_style_index_0_scoped_20f284c2_lang-CxjM-aSf.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_20f284c2_lang-bYH1Sh6a.js → index.vue_vue_type_style_index_0_scoped_20f284c2_lang-UiPNM7T6.js} +4 -4
  63. package/dist/{index.vue_vue_type_style_index_1_lang-MF8qbCuC.cjs → index.vue_vue_type_style_index_1_lang-BOKr3IxG.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-DIK0cSrJ.js → index.vue_vue_type_style_index_1_lang-D4LWRrzj.js} +3 -3
  65. package/dist/{main-BibCcP5D.cjs → main-BTO4X7hn.cjs} +1 -1
  66. package/dist/{main-CnZCBEtm.js → main-DmTuylSN.js} +3 -3
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +2 -2
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-Mtr7ZQSj.js → threeModel-1MarucKr.js} +4 -4
  73. package/dist/{threeModel-Av_Dm5Vo.cjs → threeModel-DKyo4g95.cjs} +1 -1
  74. package/dist/{threePreview-CauUQ-OA.cjs → threePreview-DZ39wE4z.cjs} +1 -1
  75. package/dist/{threePreview-11vwvu6C.js → threePreview-DczD5lkc.js} +59 -59
  76. package/dist/{threeSceneView-Bcqtouvh.js → threeSceneView-DbPuBfvY.js} +8 -8
  77. package/dist/{threeSceneView-DjBO-IBk.cjs → threeSceneView-DcX_DWMB.cjs} +1 -1
  78. package/dist/{threeSceneViewForCPMPIP-CYhcGgol.js → threeSceneViewForCPMPIP-CQT_PXVK.js} +7 -7
  79. package/dist/{threeSceneViewForCPMPIP-Iu85hN2X.cjs → threeSceneViewForCPMPIP-CzVSdvYD.cjs} +1 -1
  80. package/dist/{threeTrackPathView-Yv-dXetX.js → threeTrackPathView-CdjUnYLD.js} +24 -24
  81. package/dist/{threeTrackPathView-DMfT4Blz.cjs → threeTrackPathView-DHaQCL38.cjs} +1 -1
  82. package/dist/{threeViewerHost-lZhmjlZP.js → threeViewerHost-BP1lE3em.js} +2 -2
  83. package/dist/{threeViewerHost-C2KsZZYX.cjs → threeViewerHost-DB8EVaN9.cjs} +1 -1
  84. package/dist/{urdfTree-C3E13Tqr.cjs → urdfTree-B8eCGdSO.cjs} +1 -1
  85. package/dist/{urdfTree-BiDHH7nr.js → urdfTree-D1L8ToXk.js} +1 -1
  86. package/dist/{workpieceTreePanel-BY2EF3ND.cjs → workpieceTreePanel-BUgxGB3s.cjs} +1 -1
  87. package/dist/{workpieceTreePanel-D8Rj2vkl.js → workpieceTreePanel-DwhZVbj9.js} +4 -4
  88. package/package.json +1 -1
  89. package/dist/index-CGRBbwNI.cjs +0 -13
  90. package/dist/index-Dc9WA-9R.js +0 -4276
@@ -1,8 +1,8 @@
1
1
  import { ref as B, shallowRef as Be, defineComponent as Ke, watch as $, onMounted as Ve, nextTick as Xe, onBeforeUnmount as ze, resolveComponent as qe, createElementBlock as ue, openBlock as J, createElementVNode as S, withDirectives as We, createCommentVNode as fe, createVNode as P, unref as D, renderSlot as de, toDisplayString as he, withCtx as Ye, createBlock as $e, vShow as Je } from "vue";
2
- import { bq as Qe, br as re, bs as Me, bf as Ze, bt as z, bg as we, bu as C, bv as ye, ak as G, bw as v, ap as q, bx as et, az as tt, ax as nt, aE as Y, ah as j, by as st, bz as Se, bA as rt, bB as Ne, bC as it, bD as ot, bm as Q, bE as at, bF as Ie, bG as ct, bH as lt, bI as ut, bJ as ie, bK as Ce, bL as oe, bM as ft, bN as dt, bj as ht, bO as Z, bn as pt, b3 as Oe, aB as mt, bP as X, bQ as gt, b5 as Tt, bR as xt, av as ve, bS as Rt, b7 as Et, bT as bt, bk as At, b2 as ee, al as _t, aF as Lt, bU as Mt, bV as wt, bW as yt, bX as St, bY as Nt, bZ as ke, b_ as It, b$ as pe, c0 as me, c1 as ge, c2 as Te, c3 as xe, bp as Ct, c4 as Ot, ai as Fe, c5 as vt, aA as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js";
2
+ import { br as Qe, bs as re, bt as Me, bg as Ze, bu as z, bh as we, bv as C, bw as ye, ak as G, bx as v, ap as q, by as et, az as tt, ax as nt, aE as Y, ah as j, bz as st, bA as Se, bB as rt, bC as Ne, bD as it, bE as ot, bn as Q, bF as at, bG as Ie, bH as ct, bI as lt, bJ as ut, bK as ie, bL as Ce, bM as oe, bN as ft, bO as dt, bk as ht, bP as Z, bo as pt, b4 as Oe, aB as mt, bQ as X, bR as gt, b6 as Tt, bS as xt, av as ve, bT as Rt, b8 as Et, bU as At, bl as _t, b3 as ee, al as bt, aF as Lt, bV as Mt, bW as wt, bX as yt, bY as St, bZ as Nt, b_ as ke, b$ as It, c0 as pe, c1 as me, c2 as ge, c3 as Te, c4 as xe, bq as Ct, c5 as Ot, ai as Fe, c6 as vt, aA as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D0rkC1Yq.js";
3
3
  import { E as Re } from "./index-7MBVUN82.js";
4
- import { u as Ft, a as Pt, b as Dt, C as Ht } from "./iconfont-C0xSkmDm.js";
5
- import { M as Gt, O as Ut, S as jt } from "./MTLLoader-C60D0af6.js";
4
+ import { u as Ft, a as Pt, b as Dt, C as Ht } from "./iconfont-BW4pTt1q.js";
5
+ import { M as Gt, O as Ut, S as jt } from "./MTLLoader-BeGEKyl0.js";
6
6
  import { T as U } from "./svgIcon-D-_fXUBL.js";
7
7
  import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  function Ee(f, t) {
@@ -188,7 +188,7 @@ class Kt extends Ze {
188
188
  n && n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
189
189
  return;
190
190
  }
191
- const c = new _n(s, {
191
+ const c = new bn(s, {
192
192
  path: e || this.resourcePath || "",
193
193
  crossOrigin: this.crossOrigin,
194
194
  requestHeader: this.requestHeader,
@@ -627,21 +627,21 @@ class ln {
627
627
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(t)), Promise.all(a).then((c) => {
628
628
  const u = c.pop(), l = u.isGroup ? u.children : [u], d = c[0].count, h = [];
629
629
  for (const p of l) {
630
- const x = new Y(), m = new j(), g = new Se(), E = new j(1, 1, 1), b = new st(p.geometry, p.material, d);
630
+ const x = new Y(), m = new j(), g = new Se(), E = new j(1, 1, 1), A = new st(p.geometry, p.material, d);
631
631
  for (let T = 0; T < d; T++)
632
- o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, T), o.ROTATION && g.fromBufferAttribute(o.ROTATION, T), o.SCALE && E.fromBufferAttribute(o.SCALE, T), b.setMatrixAt(T, x.compose(m, g, E));
632
+ o.TRANSLATION && m.fromBufferAttribute(o.TRANSLATION, T), o.ROTATION && g.fromBufferAttribute(o.ROTATION, T), o.SCALE && E.fromBufferAttribute(o.SCALE, T), A.setMatrixAt(T, x.compose(m, g, E));
633
633
  for (const T in o)
634
634
  if (T === "_COLOR_0") {
635
- const _ = o[T];
636
- b.instanceColor = new rt(_.array, _.itemSize, _.normalized);
635
+ const b = o[T];
636
+ A.instanceColor = new rt(b.array, b.itemSize, b.normalized);
637
637
  } else T !== "TRANSLATION" && T !== "ROTATION" && T !== "SCALE" && p.geometry.setAttribute(T, o[T]);
638
- Ne.prototype.copy.call(b, p), this.parser.assignFinalMaterial(b), h.push(b);
638
+ Ne.prototype.copy.call(A, p), this.parser.assignFinalMaterial(A), h.push(A);
639
639
  }
640
640
  return u.isGroup ? (u.clear(), u.add(...h), u) : h[0];
641
641
  }));
642
642
  }
643
643
  }
644
- const Pe = "glTF", V = 12, be = { JSON: 1313821514, BIN: 5130562 };
644
+ const Pe = "glTF", V = 12, Ae = { JSON: 1313821514, BIN: 5130562 };
645
645
  class un {
646
646
  constructor(t) {
647
647
  this.name = R.KHR_BINARY_GLTF, this.content = null, this.body = null;
@@ -660,10 +660,10 @@ class un {
660
660
  const a = s.getUint32(r, !0);
661
661
  r += 4;
662
662
  const o = s.getUint32(r, !0);
663
- if (r += 4, o === be.JSON) {
663
+ if (r += 4, o === Ae.JSON) {
664
664
  const c = new Uint8Array(t, V + r, a);
665
665
  this.content = i.decode(c);
666
- } else if (o === be.BIN) {
666
+ } else if (o === Ae.BIN) {
667
667
  const c = V + r;
668
668
  this.body = t.slice(c, c + a);
669
669
  }
@@ -729,10 +729,10 @@ class De extends Ot {
729
729
  return e;
730
730
  }
731
731
  interpolate_(t, e, i, n) {
732
- const s = this.resultBuffer, r = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, u = n - e, l = (i - e) / u, d = l * l, h = d * l, p = t * c, x = p - c, m = -2 * h + 3 * d, g = h - d, E = 1 - m, b = g - d + l;
732
+ const s = this.resultBuffer, r = this.sampleValues, a = this.valueSize, o = a * 2, c = a * 3, u = n - e, l = (i - e) / u, d = l * l, h = d * l, p = t * c, x = p - c, m = -2 * h + 3 * d, g = h - d, E = 1 - m, A = g - d + l;
733
733
  for (let T = 0; T !== a; T++) {
734
- const _ = r[x + T + a], w = r[x + T + o] * u, L = r[p + T + a], N = r[p + T] * u;
735
- s[T] = E * _ + b * w + m * L + g * N;
734
+ const b = r[x + T + a], w = r[x + T + o] * u, L = r[p + T + a], N = r[p + T] * u;
735
+ s[T] = E * b + A * w + m * L + g * N;
736
736
  }
737
737
  return s;
738
738
  }
@@ -759,14 +759,14 @@ const y = {
759
759
  5123: Uint16Array,
760
760
  5125: Uint32Array,
761
761
  5126: Float32Array
762
- }, Ae = {
762
+ }, _e = {
763
763
  9728: Ce,
764
764
  9729: ie,
765
765
  9984: ut,
766
766
  9985: lt,
767
767
  9986: ct,
768
768
  9987: Ie
769
- }, _e = {
769
+ }, be = {
770
770
  33071: dt,
771
771
  33648: ft,
772
772
  10497: oe
@@ -898,11 +898,11 @@ function ce(f) {
898
898
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
899
899
  }
900
900
  }
901
- function bn(f) {
901
+ function An(f) {
902
902
  return f.search(/\.jpe?g($|\?)/i) > 0 || f.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : f.search(/\.webp($|\?)/i) > 0 || f.search(/^data\:image\/webp/) === 0 ? "image/webp" : f.search(/\.ktx2($|\?)/i) > 0 || f.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
903
903
  }
904
- const An = new Y();
905
- class _n {
904
+ const _n = new Y();
905
+ class bn {
906
906
  constructor(t = {}, e = {}) {
907
907
  this.json = t, this.extensions = {}, this.plugins = {}, this.options = e, this.cache = new Vt(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
908
908
  let i = !1, n = -1, s = !1, r = -1;
@@ -1161,15 +1161,15 @@ class _n {
1161
1161
  let x, m;
1162
1162
  if (h && h !== l) {
1163
1163
  const g = Math.floor(d / h), E = "InterleavedBuffer:" + n.bufferView + ":" + n.componentType + ":" + g + ":" + n.count;
1164
- let b = e.cache.get(E);
1165
- b || (x = new c(a, g * h, n.count * h / u), b = new at(x, h / u), e.cache.add(E, b)), m = new It(b, o, d % h / u, p);
1164
+ let A = e.cache.get(E);
1165
+ A || (x = new c(a, g * h, n.count * h / u), A = new at(x, h / u), e.cache.add(E, A)), m = new It(A, o, d % h / u, p);
1166
1166
  } else
1167
1167
  a === null ? x = new c(n.count * o) : x = new c(a, d, n.count * o), m = new Q(x, o, p);
1168
1168
  if (n.sparse !== void 0) {
1169
- const g = te.SCALAR, E = K[n.sparse.indices.componentType], b = n.sparse.indices.byteOffset || 0, T = n.sparse.values.byteOffset || 0, _ = new E(r[1], b, n.sparse.count * g), w = new c(r[2], T, n.sparse.count * o);
1169
+ const g = te.SCALAR, E = K[n.sparse.indices.componentType], A = n.sparse.indices.byteOffset || 0, T = n.sparse.values.byteOffset || 0, b = new E(r[1], A, n.sparse.count * g), w = new c(r[2], T, n.sparse.count * o);
1170
1170
  a !== null && (m = new Q(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1171
- for (let L = 0, N = _.length; L < N; L++) {
1172
- const M = _[L];
1171
+ for (let L = 0, N = b.length; L < N; L++) {
1172
+ const M = b[L];
1173
1173
  if (m.setX(M, w[L * o]), o >= 2 && m.setY(M, w[L * o + 1]), o >= 3 && m.setZ(M, w[L * o + 2]), o >= 4 && m.setW(M, w[L * o + 3]), o >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1174
1174
  }
1175
1175
  m.normalized = p;
@@ -1200,7 +1200,7 @@ class _n {
1200
1200
  const c = this.loadImageSource(e, i).then(function(u) {
1201
1201
  u.flipY = !1, u.name = r.name || a.name || "", u.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (u.name = a.uri);
1202
1202
  const d = (s.samplers || {})[r.sampler] || {};
1203
- return u.magFilter = Ae[d.magFilter] || ie, u.minFilter = Ae[d.minFilter] || Ie, u.wrapS = _e[d.wrapS] || oe, u.wrapT = _e[d.wrapT] || oe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Ce && u.minFilter !== ie, n.associations.set(u, { textures: t }), u;
1203
+ return u.magFilter = _e[d.magFilter] || ie, u.minFilter = _e[d.minFilter] || Ie, u.wrapS = be[d.wrapS] || oe, u.wrapT = be[d.wrapT] || oe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Ce && u.minFilter !== ie, n.associations.set(u, { textures: t }), u;
1204
1204
  }).catch(function() {
1205
1205
  return null;
1206
1206
  });
@@ -1229,7 +1229,7 @@ class _n {
1229
1229
  }), e.load(z.resolveURL(l, s.path), p, void 0, h);
1230
1230
  });
1231
1231
  }).then(function(l) {
1232
- return c === !0 && a.revokeObjectURL(o), O(l, r), l.userData.mimeType = r.mimeType || bn(r.uri), l;
1232
+ return c === !0 && a.revokeObjectURL(o), O(l, r), l.userData.mimeType = r.mimeType || An(r.uri), l;
1233
1233
  }).catch(function(l) {
1234
1234
  throw console.error("THREE.GLTFLoader: Couldn't load texture", o), l;
1235
1235
  });
@@ -1399,9 +1399,9 @@ class _n {
1399
1399
  else if (m.mode === y.LINE_STRIP)
1400
1400
  g = new Et(x, E);
1401
1401
  else if (m.mode === y.LINE_LOOP)
1402
- g = new bt(x, E);
1403
- else if (m.mode === y.POINTS)
1404
1402
  g = new At(x, E);
1403
+ else if (m.mode === y.POINTS)
1404
+ g = new _t(x, E);
1405
1405
  else
1406
1406
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
1407
1407
  Object.keys(g.geometry.morphAttributes).length > 0 && Rn(g, s), g.name = e.createUniqueName(s.name || "mesh_" + t), O(g, s), m.extensions && H(n, g, m), e.assignFinalMaterial(g), l.push(g);
@@ -1434,7 +1434,7 @@ class _n {
1434
1434
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1435
1435
  return;
1436
1436
  }
1437
- return i.type === "perspective" ? e = new _t(Lt.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : i.type === "orthographic" && (e = new Mt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), i.name && (e.name = this.createUniqueName(i.name)), O(e, i), Promise.resolve(e);
1437
+ return i.type === "perspective" ? e = new bt(Lt.radToDeg(n.yfov), n.aspectRatio || 1, n.znear || 1, n.zfar || 2e6) : i.type === "orthographic" && (e = new Mt(-n.xmag, n.xmag, n.ymag, -n.ymag, n.znear, n.zfar)), i.name && (e.name = this.createUniqueName(i.name)), O(e, i), Promise.resolve(e);
1438
1438
  }
1439
1439
  /**
1440
1440
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -1482,11 +1482,11 @@ class _n {
1482
1482
  Promise.all(u)
1483
1483
  ]).then(function(l) {
1484
1484
  const d = l[0], h = l[1], p = l[2], x = l[3], m = l[4], g = [];
1485
- for (let E = 0, b = d.length; E < b; E++) {
1486
- const T = d[E], _ = h[E], w = p[E], L = x[E], N = m[E];
1485
+ for (let E = 0, A = d.length; E < A; E++) {
1486
+ const T = d[E], b = h[E], w = p[E], L = x[E], N = m[E];
1487
1487
  if (T === void 0) continue;
1488
1488
  T.updateMatrix && T.updateMatrix();
1489
- const M = i._createAnimationTracks(T, _, w, L, N);
1489
+ const M = i._createAnimationTracks(T, b, w, L, N);
1490
1490
  if (M)
1491
1491
  for (let k = 0; k < M.length; k++)
1492
1492
  g.push(M[k]);
@@ -1524,7 +1524,7 @@ class _n {
1524
1524
  ]).then(function(c) {
1525
1525
  const u = c[0], l = c[1], d = c[2];
1526
1526
  d !== null && u.traverse(function(h) {
1527
- h.isSkinnedMesh && h.bind(d, An);
1527
+ h.isSkinnedMesh && h.bind(d, _n);
1528
1528
  });
1529
1529
  for (let h = 0, p = l.length; h < p; h++)
1530
1530
  u.add(l[h]);
@@ -1740,9 +1740,9 @@ function Mn() {
1740
1740
  const g = URL.createObjectURL(p);
1741
1741
  l.push(g);
1742
1742
  let E = null;
1743
- const b = (T) => {
1744
- const _ = T.lengthComputable ? T.loaded / T.total * 100 : 0;
1745
- t.value = `正在加载 ${x}... ${Math.round(_)}%`;
1743
+ const A = (T) => {
1744
+ const b = T.lengthComputable ? T.loaded / T.total * 100 : 0;
1745
+ t.value = `正在加载 ${x}... ${Math.round(b)}%`;
1746
1746
  };
1747
1747
  switch (t.value = `正在加载 ${x}... 0%`, m) {
1748
1748
  case "obj":
@@ -1754,15 +1754,15 @@ function Mn() {
1754
1754
  k.preload(), s.setMaterials(k);
1755
1755
  } else
1756
1756
  s.setMaterials(null);
1757
- E = await s.loadAsync(g, b);
1757
+ E = await s.loadAsync(g, A);
1758
1758
  break;
1759
1759
  case "stl":
1760
- const _ = await r.loadAsync(g, b), w = new kt({ color: 11184810, specular: 1118481, shininess: 200 });
1761
- E = new ve(_, w);
1760
+ const b = await r.loadAsync(g, A), w = new kt({ color: 11184810, specular: 1118481, shininess: 200 });
1761
+ E = new ve(b, w);
1762
1762
  break;
1763
1763
  case "gltf":
1764
1764
  case "glb":
1765
- E = (await a.loadAsync(g, b)).scene;
1765
+ E = (await a.loadAsync(g, A)).scene;
1766
1766
  break;
1767
1767
  default:
1768
1768
  console.warn(`不支持的文件类型: .${m}`), t.value = `不支持的文件类型: ${x}`;
@@ -1818,7 +1818,7 @@ const yn = { class: "obj-viewer-container" }, Sn = { class: "buttonGroup-topLeft
1818
1818
  error: g,
1819
1819
  loadModelsFromBlobs: E
1820
1820
  },
1821
- animation: { isAnimating: b, toggleAnimation: T, startAnimation: _, stopAnimation: w },
1821
+ animation: { isAnimating: A, toggleAnimation: T, startAnimation: b, stopAnimation: w },
1822
1822
  clipping: {
1823
1823
  isClipping: L,
1824
1824
  activeClippingAxis: N,
@@ -1831,35 +1831,35 @@ const yn = { class: "obj-viewer-container" }, Sn = { class: "buttonGroup-topLeft
1831
1831
  useClippingHook: !0
1832
1832
  }), He = () => {
1833
1833
  h();
1834
- }, Ge = (A) => {
1835
- N.value = A, k();
1834
+ }, Ge = (_) => {
1835
+ N.value = _, k();
1836
1836
  };
1837
- $(() => t.fileBlobs, (A) => {
1838
- A && A.length > 0 && E(A).catch((I) => {
1837
+ $(() => t.fileBlobs, (_) => {
1838
+ _ && _.length > 0 && E(_).catch((I) => {
1839
1839
  console.error("加载错误:", I);
1840
1840
  });
1841
1841
  }, {
1842
1842
  immediate: !0,
1843
1843
  deep: !0
1844
- }), $(m, (A) => {
1845
- A && A.length > 0 && l(A);
1846
- }), $(g, (A) => {
1847
- A && Re.error(`模型加载失败: ${A}`);
1844
+ }), $(m, (_) => {
1845
+ _ && _.length > 0 && l(_);
1846
+ }), $(g, (_) => {
1847
+ _ && Re.error(`模型加载失败: ${_}`);
1848
1848
  });
1849
- const le = (A) => {
1850
- i.value = !0, n.value = A, A === "剖面视图" && !L.value && M();
1849
+ const le = (_) => {
1850
+ i.value = !0, n.value = _, _ === "剖面视图" && !L.value && M();
1851
1851
  };
1852
1852
  let W = null;
1853
1853
  return Ve(async () => {
1854
1854
  await Xe();
1855
1855
  try {
1856
1856
  a(), e.value && (W = new ResizeObserver(o), W.observe(e.value));
1857
- } catch (A) {
1858
- console.error("Three.js 初始化失败:", A), Re.error("渲染引擎初始化失败!");
1857
+ } catch (_) {
1858
+ console.error("Three.js 初始化失败:", _), Re.error("渲染引擎初始化失败!");
1859
1859
  }
1860
1860
  }), ze(() => {
1861
- n.value = "", W && W.disconnect(), b.value && w(), u();
1862
- }), (A, I) => {
1861
+ n.value = "", W && W.disconnect(), A.value && w(), u();
1862
+ }), (_, I) => {
1863
1863
  const Ue = qe("el-scrollbar");
1864
1864
  return J(), ue("div", yn, [
1865
1865
  S("div", {
@@ -1888,7 +1888,7 @@ const yn = { class: "obj-viewer-container" }, Sn = { class: "buttonGroup-topLeft
1888
1888
  name: "lookAround",
1889
1889
  size: "24",
1890
1890
  onClick: D(T),
1891
- title: D(b) ? "停止动画" : "动画视图"
1891
+ title: D(A) ? "停止动画" : "动画视图"
1892
1892
  }, null, 8, ["onClick", "title"]),
1893
1893
  P(U, {
1894
1894
  name: "zuobiaoxi",
@@ -1899,7 +1899,7 @@ const yn = { class: "obj-viewer-container" }, Sn = { class: "buttonGroup-topLeft
1899
1899
  }, null, 8, ["active"])
1900
1900
  ]),
1901
1901
  S("div", Nn, [
1902
- de(A.$slots, "button-left", { switchRightPanel: le }, void 0, !0),
1902
+ de(_.$slots, "button-left", { switchRightPanel: le }, void 0, !0),
1903
1903
  P(U, {
1904
1904
  name: "clipping",
1905
1905
  size: "24",
@@ -1909,7 +1909,7 @@ const yn = { class: "obj-viewer-container" }, Sn = { class: "buttonGroup-topLeft
1909
1909
  }, null, 8, ["active"])
1910
1910
  ]),
1911
1911
  S("div", In, [
1912
- de(A.$slots, "button-right", {}, void 0, !0)
1912
+ de(_.$slots, "button-right", {}, void 0, !0)
1913
1913
  ]),
1914
1914
  I[3] || (I[3] = S("div", { class: "buttonGroup-bottom" }, null, -1)),
1915
1915
  We(S("div", Cn, [
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as Le, ref as h, watch as ae, shallowRef as be, computed as Pe, onUnmounted as Ie, resolveComponent as U, createElementBlock as De, openBlock as Q, createElementVNode as u, createVNode as l, withCtx as M, createBlock as ye, createCommentVNode as ke, unref as X, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as He, renderList as qe, nextTick as Ke, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
- import { r as Te, s as Ye } from "./threeViewerHost-lZhmjlZP.js";
3
- import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-C0xSkmDm.js";
4
- import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-D8Rj2vkl.js";
2
+ import { r as Te, s as Ye } from "./threeViewerHost-BP1lE3em.js";
3
+ import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-BW4pTt1q.js";
4
+ import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-DwhZVbj9.js";
5
5
  import { aa as st, c as it, E, aM as rt, ao as ct } from "./index-7MBVUN82.js";
6
- import { aG as Ve, aH as xe, ah as V, aE as H, aF as ut, b2 as pt, av as Se, b3 as dt, b4 as mt, b5 as vt, b6 as ft, b7 as gt, b8 as ht, b9 as bt, ba as yt, aB as _t, bb as Be, bc as wt, bd as Ct, be as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js";
6
+ import { aG as Ve, aH as xe, ah as V, aE as H, aF as ut, b3 as pt, av as Se, b4 as dt, b5 as mt, b6 as vt, b7 as ft, b8 as gt, b9 as ht, ba as bt, bb as yt, aB as _t, bc as Be, bd as wt, be as Ct, bf as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D0rkC1Yq.js";
7
7
  import "./index-BHtNKL1L.js";
8
8
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
9
- import "./index.vue_vue_type_style_index_1_lang-DIK0cSrJ.js";
9
+ import "./index.vue_vue_type_style_index_1_lang-D4LWRrzj.js";
10
10
  import "./index-DfFq9kkn.js";
11
11
  import "./index-3oQGURYh.js";
12
- import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-BS1KOggN.js";
13
- import { g as Tt, a as Dt, b as Vt, c as St, U as At, J as $t } from "./urdfTree-BiDHH7nr.js";
12
+ import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-C9cYzIy2.js";
13
+ import { g as Tt, a as Dt, b as Vt, c as St, U as At, J as $t } from "./urdfTree-D1L8ToXk.js";
14
14
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { s as Ft } from "./index-DLiNZrA6.js";
15
+ import { s as Ft } from "./index-WA32pMmJ.js";
16
16
  import { T as Y } from "./svgIcon-D-_fXUBL.js";
17
17
  const I = 1e-3, oe = ut.degToRad, Ee = new dt({
18
18
  // 灰色
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ne=require("./threeViewerHost-C2KsZZYX.cjs"),pe=require("./iconfont-DFcKl5Tl.cjs"),ve=require("./workpieceTreePanel-BY2EF3ND.cjs"),R=require("./index-DOItJqcJ.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkIBFS4N.cjs");require("./index-BpPyaNFa.cjs");const le=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index.vue_vue_type_style_index_1_lang-MF8qbCuC.cjs");require("./index-KaxOq1_-.cjs");require("./index-CXC0u8pm.cjs");const fe=require("./animationData-DAhPTTyV.cjs"),ie=require("./urdfTree-C3E13Tqr.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=require("./index-0yP57X4c.cjs"),B=require("./svgIcon-CUM54R6L.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Te(V=.005,v=64){const p=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),a=new n.TubeGeometry(p,v,V,16,!1),m=ye;return new n.Mesh(a,m)}const xe=V=>V.reduce((v,p)=>{let a=0;const m=p.Y??0,b=p.C??0,s=p.R??0;return m>0&&(a+=m),b>0&&s>0&&(a+=s*W(b)),v+a},0),ke=V=>{const v=[],p=V.Y??0,a=V.B??0,m=V.C??0,b=V.R??0,s={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!p&&!m)return v;if(v.push(s.pos.clone()),a!==0){const g=new n.Matrix4().makeRotationAxis(s.localY,W(a));s.localX.applyMatrix4(g),s.localZ.applyMatrix4(g)}if(p>0&&(s.pos.add(s.localY.clone().multiplyScalar(p*G)),v.push(s.pos.clone())),m>0&&b>0){const g=W(m),f=b*G,w=s.pos.clone().add(s.localX.clone().multiplyScalar(-f)),r=Math.max(16,Math.ceil(m/5));for(let y=1;y<=r;y++){const d=g*y/r,_=new n.Matrix4().makeRotationAxis(s.localZ,d),u=s.localX.clone().multiplyScalar(f).applyMatrix4(_),k=w.clone().add(u);v.push(k)}}return v};function Ee(V,v){const p=new n.Group;p.name="CompletePipe";const a={pos:new n.Vector3(0,0,0),localX:new n.Vector3(1,0,0),localY:new n.Vector3(0,1,0),localZ:new n.Vector3(0,0,1)};let m=0,b=1;for(let s=0;s<V.length;s++){const g=V[s],f=g.Y??0,w=g.B??0,r=g.C??0,y=g.R??0;if(w!==0){const d=new n.Matrix4().makeRotationAxis(a.localY,W(w));a.localX.applyMatrix4(d),a.localZ.applyMatrix4(d)}if(f>0){const d=a.pos.clone();a.pos.add(a.localY.clone().multiplyScalar(f*G));const _=a.pos.clone(),c=Pe(d,_,v*G);c.userData={segmentType:"straight",segmentIndex:m,frameIndex:s,length:f,frame:{Y:f,B:w,C:r,R:y}},c.name=`直段_${m}`,p.add(c);const u=d.clone();Se(p,b,u,v*G),m++}if(r>0&&y>0){const d=W(r),_=y*G,c=[];c.push(a.pos.clone());const u=a.pos.clone().add(a.localX.clone().multiplyScalar(-_)),k=Math.max(16,Math.ceil(r/5));for(let h=1;h<=k;h++){const M=d*h/k,A=new n.Matrix4().makeRotationAxis(a.localZ,M),L=a.localX.clone().multiplyScalar(_).applyMatrix4(A),q=u.clone().add(L);c.push(q)}const E=De(c,v*G);E.userData={segmentType:"bend",segmentIndex:m,frameIndex:s,angle:r,radius:y,centerPoint:u.toArray(),frame:{Y:f,B:w,C:r,R:y}},E.name=`弯段_${m}`,p.add(E),Math.floor(c.length/2),c[0],a.pos=c[c.length-1].clone();const S=new n.Matrix4().makeRotationAxis(a.localZ,d);a.localY.applyMatrix4(S),a.localX.applyMatrix4(S),m++,b++}}return p}function Se(V,v,p,a){const m=new n.Vector3(0,a*2,a*5),b=p.clone().add(m),s=[p,b],g=new n.BufferGeometry().setFromPoints(s),f=new n.LineDashedMaterial({color:16711680,dashSize:a*.5,gapSize:a*.3,linewidth:1}),w=new n.Line(g,f);w.computeLineDistances(),V.add(w);const r=document.createElement("canvas"),y=r.getContext("2d");r.width=128,r.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(v.toString(),64,64);const d=new n.CanvasTexture(r),_=new n.SpriteMaterial({map:d,transparent:!0,depthTest:!1,depthWrite:!1}),c=new n.Sprite(_),u=a*3;c.scale.set(u,u,1),c.position.copy(b),c.name=`Label_${v}`,c.userData={labelNumber:v},V.add(c)}function Pe(V,v,p){const a=new n.LineCurve3(V,v),m=new n.TubeGeometry(a,2,p,18,!1);return new n.Mesh(m,ye)}function De(V,v){const p=new n.CatmullRomCurve3(V,!1,"catmullrom",.01),a=new n.TubeGeometry(p,Math.max(16,V.length*2),v,18,!1);return new n.Mesh(a,ye)}function _e(V,v,p,a,m,b=0){let s=v.slice(0,m+1);const g=v[m+1];if(g&&b>0){const c={...g,B:(g.B??0)*b,C:(g.C??0)*b};s.push(c)}const f=xe(s),w=Math.max(0,p-f),r=[];r.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&r.push(y);let d={pos:y.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const _=[];for(let c=s.length-1;c>=0;c--){const u=s[c],k=ke(u);if(k.length>0){const E=k.map(A=>{const $=A.clone(),L=new n.Matrix4;return L.makeBasis(d.localX,d.localY,d.localZ),$.applyMatrix4(L),$.add(d.pos)});_.push(E);const S=E[E.length-1];d.pos=S.clone();const h=u.B??0,M=u.C??0;if(h!==0){const A=new n.Matrix4().makeRotationAxis(d.localY,W(h));d.localX.applyMatrix4(A),d.localZ.applyMatrix4(A)}if(M>0){const A=W(M),$=new n.Matrix4().makeRotationAxis(d.localZ,A);d.localY.applyMatrix4($),d.localX.applyMatrix4($)}}}for(const c of _)c.length>1&&r.push(...c.slice(1));r.length<2&&r.push(new n.Vector3(0,.001,0));try{const c=new n.CatmullRomCurve3(r,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,r.length*4),a*G,18,!1);V.geometry.dispose(),V.geometry=u}catch(c){console.error("管件更新失败",c)}}function Ce(V,v,p,a=0){let m=V.slice(0,p+1);const b=V[p+1];if(b&&a>0){const d={...b,B:(b.B??0)*a,C:(b.C??0)*a};m.push(d)}const s=xe(m),g=Math.max(0,v-s),f=[];f.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,g*G,0);g>0&&f.push(w);let r={pos:w.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const y=[];for(let d=m.length-1;d>=0;d--){const _=m[d],c=ke(_);if(c.length>0){const u=c.map(h=>{const M=h.clone(),A=new n.Matrix4;return A.makeBasis(r.localX,r.localY,r.localZ),M.applyMatrix4(A),M.add(r.pos)});y.push(u);const k=u[u.length-1];r.pos=k.clone();const E=_.B??0,S=_.C??0;if(E!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(E));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(S>0){const h=W(S),M=new n.Matrix4().makeRotationAxis(r.localZ,h);r.localY.applyMatrix4(M),r.localX.applyMatrix4(M)}}}for(const d of y)d.length>1&&f.push(...d.slice(1));return f.length<2&&f.push(new n.Vector3(0,.001,0)),f}function Ne(V,v,p,a,m,b,s,g=0,f=0){const w=m-f,r=Ce(a,w,s,g);let d=Ce(p,f,s,g);d.forEach(c=>c.y=-c.y),d.reverse();const _=[...d,...r];try{const c=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,_.length*4),b*G,18,!1);v.geometry.dispose(),V.geometry.dispose(),v.parent&&v.parent.remove(v),V.geometry=u}catch(c){console.error("管件更新失败",c)}}const Re={class:"panel-content"},Be={class:"action-bar"},Ae={class:"animation-controls"},$e={class:"control-row"},Fe={class:"control-row"},ze={class:"frame-info"},Ye={class:"control-row"},Le={class:"progress-bar"},Ue={class:"dialog-footer"},Ie=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},setup(V,{expose:v}){const p=V,a=e.ref(),m=e.ref();e.watch(()=>p.threeData,t=>{const l=t==null?void 0:t.data;m.value=l==null?void 0:l.type},{immediate:!0});const b=async()=>{let t={};m.value===ne.robotMode.SINGLE&&(t=await fe.fetchSingleRobotAnimationData()),m.value===ne.robotMode.DOUBLE&&(t=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:l=0,pipeRadius:o=0,clampLength:i=0,animationData:x}=t;S.value=l,h.value=o,M.value=i,a.value=x;const N=R.cloneDeep(a.value),J=re(Y.value),X=(N==null?void 0:N["输出(动画数据)"])||[];s.value=X.length?X:[J]},s=e.ref([]),g=e.ref(!1),f=e.ref(""),w=e.ref(!1),r=e.ref(0),y=e.ref(0),d=e.ref(1e3);let _=!1;const c=e.ref(null),u=e.shallowRef(null),k=e.shallowRef(null),E=e.shallowRef(null),S=e.ref(0),h=e.ref(12.5),M=e.ref(30),A=e.ref([]),$=e.ref(null),L=e.computed(()=>p.model?ie.getNonFixedJoints(p.model).map(o=>o.name):[]),q=e.ref(["Y","B","C","R"]),Y=e.computed(()=>[...L.value,...q.value]),ce=e.computed(()=>Y.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ne=require("./threeViewerHost-DB8EVaN9.cjs"),pe=require("./iconfont-BXXhBGTd.cjs"),ve=require("./workpieceTreePanel-BUgxGB3s.cjs"),R=require("./index-DOItJqcJ.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B6LzqMjV.cjs");require("./index-BpPyaNFa.cjs");const le=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index.vue_vue_type_style_index_1_lang-BOKr3IxG.cjs");require("./index-KaxOq1_-.cjs");require("./index-CXC0u8pm.cjs");const fe=require("./animationData-Dxpc8KPf.cjs"),ie=require("./urdfTree-B8eCGdSO.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=require("./index-BV-u3HMZ.cjs"),B=require("./svgIcon-CUM54R6L.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Te(V=.005,v=64){const p=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),a=new n.TubeGeometry(p,v,V,16,!1),m=ye;return new n.Mesh(a,m)}const xe=V=>V.reduce((v,p)=>{let a=0;const m=p.Y??0,b=p.C??0,s=p.R??0;return m>0&&(a+=m),b>0&&s>0&&(a+=s*W(b)),v+a},0),ke=V=>{const v=[],p=V.Y??0,a=V.B??0,m=V.C??0,b=V.R??0,s={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!p&&!m)return v;if(v.push(s.pos.clone()),a!==0){const g=new n.Matrix4().makeRotationAxis(s.localY,W(a));s.localX.applyMatrix4(g),s.localZ.applyMatrix4(g)}if(p>0&&(s.pos.add(s.localY.clone().multiplyScalar(p*G)),v.push(s.pos.clone())),m>0&&b>0){const g=W(m),f=b*G,w=s.pos.clone().add(s.localX.clone().multiplyScalar(-f)),r=Math.max(16,Math.ceil(m/5));for(let y=1;y<=r;y++){const d=g*y/r,_=new n.Matrix4().makeRotationAxis(s.localZ,d),u=s.localX.clone().multiplyScalar(f).applyMatrix4(_),k=w.clone().add(u);v.push(k)}}return v};function Ee(V,v){const p=new n.Group;p.name="CompletePipe";const a={pos:new n.Vector3(0,0,0),localX:new n.Vector3(1,0,0),localY:new n.Vector3(0,1,0),localZ:new n.Vector3(0,0,1)};let m=0,b=1;for(let s=0;s<V.length;s++){const g=V[s],f=g.Y??0,w=g.B??0,r=g.C??0,y=g.R??0;if(w!==0){const d=new n.Matrix4().makeRotationAxis(a.localY,W(w));a.localX.applyMatrix4(d),a.localZ.applyMatrix4(d)}if(f>0){const d=a.pos.clone();a.pos.add(a.localY.clone().multiplyScalar(f*G));const _=a.pos.clone(),c=Pe(d,_,v*G);c.userData={segmentType:"straight",segmentIndex:m,frameIndex:s,length:f,frame:{Y:f,B:w,C:r,R:y}},c.name=`直段_${m}`,p.add(c);const u=d.clone();Se(p,b,u,v*G),m++}if(r>0&&y>0){const d=W(r),_=y*G,c=[];c.push(a.pos.clone());const u=a.pos.clone().add(a.localX.clone().multiplyScalar(-_)),k=Math.max(16,Math.ceil(r/5));for(let h=1;h<=k;h++){const M=d*h/k,A=new n.Matrix4().makeRotationAxis(a.localZ,M),L=a.localX.clone().multiplyScalar(_).applyMatrix4(A),q=u.clone().add(L);c.push(q)}const E=De(c,v*G);E.userData={segmentType:"bend",segmentIndex:m,frameIndex:s,angle:r,radius:y,centerPoint:u.toArray(),frame:{Y:f,B:w,C:r,R:y}},E.name=`弯段_${m}`,p.add(E),Math.floor(c.length/2),c[0],a.pos=c[c.length-1].clone();const S=new n.Matrix4().makeRotationAxis(a.localZ,d);a.localY.applyMatrix4(S),a.localX.applyMatrix4(S),m++,b++}}return p}function Se(V,v,p,a){const m=new n.Vector3(0,a*2,a*5),b=p.clone().add(m),s=[p,b],g=new n.BufferGeometry().setFromPoints(s),f=new n.LineDashedMaterial({color:16711680,dashSize:a*.5,gapSize:a*.3,linewidth:1}),w=new n.Line(g,f);w.computeLineDistances(),V.add(w);const r=document.createElement("canvas"),y=r.getContext("2d");r.width=128,r.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(v.toString(),64,64);const d=new n.CanvasTexture(r),_=new n.SpriteMaterial({map:d,transparent:!0,depthTest:!1,depthWrite:!1}),c=new n.Sprite(_),u=a*3;c.scale.set(u,u,1),c.position.copy(b),c.name=`Label_${v}`,c.userData={labelNumber:v},V.add(c)}function Pe(V,v,p){const a=new n.LineCurve3(V,v),m=new n.TubeGeometry(a,2,p,18,!1);return new n.Mesh(m,ye)}function De(V,v){const p=new n.CatmullRomCurve3(V,!1,"catmullrom",.01),a=new n.TubeGeometry(p,Math.max(16,V.length*2),v,18,!1);return new n.Mesh(a,ye)}function _e(V,v,p,a,m,b=0){let s=v.slice(0,m+1);const g=v[m+1];if(g&&b>0){const c={...g,B:(g.B??0)*b,C:(g.C??0)*b};s.push(c)}const f=xe(s),w=Math.max(0,p-f),r=[];r.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&r.push(y);let d={pos:y.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const _=[];for(let c=s.length-1;c>=0;c--){const u=s[c],k=ke(u);if(k.length>0){const E=k.map(A=>{const $=A.clone(),L=new n.Matrix4;return L.makeBasis(d.localX,d.localY,d.localZ),$.applyMatrix4(L),$.add(d.pos)});_.push(E);const S=E[E.length-1];d.pos=S.clone();const h=u.B??0,M=u.C??0;if(h!==0){const A=new n.Matrix4().makeRotationAxis(d.localY,W(h));d.localX.applyMatrix4(A),d.localZ.applyMatrix4(A)}if(M>0){const A=W(M),$=new n.Matrix4().makeRotationAxis(d.localZ,A);d.localY.applyMatrix4($),d.localX.applyMatrix4($)}}}for(const c of _)c.length>1&&r.push(...c.slice(1));r.length<2&&r.push(new n.Vector3(0,.001,0));try{const c=new n.CatmullRomCurve3(r,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,r.length*4),a*G,18,!1);V.geometry.dispose(),V.geometry=u}catch(c){console.error("管件更新失败",c)}}function Ce(V,v,p,a=0){let m=V.slice(0,p+1);const b=V[p+1];if(b&&a>0){const d={...b,B:(b.B??0)*a,C:(b.C??0)*a};m.push(d)}const s=xe(m),g=Math.max(0,v-s),f=[];f.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,g*G,0);g>0&&f.push(w);let r={pos:w.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const y=[];for(let d=m.length-1;d>=0;d--){const _=m[d],c=ke(_);if(c.length>0){const u=c.map(h=>{const M=h.clone(),A=new n.Matrix4;return A.makeBasis(r.localX,r.localY,r.localZ),M.applyMatrix4(A),M.add(r.pos)});y.push(u);const k=u[u.length-1];r.pos=k.clone();const E=_.B??0,S=_.C??0;if(E!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(E));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(S>0){const h=W(S),M=new n.Matrix4().makeRotationAxis(r.localZ,h);r.localY.applyMatrix4(M),r.localX.applyMatrix4(M)}}}for(const d of y)d.length>1&&f.push(...d.slice(1));return f.length<2&&f.push(new n.Vector3(0,.001,0)),f}function Ne(V,v,p,a,m,b,s,g=0,f=0){const w=m-f,r=Ce(a,w,s,g);let d=Ce(p,f,s,g);d.forEach(c=>c.y=-c.y),d.reverse();const _=[...d,...r];try{const c=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,_.length*4),b*G,18,!1);v.geometry.dispose(),V.geometry.dispose(),v.parent&&v.parent.remove(v),V.geometry=u}catch(c){console.error("管件更新失败",c)}}const Re={class:"panel-content"},Be={class:"action-bar"},Ae={class:"animation-controls"},$e={class:"control-row"},Fe={class:"control-row"},ze={class:"frame-info"},Ye={class:"control-row"},Le={class:"progress-bar"},Ue={class:"dialog-footer"},Ie=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},setup(V,{expose:v}){const p=V,a=e.ref(),m=e.ref();e.watch(()=>p.threeData,t=>{const l=t==null?void 0:t.data;m.value=l==null?void 0:l.type},{immediate:!0});const b=async()=>{let t={};m.value===ne.robotMode.SINGLE&&(t=await fe.fetchSingleRobotAnimationData()),m.value===ne.robotMode.DOUBLE&&(t=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:l=0,pipeRadius:o=0,clampLength:i=0,animationData:x}=t;S.value=l,h.value=o,M.value=i,a.value=x;const N=R.cloneDeep(a.value),J=re(Y.value),X=(N==null?void 0:N["输出(动画数据)"])||[];s.value=X.length?X:[J]},s=e.ref([]),g=e.ref(!1),f=e.ref(""),w=e.ref(!1),r=e.ref(0),y=e.ref(0),d=e.ref(1e3);let _=!1;const c=e.ref(null),u=e.shallowRef(null),k=e.shallowRef(null),E=e.shallowRef(null),S=e.ref(0),h=e.ref(12.5),M=e.ref(30),A=e.ref([]),$=e.ref(null),L=e.computed(()=>p.model?ie.getNonFixedJoints(p.model).map(o=>o.name):[]),q=e.ref(["Y","B","C","R"]),Y=e.computed(()=>[...L.value,...q.value]),ce=e.computed(()=>Y.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${Y.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),ae=()=>s.value.map(t=>({Y:parseFloat(t.Y)||0,B:parseFloat(t.B)||0,C:parseFloat(t.C)||0,R:parseFloat(t.R)||0})),K=()=>{const t=[],l=[];return s.value.forEach(o=>{const{Y1:i,B1:x,C1:N,R1:J,Y2:X,B2:oe,C2:de,R2:D}=o;t.push({Y:parseFloat(i)||0,B:parseFloat(x)||0,C:parseFloat(N)||0,R:parseFloat(J)||0}),l.push({Y:parseFloat(X)||0,B:parseFloat(oe)||0,C:parseFloat(de)||0,R:parseFloat(D)||0})}),{posPipeYbcr:t,negPipeYbcr:l}},T=(t=0,l=0)=>{if(u.value&&k.value){const o=K();Ne(u.value,k.value,o.posPipeYbcr,o.negPipeYbcr,S.value,h.value,t,l,M.value)}else if(u.value){const o=ae();_e(u.value,o,S.value,h.value,t,l)}},C=t=>{if(t<0||t>=s.value.length){console.error(`帧索引 ${t} 超出范围`);return}const l=s.value[t];if(console.log(`应用第 ${t} 帧数据 ${l}`),r.value=t,c.value){const o={};L.value.forEach(i=>{const x=parseFloat(l[i]);isNaN(x)||(o[i]=x)}),c.value.setJointAngles(o)}T(t,0)},U=async()=>{if(s.value.length===0){R.ElMessage.error("无法播放动画:无数据");return}if(!w.value){w.value=!0,_=!1,s.value.length-1===r.value&&(r.value=0);try{for(let t=r.value+1;t<s.value.length&&!_;t++){r.value=t;const l=s.value[t],o={};c.value&&L.value.forEach(i=>{const x=parseFloat(l[i]);isNaN(x)||(o[i]=x)}),c.value?await c.value.animateToState(o,d.value,i=>{y.value=(t+i)/s.value.length*100,T(t-1,i)}):(await new Promise(i=>setTimeout(i,d.value)),y.value=(t+1)/s.value.length*100)}_||R.ElMessage.success("动画播放完成")}catch(t){console.error("动画播放出错:",t),R.ElMessage.error("动画播放出错")}finally{w.value=!1,y.value=0}}},F=()=>{_=!0,w.value=!1,y.value=0,R.ElMessage.info("动画已停止")},I=()=>{r.value=0},z=()=>{if(u.value&&k.value){const t=K();Ne(u.value,k.value,t.posPipeYbcr,t.negPipeYbcr,S.value,h.value,-1,0,M.value)}else if(u.value){const t=ae();_e(u.value,t,S.value,h.value,-1,0)}},Z=()=>{c.value&&c.value.resetToZero(),z(),I(),R.ElMessage.success("机器人和管件已重置")},O=t=>`第 ${t+1} 帧`,j=t=>{w.value&&F(),C(t)},Q=()=>{w.value&&F(),!(r.value+1>=s.value.length)&&C(r.value+1)},P=()=>{w.value&&F(),r.value!==0&&C(r.value-1)},H=()=>{E.value&&(E.value.visible=!0),u.value&&u.value.parent&&u.value.parent.remove(u.value),E.value=null,u.value=null,k.value=null},re=t=>t==null?void 0:t.reduce((l,o)=>(l[o]="0",l),{});e.watch(Y,(t,l)=>{if(JSON.stringify(t)!==JSON.stringify(l))if(t.length>0){const o=re(t);s.value=[o]}else s.value=[]},{immediate:!0});const ee=e.ref(0),ue=t=>{ee.value=t},he=(t,l)=>{if(!t||!l)return;const o=ie.getTargetJoint(t,l),i=Te();i.visible=!1,o==null||o.add(i)},ge=t=>{c.value=new ve.URDFRobotController(t),A.value=ie.getAllLinkName(t),$.value="Pipe_Joint"},te=()=>{c.value=null,A.value=[],$.value=null},se=t=>{ge(t),he(t,$.value),ue(ee.value+1),Z()};e.watch(()=>p.model,t=>{if(H(),t){se(t);return}te()},{immediate:!0});const me=t=>{var o,i;const l=new n.Mesh(t.geometry.clone(),t.material);return l.name="managed_pipe_clone",(i=(o=t==null?void 0:t.parent)==null?void 0:o.add)==null||i.call(o,l),l.position.copy(t.position),l.rotation.copy(t.rotation),l.scale.copy(t.scale),l};e.watch([$,M,S,ee],([t,l])=>{if(H(),p.model&&t){const o=ie.getMeshFromJoint(p.model,t);if(console.log(o,"meshToReplace"),o&&o.parent){E.value=o,o.visible=!1;const i=me(o);if(m.value===ne.robotMode.SINGLE&&(i.position.y-=l*.001),u.value=i,m.value===ne.robotMode.DOUBLE){const x=me(o);k.value=x}T(0,0)}else t&&console.warn(`在 link '${t}' 中未找到可替换的网格或其没有父级。`)}});const Ve=async()=>{if(Y.value.length===0){R.ElMessage.warning("没有可导出的表头");return}const t=Y.value.join(" ");try{await navigator.clipboard.writeText(t),R.ElMessage.success("表头已成功复制到剪贴板!")}catch(l){console.error("复制失败:",l),R.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},be=()=>{if(!f.value.trim()){R.ElMessage.warning("导入内容不能为空");return}const t=f.value.trim().split(`
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, createElementBlock as x, openBlock as g, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, withCtx as le, shallowRef as te, onMounted as Me, nextTick as me, onBeforeUnmount as Ee, withDirectives as I, vShow as W, unref as z, renderSlot as ve, createBlock as de } from "vue";
2
- import { s as pe } from "./threeViewerHost-lZhmjlZP.js";
3
- import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-C0xSkmDm.js";
4
- import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-D8Rj2vkl.js";
2
+ import { s as pe } from "./threeViewerHost-BP1lE3em.js";
3
+ import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-BW4pTt1q.js";
4
+ import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-DwhZVbj9.js";
5
5
  import { c as Ke, E as _ } from "./index-7MBVUN82.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D0rkC1Yq.js";
7
7
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
8
- import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-BiDHH7nr.js";
8
+ import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-D1L8ToXk.js";
9
9
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { T as y } from "./svgIcon-D-_fXUBL.js";
11
- import { i as at } from "./animationData-BS1KOggN.js";
12
- import { O as ot } from "./MTLLoader-C60D0af6.js";
11
+ import { i as at } from "./animationData-C9cYzIy2.js";
12
+ import { O as ot } from "./MTLLoader-BeGEKyl0.js";
13
13
  const st = { class: "panel-content" }, it = {
14
14
  key: 0,
15
15
  class: "animation-controls"
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-C2KsZZYX.cjs"),q=require("./iconfont-DFcKl5Tl.cjs"),J=require("./workpieceTreePanel-BY2EF3ND.cjs"),f=require("./index-DOItJqcJ.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkIBFS4N.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-C3E13Tqr.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./svgIcon-CUM54R6L.cjs"),Ce=require("./animationData-DAhPTTyV.cjs"),_e=require("./MTLLoader-BV5SUzmG.cjs"),we={class:"panel-content"},Se={key:0,class:"animation-controls"},Pe={class:"control-row"},Te={class:"control-row"},Be={class:"frame-info"},xe={class:"control-row"},ze={key:1,class:"empty-state"},De={class:"dialog-footer"},Le=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),g=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-DB8EVaN9.cjs"),q=require("./iconfont-BXXhBGTd.cjs"),J=require("./workpieceTreePanel-BUgxGB3s.cjs"),f=require("./index-DOItJqcJ.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B6LzqMjV.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-B8eCGdSO.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./svgIcon-CUM54R6L.cjs"),Ce=require("./animationData-Dxpc8KPf.cjs"),_e=require("./MTLLoader-CSt_lM1a.cjs"),we={class:"panel-content"},Se={key:0,class:"animation-controls"},Pe={class:"control-row"},Te={class:"control-row"},Be={class:"frame-info"},xe={class:"control-row"},ze={key:1,class:"empty-state"},De={class:"dialog-footer"},Le=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),g=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${S.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),M=e.computed(()=>s.value[g.value]||{});e.watch(()=>y.model,o=>{o?(u.value=new J.URDFRobotController(o),V.value=U.getAllLinkName(o),g.value=0):(u.value=null,V.value=[])},{immediate:!0});const D=o=>{if(o<0||o>=s.value.length){console.error(`帧索引 ${o} 超出范围`);return}const n=s.value[o];if(u.value){const p={};N.value.forEach(k=>{const r=parseFloat(n[k]);isNaN(r)||(p[k]=r)}),u.value.setJointAngles(p)}g.value=o,w.value=s.value.length>1?o/(s.value.length-1)*100:100},L=async o=>{try{for(let n=g.value;n<s.value.length;n++){if(o!==c)return;const p=s.value[n],k={};if(u.value)N.value.forEach(r=>{const d=parseFloat(p[r]);isNaN(d)||(k[r]=d)}),await u.value.animateToState(k,b.value,r=>{o===c&&(w.value=(n+r)/s.value.length*100)});else{if(await new Promise(r=>setTimeout(r,b.value)),o!==c)return;w.value=(n+1)/s.value.length*100}g.value=n}o===c&&(f.ElMessage.success("动画播放完成"),i.value="stopped",w.value=100)}catch(n){console.error("动画播放出错:",n),f.ElMessage.error("动画播放出错"),i.value="stopped"}},B=()=>{if(s.value.length===0){f.ElMessage.error("无动画数据");return}i.value==="stopped"&&(g.value=0,D(0)),i.value="playing",c++,L(c),f.ElMessage.info("动画播放中")},$=()=>{i.value==="playing"&&(c++,i.value="paused",f.ElMessage.info("动画已暂停"))},R=()=>{c++,i.value="stopped",g.value=0,w.value=0,D(0),f.ElMessage.info("动画已停止并重置")},G=()=>{i.value==="playing"?$():B()},x=o=>{c++,i.value="paused",D(o)},X=()=>{if(!T.value.trim()){f.ElMessage.warning("导入内容不能为空");return}const o=T.value.trim().split(`
@@ -1,8 +1,8 @@
1
- import { defineComponent as ce, computed as U, ref as k, resolveComponent as j, createElementBlock as ee, openBlock as E, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as X, shallowRef as D, watch as je, onMounted as Ee, onBeforeUnmount as Xe, withDirectives as N, createCommentVNode as S, unref as A, renderSlot as ie, createBlock as le, vShow as Z, nextTick as Ye } from "vue";
2
- import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-C0xSkmDm.js";
3
- import { ak as O, av as Oe, c6 as Ge, b3 as qe, ah as te, b5 as ue, bh as fe, bn as Ke, b7 as We, bm as Je, bj as Re, bk as He, aF as Qe, c7 as Se } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js";
1
+ import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, createElementBlock as ee, openBlock as X, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as j, shallowRef as D, watch as Ee, onMounted as Xe, onBeforeUnmount as je, withDirectives as N, createCommentVNode as S, unref as A, renderSlot as ie, createBlock as le, vShow as Z, nextTick as Ye } from "vue";
2
+ import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-BW4pTt1q.js";
3
+ import { ak as O, av as Oe, c7 as Ge, b4 as qe, ah as te, b6 as ue, bi as fe, bo as Ke, b8 as We, bn as Je, bk as Re, bl as He, aF as Qe, c8 as Se } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D0rkC1Yq.js";
4
4
  import { E as B } from "./index-7MBVUN82.js";
5
- import { U as et, J as tt } from "./urdfTree-BiDHH7nr.js";
5
+ import { U as et, J as tt } from "./urdfTree-D1L8ToXk.js";
6
6
  import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  import { T as b } from "./svgIcon-D-_fXUBL.js";
8
8
  import { i as nt } from "./isString-D70CzuJZ.js";
@@ -91,8 +91,8 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
91
91
  return n({ playAnimation: v, stopAnimation: C, forwardFrame: _, backwardFrame: T, resetAnimationFrame: h, reset: async () => {
92
92
  await C(), h();
93
93
  } }), (g, y) => {
94
- const q = j("el-input-number"), K = j("el-form-item"), W = j("el-form"), J = j("el-slider");
95
- return E(), ee("div", it, [
94
+ const q = E("el-input-number"), K = E("el-form-item"), W = E("el-form"), J = E("el-slider");
95
+ return X(), ee("div", it, [
96
96
  d("div", lt, [
97
97
  d("div", rt, [
98
98
  p(W, {
@@ -122,7 +122,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
122
122
  ]),
123
123
  d("div", ct, [
124
124
  y[2] || (y[2] = d("label", null, "当前帧:", -1)),
125
- d("span", ut, X(s.value + 1) + " / " + X(l.value.length), 1)
125
+ d("span", ut, j(s.value + 1) + " / " + j(l.value.length), 1)
126
126
  ]),
127
127
  d("div", ft, [
128
128
  y[3] || (y[3] = d("label", null, "动画进度:", -1)),
@@ -297,7 +297,7 @@ function Vt(e, n) {
297
297
  const s = $t(n);
298
298
  return s.name = "轨迹路径", o.add(s), s;
299
299
  }
300
- function jt(e, n, o, a = 4, l = 50) {
300
+ function Et(e, n, o, a = 4, l = 50) {
301
301
  let t = 1 / 0, s = -1 / 0, r = 1 / 0, f = -1 / 0, c = 1 / 0, m = -1 / 0;
302
302
  for (let h = 0; h < e.length; h += 3) {
303
303
  const L = e[h], g = e[h + 1], y = e[h + 2];
@@ -306,7 +306,7 @@ function jt(e, n, o, a = 4, l = 50) {
306
306
  const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, P = Qe.degToRad(n.fov), _ = 2 * Math.tan(P / 2) * l, T = C / _ * o.domElement.height * (a / 4);
307
307
  return Math.min(0.4, T);
308
308
  }
309
- function Et(e) {
309
+ function Xt(e) {
310
310
  if (e.length % 3 !== 0)
311
311
  return console.error("points array length is not a multiple of 3:", e), null;
312
312
  const n = new ue();
@@ -323,17 +323,17 @@ function Et(e) {
323
323
  }), l = new He(n, a);
324
324
  return a.needsUpdate = !0, l;
325
325
  }
326
- function Xt(e, n) {
326
+ function jt(e, n) {
327
327
  if (!n)
328
328
  return;
329
329
  const { scene: o, camera: a, renderer: l, controls: t } = e();
330
330
  if (!o || !a || !l || !t)
331
331
  return;
332
- const s = Et(n);
332
+ const s = Xt(n);
333
333
  if (!s)
334
334
  return;
335
335
  s.name = "轨迹路径", o.add(s);
336
- const r = jt(n, a, l, 0.1, 50);
336
+ const r = Et(n, a, l, 0.1, 50);
337
337
  return s.material.size = r, s;
338
338
  }
339
339
  const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft" }, Nt = { class: "buttonGroup-left" }, Zt = { class: "buttonGroup-right" }, Bt = { class: "buttonGroup-bottom" }, It = { class: "left-panel" }, Ot = { class: "panel-header" }, Gt = { class: "panel-body" }, qt = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Jt = {
@@ -398,7 +398,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
398
398
  if (URL.revokeObjectURL(u), nt(V)) {
399
399
  Q.value = await Ut(V, n.trackFileType) || [];
400
400
  const z = Q.value;
401
- ke.value && (w.value = Vt(h, z)), (we.value || _e.value || x.value) && (w.value = Xt(h, z));
401
+ ke.value && (w.value = Vt(h, z)), (we.value || _e.value || x.value) && (w.value = jt(h, z));
402
402
  }
403
403
  }, Pe = async () => {
404
404
  var i, u;
@@ -406,7 +406,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
406
406
  }, ae = async (i) => {
407
407
  se(), await Ae(i), w.value && Ie(h, w.value), x.value && Pe();
408
408
  };
409
- je(() => oe.value, async (i) => {
409
+ Ee(() => oe.value, async (i) => {
410
410
  i && await ae(i);
411
411
  }, {
412
412
  immediate: !0,
@@ -437,17 +437,17 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
437
437
  Y && Y.disconnect(), M.value && pe(), se(), L();
438
438
  };
439
439
  let Y = null;
440
- return Ee(async () => {
440
+ return Xe(async () => {
441
441
  try {
442
442
  $e();
443
443
  } catch (i) {
444
444
  console.error("Three.js 初始化失败:", i), B.error("渲染引擎初始化失败!");
445
445
  }
446
- }), Xe(() => {
446
+ }), je(() => {
447
447
  Ve();
448
448
  }), (i, u) => {
449
- const V = j("el-scrollbar");
450
- return E(), ee("div", Yt, [
449
+ const V = E("el-scrollbar");
450
+ return X(), ee("div", Yt, [
451
451
  d("div", {
452
452
  ref_key: "threejsContainer",
453
453
  ref: o,
@@ -552,7 +552,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
552
552
  ]),
553
553
  N(d("div", It, [
554
554
  d("div", Ot, [
555
- d("span", null, X(r.value), 1),
555
+ d("span", null, j(r.value), 1),
556
556
  d("span", {
557
557
  class: "close",
558
558
  onClick: u[4] || (u[4] = (z) => s.value = !1)
@@ -561,11 +561,11 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
561
561
  d("div", Gt, [
562
562
  p(V, { height: "100%" }, {
563
563
  default: I(() => [
564
- r.value === "场景树" ? (E(), le(et, {
564
+ r.value === "场景树" ? (X(), le(et, {
565
565
  key: 0,
566
566
  model: m.value
567
567
  }, null, 8, ["model"])) : S("", !0),
568
- r.value === "剖面视图" ? (E(), le(Be, {
568
+ r.value === "剖面视图" ? (X(), le(Be, {
569
569
  key: 1,
570
570
  value: A(ne),
571
571
  onChange: be
@@ -579,7 +579,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
579
579
  ]),
580
580
  N(d("div", qt, [
581
581
  d("div", Kt, [
582
- d("span", null, X(c.value), 1),
582
+ d("span", null, j(c.value), 1),
583
583
  d("span", {
584
584
  class: "close",
585
585
  onClick: u[5] || (u[5] = (z) => f.value = !1)
@@ -607,9 +607,9 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
607
607
  ], 512), [
608
608
  [Z, f.value]
609
609
  ]),
610
- a.value ? (E(), ee("div", Jt, [
610
+ a.value ? (X(), ee("div", Jt, [
611
611
  u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
612
- d("p", null, X(l.value), 1)
612
+ d("p", null, j(l.value), 1)
613
613
  ])) : S("", !0)
614
614
  ]);
615
615
  };