ss-component-new 1.3.428 → 1.3.430

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 (107) hide show
  1. package/dist/{MTLLoader-DBXJU4gy.js → MTLLoader-D7sNoLcK.js} +1 -1
  2. package/dist/{MTLLoader-C1qSZuWT.cjs → MTLLoader-p0GsbA2N.cjs} +1 -1
  3. package/dist/{OrbitControls-BFwyCnTH.cjs → OrbitControls-BhtVNiz9.cjs} +1 -1
  4. package/dist/{OrbitControls-BK6rha_f.js → OrbitControls-xsAEcOQ0.js} +1 -1
  5. package/dist/{URDFLoader-CTaB1j6-.cjs → URDFLoader-DAb823an.cjs} +1 -1
  6. package/dist/{URDFLoader-B4rOIDHb.js → URDFLoader-OhWW6Ghz.js} +2 -2
  7. package/dist/{animationData-DugoMERO.cjs → animationData-CM85S6tn.cjs} +1 -1
  8. package/dist/{animationData-Bfdz_yNt.js → animationData-CZHPgZ5e.js} +3 -3
  9. package/dist/{array-BOctoevY.cjs → array-0RI_MV-5.cjs} +1 -1
  10. package/dist/{array-CtInsg0G.js → array-DeAl78t6.js} +84 -84
  11. package/dist/{clone-r23wXuC7.js → clone-BDsG8VVj.js} +1 -1
  12. package/dist/clone-D92QCGo2.cjs +1 -0
  13. package/dist/{iconfont-C4b-8B6C.js → iconfont-C5j4Td3D.js} +2 -2
  14. package/dist/{iconfont-B8J8hnDJ.cjs → iconfont-DvB947R2.cjs} +1 -1
  15. package/dist/{index-1tRX531i.cjs → index-4SWc85gj.cjs} +1 -1
  16. package/dist/index-8V0NHmW6.cjs +1 -0
  17. package/dist/{index-x-HWwt4p.js → index-9Fw7ND1N.js} +11 -11
  18. package/dist/{index-DQdcA8b0.cjs → index-B6e2oM-P.cjs} +1 -1
  19. package/dist/{index-Bn4g3hXz.cjs → index-B9MP9Z_h.cjs} +1 -1
  20. package/dist/{index-C9LONCdW.js → index-BEyBnEnd.js} +5 -5
  21. package/dist/{index-BWtc895B.js → index-BF5SUWUn.js} +1 -1
  22. package/dist/{index-rGJF9UJ9.js → index-BK-oz1IK.js} +1908 -1929
  23. package/dist/{index-BDClkBzq.cjs → index-BTfuvT7M.cjs} +1 -1
  24. package/dist/{index-D38qJHp0.js → index-BTgKT-Kp.js} +21 -21
  25. package/dist/{index-HHT3da7j.cjs → index-BpYkNRvs.cjs} +12 -12
  26. package/dist/{index-DzN70K91.js → index-C-rFa3VT.js} +1229 -1203
  27. package/dist/{index-N0L2zoGC.cjs → index-C09sw7CL.cjs} +1 -1
  28. package/dist/{index-Bu5lDLj_.cjs → index-C3JpBKyN.cjs} +1 -1
  29. package/dist/{index-CZly4koJ.js → index-CFiyfU1X.js} +36 -36
  30. package/dist/{index-D3lXIyot.cjs → index-CGaJRFh6.cjs} +1 -1
  31. package/dist/{index-Dbv6QX4e.js → index-CGqnKnrd.js} +2 -2
  32. package/dist/{index-B7H-5M2Y.cjs → index-CIMnUwEB.cjs} +1 -1
  33. package/dist/{index-6RECQqV8.js → index-CKsprVNa.js} +1 -1
  34. package/dist/{index-DaiB_qqV.cjs → index-CLLeUa5o.cjs} +1 -1
  35. package/dist/index-CWzVeyId.cjs +2 -0
  36. package/dist/{index-DhD0tnVr.cjs → index-CZuPznao.cjs} +1 -1
  37. package/dist/{index-CdsqSTRI.js → index-Ca_pqbsS.js} +20 -20
  38. package/dist/{index-CTkNgtX3.cjs → index-Call_60N.cjs} +1 -1
  39. package/dist/{index-CKCe1GPP.cjs → index-CljHDtk8.cjs} +1 -1
  40. package/dist/{index-BBr25gXh.js → index-D1U0qzcp.js} +4 -4
  41. package/dist/{index-B0HOwfWc.cjs → index-DCfi_waU.cjs} +1 -1
  42. package/dist/{index-BtWec77G.cjs → index-DDAEpzaB.cjs} +1 -1
  43. package/dist/{index-Bi1DonQa.js → index-DDK5gDem.js} +12 -12
  44. package/dist/{index-BIbJs6Kp.cjs → index-DM4iU2Ab.cjs} +1 -1
  45. package/dist/{index-CdGqaqYM.js → index-DO5zum3x.js} +2 -2
  46. package/dist/{index-BK6-AVLE.js → index-DQ94pBGZ.js} +339 -330
  47. package/dist/{index-H2suIBRd.js → index-DSKIm3im.js} +4 -4
  48. package/dist/{index-DlXwTcJ9.js → index-DTllcl_O.js} +2 -2
  49. package/dist/{index-DvbvoiZG.js → index-DU2dKJOK.js} +15 -15
  50. package/dist/{index-CtLw-tqJ.js → index-DbPbr5TD.js} +9840 -9754
  51. package/dist/{index-Dk-xbMrl.js → index-DgTbfgjE.js} +18 -18
  52. package/dist/index-Digv4Fyh.cjs +1 -0
  53. package/dist/{index-ss_5hS2p.js → index-DkA3dv5l.js} +1 -1
  54. package/dist/{index-DAZMn3y_.js → index-Dn7UEQUd.js} +1 -1
  55. package/dist/{index-BfK0dq3V.cjs → index-DoorIpTj.cjs} +1 -1
  56. package/dist/{index-CNRHr3kT.cjs → index-DqmyyzfP.cjs} +1 -1
  57. package/dist/{index-CnsDmHXo.cjs → index-DxPKykuA.cjs} +1 -1
  58. package/dist/{index-jDRNGigR.js → index-Dxs-F0xJ.js} +8 -8
  59. package/dist/{index-mDUckx7n.cjs → index-DyCQbiMc.cjs} +1 -1
  60. package/dist/index-Dz_V4Aef.cjs +26 -0
  61. package/dist/{index-DpRkYDKO.cjs → index-IGuY2Qp9.cjs} +1 -1
  62. package/dist/{index-TDwSq2BF.js → index-Lhh-KMx5.js} +2 -2
  63. package/dist/{index-DAfCxuFU.js → index-RF5qQdBY.js} +1 -1
  64. package/dist/{index-CJijEg9W.js → index-ToiCtVRE.js} +7 -7
  65. package/dist/{index-NSrMRasA.cjs → index-XVjZTSe1.cjs} +1 -1
  66. package/dist/{index-CeXLp3RG.js → index-YzkBsOrM.js} +4 -4
  67. package/dist/{index-mpH7L8Rm.js → index-fH3hPSMI.js} +41 -39
  68. package/dist/{index-C772JVG0.cjs → index-fh5hS-5q.cjs} +1 -1
  69. package/dist/{index-qhLt4UGH.cjs → index-ilXWn4_Y.cjs} +1 -1
  70. package/dist/index-p9kkXcpR.js +10841 -0
  71. package/dist/{index-DyHFsX8U.js → index-sl2ZbrIv.js} +1 -1
  72. package/dist/index-xN3pvlzo.cjs +18 -0
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bk-thOPD.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BGyDDkYS.cjs} +1 -1
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BUMDcqtn.js} +3 -3
  75. package/dist/{main-Dyv9tK3q.cjs → main-2_nRO_Yd.cjs} +1 -1
  76. package/dist/{main-BazhXMmW.js → main-hbDYKA6O.js} +4 -4
  77. package/dist/{menuIndex-B8QQIas4.cjs → menuIndex-8KYc1zS9.cjs} +1 -1
  78. package/dist/{menuIndex-qnbpFYeU.js → menuIndex-CPrSvY9F.js} +1 -1
  79. package/dist/ss-component.cjs +1 -1
  80. package/dist/ss-component.css +3 -3
  81. package/dist/ss-component.js +15 -15
  82. package/dist/ss-component2.cjs +1 -1
  83. package/dist/ss-component2.js +12 -12
  84. package/dist/{threeModel-CKvba3tD.js → threeModel-C1V8R9PI.js} +45 -45
  85. package/dist/{threeModel-BWwXtPBu.cjs → threeModel-z-ti4e5E.cjs} +1 -1
  86. package/dist/{threePreview-GizvH53S.js → threePreview-BoiGO8RT.js} +4 -4
  87. package/dist/{threePreview-CbKggw3I.cjs → threePreview-Bs-m2IAX.cjs} +1 -1
  88. package/dist/{threeSceneView-D6UJzKUj.js → threeSceneView-BCuH_gVn.js} +11 -11
  89. package/dist/{threeSceneView-CJnJdw2X.cjs → threeSceneView-CTHpWmwg.cjs} +1 -1
  90. package/dist/{threeSceneViewForCPMPIP-hUnAkwBg.cjs → threeSceneViewForCPMPIP-CsDzXB39.cjs} +1 -1
  91. package/dist/{threeSceneViewForCPMPIP-NCyWbrvb.js → threeSceneViewForCPMPIP-Dyb60cS_.js} +8 -8
  92. package/dist/{threeTrackPathView-DSHB2LWA.js → threeTrackPathView-C7MWmsr9.js} +4 -4
  93. package/dist/{threeTrackPathView-ZqSjOtFS.cjs → threeTrackPathView-DL3Fx1XR.cjs} +1 -1
  94. package/dist/{threeViewerHost-BEEjkIf3.js → threeViewerHost-2yySAP_2.js} +3 -3
  95. package/dist/{threeViewerHost-D0oJ3S3c.cjs → threeViewerHost-Bk3vNumJ.cjs} +1 -1
  96. package/dist/{urdfTree-DnkBJIj6.cjs → urdfTree-B1vSZdxZ.cjs} +1 -1
  97. package/dist/{urdfTree-DEWAJ5kl.js → urdfTree-BwPn5sja.js} +1 -1
  98. package/dist/{workpieceTreePanel-XOSlhouq.js → workpieceTreePanel-DnVOjYQ2.js} +4 -4
  99. package/dist/{workpieceTreePanel-DzpjPYZ9.cjs → workpieceTreePanel-zPR2Z6wa.cjs} +1 -1
  100. package/package.json +1 -1
  101. package/dist/clone-t2ps0jmw.cjs +0 -1
  102. package/dist/index-BSeL_Eve.js +0 -10837
  103. package/dist/index-BeOgM-lp.cjs +0 -1
  104. package/dist/index-ClvA5-wg.cjs +0 -18
  105. package/dist/index-DAEMvwnX.cjs +0 -26
  106. package/dist/index-DUBEV33e.cjs +0 -2
  107. package/dist/index-DgpEgbFi.cjs +0 -1
@@ -1,29 +1,29 @@
1
1
  import { defineAsyncComponent as o } from "vue";
2
- import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js";
3
- import { S as k } from "./index-BHtNKL1L.js";
4
- import { u as C } from "./index-rGJF9UJ9.js";
5
- import "./index-BWtc895B.js";
2
+ import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BUMDcqtn.js";
3
+ import { S as j } from "./index-BHtNKL1L.js";
4
+ import { u as C } from "./index-BK-oz1IK.js";
5
+ import "./index-BF5SUWUn.js";
6
6
  import "./request-XJsZ4h2T.js";
7
7
  /* empty css */
8
8
  import u from "./ss-component2.js";
9
9
  import { t as g, c as T, b as P } from "./index-ChNfRlIP.js";
10
- const n = o(() => import("./main-BazhXMmW.js"));
10
+ const n = o(() => import("./main-hbDYKA6O.js"));
11
11
  n.install = (t) => {
12
12
  t.component("ssComponent", n);
13
13
  };
14
- const s = o(() => import("./index-DzN70K91.js").then((t) => t.p));
14
+ const s = o(() => import("./index-C-rFa3VT.js").then((t) => t.q));
15
15
  s.install = (t) => {
16
16
  t.component("ssTab", s);
17
17
  };
18
- const r = o(() => import("./index-jDRNGigR.js").then((t) => t.i));
18
+ const r = o(() => import("./index-Dxs-F0xJ.js").then((t) => t.i));
19
19
  r.install = (t) => {
20
20
  t.component("ssMenu", r);
21
21
  };
22
- const m = o(() => import("./index-mpH7L8Rm.js"));
22
+ const m = o(() => import("./index-fH3hPSMI.js"));
23
23
  m.install = (t) => {
24
24
  t.component("ssMenuComponent", m);
25
25
  };
26
- const i = o(() => import("./index-DlXwTcJ9.js"));
26
+ const i = o(() => import("./index-DTllcl_O.js"));
27
27
  i.install = (t) => {
28
28
  t.component("ssCanvas", i);
29
29
  };
@@ -31,15 +31,15 @@ const c = o(() => import("./index-rlStojTL.js"));
31
31
  c.install = (t) => {
32
32
  t.component("ssFold", c);
33
33
  };
34
- const a = o(() => import("./index-TDwSq2BF.js").then((t) => t.i));
34
+ const a = o(() => import("./index-Lhh-KMx5.js").then((t) => t.i));
35
35
  a.install = (t) => {
36
36
  t.component("ssAvatar", a);
37
37
  };
38
- const l = o(() => import("./threeModel-CKvba3tD.js"));
38
+ const l = o(() => import("./threeModel-C1V8R9PI.js"));
39
39
  l.install = (t) => {
40
40
  t.component("ssThree", l);
41
41
  };
42
- const p = o(() => import("./threeViewerHost-BEEjkIf3.js").then((t) => t.t));
42
+ const p = o(() => import("./threeViewerHost-2yySAP_2.js").then((t) => t.t));
43
43
  p.install = (t) => {
44
44
  t.component("threeViewerHost", p);
45
45
  };
@@ -65,10 +65,10 @@ const f = C(), d = [n, s, r, m, i, c, a, l, p], V = (t) => {
65
65
  f.setPlatform(t);
66
66
  const e = b(t);
67
67
  v(e);
68
- }, I = { getPlatform: f.getPlatform, setPlatform: f.setPlatform, initPlatform: w };
68
+ }, q = { getPlatform: f.getPlatform, setPlatform: f.setPlatform, initPlatform: w };
69
69
  export {
70
- k as SvgIcon,
70
+ j as SvgIcon,
71
71
  V as default,
72
- I as platformApi,
72
+ q as platformApi,
73
73
  u as router
74
74
  };
@@ -1 +1 @@
1
- "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-aYsnw0xY.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-DgpEgbFi.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-DUBEV33e.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-D3lXIyot.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-CTkNgtX3.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-B7H-5M2Y.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-BtWec77G.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-DQdcA8b0.cjs"))},{path:"角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-CNRHr3kT.cjs"))},{path:"部门管理",name:"Department",component:async()=>Promise.resolve().then(()=>require("./index-qhLt4UGH.cjs"))},{path:"职位管理",name:"Position",component:async()=>Promise.resolve().then(()=>require("./index-CKCe1GPP.cjs"))},{path:"个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-DpRkYDKO.cjs"))},{path:"log",name:"log",component:async()=>Promise.resolve().then(()=>require("./index-B0HOwfWc.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
1
+ "use strict";const n=require("vue-router"),t=[{path:"/tenant",name:"Tenant",component:async()=>Promise.resolve().then(()=>require("./index-aYsnw0xY.cjs"))},{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-Digv4Fyh.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-CWzVeyId.cjs")),children:[{path:"系统配置/站内信",name:"Message",component:async()=>Promise.resolve().then(()=>require("./index-DPIg2S6M.cjs"))},{path:"系统配置/自动生成",name:"Automatic",component:async()=>Promise.resolve().then(()=>require("./index-B2BAJXIH.cjs"))},{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-CGaJRFh6.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-Call_60N.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-CIMnUwEB.cjs"))},{path:"系统维护/登录日志",name:"LoginLog",component:async()=>Promise.resolve().then(()=>require("./index-DDAEpzaB.cjs"))},{path:"系统维护/操作日志",name:"OperateLog",component:async()=>Promise.resolve().then(()=>require("./index-B6e2oM-P.cjs"))},{path:"角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DqmyyzfP.cjs"))},{path:"部门管理",name:"Department",component:async()=>Promise.resolve().then(()=>require("./index-ilXWn4_Y.cjs"))},{path:"职位管理",name:"Position",component:async()=>Promise.resolve().then(()=>require("./index-CljHDtk8.cjs"))},{path:"个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-IGuY2Qp9.cjs"))},{path:"log",name:"log",component:async()=>Promise.resolve().then(()=>require("./index-DCfi_waU.cjs"))}]}],o=n.createRouter({history:n.createWebHashHistory(),routes:t});o.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=o;
@@ -8,12 +8,12 @@ const a = [
8
8
  {
9
9
  path: "/login",
10
10
  name: "Login",
11
- component: async () => import("./index-BK6-AVLE.js")
11
+ component: async () => import("./index-DQ94pBGZ.js")
12
12
  },
13
13
  {
14
14
  path: "/",
15
15
  name: "Model",
16
- component: async () => import("./index-BSeL_Eve.js"),
16
+ component: async () => import("./index-p9kkXcpR.js"),
17
17
  // component: async ()=>import('@/components/views/model/component/main.vue'),
18
18
  // component: async ()=>import('@/components/views/canvas/index.vue'),
19
19
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -31,17 +31,17 @@ const a = [
31
31
  {
32
32
  path: "平台管理/菜单管理",
33
33
  name: "Menu",
34
- component: async () => import("./index-CeXLp3RG.js")
34
+ component: async () => import("./index-YzkBsOrM.js")
35
35
  },
36
36
  {
37
37
  path: "平台管理/主菜单管理",
38
38
  name: "MainMenu",
39
- component: async () => import("./index-H2suIBRd.js")
39
+ component: async () => import("./index-DSKIm3im.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/个人中心",
43
43
  name: "PersonalCenter",
44
- component: async () => import("./index-C9LONCdW.js")
44
+ component: async () => import("./index-BEyBnEnd.js")
45
45
  },
46
46
  // {
47
47
  // path: '系统管理/职位管理',
@@ -66,37 +66,37 @@ const a = [
66
66
  {
67
67
  path: "系统维护/登录日志",
68
68
  name: "LoginLog",
69
- component: async () => import("./index-Dbv6QX4e.js")
69
+ component: async () => import("./index-CGqnKnrd.js")
70
70
  },
71
71
  {
72
72
  path: "系统维护/操作日志",
73
73
  name: "OperateLog",
74
- component: async () => import("./index-CdGqaqYM.js")
74
+ component: async () => import("./index-DO5zum3x.js")
75
75
  },
76
76
  {
77
77
  path: "角色管理",
78
78
  name: "Role",
79
- component: async () => import("./index-CJijEg9W.js")
79
+ component: async () => import("./index-ToiCtVRE.js")
80
80
  },
81
81
  {
82
82
  path: "部门管理",
83
83
  name: "Department",
84
- component: async () => import("./index-Bi1DonQa.js")
84
+ component: async () => import("./index-DDK5gDem.js")
85
85
  },
86
86
  {
87
87
  path: "职位管理",
88
88
  name: "Position",
89
- component: async () => import("./index-CZly4koJ.js")
89
+ component: async () => import("./index-CFiyfU1X.js")
90
90
  },
91
91
  {
92
92
  path: "个人中心",
93
93
  name: "PersonalCenter",
94
- component: async () => import("./index-DvbvoiZG.js")
94
+ component: async () => import("./index-DU2dKJOK.js")
95
95
  },
96
96
  {
97
97
  path: "log",
98
98
  name: "log",
99
- component: async () => import("./index-DAZMn3y_.js")
99
+ component: async () => import("./index-Dn7UEQUd.js")
100
100
  }
101
101
  // {
102
102
  // path: 'priority',
@@ -1,9 +1,9 @@
1
1
  import { ref as b, watch as Pe, createElementBlock as q, openBlock as H, createBlock as Le, computed as ie, onMounted as $e, onUnmounted as je, Fragment as Xe, renderList as He, createElementVNode as h, createCommentVNode as xe, toDisplayString as ae, resolveComponent as Je, createVNode as z, defineComponent as Ye, normalizeStyle as Ee, normalizeClass as Fe, nextTick as Be, onBeforeUnmount as qe, withDirectives as se, unref as O, withCtx as Te, isRef as he, vModelRadio as ye, vShow as we } from "vue";
2
- import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, b as Qe, A as et, c as tt, M as Ve, X as nt, G as at, e as Me, f as ot, h as De, i as st, D as ke, H as lt, j as Re, k as Oe, l as Ue, m as ze, E as _e, n as de, o as it, p as rt, T as ct } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js";
3
- import { O as ut } from "./OrbitControls-BK6rha_f.js";
4
- import { V as dt, W as pt } from "./index-CtLw-tqJ.js";
2
+ import { V as M, B as be, S as Ze, C as We, P as Ke, W as Ne, b as Qe, A as et, c as tt, M as Re, X as nt, G as at, e as Me, f as ot, h as De, i as st, D as ke, H as lt, j as Ve, k as Oe, l as Ue, m as ze, E as _e, n as de, o as it, p as rt, T as ct } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BUMDcqtn.js";
3
+ import { O as ut } from "./OrbitControls-xsAEcOQ0.js";
4
+ import { W as dt, X as pt } from "./index-DbPbr5TD.js";
5
5
  import { _ as me } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { c as Ge } from "./index-rGJF9UJ9.js";
6
+ import { c as Ge } from "./index-BK-oz1IK.js";
7
7
  import { E as Ie } from "./request-XJsZ4h2T.js";
8
8
  function mt(E) {
9
9
  let f = null, r = null, c = null, v = null, w = null, k = null, i = null, A = null;
@@ -18,8 +18,8 @@ function mt(E) {
18
18
  alpha: !0
19
19
  }), c.setSize(d.clientWidth, d.clientHeight), c.localClippingEnabled = !0, c.shadowMap.enabled = !0, c.shadowMap.type = Qe, c.toneMapping = et, c.toneMappingExposure = 1, c.outputColorSpace = tt, d.appendChild(c.domElement), v = new ut(r, c.domElement), v.enableDamping = !0, v.dampingFactor = 0.05, v.mouseButtons = {
20
20
  LEFT: null,
21
- MIDDLE: Ve.PAN,
22
- RIGHT: Ve.ROTATE
21
+ MIDDLE: Re.PAN,
22
+ RIGHT: Re.ROTATE
23
23
  }, v.panSpeed = 0.7, w = new nt(r, c, {
24
24
  container: d,
25
25
  type: "cube",
@@ -55,12 +55,12 @@ function mt(E) {
55
55
  i && (f.remove(i), i.dispose()), A && (f.remove(A), A.geometry.dispose(), A.material.dispose());
56
56
  const S = Math.min(Math.max(Math.floor(d / 20), 30), 40);
57
57
  i = new at(d, S, 13421772, 14540253), i.rotateX(Math.PI / 2), i.position.copy(a), f.add(i);
58
- const V = new Me(d, d), X = new ot({
58
+ const R = new Me(d, d), X = new ot({
59
59
  opacity: 0.3,
60
60
  // 阴影透明度
61
61
  color: 0
62
62
  });
63
- A = new De(V, X), A.position.copy(a), A.position.z -= 0.01, A.receiveShadow = !0, f.add(A);
63
+ A = new De(R, X), A.position.copy(a), A.position.z -= 0.01, A.receiveShadow = !0, f.add(A);
64
64
  }, u = () => {
65
65
  if (D.value.length === 0)
66
66
  return;
@@ -78,9 +78,9 @@ function mt(E) {
78
78
  console.warn("无法计算包围盒,网格更新失败");
79
79
  return;
80
80
  }
81
- const S = d.getSize(new M()), V = d.getCenter(new M()), X = Math.max(S.x, S.y, S.z), W = Math.max(X * 8, 50), K = new M(
82
- V.x,
83
- V.y,
81
+ const S = d.getSize(new M()), R = d.getCenter(new M()), X = Math.max(S.x, S.y, S.z), W = Math.max(X * 8, 50), K = new M(
82
+ R.x,
83
+ R.y,
84
84
  d.min.z
85
85
  // 模型的最底部
86
86
  );
@@ -92,13 +92,13 @@ function mt(E) {
92
92
  a.position.set(10, 10, 8), a.castShadow = !0, a.shadow.mapSize.width = 4096, a.shadow.mapSize.height = 4096, a.shadow.camera.near = 0.5, a.shadow.camera.far = 50, a.shadow.camera.left = -50, a.shadow.camera.right = 50, a.shadow.camera.top = 50, a.shadow.camera.bottom = -50, f.add(a);
93
93
  const S = new ke(16777215, 0.8);
94
94
  S.position.set(-8, -8, 6), f.add(S);
95
- const V = new ke(16777215, 0.6);
96
- V.position.set(0, -15, 2), f.add(V);
95
+ const R = new ke(16777215, 0.6);
96
+ R.position.set(0, -15, 2), f.add(R);
97
97
  const X = new lt(16777215, 4473924, 0.8);
98
98
  f.add(X);
99
- const W = new Re(16777215, 1, 50);
99
+ const W = new Ve(16777215, 1, 50);
100
100
  W.position.set(15, 15, 15), f.add(W);
101
- const K = new Re(16777215, 0.5, 50);
101
+ const K = new Ve(16777215, 0.5, 50);
102
102
  K.position.set(-15, -15, 15), f.add(K);
103
103
  }, _ = () => {
104
104
  k = requestAnimationFrame(_), v && v.update();
@@ -120,7 +120,7 @@ function mt(E) {
120
120
  ].forEach((S) => {
121
121
  d[S] && d[S].dispose && d[S].dispose();
122
122
  }), d.dispose && d.dispose();
123
- }, R = (d) => {
123
+ }, V = (d) => {
124
124
  d == null || d.traverse((a) => {
125
125
  a.geometry && a.geometry.dispose(), a.material && (Array.isArray(a.material) ? a.material.forEach((S) => {
126
126
  U(S);
@@ -155,7 +155,7 @@ function mt(E) {
155
155
  console.warn("无法计算包围盒");
156
156
  return;
157
157
  }
158
- const V = a.getSize(new M()), X = a.getCenter(new M()), K = Math.max(V.x, V.y, V.z) * 0.8, N = new M(X.x + K, X.y - K, X.z + K);
158
+ const R = a.getSize(new M()), X = a.getCenter(new M()), K = Math.max(R.x, R.y, R.z) * 0.8, N = new M(X.x + K, X.y - K, X.z + K);
159
159
  r.position.copy(N), r.lookAt(X), v.target.copy(X), v.update(), l.value.copy(N), C.value.copy(X), u();
160
160
  },
161
161
  getThreeJSObjects: () => ({
@@ -168,13 +168,13 @@ function mt(E) {
168
168
  clearAllModels: () => {
169
169
  if (!f) return;
170
170
  D.value.forEach((a) => {
171
- f.remove(a), R(a);
171
+ f.remove(a), V(a);
172
172
  });
173
173
  const d = [];
174
174
  f.children.forEach((a) => {
175
175
  !a.isLight && !a.isCamera && a.type !== "GridHelper" && a !== A && d.push(a);
176
176
  }), d.forEach((a) => {
177
- f.remove(a), R(a);
177
+ f.remove(a), V(a);
178
178
  }), D.value = [], u();
179
179
  },
180
180
  cleanup: () => {
@@ -187,7 +187,7 @@ function ft(E, f) {
187
187
  const r = b(!1);
188
188
  let c = null, v = 12700, w = new M(), k = new M(), i = new M(), A = 0, L = null;
189
189
  const F = (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2, T = (e) => {
190
- const u = new M(), p = A * 1.2, _ = new M(i.x + p, i.y, i.z), U = new M(i.x, i.y + p, i.z), R = new M(i.x, i.y - p, i.z);
190
+ const u = new M(), p = A * 1.2, _ = new M(i.x + p, i.y, i.z), U = new M(i.x, i.y + p, i.z), V = new M(i.x, i.y - p, i.z);
191
191
  if (e <= 0.567) {
192
192
  const G = e / 0.567 * Math.PI * 2;
193
193
  u.x = i.x + Math.cos(G) * p, u.z = i.z + Math.sin(G) * p, u.y = i.y;
@@ -199,7 +199,7 @@ function ft(E, f) {
199
199
  u.x = i.x + Math.sin(j) * p, u.y = i.y + Math.cos(j) * p, u.z = i.z;
200
200
  } else {
201
201
  const J = (e - 0.881) / 0.119, G = F(J);
202
- u.lerpVectors(R, w, G);
202
+ u.lerpVectors(V, w, G);
203
203
  }
204
204
  return u;
205
205
  }, D = () => {
@@ -226,9 +226,9 @@ function ft(E, f) {
226
226
  i = p.getCenter(new M()), A = Math.max(_.x, _.y, _.z) * 1.2;
227
227
  const U = new M(i.x + A * 1.2, i.y, i.z);
228
228
  u.enabled = !1;
229
- const R = e.position.clone(), J = 1e3, G = Date.now(), j = () => {
229
+ const V = e.position.clone(), J = 1e3, G = Date.now(), j = () => {
230
230
  const Z = Date.now() - G, ee = Math.min(Z / J, 1), d = F(ee);
231
- e.position.lerpVectors(R, U, d), e.lookAt(i), u.target.copy(i), ee < 1 ? requestAnimationFrame(j) : (r.value = !0, c = null, D());
231
+ e.position.lerpVectors(V, U, d), e.lookAt(i), u.target.copy(i), ee < 1 ? requestAnimationFrame(j) : (r.value = !0, c = null, D());
232
232
  };
233
233
  j();
234
234
  }, C = () => {
@@ -244,8 +244,8 @@ function ft(E, f) {
244
244
  const { camera: e, controls: u } = E();
245
245
  if (!e || !u) return;
246
246
  u.enabled = !0;
247
- const p = e.position.clone(), _ = u.target.clone(), U = 1500, R = Date.now(), J = () => {
248
- const G = Date.now() - R, j = Math.min(G / U, 1), Z = F(j);
247
+ const p = e.position.clone(), _ = u.target.clone(), U = 1500, V = Date.now(), J = () => {
248
+ const G = Date.now() - V, j = Math.min(G / U, 1), Z = F(j);
249
249
  e.position.lerpVectors(p, w, Z), u.target.lerpVectors(_, k, Z), j < 1 && requestAnimationFrame(J);
250
250
  };
251
251
  J();
@@ -282,8 +282,8 @@ function vt(E, f) {
282
282
  opacity: 0.3,
283
283
  side: Ue,
284
284
  depthWrite: !1
285
- }), R = new De(u, U);
286
- return R.position.copy(p), R.rotation.copy(_), R;
285
+ }), V = new De(u, U);
286
+ return V.position.copy(p), V.rotation.copy(_), V;
287
287
  }, T = () => {
288
288
  if (D(), l(), c.value === "none")
289
289
  return;
@@ -402,7 +402,7 @@ const gt = { class: "panel-content" }, ht = {
402
402
  shininess: 80,
403
403
  side: Ue
404
404
  }), !0) : (Ie.error('在 "Pipe_Link" 内未找到任何 Mesh'), !1);
405
- }, R = (n) => {
405
+ }, V = (n) => {
406
406
  if (!n || !n.joints)
407
407
  return console.warn("URDF模型没有关节信息"), [];
408
408
  let m = null;
@@ -537,8 +537,8 @@ const gt = { class: "panel-content" }, ht = {
537
537
  console.warn("没有动画数据");
538
538
  return;
539
539
  }
540
- U(), F.value = !0, T.value = !1, D.value = 0, l.value = 0, V();
541
- }, V = () => {
540
+ U(), F.value = !0, T.value = !1, D.value = 0, l.value = 0, R();
541
+ }, R = () => {
542
542
  if (!F.value || T.value) return;
543
543
  const n = D.value;
544
544
  if (n >= p.length - 1) {
@@ -552,7 +552,7 @@ const gt = { class: "panel-content" }, ht = {
552
552
  ee(o, n, m);
553
553
  } else
554
554
  ee(s, n);
555
- l.value++, l.value > Ae && (l.value = 0, D.value++), C.value = setTimeout(V, u());
555
+ l.value++, l.value > Ae && (l.value = 0, D.value++), C.value = setTimeout(R, u());
556
556
  }, X = () => {
557
557
  T.value = !0, C.value && (clearTimeout(C.value), C.value = null);
558
558
  }, W = () => {
@@ -576,7 +576,7 @@ const gt = { class: "panel-content" }, ht = {
576
576
  }), Pe(
577
577
  () => r.model,
578
578
  (n) => {
579
- n ? (v.value = n, c.value = R(n)) : c.value = [];
579
+ n ? (v.value = n, c.value = V(n)) : c.value = [];
580
580
  },
581
581
  { immediate: !0 }
582
582
  );
@@ -636,7 +636,7 @@ const gt = { class: "panel-content" }, ht = {
636
636
  ])))
637
637
  ]));
638
638
  }
639
- }, Vt = /* @__PURE__ */ me(Tt, [["__scopeId", "data-v-bcf4fa92"]]), Rt = { class: "panel-content" }, It = "id", Lt = {
639
+ }, Rt = /* @__PURE__ */ me(Tt, [["__scopeId", "data-v-bcf4fa92"]]), Vt = { class: "panel-content" }, It = "id", Lt = {
640
640
  __name: "urdfTree",
641
641
  props: {
642
642
  model: Object,
@@ -712,7 +712,7 @@ const gt = { class: "panel-content" }, ht = {
712
712
  { immediate: !0 }
713
713
  ), (l, C) => {
714
714
  const g = Je("el-tree");
715
- return H(), q("div", Rt, [
715
+ return H(), q("div", Vt, [
716
716
  z(g, {
717
717
  data: v.value,
718
718
  props: w,
@@ -787,14 +787,14 @@ const gt = { class: "panel-content" }, ht = {
787
787
  initThreeJS: p,
788
788
  handleResize: _,
789
789
  fitCameraToAllModels: U,
790
- getThreeJSObjects: R,
790
+ getThreeJSObjects: V,
791
791
  clearAllModels: J,
792
792
  cleanup: G
793
- } = mt(k), { isAnimating: j, toggleAnimation: Z, stopAnimation: ee } = ft(R, g), { isClipping: d, activeClippingAxis: a, toggleClipping: S, updateClippingPlanes: V } = vt(
794
- R,
793
+ } = mt(k), { isAnimating: j, toggleAnimation: Z, stopAnimation: ee } = ft(V, g), { isClipping: d, activeClippingAxis: a, toggleClipping: S, updateClippingPlanes: R } = vt(
794
+ V,
795
795
  g
796
796
  ), { addModelsFromUrls: X, loadModelByDefaultPath: W, urdfModel: K, modelBoundingBoxes: N } = pt(
797
- R,
797
+ V,
798
798
  g,
799
799
  i,
800
800
  A,
@@ -802,7 +802,7 @@ const gt = { class: "panel-content" }, ht = {
802
802
  ), te = () => {
803
803
  if (L.value || g.value.length === 0) return;
804
804
  L.value = !0, j.value && ee();
805
- const { camera: o, controls: t } = R();
805
+ const { camera: o, controls: t } = V();
806
806
  if (!o || !t) return;
807
807
  t.enabled = !0;
808
808
  const y = (Q) => Q < 0.5 ? 4 * Q * Q * Q : 1 - Math.pow(-2 * Q + 2, 3) / 2, Y = o.position.clone(), $ = t.target.clone(), ne = 1500, I = Date.now(), P = () => {
@@ -836,7 +836,7 @@ const gt = { class: "panel-content" }, ht = {
836
836
  return $e(async () => {
837
837
  await Be();
838
838
  try {
839
- p(), v = R().scene, w = !0, window.addEventListener("resize", _);
839
+ p(), v = V().scene, w = !0, window.addEventListener("resize", _);
840
840
  } catch (o) {
841
841
  console.error("Three.js初始化失败:", o);
842
842
  }
@@ -1017,7 +1017,7 @@ const gt = { class: "panel-content" }, ht = {
1017
1017
  name: "clipping-axis",
1018
1018
  value: "none",
1019
1019
  "onUpdate:modelValue": t[7] || (t[7] = (P) => he(a) ? a.value = P : null),
1020
- onChange: t[8] || (t[8] = (...P) => O(V) && O(V)(...P))
1020
+ onChange: t[8] || (t[8] = (...P) => O(R) && O(R)(...P))
1021
1021
  }, null, 544), [
1022
1022
  [ye, O(a)]
1023
1023
  ]),
@@ -1029,7 +1029,7 @@ const gt = { class: "panel-content" }, ht = {
1029
1029
  name: "clipping-axis",
1030
1030
  value: "x",
1031
1031
  "onUpdate:modelValue": t[9] || (t[9] = (P) => he(a) ? a.value = P : null),
1032
- onChange: t[10] || (t[10] = (...P) => O(V) && O(V)(...P))
1032
+ onChange: t[10] || (t[10] = (...P) => O(R) && O(R)(...P))
1033
1033
  }, null, 544), [
1034
1034
  [ye, O(a)]
1035
1035
  ]),
@@ -1041,7 +1041,7 @@ const gt = { class: "panel-content" }, ht = {
1041
1041
  name: "clipping-axis",
1042
1042
  value: "y",
1043
1043
  "onUpdate:modelValue": t[11] || (t[11] = (P) => he(a) ? a.value = P : null),
1044
- onChange: t[12] || (t[12] = (...P) => O(V) && O(V)(...P))
1044
+ onChange: t[12] || (t[12] = (...P) => O(R) && O(R)(...P))
1045
1045
  }, null, 544), [
1046
1046
  [ye, O(a)]
1047
1047
  ]),
@@ -1053,7 +1053,7 @@ const gt = { class: "panel-content" }, ht = {
1053
1053
  name: "clipping-axis",
1054
1054
  value: "z",
1055
1055
  "onUpdate:modelValue": t[13] || (t[13] = (P) => he(a) ? a.value = P : null),
1056
- onChange: t[14] || (t[14] = (...P) => O(V) && O(V)(...P))
1056
+ onChange: t[14] || (t[14] = (...P) => O(R) && O(R)(...P))
1057
1057
  }, null, 544), [
1058
1058
  [ye, O(a)]
1059
1059
  ]),
@@ -1077,7 +1077,7 @@ const gt = { class: "panel-content" }, ht = {
1077
1077
  ]),
1078
1078
  z(y, { "max-height": "650px" }, {
1079
1079
  default: Te(() => [
1080
- se(z(Vt, {
1080
+ se(z(Rt, {
1081
1081
  ref_key: "jointRef",
1082
1082
  ref: C,
1083
1083
  model: O(K),
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bk-thOPD.cjs"),fe=require("./OrbitControls-BFwyCnTH.cjs"),pe=require("./index-DAEMvwnX.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=require("./index-ClvA5-wg.cjs"),de=require("./request-Dl8yi2iS.cjs");function ve(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,b=null;const D=1e3/30;let S=0;const E=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const m=z.value;u=new n.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(m.clientWidth,m.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,m.appendChild(d.domElement),h=new fe.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:m,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),x.attachControls(h),f(),C()},t=(m,l)=>{c&&(g.remove(c),c.dispose()),b&&(g.remove(b),b.geometry.dispose(),b.material.dispose());const _=Math.min(Math.max(Math.floor(m/20),30),40);c=new n.GridHelper(m,_,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(m,m),O=new n.ShadowMaterial({opacity:.3,color:0});b=new n.Mesh(B,O),b.position.copy(l),b.position.z-=.01,b.receiveShadow=!0,g.add(b)},p=()=>{if(E.value.length===0)return;const m=new n.Box3;let l=!1;if(E.value.forEach(X=>{if(X.userData.boundingBox)m.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);m.union(Z.box),l=!0}else m.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const _=m.getSize(new n.Vector3),B=m.getCenter(new n.Vector3),O=Math.max(_.x,_.y,_.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,m.min.z);t(j,q)},f=()=>{const m=new n.AmbientLight(4210752,.6);g.add(m);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const _=new n.DirectionalLight(16777215,.8);_.position.set(-8,-8,6),g.add(_);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},C=()=>{P=requestAnimationFrame(C),h&&h.update();const m=performance.now(),l=m-S;l<D||(S=m-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(_=>{m[_]&&m[_].dispose&&m[_].dispose()}),m.dispose&&m.dispose()},A=m=>{m==null||m.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(_=>{I(_)}):I(l.material))})};return{currentModels:E,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const m=z.value,l=m.clientWidth,_=m.clientHeight;u.aspect=l/_,u.updateProjectionMatrix(),d.setSize(l,_),x.update()},fitCameraToAllModels:m=>{if(!u||!h||E.value.length===0)return;const l=new n.Box3;let _=!1;if(E.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),_=!0;else if(Z.userData.modelId&&m.has(Z.userData.modelId)){const ee=m.get(Z.userData.modelId);l.union(ee.box),_=!0}else l.expandByObject(Z),_=!0}),!_){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;E.value.forEach(l=>{g.remove(l),A(l)});const m=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==b&&m.push(l)}),m.forEach(l=>{g.remove(l),A(l)}),E.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),b&&(b.geometry.dispose(),b.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function ge(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,b=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,f=b*1.2,C=new n.Vector3(c.x+f,c.y,c.z),I=new n.Vector3(c.x,c.y+f,c.z),A=new n.Vector3(c.x,c.y-f,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*f,p.z=c.z+Math.sin($)*f,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(C,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*f,p.y=c.y+Math.cos(J)*f,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},E=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const f=Date.now()-d,C=Math.min(f/h,1);if(C>=1){k();return}const I=S(C);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(E)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const f=new n.Box3;g.value.forEach(G=>{f.expandByObject(G)});const C=f.getSize(new n.Vector3);c=f.getCenter(new n.Vector3),b=Math.max(C.x,C.y,C.z)*1.2;const I=new n.Vector3(c.x+b*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),m=D(Y);t.position.lerpVectors(A,I,m),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,E())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const f=t.position.clone(),C=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(f,x,G),p.target.lerpVectors(C,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function he(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const b=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,f,C;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(f),A.rotation.copy(C),A},S=()=>{if(E(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(C=>{C.clippingPlanes=[y]}):f.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},E=()=>{g.value.forEach(y=>{y.traverse(t=>{t.isMesh&&t.material&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(b(),g.value.length>0&&F()):(d.value="none",E(),r())},updateClippingPlanes:S,clearClippingPlanes:E,clearClippingMeshes:r}}const ye={class:"panel-content"},we={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=me.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(pe.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},xe=oe._export_sfc(we,[["__scopeId","data-v-2387536e"]]),Ve={class:"panel-content"},Me={key:0,class:"joints-list"},ke={class:"joint-info-row"},Pe={class:"joint-left"},Ce={class:"joint-name"},be={class:"joint-range"},Ee={class:"joint-type"},_e={key:0,class:"joint-control-row"},ze={class:"slider-container"},De=["min","max","value","onInput","disabled"],Ne={class:"value-display"},Se={class:"joint-value"},Be={class:"unit"},Ae={key:1,class:"empty-state"},ae=.001,Re=1e3,ce=60,Fe={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),b=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),E=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Re/ce/t.value;let f=[];e.watch(()=>u.animationData,o=>{var i;b.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=me.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(f=v)},{deep:!0}),e.computed(()=>f.length>0);const C=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return de.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(de.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??C(s._jointType,!1),upper:s.limit.upper??C(s._jointType,!0)}:{lower:C(s._jointType,!1),upper:C(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={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(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=f.slice(0,o+1);const V=f[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,b.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),ue=new n.Matrix4;return ue.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(ue),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},m=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=m(a,w||a,i)}),V},_=()=>{if(f.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,E.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=E.value;if(o>=f.length-1){const s=f[f.length-1];Y(s,f.length-1,1),j();return}const v=r.value/ce,i=f[o],V=f[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ce&&(r.value=0,E.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:_,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),E.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},re=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",ke,[e.createElementVNode("div",Pe,[e.createElementVNode("span",Ce,e.toDisplayString(i.name),1),e.createElementVNode("span",be," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ee,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",ze,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,De)]),e.createElementVNode("div",Ne,[e.createElementVNode("span",Se,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Be,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Ae,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Te=oe._export_sfc(Fe,[["__scopeId","data-v-bcf4fa92"]]),Le={class:"panel-content"},Ie="id",$e={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},b=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(f=>f.children&&f.children.length>0).slice(0,k).map(f=>f.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),E=e.computed(()=>u!=null&&u.model?b(u.model):[]);return e.watch(E,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Ie,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Je=oe._export_sfc($e,[["__scopeId","data-v-290ff4e1"]]),Oe=["xlink:href"],Ue=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,Oe)],6))],6))}}),N=oe._export_sfc(Ue,[["__scopeId","data-v-3150a90b"]]),Ge={class:"obj-viewer-container"},je={class:"buttonGroup-top"},qe={class:"buttonGroup-topLeft"},Xe={class:"buttonGroup-left"},He={class:"buttonGroup-right"},Ye={class:"buttonGroup-bottom"},Ze={class:"left-panel"},We={class:"panel-header"},Ke={key:1,class:"clipping-content"},Qe={class:"radio-group"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"radio-label"},at={class:"radio-label"},ot={class:"right-panel"},lt={class:"panel-header"},st={key:0,class:"loading-overlay"},it={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),b=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),E=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:f,handleResize:C,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=ve(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=ge(A,y),{isClipping:m,activeClippingAxis:l,toggleClipping:_,updateClippingPlanes:B}=he(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=pe.useModelLoader(A,y,c,b,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),m.value&&_();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},re=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!m.value&&_()},i=s=>{E.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{f(),h=A().scene,x=!0,window.addEventListener("resize",C)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",C),J.value&&Y(),$()}),g({addModelsFromUrls:re,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",je,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",He,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:E.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:E.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Ye,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Je,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",at,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",ot,[e.createElementVNode("div",lt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>E.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Te,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(xe,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,E.value]]),c.value?(e.openBlock(),e.createElementBlock("div",st,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(b.value),1)])):e.createCommentVNode("",!0)])}}},rt=oe._export_sfc(it,[["__scopeId","data-v-eb64b36c"]]);exports.default=rt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BGyDDkYS.cjs"),fe=require("./OrbitControls-BhtVNiz9.cjs"),pe=require("./index-Dz_V4Aef.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=require("./index-xN3pvlzo.cjs"),de=require("./request-Dl8yi2iS.cjs");function ve(z){let g=null,u=null,d=null,h=null,x=null,P=null,c=null,b=null;const D=1e3/30;let S=0;const E=e.ref([]),r=e.ref(new n.Vector3),k=e.ref(new n.Vector3),y=()=>{if(!z.value)return;g=new n.Scene,g.background=new n.Color(15790320);const m=z.value;u=new n.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),u.position.set(8,-8,6),u.up.set(0,0,1),u.lookAt(0,0,0),d=new n.WebGLRenderer({antialias:!0,alpha:!0}),d.setSize(m.clientWidth,m.clientHeight),d.localClippingEnabled=!0,d.shadowMap.enabled=!0,d.shadowMap.type=n.PCFSoftShadowMap,d.toneMapping=n.ACESFilmicToneMapping,d.toneMappingExposure=1,d.outputColorSpace=n.SRGBColorSpace,m.appendChild(d.domElement),h=new fe.OrbitControls(u,d.domElement),h.enableDamping=!0,h.dampingFactor=.05,h.mouseButtons={LEFT:null,MIDDLE:n.MOUSE.PAN,RIGHT:n.MOUSE.ROTATE},h.panSpeed=.7,x=new n.Xe(u,d,{container:m,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),x.attachControls(h),f(),C()},t=(m,l)=>{c&&(g.remove(c),c.dispose()),b&&(g.remove(b),b.geometry.dispose(),b.material.dispose());const _=Math.min(Math.max(Math.floor(m/20),30),40);c=new n.GridHelper(m,_,13421772,14540253),c.rotateX(Math.PI/2),c.position.copy(l),g.add(c);const B=new n.PlaneGeometry(m,m),O=new n.ShadowMaterial({opacity:.3,color:0});b=new n.Mesh(B,O),b.position.copy(l),b.position.z-=.01,b.receiveShadow=!0,g.add(b)},p=()=>{if(E.value.length===0)return;const m=new n.Box3;let l=!1;if(E.value.forEach(X=>{if(X.userData.boundingBox)m.union(X.userData.boundingBox),l=!0;else if(X.userData.modelId&&modelBoundingBoxes.has(X.userData.modelId)){const Z=modelBoundingBoxes.get(X.userData.modelId);m.union(Z.box),l=!0}else m.expandByObject(X),l=!0}),!l){console.warn("无法计算包围盒,网格更新失败");return}const _=m.getSize(new n.Vector3),B=m.getCenter(new n.Vector3),O=Math.max(_.x,_.y,_.z),j=Math.max(O*8,50),q=new n.Vector3(B.x,B.y,m.min.z);t(j,q)},f=()=>{const m=new n.AmbientLight(4210752,.6);g.add(m);const l=new n.DirectionalLight(16777215,2);l.position.set(10,10,8),l.castShadow=!0,l.shadow.mapSize.width=4096,l.shadow.mapSize.height=4096,l.shadow.camera.near=.5,l.shadow.camera.far=50,l.shadow.camera.left=-50,l.shadow.camera.right=50,l.shadow.camera.top=50,l.shadow.camera.bottom=-50,g.add(l);const _=new n.DirectionalLight(16777215,.8);_.position.set(-8,-8,6),g.add(_);const B=new n.DirectionalLight(16777215,.6);B.position.set(0,-15,2),g.add(B);const O=new n.HemisphereLight(16777215,4473924,.8);g.add(O);const j=new n.PointLight(16777215,1,50);j.position.set(15,15,15),g.add(j);const q=new n.PointLight(16777215,.5,50);q.position.set(-15,-15,15),g.add(q)},C=()=>{P=requestAnimationFrame(C),h&&h.update();const m=performance.now(),l=m-S;l<D||(S=m-l%D,d&&g&&u&&d.render(g,u),x&&x.render())},I=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(_=>{m[_]&&m[_].dispose&&m[_].dispose()}),m.dispose&&m.dispose()},A=m=>{m==null||m.traverse(l=>{l.geometry&&l.geometry.dispose(),l.material&&(Array.isArray(l.material)?l.material.forEach(_=>{I(_)}):I(l.material))})};return{currentModels:E,initialCameraPosition:r,initialTargetPosition:k,initThreeJS:y,handleResize:()=>{if(!z.value||!u||!d||!x)return;const m=z.value,l=m.clientWidth,_=m.clientHeight;u.aspect=l/_,u.updateProjectionMatrix(),d.setSize(l,_),x.update()},fitCameraToAllModels:m=>{if(!u||!h||E.value.length===0)return;const l=new n.Box3;let _=!1;if(E.value.forEach(Z=>{if(Z.userData.boundingBox)l.union(Z.userData.boundingBox),_=!0;else if(Z.userData.modelId&&m.has(Z.userData.modelId)){const ee=m.get(Z.userData.modelId);l.union(ee.box),_=!0}else l.expandByObject(Z),_=!0}),!_){console.warn("无法计算包围盒");return}const B=l.getSize(new n.Vector3),O=l.getCenter(new n.Vector3),q=Math.max(B.x,B.y,B.z)*.8,X=new n.Vector3(O.x+q,O.y-q,O.z+q);u.position.copy(X),u.lookAt(O),h.target.copy(O),h.update(),r.value.copy(X),k.value.copy(O),p()},getThreeJSObjects:()=>({scene:g,camera:u,renderer:d,controls:h,gizmo:x}),clearAllModels:()=>{if(!g)return;E.value.forEach(l=>{g.remove(l),A(l)});const m=[];g.children.forEach(l=>{!l.isLight&&!l.isCamera&&l.type!=="GridHelper"&&l!==b&&m.push(l)}),m.forEach(l=>{g.remove(l),A(l)}),E.value=[],p()},cleanup:()=>{P&&cancelAnimationFrame(P),c&&c.dispose(),b&&(b.geometry.dispose(),b.material.dispose()),d&&d.dispose(),h&&h.dispose(),x&&x.dispose()},updateGridForModels:p}}function ge(z,g){const u=e.ref(!1);let d=null,h=12700,x=new n.Vector3,P=new n.Vector3,c=new n.Vector3,b=0,F=null;const D=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,S=t=>{const p=new n.Vector3,f=b*1.2,C=new n.Vector3(c.x+f,c.y,c.z),I=new n.Vector3(c.x,c.y+f,c.z),A=new n.Vector3(c.x,c.y-f,c.z);if(t<=.567){const $=t/.567*Math.PI*2;p.x=c.x+Math.cos($)*f,p.z=c.z+Math.sin($)*f,p.y=c.y}else if(t<=.724){const L=(t-.567)/.157,$=D(L);p.lerpVectors(C,I,$)}else if(t<=.881){const L=(t-.724)/.157,J=D(L)*Math.PI;p.x=c.x+Math.sin(J)*f,p.y=c.y+Math.cos(J)*f,p.z=c.z}else{const L=(t-.881)/.119,$=D(L);p.lerpVectors(A,x,$)}return p},E=()=>{const{camera:t,controls:p}=z();if(!t||!p)return;d||(d=Date.now());const f=Date.now()-d,C=Math.min(f/h,1);if(C>=1){k();return}const I=S(C);t.position.copy(I),t.lookAt(c),p.target.copy(c),F=requestAnimationFrame(E)},r=()=>{if(g.value.length===0)return;const{camera:t,controls:p}=z();if(!t||!p)return;x.copy(t.position),P.copy(p.target);const f=new n.Box3;g.value.forEach(G=>{f.expandByObject(G)});const C=f.getSize(new n.Vector3);c=f.getCenter(new n.Vector3),b=Math.max(C.x,C.y,C.z)*1.2;const I=new n.Vector3(c.x+b*1.2,c.y,c.z);p.enabled=!1;const A=t.position.clone(),L=1e3,$=Date.now(),J=()=>{const G=Date.now()-$,Y=Math.min(G/L,1),m=D(Y);t.position.lerpVectors(A,I,m),t.lookAt(c),p.target.copy(c),Y<1?requestAnimationFrame(J):(u.value=!0,d=null,E())};J()},k=()=>{u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{controls:t}=z();t&&(t.enabled=!0,t.target.copy(P))};return{isAnimating:u,toggleAnimation:()=>{if(u.value){u.value=!1,d=null,F&&(cancelAnimationFrame(F),F=null);const{camera:t,controls:p}=z();if(!t||!p)return;p.enabled=!0;const f=t.position.clone(),C=p.target.clone(),I=1500,A=Date.now(),L=()=>{const $=Date.now()-A,J=Math.min($/I,1),G=D(J);t.position.lerpVectors(f,x,G),p.target.lerpVectors(C,P,G),J<1&&requestAnimationFrame(L)};L()}else r()},startAnimation:r,stopAnimation:k}}function he(z,g){const u=e.ref(!1),d=e.ref("none");let h=[],x=[],P=new n.Box3,c=new n.Vector3;const b=()=>{h=[new n.Plane(new n.Vector3(1,0,0),0),new n.Plane(new n.Vector3(0,1,0),0),new n.Plane(new n.Vector3(0,0,1),0)]},F=()=>{P.makeEmpty(),g.value.forEach(y=>{P.expandByObject(y)}),c=P.getCenter(new n.Vector3)},D=y=>{const t=P.getSize(new n.Vector3);let p,f,C;y==="x"?(p=new n.PlaneGeometry(t.z*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,Math.PI/2,0)):y==="y"?(p=new n.PlaneGeometry(t.x*1.2,t.z*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(Math.PI/2,0,0)):y==="z"&&(p=new n.PlaneGeometry(t.x*1.2,t.y*1.2),f=new n.Vector3(c.x,c.y,c.z),C=new n.Euler(0,0,0));const I=new n.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:n.DoubleSide,depthWrite:!1}),A=new n.Mesh(p,I);return A.position.copy(f),A.rotation.copy(C),A},S=()=>{if(E(),r(),d.value==="none")return;F();let y=null;if(d.value==="x"?(h[0].constant=-c.x,y=h[0]):d.value==="y"?(h[1].constant=-c.y,y=h[1]):d.value==="z"&&(h[2].constant=-c.z,y=h[2]),y){g.value.forEach(p=>{p.traverse(f=>{f.isMesh&&f.material&&(Array.isArray(f.material)?f.material.forEach(C=>{C.clippingPlanes=[y]}):f.material.clippingPlanes=[y])})});const{scene:t}=z();if(t){const p=D(d.value);t.add(p),x.push(p)}}},E=()=>{g.value.forEach(y=>{y.traverse(t=>{t.isMesh&&t.material&&(Array.isArray(t.material)?t.material.forEach(p=>{p.clippingPlanes=[]}):t.material.clippingPlanes=[])})})},r=()=>{const{scene:y}=z();y&&x.forEach(t=>{y.remove(t),t.geometry.dispose(),t.material.dispose()}),x=[]};return{isClipping:u,activeClippingAxis:d,toggleClipping:()=>{u.value=!u.value,u.value?(b(),g.value.length>0&&F()):(d.value="none",E(),r())},updateClippingPlanes:S,clearClippingPlanes:E,clearClippingMeshes:r}}const ye={class:"panel-content"},we={__name:"animationPanel",props:{animationData:Object,model:Object},setup(z){const g=z;e.ref();const u=e.ref();return e.watch(()=>[g==null?void 0:g.animationData],()=>{var h;let d=((h=me.cloneDeep(g==null?void 0:g.animationData))==null?void 0:h["输出(动画数据)Content"])??[];d&&(u.value=d)},{deep:!0,immediate:!0}),(d,h)=>{var x,P,c;return e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(pe.ssTable,{itemData:(x=u.value)==null?void 0:x.compData,key:(P=u.value)==null?void 0:P.id,index:(c=u.value)==null?void 0:c.id,showHeader:!1},null,8,["itemData","index"]))])}}},xe=oe._export_sfc(we,[["__scopeId","data-v-2387536e"]]),Ve={class:"panel-content"},Me={key:0,class:"joints-list"},ke={class:"joint-info-row"},Pe={class:"joint-left"},Ce={class:"joint-name"},be={class:"joint-range"},Ee={class:"joint-type"},_e={key:0,class:"joint-control-row"},ze={class:"slider-container"},De=["min","max","value","onInput","disabled"],Ne={class:"value-display"},Se={class:"joint-value"},Be={class:"unit"},Ae={key:1,class:"empty-state"},ae=.001,Re=1e3,ce=60,Fe={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(z,{expose:g}){const u=z;e.ref(!0);const d=e.ref([]),h=e.ref(null),x=e.ref(null),P=e.ref(12.5),c=e.ref(),b=e.ref(1302),F=e.ref(30),D=e.ref(!1),S=e.ref(!1),E=e.ref(0),r=e.ref(0),k=e.ref(null),y=n.MathUtils.degToRad,t=e.ref(1),p=()=>Re/ce/t.value;let f=[];e.watch(()=>u.animationData,o=>{var i;b.value=o.extra.管长,P.value=o.extra.外径/2;let v=((i=me.cloneDeep(o))==null?void 0:i["输出(动画数据)"])??[];v&&v.length>0&&(f=v)},{deep:!0}),e.computed(()=>f.length>0);const C=(o,v=!1)=>o==="revolute"?v?Math.PI:-Math.PI:o==="prismatic"?v?1:-1:0,I=()=>{if(!h.value)return de.ElMessage.error("未加载 URDF"),!1;let o=null;return h.value.traverse(v=>{o||v.name==="Pipe_Link"&&v.traverse(i=>{i instanceof n.Mesh&&!o&&(o=i)})}),o?(o.position.y-=F.value*ae,c.value=o,o.material=new n.MeshPhongMaterial({color:11184810,shininess:80,side:n.DoubleSide}),!0):(de.ElMessage.error('在 "Pipe_Link" 内未找到任何 Mesh'),!1)},A=o=>{if(!o||!o.joints)return console.warn("URDF模型没有关节信息"),[];let v=null;if(o.traverse(V=>{V.name==="Pipe_Link"&&!v&&(v=V)}),v)c.value=v;else return console.warn("未找到管子模型"),[];const i=[];return Object.keys(o.joints).forEach(V=>{const s=o.joints[V];if(s._jointType==="fixed")return;const a=s.limit?{lower:s.limit.lower??C(s._jointType,!1),upper:s.limit.upper??C(s._jointType,!0)}:{lower:C(s._jointType,!1),upper:C(s._jointType,!0)};i.push({name:V,type:s._jointType||"unknown",limit:a,currentValue:s.angle||0,urdfJoint:s})}),i.sort((V,s)=>V.name.localeCompare(s.name))},L=(o,v)=>{const i=d.value.find(s=>s.name===o);if(!i)return;const V=parseFloat(v);if(i.limit){const s=Math.max(i.limit.lower,Math.min(i.limit.upper,V));i.currentValue=s}else i.currentValue=V;u.model&&u.model.setJointValue?u.model.setJointValue(o,i.currentValue):i.urdfJoint&&i.urdfJoint.setJointValue(i.currentValue)},$=o=>o.reduce((v,i)=>{let V=0;const s=i.Y??0,a=i.C??0,w=i.R??0;return s>0&&(V+=s),a>0&&w>0&&(V+=w*y(a)),v+V},0),J=o=>{const v=[],i=o.Y??0,V=o.B??0,s=o.C??0,a=o.R??0,w={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(!i&&!s)return v;if(v.push(w.pos.clone()),V!==0){const U=new n.Matrix4().makeRotationAxis(w.localY,y(V));w.localX.applyMatrix4(U),w.localZ.applyMatrix4(U)}if(i>0&&(w.pos.add(w.localY.clone().multiplyScalar(i*ae)),v.push(w.pos.clone())),s>0&&a>0){const U=y(s),T=a*ae,W=w.pos.clone().add(w.localX.clone().multiplyScalar(-T)),R=Math.max(16,Math.ceil(s/5));for(let M=1;M<=R;M++){const H=U*M/R,K=new n.Matrix4().makeRotationAxis(w.localZ,H),se=w.localX.clone().multiplyScalar(T).applyMatrix4(K),ie=W.clone().add(se);v.push(ie)}}return v},G=(o,v=0)=>{let i=f.slice(0,o+1);const V=f[o+1];if(V&&v>0){const R={...V,B:(V.B??0)*v,C:(V.C??0)*v};i.push(R)}const s=$(i),a=Math.max(0,b.value-s),w=[];w.push(new n.Vector3(0,0,0));const U=new n.Vector3(0,a*ae,0);a>0&&w.push(U);let T={pos:U.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const W=[];for(let R=i.length-1;R>=0;R--){const M=i[R],H=J(M);if(H.length>0){const K=H.map(Q=>{const ne=Q.clone(),ue=new n.Matrix4;return ue.makeBasis(T.localX,T.localY,T.localZ),ne.applyMatrix4(ue),ne.add(T.pos)});W.push(K);const te=K[K.length-1];T.pos=te.clone();const se=M.B??0,ie=M.C??0;if(se!==0){const Q=new n.Matrix4().makeRotationAxis(T.localY,y(se));T.localX.applyMatrix4(Q),T.localZ.applyMatrix4(Q)}if(ie>0){const Q=y(ie),ne=new n.Matrix4().makeRotationAxis(T.localZ,Q);T.localY.applyMatrix4(ne),T.localX.applyMatrix4(ne)}}}for(const R of W)R.length>1&&w.push(...R.slice(1));w.length<2&&w.push(new n.Vector3(0,.001,0));try{const R=new n.CatmullRomCurve3(w,!1,"catmullrom",.01),M=new n.TubeGeometry(R,Math.max(2,w.length*4),P.value*ae,18,!1);c.value.geometry.dispose(),c.value.geometry=M}catch(R){console.error("管件更新失败",R)}},Y=(o,v,i=1)=>{o&&(Object.keys(o).forEach(V=>{const s=o[V],a=d.value.find(w=>w.name===V);a&&(a.currentValue=s,u.model&&u.model.setJointValue?u.model.setJointValue(V,s):a.urdfJoint&&a.urdfJoint.setJointValue(s))}),G(v,i))},m=(o,v,i)=>o+(v-o)*i,l=(o,v,i)=>{if(!o||!v)return o||v;const V={};return Object.keys(o).forEach(s=>{const a=o[s],w=v[s];V[s]=m(a,w||a,i)}),V},_=()=>{if(f.length===0){console.warn("没有动画数据");return}I(),D.value=!0,S.value=!1,E.value=0,r.value=0,B()},B=()=>{if(!D.value||S.value)return;const o=E.value;if(o>=f.length-1){const s=f[f.length-1];Y(s,f.length-1,1),j();return}const v=r.value/ce,i=f[o],V=f[o+1];if(V){const s=l(i,V,v);Y(s,o,v)}else Y(i,o);r.value++,r.value>ce&&(r.value=0,E.value++),k.value=setTimeout(B,p())},O=()=>{S.value=!0,k.value&&(clearTimeout(k.value),k.value=null)},j=()=>{D.value=!1,S.value=!1,t.value=1,k.value&&(clearTimeout(k.value),k.value=null)};g({startAnimation:_,pauseAnimation:O,stopAnimation:j,resetAll:()=>{j(),E.value=0,r.value=0,d.value.forEach(o=>{(o.type==="revolute"||o.type==="prismatic")&&L(o.name,0)}),G(-1,0)},fastForward:()=>{t.value<4&&(t.value=Math.min(4,t.value*2))},fastBackward:()=>{t.value>.25&&(t.value=Math.max(.25,t.value/2))}}),e.watch(()=>u.model,o=>{o?(h.value=o,d.value=A(o)):d.value=[]},{immediate:!0});const ee=()=>{!u.model||D.value&&!S.value||d.value.forEach(o=>{o.urdfJoint&&o.urdfJoint.angle!==void 0&&(o.currentValue=o.urdfJoint.angle)})},le=()=>{const o=()=>{ee(),x.value=requestAnimationFrame(o)};o()},re=()=>{x.value&&(cancelAnimationFrame(x.value),x.value=null)};return e.onMounted(()=>{le()}),e.onUnmounted(()=>{re(),j()}),(o,v)=>(e.openBlock(),e.createElementBlock("div",Ve,[d.value.length>0?(e.openBlock(),e.createElementBlock("div",Me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,i=>{var V,s,a,w;return e.openBlock(),e.createElementBlock("div",{key:i.name,class:"joint-item"},[e.createElementVNode("div",ke,[e.createElementVNode("div",Pe,[e.createElementVNode("span",Ce,e.toDisplayString(i.name),1),e.createElementVNode("span",be," ["+e.toDisplayString(((V=i.limit)==null?void 0:V.lower.toFixed(2))??(i.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((s=i.limit)==null?void 0:s.upper.toFixed(2))??(i.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ee,e.toDisplayString(i.type),1)]),i.type==="revolute"||i.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",_e,[e.createElementVNode("div",ze,[e.createElementVNode("input",{type:"range",min:((a=i.limit)==null?void 0:a.lower)??(i.type==="revolute"?-Math.PI:-1),max:((w=i.limit)==null?void 0:w.upper)??(i.type==="revolute"?Math.PI:1),step:.01,value:i.currentValue,onInput:U=>L(i.name,U.target.value),class:"joint-slider",disabled:D.value&&!S.value},null,40,De)]),e.createElementVNode("div",Ne,[e.createElementVNode("span",Se,e.toDisplayString(i.currentValue?Number(i.currentValue).toFixed(3):"0.000"),1),e.createElementVNode("span",Be,e.toDisplayString(i.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",Ae,v[0]||(v[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Te=oe._export_sfc(Fe,[["__scopeId","data-v-bcf4fa92"]]),Le={class:"panel-content"},Ie="id",$e={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:z=>["breadth","firstLevel"].includes(z)}},emits:["nodeClick"],setup(z,{emit:g}){const u=z,d=g,h=e.ref([]),x={children:"children",label:"label"},P=r=>{d("nodeClick",r)},c=(r,k=0)=>{const y=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&r.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const p={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:k+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:c(t==null?void 0:t.children,k+1),path:t==null?void 0:t.name};y.push(p)}}),y},b=r=>r?[{name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:c(r==null?void 0:r.children,1),path:r==null?void 0:r.name}]:[],F=(r,k)=>{const y=[],t=[...r];for(;t.length>0&&y.length<k;){const p=t.shift();p.children&&p.children.length>0&&(y.push(p.id),t.push(...p.children))}return y},D=(r,k)=>{const y=[];return r.forEach(t=>{if(t.children&&t.children.length>0){y.push(t.id);const p=t.children.filter(f=>f.children&&f.children.length>0).slice(0,k).map(f=>f.id);y.push(...p)}}),y.slice(0,k+1)},S=e.computed(()=>!h.value||h.value.length===0?[]:u.expandStrategy==="firstLevel"?D(h.value,u.maxExpandCount):F(h.value,u.maxExpandCount)),E=e.computed(()=>u!=null&&u.model?b(u.model):[]);return e.watch(E,r=>{h.value=JSON.parse(JSON.stringify(r))},{immediate:!0}),(r,k)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(y,{data:h.value,props:x,"default-expanded-keys":S.value,"node-key":Ie,onNodeClick:P},null,8,["data","default-expanded-keys"])])}}},Je=oe._export_sfc($e,[["__scopeId","data-v-290ff4e1"]]),Oe=["xlink:href"],Ue=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(z){const g=z,u=e.computed(()=>({backgroundColor:g.backgroundColor})),d=e.computed(()=>`#${g.prefix}-${g.name}`),h=e.computed(()=>{const{size:x}=g;let P=`${x}`;return P=`${P.replace("px","")}px`,{width:P,height:P}});return(x,P)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:x.active}]),style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[x.$attrs.class,x.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(h.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":d.value},null,8,Oe)],6))],6))}}),N=oe._export_sfc(Ue,[["__scopeId","data-v-3150a90b"]]),Ge={class:"obj-viewer-container"},je={class:"buttonGroup-top"},qe={class:"buttonGroup-topLeft"},Xe={class:"buttonGroup-left"},He={class:"buttonGroup-right"},Ye={class:"buttonGroup-bottom"},Ze={class:"left-panel"},We={class:"panel-header"},Ke={key:1,class:"clipping-content"},Qe={class:"radio-group"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"radio-label"},at={class:"radio-label"},ot={class:"right-panel"},lt={class:"panel-header"},st={key:0,class:"loading-overlay"},it={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(z,{expose:g,emit:u}){const d=u;let h=null,x=!1;const P=e.ref(null),c=e.ref(!1),b=e.ref("");e.ref(!1);const F=e.ref(!1),D=e.ref(!1),S=e.ref(""),E=e.ref(!1),r=e.ref(""),k=e.ref(),{currentModels:y,initialCameraPosition:t,initialTargetPosition:p,initThreeJS:f,handleResize:C,fitCameraToAllModels:I,getThreeJSObjects:A,clearAllModels:L,cleanup:$}=ve(P),{isAnimating:J,toggleAnimation:G,stopAnimation:Y}=ge(A,y),{isClipping:m,activeClippingAxis:l,toggleClipping:_,updateClippingPlanes:B}=he(A,y),{addModelsFromUrls:O,loadModelByDefaultPath:j,urdfModel:q,modelBoundingBoxes:X}=pe.useModelLoader(A,y,c,b,L),Z=()=>{if(F.value||y.value.length===0)return;F.value=!0,J.value&&Y();const{camera:s,controls:a}=A();if(!s||!a)return;a.enabled=!0;const w=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,U=s.position.clone(),T=a.target.clone(),W=1500,R=Date.now(),M=()=>{const H=Date.now()-R,K=Math.min(H/W,1),te=w(K);s.position.lerpVectors(U,t.value,te),a.target.lerpVectors(T,p.value,te),K<1?requestAnimationFrame(M):F.value=!1};M()},ee=async()=>x?Promise.resolve():new Promise(s=>{const a=()=>{x?s():requestAnimationFrame(a)};a()}),le=async(s,a)=>{try{await ee(),J.value&&Y(),m.value&&_();const w=await a(s);return I(X),w}catch(w){throw console.error("加载模型失败:",w),w}},re=async s=>le(s,O),o=async s=>le(s,j),v=s=>{D.value=!0,S.value=s,s==="剖面视图"&&!m.value&&_()},i=s=>{E.value=!0,r.value=s,s==="动画仿真"&&d("getAnimationData")},V=()=>{e.nextTick(()=>{var s;(s=k.value)==null||s.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{f(),h=A().scene,x=!0,window.addEventListener("resize",C)}catch(s){console.error("Three.js初始化失败:",s)}}),e.onBeforeUnmount(()=>{x=!1,S.value="",r.value="",window.removeEventListener("resize",C),J.value&&Y(),$()}),g({addModelsFromUrls:re,loadModelByDefaultPath:o}),(s,a)=>{var U,T,W,R;const w=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Ge,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:P,class:"threejs-container"},null,512),e.createElementVNode("div",je,[e.createVNode(N,{name:"guanjianjiexi",size:"34"}),e.createVNode(N,{name:"guanjiekongzhi",size:"34"}),e.createVNode(N,{name:"gongyishengcheng",size:"34"}),e.createVNode(N,{name:"buchangshezhi",size:"34"}),e.createVNode(N,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",qe,[e.createVNode(N,{name:"viewReset",size:"24",onClick:Z,title:"重置"}),e.createVNode(N,{name:"fangda",size:"24",title:"放大"}),e.createVNode(N,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(N,{name:"lookAround",size:"24",onClick:e.unref(G),title:e.unref(J)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",Xe,[e.createVNode(N,{name:"jiegoushu",size:"24",onClick:a[0]||(a[0]=M=>v("场景树")),active:D.value&&S.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(N,{name:"clipping",size:"24",onClick:a[1]||(a[1]=M=>v("剖面视图")),active:D.value&&S.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[2]||(a[2]=M=>v("场景树3"))}),e.createVNode(N,{name:"donghuafangzhen",size:"24",onClick:a[3]||(a[3]=M=>v("场景4"))})]),e.createElementVNode("div",He,[e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"guanjiekongzhi",size:"24",onClick:a[4]||(a[4]=M=>i("关节控制")),active:E.value&&r.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:a[5]||(a[5]=M=>i("动画仿真")),active:E.value&&r.value==="动画仿真"},null,8,["active"]),e.createVNode(N,{name:"donghuafangzhen",size:"24"}),e.createVNode(N,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",Ye,[e.createVNode(N,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(U=k.value)==null?void 0:U.fastBackward},null,8,["onClick"]),e.createVNode(N,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:V}),e.createVNode(N,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(T=k.value)==null?void 0:T.fastForward},null,8,["onClick"]),e.createVNode(N,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(W=k.value)==null?void 0:W.pauseAnimation},null,8,["onClick"]),e.createVNode(N,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(R=k.value)==null?void 0:R.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",Ze,[e.createElementVNode("div",We,[e.createElementVNode("span",null,e.toDisplayString(S.value),1),e.createElementVNode("span",{class:"close",onClick:a[6]||(a[6]=M=>D.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[S.value==="场景树"?(e.openBlock(),e.createBlock(Je,{key:0,model:e.unref(q)},null,8,["model"])):e.createCommentVNode("",!0),S.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",Ke,[e.createElementVNode("div",Qe,[e.createElementVNode("label",et,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":a[7]||(a[7]=M=>e.isRef(l)?l.value=M:null),onChange:a[8]||(a[8]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[16]||(a[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",tt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":a[9]||(a[9]=M=>e.isRef(l)?l.value=M:null),onChange:a[10]||(a[10]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[17]||(a[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":a[11]||(a[11]=M=>e.isRef(l)?l.value=M:null),onChange:a[12]||(a[12]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[18]||(a[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",at,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":a[13]||(a[13]=M=>e.isRef(l)?l.value=M:null),onChange:a[14]||(a[14]=(...M)=>e.unref(B)&&e.unref(B)(...M))},null,544),[[e.vModelRadio,e.unref(l)]]),a[19]||(a[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",ot,[e.createElementVNode("div",lt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:a[15]||(a[15]=M=>E.value=!1)}," X ")]),e.createVNode(w,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Te,{ref_key:"jointRef",ref:k,model:e.unref(q),scene:e.unref(h),animationData:z.animationData},null,8,["model","scene","animationData"]),[[e.vShow,r.value==="关节控制"]]),e.withDirectives(e.createVNode(xe,{animationData:z.animationData},null,8,["animationData"]),[[e.vShow,r.value==="动画仿真"]])]),_:1})],512),[[e.vShow,E.value]]),c.value?(e.openBlock(),e.createElementBlock("div",st,[a[20]||(a[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(b.value),1)])):e.createCommentVNode("",!0)])}}},rt=oe._export_sfc(it,[["__scopeId","data-v-eb64b36c"]]);exports.default=rt;
@@ -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 b, withDirectives as We, createCommentVNode as fe, createVNode as F, unref as D, renderSlot as de, toDisplayString as he, withCtx as Ye, createBlock as $e, vShow as Je } from "vue";
2
- import { af as Qe, ag as re, ah as we, J as Ze, ai as z, K as ye, aj as C, ak as Se, C as G, al as v, c as q, am as et, j as tt, D as nt, n as Y, V as j, an as st, ao as be, ap as rt, aq as Ne, ar as it, as as ot, Y as Q, at, au as Ie, av as ct, aw as lt, ax as ut, ay as ie, az as Ce, aA as oe, aB as ft, aC as dt, Q as ht, aD as Z, Z as pt, t as Oe, l as mt, aE as X, aF as gt, u as Tt, aG as Rt, h as ve, aH as xt, w as Et, aI as At, R as _t, s as ee, P as Lt, o as Mt, aJ as wt, aK as yt, aL as St, aM as bt, aN as Nt, aO as ke, aP as It, aQ as pe, aR as me, aS as ge, aT as Te, aU as Re, $ as Ct, aV as Ot, B as Pe, aW as vt, k as kt } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-EOt2_XRY.js";
3
- import "./index-rGJF9UJ9.js";
4
- import { u as Pt, a as Ft, b as Dt, C as Ht } from "./iconfont-C4b-8B6C.js";
5
- import { M as Gt, O as Ut, S as jt } from "./MTLLoader-DBXJU4gy.js";
2
+ import { af as Qe, ag as re, ah as we, J as Ze, ai as z, K as ye, aj as C, ak as Se, C as G, al as v, c as q, am as et, j as tt, D as nt, n as Y, V as j, an as st, ao as be, ap as rt, aq as Ne, ar as it, as as ot, Y as Q, at, au as Ie, av as ct, aw as lt, ax as ut, ay as ie, az as Ce, aA as oe, aB as ft, aC as dt, Q as ht, aD as Z, Z as pt, t as Oe, l as mt, aE as X, aF as gt, u as Tt, aG as Rt, h as ve, aH as xt, w as Et, aI as At, R as _t, s as ee, P as Lt, o as Mt, aJ as wt, aK as yt, aL as St, aM as bt, aN as Nt, aO as ke, aP as It, aQ as pe, aR as me, aS as ge, aT as Te, aU as Re, $ as Ct, aV as Ot, B as Pe, aW as vt, k as kt } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BUMDcqtn.js";
3
+ import "./index-BK-oz1IK.js";
4
+ import { u as Pt, a as Ft, b as Dt, C as Ht } from "./iconfont-C5j4Td3D.js";
5
+ import { M as Gt, O as Ut, S as jt } from "./MTLLoader-D7sNoLcK.js";
6
6
  import { T as U } from "./svgIcon-4u4PW7Is.js";
7
7
  import { E as xe } from "./request-XJsZ4h2T.js";
8
8
  import { _ as Bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";