ss-component-new 1.2.111 → 1.2.113

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 (97) hide show
  1. package/dist/{MTLLoader-hWX_D7j7.js → MTLLoader-CxvMDUe0.js} +1 -1
  2. package/dist/{MTLLoader-BgOTItOM.cjs → MTLLoader-DGjQiY9j.cjs} +1 -1
  3. package/dist/{OBJLoader-C3tq7BYe.cjs → OBJLoader-DJpc8vUj.cjs} +1 -1
  4. package/dist/{OBJLoader-BukOM4Nu.js → OBJLoader-qAJoaDam.js} +1 -1
  5. package/dist/{OrbitControls-jkIlFyOy.js → OrbitControls-BMEUSilq.js} +1 -1
  6. package/dist/{OrbitControls-DKRnuekm.cjs → OrbitControls-Y0_MwO63.cjs} +1 -1
  7. package/dist/{URDFLoader-VSdgVBcE.js → URDFLoader-DFaB1rOB.js} +97 -97
  8. package/dist/{URDFLoader-CX_gwIob.cjs → URDFLoader-z_OD751c.cjs} +1 -1
  9. package/dist/{animationData-B6OrW5p6.js → animationData-Clde34ha.js} +7 -7
  10. package/dist/{animationData-C7dHVqYg.cjs → animationData-DcdD2uXH.cjs} +1 -1
  11. package/dist/{array-B_QF2OoW.js → array-DdC5qADi.js} +1 -1
  12. package/dist/{array-BgZ91brz.cjs → array-DyI9Z7da.cjs} +1 -1
  13. package/dist/{iconfont-BgB-_U_6.js → iconfont-BXKkx1g6.js} +88 -88
  14. package/dist/iconfont-Bi9FnKuf.cjs +1 -0
  15. package/dist/{index-d_PGJZkK.js → index-4PVKlafX.js} +1 -1
  16. package/dist/{index-CT0ojXx1.cjs → index-6hYePeg5.cjs} +1 -1
  17. package/dist/{index-cgzu94nF.cjs → index-B1DG30Df.cjs} +1 -1
  18. package/dist/{index-azgr74so.js → index-B8eH4yd_.js} +1 -1
  19. package/dist/{index-CUKZC4Nj.js → index-BAvTpFlb.js} +1 -1
  20. package/dist/{index-CbzP4t5J.cjs → index-BDUgsfdc.cjs} +1 -1
  21. package/dist/{index-DkTkLUFp.js → index-BGYM_yzB.js} +1 -1
  22. package/dist/index-BUC9msP6.cjs +1 -0
  23. package/dist/{index-9Bq99VYB.cjs → index-BWdy2G65.cjs} +1 -1
  24. package/dist/{index-BOfis0vA.js → index-BZBOlP5a.js} +3 -3
  25. package/dist/{index-Bx40M9YE.js → index-BfVijxl4.js} +1 -1
  26. package/dist/{index-CcCFQb0J.cjs → index-BgMxvBrj.cjs} +1 -1
  27. package/dist/{index-BheoHyAf.cjs → index-BsyhUS4V.cjs} +1 -1
  28. package/dist/{index-B2-FEPjF.js → index-BxrVd7R_.js} +1 -1
  29. package/dist/{index-BcQjNx-Q.cjs → index-C5pOxrIu.cjs} +1 -1
  30. package/dist/{index-Co-G3YR2.cjs → index-C6VrMmAM.cjs} +1 -1
  31. package/dist/{index-Cyq0NQxD.js → index-CH7VgZsg.js} +4 -4
  32. package/dist/{index-DTM9dTrs.js → index-CKtVnHqz.js} +1 -1
  33. package/dist/{index-D4M6WyOm.js → index-CL-M8PGp.js} +3422 -3421
  34. package/dist/{index-BPP3Oi4x.js → index-CNyI4C5D.js} +4 -4
  35. package/dist/{index-ClqfqYxq.cjs → index-CWUgMjDD.cjs} +1 -1
  36. package/dist/{index-C1XnW8VT.cjs → index-CXPAg3zi.cjs} +1 -1
  37. package/dist/{index-DPGM3-ZE.js → index-Cag9EKDi.js} +9 -9
  38. package/dist/{index-BNGaTEx5.cjs → index-Ce63svvK.cjs} +1 -1
  39. package/dist/{index-Dll9lcYi.js → index-Cfh6xox2.js} +1 -1
  40. package/dist/{index-D-h6ztpZ.cjs → index-CoVIQ7yB.cjs} +1 -1
  41. package/dist/{index-ygHebc1d.js → index-CrLgmQwX.js} +16 -16
  42. package/dist/{index-DaMyMwHq.js → index-Ct7FxVrb.js} +1 -1
  43. package/dist/{index-BKWeM8bu.js → index-D2J4nD2U.js} +3 -3
  44. package/dist/{index-CCixZ8x2.cjs → index-D6gzqbUQ.cjs} +1 -1
  45. package/dist/{index-DQW-r04P.js → index-D7uWgp_G.js} +1 -1
  46. package/dist/{index-Cs6-4hum.js → index-DZ6iK-To.js} +2 -2
  47. package/dist/{index-B_CKxC0N.cjs → index-Ddk7mQP9.cjs} +1 -1
  48. package/dist/{index-DbDdlA5q.js → index-Ddl5YPaT.js} +7 -7
  49. package/dist/{index-BE67ZntN.js → index-Dn7a-X3Y.js} +2 -2
  50. package/dist/index-DnoDETkE.cjs +1 -0
  51. package/dist/{index-9ASTWGRl.cjs → index-DvR7fcc6.cjs} +1 -1
  52. package/dist/{index-i-fwIxhy.cjs → index-Dw15nvpm.cjs} +1 -1
  53. package/dist/{index-DalbUyWu.cjs → index-DyLovBRT.cjs} +1 -1
  54. package/dist/{index-Cjs5dfSY.cjs → index-Md9bylWp.cjs} +1 -1
  55. package/dist/{index-Bnhk2Wum.js → index-OXqTOaYL.js} +1 -1
  56. package/dist/{index-6kcPKvxJ.cjs → index-PGBtNsFS.cjs} +1 -1
  57. package/dist/{index-VMUoElNW.js → index-bNwKGgV2.js} +4 -4
  58. package/dist/{index-Cf1Y1Sze.cjs → index-lOzwjQZi.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BgpRnb6p.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D1CNkdop.js} +9 -9
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-cYS0o50W.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DzZjQSCB.cjs} +2 -2
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dgy71NC0.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DV9lk-8w.js} +22 -31
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-o8Cf7V1D.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eVz0Sp.cjs} +149 -149
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-D5E2HyCn.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Bo97w4bj.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-BEM7doEB.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Deyo5lI4.js} +4 -4
  65. package/dist/{index.vue_vue_type_style_index_1_lang-C6g1KtOz.cjs → index.vue_vue_type_style_index_1_lang-BwsR7epS.cjs} +1 -1
  66. package/dist/{index.vue_vue_type_style_index_1_lang-Cqs4qqQV.js → index.vue_vue_type_style_index_1_lang-Duqg1WtV.js} +4 -4
  67. package/dist/{loaderUtil-BFbM8t6R.js → loaderUtil-1wRb28no.js} +1 -1
  68. package/dist/{loaderUtil-DWuLgv1P.cjs → loaderUtil-Cq8QCp9W.cjs} +1 -1
  69. package/dist/{main-BlxcR1aO.js → main-5e5sWLUD.js} +3 -3
  70. package/dist/{main-BIJA7Oyr.cjs → main-CBFpUWMt.cjs} +1 -1
  71. package/dist/ss-component.cjs +1 -1
  72. package/dist/ss-component.css +1 -1
  73. package/dist/ss-component.js +9 -9
  74. package/dist/ss-component2.cjs +1 -1
  75. package/dist/ss-component2.js +10 -10
  76. package/dist/{threeModel-wFgYGhPU.cjs → threeModel-BbUQzHU5.cjs} +1 -1
  77. package/dist/{threeModel-B8-8TvnY.js → threeModel-BqpIaxlN.js} +4 -4
  78. package/dist/{threePreview-vuENkCyX.cjs → threePreview-Aib1ZmEj.cjs} +1 -1
  79. package/dist/{threePreview-BgJvhDAL.js → threePreview-B-BL8PZx.js} +4 -4
  80. package/dist/{threeSceneView-D18FzdLv.js → threeSceneView-BVK89QUf.js} +8 -8
  81. package/dist/{threeSceneView-B7qSJrwR.cjs → threeSceneView-CLF-6z2y.cjs} +1 -1
  82. package/dist/{threeSceneViewForCPMPIP-RT8liwZe.js → threeSceneViewForCPMPIP-BjV_TpZd.js} +7 -7
  83. package/dist/{threeSceneViewForCPMPIP-9yi6jiex.cjs → threeSceneViewForCPMPIP-wW_fS1HP.cjs} +1 -1
  84. package/dist/threeTrackPathView-BwlIgu4k.js +605 -0
  85. package/dist/threeTrackPathView-CjpKhUbd.cjs +1 -0
  86. package/dist/{threeViewerHost-DeU3hwnv.js → threeViewerHost-D3LMGTE2.js} +2 -2
  87. package/dist/{threeViewerHost-LpwVv2oj.cjs → threeViewerHost-EljVz9SK.cjs} +1 -1
  88. package/dist/{urdfTree-DLpxOUSk.js → urdfTree-C1_9e3Ka.js} +1 -1
  89. package/dist/{urdfTree-DE-KsOZc.cjs → urdfTree-W9sGK4ua.cjs} +1 -1
  90. package/dist/{workpieceTreePanel-D2M5yIk2.js → workpieceTreePanel-B5YNWinu.js} +47 -47
  91. package/dist/{workpieceTreePanel-D0Y23OeS.cjs → workpieceTreePanel-DrSgMdW9.cjs} +1 -1
  92. package/package.json +1 -1
  93. package/dist/iconfont-DU9A12zM.cjs +0 -1
  94. package/dist/index-B-6muHKY.cjs +0 -1
  95. package/dist/index-CRIDwb3u.cjs +0 -1
  96. package/dist/threeTrackPathView-DWGdVtPl.js +0 -1458
  97. package/dist/threeTrackPathView-cB27_BKX.cjs +0 -370
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as Be, ref as g, watch as ne, shallowRef as be, computed as ke, onUnmounted as Ie, resolveComponent as B, createElementBlock as Ve, openBlock as q, createElementVNode as c, createVNode as l, withCtx as R, createBlock as ye, createCommentVNode as Pe, unref as X, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as He, renderList as Ke, nextTick as Qe, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
- import { r as Te, s as Le } from "./threeViewerHost-DeU3hwnv.js";
3
- import { u as Ne, a as qe, b as et, C as tt } from "./iconfont-BgB-_U_6.js";
4
- import { U as lt, u as ot, a as at, W as nt } from "./workpieceTreePanel-D2M5yIk2.js";
2
+ import { r as Te, s as Le } from "./threeViewerHost-D3LMGTE2.js";
3
+ import { u as Ne, a as qe, b as et, C as tt } from "./iconfont-BXKkx1g6.js";
4
+ import { U as lt, u as ot, a as at, W as nt } from "./workpieceTreePanel-B5YNWinu.js";
5
5
  import { ah as st, c as it, E, aW as rt, aw as ct } from "./index-DIUrwul5.js";
6
- import { an as De, ao as xe, _ as V, al as H, am as ut, aK as pt, ac as Se, aL as dt, aM as mt, aN as vt, aO as ft, aP as gt, aQ as ht, aR as bt, aS as yt, ai as _t, aT as Ye, aU as wt, aV as Ct, aW as Pt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dgy71NC0.js";
6
+ import { an as De, ao as xe, _ as V, al as H, am as ut, aK as pt, ac as Se, aL as dt, aM as mt, aN as vt, aO as ft, aP as gt, aQ as ht, aR as bt, aS as yt, ai as _t, aT as Ye, aU as wt, aV as Ct, aW as Pt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DV9lk-8w.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-Cqs4qqQV.js";
9
+ import "./index.vue_vue_type_style_index_1_lang-Duqg1WtV.js";
10
10
  import "./index-_lg-jrRI.js";
11
11
  import "./index-AIq5wzuR.js";
12
- import { f as kt, a as xt, g as Rt, b as Mt } from "./animationData-B6OrW5p6.js";
13
- import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-DLpxOUSk.js";
12
+ import { f as kt, a as xt, g as Rt, b as Mt } from "./animationData-Clde34ha.js";
13
+ import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-C1_9e3Ka.js";
14
14
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { s as Ft } from "./index-B2-FEPjF.js";
15
+ import { s as Ft } from "./index-BxrVd7R_.js";
16
16
  import { T as z } 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-LpwVv2oj.cjs"),pe=require("./iconfont-DU9A12zM.cjs"),ve=require("./workpieceTreePanel-D0Y23OeS.cjs"),D=require("./index-C8qRkCgn.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-o8Cf7V1D.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-C6g1KtOz.cjs");require("./index-BIkQWptd.cjs");require("./index-DOCHgBta.cjs");const fe=require("./animationData-C7dHVqYg.cjs"),ie=require("./urdfTree-DE-KsOZc.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=require("./index-CT0ojXx1.cjs"),R=require("./svgIcon-CUM54R6L.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Ee(g=.005,m=64){const d=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),s=new n.TubeGeometry(d,m,g,16,!1),p=ye;return new n.Mesh(s,p)}const xe=g=>g.reduce((m,d)=>{let s=0;const p=d.Y??0,b=d.C??0,r=d.R??0;return p>0&&(s+=p),b>0&&r>0&&(s+=r*W(b)),m+s},0),ke=g=>{const m=[],d=g.Y??0,s=g.B??0,p=g.C??0,b=g.R??0,r={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(!d&&!p)return m;if(m.push(r.pos.clone()),s!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(s));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(d>0&&(r.pos.add(r.localY.clone().multiplyScalar(d*G)),m.push(r.pos.clone())),p>0&&b>0){const h=W(p),v=b*G,w=r.pos.clone().add(r.localX.clone().multiplyScalar(-v)),a=Math.max(16,Math.ceil(p/5));for(let y=1;y<=a;y++){const u=h*y/a,_=new n.Matrix4().makeRotationAxis(r.localZ,u),c=r.localX.clone().multiplyScalar(v).applyMatrix4(_),x=w.clone().add(c);m.push(x)}}return m};function Te(g,m){const d=new n.Group;d.name="CompletePipe";const s={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 p=0,b=1;for(let r=0;r<g.length;r++){const h=g[r],v=h.Y??0,w=h.B??0,a=h.C??0,y=h.R??0;if(w!==0){const u=new n.Matrix4().makeRotationAxis(s.localY,W(w));s.localX.applyMatrix4(u),s.localZ.applyMatrix4(u)}if(v>0){const u=s.pos.clone();s.pos.add(s.localY.clone().multiplyScalar(v*G));const _=s.pos.clone(),i=Pe(u,_,m*G);i.userData={segmentType:"straight",segmentIndex:p,frameIndex:r,length:v,frame:{Y:v,B:w,C:a,R:y}},i.name=`直段_${p}`,d.add(i);const c=u.clone();Se(d,b,c,m*G),p++}if(a>0&&y>0){const u=W(a),_=y*G,i=[];i.push(s.pos.clone());const c=s.pos.clone().add(s.localX.clone().multiplyScalar(-_)),x=Math.max(16,Math.ceil(a/5));for(let f=1;f<=x;f++){const k=u*f/x,B=new n.Matrix4().makeRotationAxis(s.localZ,k),L=s.localX.clone().multiplyScalar(_).applyMatrix4(B),q=c.clone().add(L);i.push(q)}const E=De(i,m*G);E.userData={segmentType:"bend",segmentIndex:p,frameIndex:r,angle:a,radius:y,centerPoint:c.toArray(),frame:{Y:v,B:w,C:a,R:y}},E.name=`弯段_${p}`,d.add(E),Math.floor(i.length/2),i[0],s.pos=i[i.length-1].clone();const T=new n.Matrix4().makeRotationAxis(s.localZ,u);s.localY.applyMatrix4(T),s.localX.applyMatrix4(T),p++,b++}}return d}function Se(g,m,d,s){const p=new n.Vector3(0,s*2,s*5),b=d.clone().add(p),r=[d,b],h=new n.BufferGeometry().setFromPoints(r),v=new n.LineDashedMaterial({color:16711680,dashSize:s*.5,gapSize:s*.3,linewidth:1}),w=new n.Line(h,v);w.computeLineDistances(),g.add(w);const a=document.createElement("canvas"),y=a.getContext("2d");a.width=128,a.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(m.toString(),64,64);const u=new n.CanvasTexture(a),_=new n.SpriteMaterial({map:u,transparent:!0,depthTest:!1,depthWrite:!1}),i=new n.Sprite(_),c=s*3;i.scale.set(c,c,1),i.position.copy(b),i.name=`Label_${m}`,i.userData={labelNumber:m},g.add(i)}function Pe(g,m,d){const s=new n.LineCurve3(g,m),p=new n.TubeGeometry(s,2,d,18,!1);return new n.Mesh(p,ye)}function De(g,m){const d=new n.CatmullRomCurve3(g,!1,"catmullrom",.01),s=new n.TubeGeometry(d,Math.max(16,g.length*2),m,18,!1);return new n.Mesh(s,ye)}function _e(g,m,d,s,p,b=0){let r=m.slice(0,p+1);const h=m[p+1];if(h&&b>0){const i={...h,B:(h.B??0)*b,C:(h.C??0)*b};r.push(i)}const v=xe(r),w=Math.max(0,d-v),a=[];a.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&a.push(y);let u={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 i=r.length-1;i>=0;i--){const c=r[i],x=ke(c);if(x.length>0){const E=x.map(B=>{const A=B.clone(),L=new n.Matrix4;return L.makeBasis(u.localX,u.localY,u.localZ),A.applyMatrix4(L),A.add(u.pos)});_.push(E);const T=E[E.length-1];u.pos=T.clone();const f=c.B??0,k=c.C??0;if(f!==0){const B=new n.Matrix4().makeRotationAxis(u.localY,W(f));u.localX.applyMatrix4(B),u.localZ.applyMatrix4(B)}if(k>0){const B=W(k),A=new n.Matrix4().makeRotationAxis(u.localZ,B);u.localY.applyMatrix4(A),u.localX.applyMatrix4(A)}}}for(const i of _)i.length>1&&a.push(...i.slice(1));a.length<2&&a.push(new n.Vector3(0,.001,0));try{const i=new n.CatmullRomCurve3(a,!1,"catmullrom",.01),c=new n.TubeGeometry(i,Math.max(2,a.length*4),s*G,18,!1);g.geometry.dispose(),g.geometry=c}catch(i){console.error("管件更新失败",i)}}function Ce(g,m,d,s=0){let p=g.slice(0,d+1);const b=g[d+1];if(b&&s>0){const u={...b,B:(b.B??0)*s,C:(b.C??0)*s};p.push(u)}const r=xe(p),h=Math.max(0,m-r),v=[];v.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,h*G,0);h>0&&v.push(w);let a={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 u=p.length-1;u>=0;u--){const _=p[u],i=ke(_);if(i.length>0){const c=i.map(f=>{const k=f.clone(),B=new n.Matrix4;return B.makeBasis(a.localX,a.localY,a.localZ),k.applyMatrix4(B),k.add(a.pos)});y.push(c);const x=c[c.length-1];a.pos=x.clone();const E=_.B??0,T=_.C??0;if(E!==0){const f=new n.Matrix4().makeRotationAxis(a.localY,W(E));a.localX.applyMatrix4(f),a.localZ.applyMatrix4(f)}if(T>0){const f=W(T),k=new n.Matrix4().makeRotationAxis(a.localZ,f);a.localY.applyMatrix4(k),a.localX.applyMatrix4(k)}}}for(const u of y)u.length>1&&v.push(...u.slice(1));return v.length<2&&v.push(new n.Vector3(0,.001,0)),v}function Ne(g,m,d,s,p,b,r,h=0,v=0){const w=p-v,a=Ce(s,w,r,h);let u=Ce(d,v,r,h);u.forEach(i=>i.y=-i.y),u.reverse();const _=[...u,...a];try{const i=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),c=new n.TubeGeometry(i,Math.max(2,_.length*4),b*G,18,!1);m.geometry.dispose(),g.geometry.dispose(),m.parent&&m.parent.remove(m),g.geometry=c}catch(i){console.error("管件更新失败",i)}}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(g,{expose:m}){const d=g,s=e.ref(),p=e.ref();e.watch(()=>d.threeData,o=>{const t=o==null?void 0:o.data;p.value=t==null?void 0:t.type},{immediate:!0});const b=async()=>{let o={};p.value===ne.robotMode.SINGLE&&(o=await fe.fetchSingleRobotAnimationData()),p.value===ne.robotMode.DOUBLE&&(o=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:t=0,pipeRadius:l=0,clampLength:V=0,animationData:C}=o;T.value=t,f.value=l,k.value=V,s.value=C;const $=D.cloneDeep(s.value),J=re(Y.value),X=($==null?void 0:$["输出(动画数据)"])||[];r.value=X.length?X:[J]},r=e.ref([]),h=e.ref(!1),v=e.ref(""),w=e.ref(!1),a=e.ref(0),y=e.ref(0),u=e.ref(1e3);let _=!1;const i=e.ref(null),c=e.shallowRef(null),x=e.shallowRef(null),E=e.shallowRef(null),T=e.ref(0),f=e.ref(12.5),k=e.ref(30),B=e.ref([]),A=e.ref(null),L=e.computed(()=>d.model?ie.getNonFixedJoints(d.model).map(l=>l.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-EljVz9SK.cjs"),pe=require("./iconfont-Bi9FnKuf.cjs"),ve=require("./workpieceTreePanel-DrSgMdW9.cjs"),D=require("./index-C8qRkCgn.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eVz0Sp.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-BwsR7epS.cjs");require("./index-BIkQWptd.cjs");require("./index-DOCHgBta.cjs");const fe=require("./animationData-DcdD2uXH.cjs"),ie=require("./urdfTree-W9sGK4ua.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Me=require("./index-6hYePeg5.cjs"),R=require("./svgIcon-CUM54R6L.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Ee(g=.005,m=64){const d=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),s=new n.TubeGeometry(d,m,g,16,!1),p=ye;return new n.Mesh(s,p)}const xe=g=>g.reduce((m,d)=>{let s=0;const p=d.Y??0,b=d.C??0,r=d.R??0;return p>0&&(s+=p),b>0&&r>0&&(s+=r*W(b)),m+s},0),ke=g=>{const m=[],d=g.Y??0,s=g.B??0,p=g.C??0,b=g.R??0,r={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(!d&&!p)return m;if(m.push(r.pos.clone()),s!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(s));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(d>0&&(r.pos.add(r.localY.clone().multiplyScalar(d*G)),m.push(r.pos.clone())),p>0&&b>0){const h=W(p),v=b*G,w=r.pos.clone().add(r.localX.clone().multiplyScalar(-v)),a=Math.max(16,Math.ceil(p/5));for(let y=1;y<=a;y++){const u=h*y/a,_=new n.Matrix4().makeRotationAxis(r.localZ,u),c=r.localX.clone().multiplyScalar(v).applyMatrix4(_),x=w.clone().add(c);m.push(x)}}return m};function Te(g,m){const d=new n.Group;d.name="CompletePipe";const s={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 p=0,b=1;for(let r=0;r<g.length;r++){const h=g[r],v=h.Y??0,w=h.B??0,a=h.C??0,y=h.R??0;if(w!==0){const u=new n.Matrix4().makeRotationAxis(s.localY,W(w));s.localX.applyMatrix4(u),s.localZ.applyMatrix4(u)}if(v>0){const u=s.pos.clone();s.pos.add(s.localY.clone().multiplyScalar(v*G));const _=s.pos.clone(),i=Pe(u,_,m*G);i.userData={segmentType:"straight",segmentIndex:p,frameIndex:r,length:v,frame:{Y:v,B:w,C:a,R:y}},i.name=`直段_${p}`,d.add(i);const c=u.clone();Se(d,b,c,m*G),p++}if(a>0&&y>0){const u=W(a),_=y*G,i=[];i.push(s.pos.clone());const c=s.pos.clone().add(s.localX.clone().multiplyScalar(-_)),x=Math.max(16,Math.ceil(a/5));for(let f=1;f<=x;f++){const k=u*f/x,B=new n.Matrix4().makeRotationAxis(s.localZ,k),L=s.localX.clone().multiplyScalar(_).applyMatrix4(B),q=c.clone().add(L);i.push(q)}const E=De(i,m*G);E.userData={segmentType:"bend",segmentIndex:p,frameIndex:r,angle:a,radius:y,centerPoint:c.toArray(),frame:{Y:v,B:w,C:a,R:y}},E.name=`弯段_${p}`,d.add(E),Math.floor(i.length/2),i[0],s.pos=i[i.length-1].clone();const T=new n.Matrix4().makeRotationAxis(s.localZ,u);s.localY.applyMatrix4(T),s.localX.applyMatrix4(T),p++,b++}}return d}function Se(g,m,d,s){const p=new n.Vector3(0,s*2,s*5),b=d.clone().add(p),r=[d,b],h=new n.BufferGeometry().setFromPoints(r),v=new n.LineDashedMaterial({color:16711680,dashSize:s*.5,gapSize:s*.3,linewidth:1}),w=new n.Line(h,v);w.computeLineDistances(),g.add(w);const a=document.createElement("canvas"),y=a.getContext("2d");a.width=128,a.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(m.toString(),64,64);const u=new n.CanvasTexture(a),_=new n.SpriteMaterial({map:u,transparent:!0,depthTest:!1,depthWrite:!1}),i=new n.Sprite(_),c=s*3;i.scale.set(c,c,1),i.position.copy(b),i.name=`Label_${m}`,i.userData={labelNumber:m},g.add(i)}function Pe(g,m,d){const s=new n.LineCurve3(g,m),p=new n.TubeGeometry(s,2,d,18,!1);return new n.Mesh(p,ye)}function De(g,m){const d=new n.CatmullRomCurve3(g,!1,"catmullrom",.01),s=new n.TubeGeometry(d,Math.max(16,g.length*2),m,18,!1);return new n.Mesh(s,ye)}function _e(g,m,d,s,p,b=0){let r=m.slice(0,p+1);const h=m[p+1];if(h&&b>0){const i={...h,B:(h.B??0)*b,C:(h.C??0)*b};r.push(i)}const v=xe(r),w=Math.max(0,d-v),a=[];a.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&a.push(y);let u={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 i=r.length-1;i>=0;i--){const c=r[i],x=ke(c);if(x.length>0){const E=x.map(B=>{const A=B.clone(),L=new n.Matrix4;return L.makeBasis(u.localX,u.localY,u.localZ),A.applyMatrix4(L),A.add(u.pos)});_.push(E);const T=E[E.length-1];u.pos=T.clone();const f=c.B??0,k=c.C??0;if(f!==0){const B=new n.Matrix4().makeRotationAxis(u.localY,W(f));u.localX.applyMatrix4(B),u.localZ.applyMatrix4(B)}if(k>0){const B=W(k),A=new n.Matrix4().makeRotationAxis(u.localZ,B);u.localY.applyMatrix4(A),u.localX.applyMatrix4(A)}}}for(const i of _)i.length>1&&a.push(...i.slice(1));a.length<2&&a.push(new n.Vector3(0,.001,0));try{const i=new n.CatmullRomCurve3(a,!1,"catmullrom",.01),c=new n.TubeGeometry(i,Math.max(2,a.length*4),s*G,18,!1);g.geometry.dispose(),g.geometry=c}catch(i){console.error("管件更新失败",i)}}function Ce(g,m,d,s=0){let p=g.slice(0,d+1);const b=g[d+1];if(b&&s>0){const u={...b,B:(b.B??0)*s,C:(b.C??0)*s};p.push(u)}const r=xe(p),h=Math.max(0,m-r),v=[];v.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,h*G,0);h>0&&v.push(w);let a={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 u=p.length-1;u>=0;u--){const _=p[u],i=ke(_);if(i.length>0){const c=i.map(f=>{const k=f.clone(),B=new n.Matrix4;return B.makeBasis(a.localX,a.localY,a.localZ),k.applyMatrix4(B),k.add(a.pos)});y.push(c);const x=c[c.length-1];a.pos=x.clone();const E=_.B??0,T=_.C??0;if(E!==0){const f=new n.Matrix4().makeRotationAxis(a.localY,W(E));a.localX.applyMatrix4(f),a.localZ.applyMatrix4(f)}if(T>0){const f=W(T),k=new n.Matrix4().makeRotationAxis(a.localZ,f);a.localY.applyMatrix4(k),a.localX.applyMatrix4(k)}}}for(const u of y)u.length>1&&v.push(...u.slice(1));return v.length<2&&v.push(new n.Vector3(0,.001,0)),v}function Ne(g,m,d,s,p,b,r,h=0,v=0){const w=p-v,a=Ce(s,w,r,h);let u=Ce(d,v,r,h);u.forEach(i=>i.y=-i.y),u.reverse();const _=[...u,...a];try{const i=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),c=new n.TubeGeometry(i,Math.max(2,_.length*4),b*G,18,!1);m.geometry.dispose(),g.geometry.dispose(),m.parent&&m.parent.remove(m),g.geometry=c}catch(i){console.error("管件更新失败",i)}}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(g,{expose:m}){const d=g,s=e.ref(),p=e.ref();e.watch(()=>d.threeData,o=>{const t=o==null?void 0:o.data;p.value=t==null?void 0:t.type},{immediate:!0});const b=async()=>{let o={};p.value===ne.robotMode.SINGLE&&(o=await fe.fetchSingleRobotAnimationData()),p.value===ne.robotMode.DOUBLE&&(o=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:t=0,pipeRadius:l=0,clampLength:V=0,animationData:C}=o;T.value=t,f.value=l,k.value=V,s.value=C;const $=D.cloneDeep(s.value),J=re(Y.value),X=($==null?void 0:$["输出(动画数据)"])||[];r.value=X.length?X:[J]},r=e.ref([]),h=e.ref(!1),v=e.ref(""),w=e.ref(!1),a=e.ref(0),y=e.ref(0),u=e.ref(1e3);let _=!1;const i=e.ref(null),c=e.shallowRef(null),x=e.shallowRef(null),E=e.shallowRef(null),T=e.ref(0),f=e.ref(12.5),k=e.ref(30),B=e.ref([]),A=e.ref(null),L=e.computed(()=>d.model?ie.getNonFixedJoints(d.model).map(l=>l.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=()=>r.value.map(o=>({Y:parseFloat(o.Y)||0,B:parseFloat(o.B)||0,C:parseFloat(o.C)||0,R:parseFloat(o.R)||0})),K=()=>{const o=[],t=[];return r.value.forEach(l=>{const{Y1:V,B1:C,C1:$,R1:J,Y2:X,B2:oe,C2:de,R2:P}=l;o.push({Y:parseFloat(V)||0,B:parseFloat(C)||0,C:parseFloat($)||0,R:parseFloat(J)||0}),t.push({Y:parseFloat(X)||0,B:parseFloat(oe)||0,C:parseFloat(de)||0,R:parseFloat(P)||0})}),{posPipeYbcr:o,negPipeYbcr:t}},M=(o=0,t=0)=>{if(c.value&&x.value){const l=K();Ne(c.value,x.value,l.posPipeYbcr,l.negPipeYbcr,T.value,f.value,o,t,k.value)}else if(c.value){const l=ae();_e(c.value,l,T.value,f.value,o,t)}},N=o=>{if(o<0||o>=r.value.length){console.error(`帧索引 ${o} 超出范围`);return}const t=r.value[o];if(console.log(`应用第 ${o} 帧数据 ${t}`),a.value=o,i.value){const l={};L.value.forEach(V=>{const C=parseFloat(t[V]);isNaN(C)||(l[V]=C)}),i.value.setJointAngles(l)}M(o,0)},U=async()=>{if(r.value.length===0){D.ElMessage.error("无法播放动画:无数据");return}if(!w.value){w.value=!0,_=!1,r.value.length-1===a.value&&(a.value=0);try{for(let o=a.value+1;o<r.value.length&&!_;o++){a.value=o;const t=r.value[o],l={};i.value&&L.value.forEach(V=>{const C=parseFloat(t[V]);isNaN(C)||(l[V]=C)}),i.value?await i.value.animateToState(l,u.value,V=>{y.value=(o+V)/r.value.length*100,M(o-1,V)}):(await new Promise(V=>setTimeout(V,u.value)),y.value=(o+1)/r.value.length*100)}_||D.ElMessage.success("动画播放完成")}catch(o){console.error("动画播放出错:",o),D.ElMessage.error("动画播放出错")}finally{w.value=!1,y.value=0}}},F=()=>{_=!0,w.value=!1,y.value=0,D.ElMessage.info("动画已停止")},I=()=>{a.value=0},z=()=>{if(c.value&&x.value){const o=K();Ne(c.value,x.value,o.posPipeYbcr,o.negPipeYbcr,T.value,f.value,-1,0,k.value)}else if(c.value){const o=ae();_e(c.value,o,T.value,f.value,-1,0)}},Z=()=>{i.value&&i.value.resetToZero(),z(),I(),D.ElMessage.success("机器人和管件已重置")},O=o=>`第 ${o+1} 帧`,j=o=>{w.value&&F(),N(o)},Q=()=>{w.value&&F(),!(a.value+1>=r.value.length)&&N(a.value+1)},S=()=>{w.value&&F(),a.value!==0&&N(a.value-1)},H=()=>{E.value&&(E.value.visible=!0),c.value&&c.value.parent&&c.value.parent.remove(c.value),E.value=null,c.value=null,x.value=null},re=o=>o==null?void 0:o.reduce((t,l)=>(t[l]="0",t),{});e.watch(Y,(o,t)=>{if(JSON.stringify(o)!==JSON.stringify(t))if(o.length>0){const l=re(o);r.value=[l]}else r.value=[]},{immediate:!0});const ee=e.ref(0),ue=o=>{ee.value=o},he=(o,t)=>{if(!o||!t)return;const l=ie.getTargetJoint(o,t),V=Ee();V.visible=!1,l==null||l.add(V)},ge=o=>{i.value=new ve.URDFRobotController(o),B.value=ie.getAllLinkName(o),A.value="Pipe_Joint"},te=()=>{i.value=null,B.value=[],A.value=null},se=o=>{ge(o),he(o,A.value),ue(ee.value+1),Z()};e.watch(()=>d.model,o=>{if(H(),o){se(o);return}te()},{immediate:!0});const me=o=>{var l,V;const t=new n.Mesh(o.geometry.clone(),o.material);return t.name="managed_pipe_clone",(V=(l=o==null?void 0:o.parent)==null?void 0:l.add)==null||V.call(l,t),t.position.copy(o.position),t.rotation.copy(o.rotation),t.scale.copy(o.scale),t};e.watch([A,k,T,ee],([o,t])=>{if(H(),d.model&&o){const l=ie.getMeshFromJoint(d.model,o);if(console.log(l,"meshToReplace"),l&&l.parent){E.value=l,l.visible=!1;const V=me(l);if(p.value===ne.robotMode.SINGLE&&(V.position.y-=t*.001),c.value=V,p.value===ne.robotMode.DOUBLE){const C=me(l);x.value=C}M(0,0)}else o&&console.warn(`在 link '${o}' 中未找到可替换的网格或其没有父级。`)}});const Ve=async()=>{if(Y.value.length===0){D.ElMessage.warning("没有可导出的表头");return}const o=Y.value.join(" ");try{await navigator.clipboard.writeText(o),D.ElMessage.success("表头已成功复制到剪贴板!")}catch(t){console.error("复制失败:",t),D.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},be=()=>{if(!v.value.trim()){D.ElMessage.warning("导入内容不能为空");return}const o=v.value.trim().split(`
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as fe, ref as r, computed as k, watch as X, onUnmounted as Re, resolveComponent as M, createElementBlock as x, openBlock as g, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as $, Fragment as Oe, renderList as De, withCtx as le, shallowRef as te, onMounted as Be, nextTick as Ee, onBeforeUnmount as Je, withDirectives as I, vShow as W, unref as z, renderSlot as ce, createBlock as ve } from "vue";
2
- import { s as de } from "./threeViewerHost-DeU3hwnv.js";
3
- import { u as Me, a as Ge, b as He, C as Ie } from "./iconfont-BgB-_U_6.js";
4
- import { U as We, u as Xe, a as Ye, W as Ze } from "./workpieceTreePanel-D2M5yIk2.js";
2
+ import { s as de } from "./threeViewerHost-D3LMGTE2.js";
3
+ import { u as Me, a as Ge, b as He, C as Ie } from "./iconfont-BXKkx1g6.js";
4
+ import { U as We, u as Xe, a as Ye, W as Ze } from "./workpieceTreePanel-B5YNWinu.js";
5
5
  import { c as qe, E as _ } from "./index-DIUrwul5.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dgy71NC0.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DV9lk-8w.js";
7
7
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
8
- import { g as Ke, b as Qe, U as et, J as tt, d as lt } from "./urdfTree-DLpxOUSk.js";
8
+ import { g as Ke, b as Qe, U as et, J as tt, d as lt } from "./urdfTree-C1_9e3Ka.js";
9
9
  import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { T as y } from "./svgIcon-D-_fXUBL.js";
11
- import { i as nt } from "./animationData-B6OrW5p6.js";
12
- import { l as at } from "./loaderUtil-BFbM8t6R.js";
11
+ import { i as nt } from "./animationData-Clde34ha.js";
12
+ import { l as at } from "./loaderUtil-1wRb28no.js";
13
13
  const ot = { class: "panel-content" }, st = {
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"),Q=require("./threeViewerHost-LpwVv2oj.cjs"),q=require("./iconfont-DU9A12zM.cjs"),J=require("./workpieceTreePanel-D0Y23OeS.cjs"),p=require("./index-C8qRkCgn.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-o8Cf7V1D.cjs");const ee=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),L=require("./urdfTree-DE-KsOZc.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./svgIcon-CUM54R6L.cjs"),Ee=require("./animationData-C7dHVqYg.cjs"),Ce=require("./loaderUtil-DWuLgv1P.cjs"),_e={class:"panel-content"},we={key:0,class:"animation-controls"},Se={class:"control-row"},Pe={class:"control-row"},Te={class:"frame-info"},Be={class:"control-row"},xe={key:1,class:"empty-state"},ze={class:"dialog-footer"},De=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(j,{expose:f}){const k=j,s=e.ref([]),_=e.ref(!1),P=e.ref(""),v=e.ref("stopped"),g=e.ref(0),w=e.ref(0),V=e.ref(10),i=e.ref(null);let u=0;const b=e.ref([]),N=e.computed(()=>k.model?L.getNonFixedJoints(k.model).map(m=>m.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"),Q=require("./threeViewerHost-EljVz9SK.cjs"),q=require("./iconfont-Bi9FnKuf.cjs"),J=require("./workpieceTreePanel-DrSgMdW9.cjs"),p=require("./index-C8qRkCgn.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eVz0Sp.cjs");const ee=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),L=require("./urdfTree-W9sGK4ua.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./svgIcon-CUM54R6L.cjs"),Ee=require("./animationData-DcdD2uXH.cjs"),Ce=require("./loaderUtil-Cq8QCp9W.cjs"),_e={class:"panel-content"},we={key:0,class:"animation-controls"},Se={class:"control-row"},Pe={class:"control-row"},Te={class:"frame-info"},Be={class:"control-row"},xe={key:1,class:"empty-state"},ze={class:"dialog-footer"},De=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(j,{expose:f}){const k=j,s=e.ref([]),_=e.ref(!1),P=e.ref(""),v=e.ref("stopped"),g=e.ref(0),w=e.ref(0),V=e.ref(10),i=e.ref(null);let u=0;const b=e.ref([]),N=e.computed(()=>k.model?L.getNonFixedJoints(k.model).map(m=>m.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 ...`:"请先加载模型。"),$=e.computed(()=>s.value[g.value]||{});e.watch(()=>k.model,o=>{o?(i.value=new J.URDFRobotController(o),b.value=L.getAllLinkName(o),g.value=0):(i.value=null,b.value=[])},{immediate:!0});const z=o=>{if(o<0||o>=s.value.length){console.error(`帧索引 ${o} 超出范围`);return}const n=s.value[o];if(i.value){const m={};N.value.forEach(y=>{const r=parseFloat(n[y]);isNaN(r)||(m[y]=r)}),i.value.setJointAngles(m)}g.value=o,w.value=s.value.length>1?o/(s.value.length-1)*100:100},D=async o=>{try{for(let n=g.value;n<s.value.length;n++){if(o!==u)return;const m=s.value[n],y={};if(i.value)N.value.forEach(r=>{const c=parseFloat(m[r]);isNaN(c)||(y[r]=c)}),await i.value.animateToState(y,V.value,r=>{o===u&&(w.value=(n+r)/s.value.length*100)});else{if(await new Promise(r=>setTimeout(r,V.value)),o!==u)return;w.value=(n+1)/s.value.length*100}g.value=n}o===u&&(p.ElMessage.success("动画播放完成"),v.value="stopped",w.value=100)}catch(n){console.error("动画播放出错:",n),p.ElMessage.error("动画播放出错"),v.value="stopped"}},T=()=>{if(s.value.length===0){p.ElMessage.error("无动画数据");return}v.value==="stopped"&&(g.value=0,z(0)),v.value="playing",u++,D(u),p.ElMessage.info("动画播放中")},M=()=>{v.value==="playing"&&(u++,v.value="paused",p.ElMessage.info("动画已暂停"))},R=()=>{u++,v.value="stopped",g.value=0,w.value=0,z(0),p.ElMessage.info("动画已停止并重置")},F=()=>{v.value==="playing"?M():T()},B=o=>{u++,v.value="paused",z(o)},G=()=>{if(!P.value.trim()){p.ElMessage.warning("导入内容不能为空");return}const o=P.value.trim().split(`