ss-component-new 1.3.340 → 1.3.342

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 (154) hide show
  1. package/dist/{MTLLoader-C-XJYnXR.js → MTLLoader-Ajg9K91w.js} +1 -1
  2. package/dist/{MTLLoader-Dx_OCevv.cjs → MTLLoader-PBhLgTVu.cjs} +1 -1
  3. package/dist/{OrbitControls-B55yzIKX.cjs → OrbitControls-C10-pt6H.cjs} +1 -1
  4. package/dist/{OrbitControls-BB87FyuR.js → OrbitControls-CgEewitL.js} +1 -1
  5. package/dist/{URDFLoader-Uh4bBb-n.cjs → URDFLoader-Bj47zJKE.cjs} +1 -1
  6. package/dist/{URDFLoader-DgP2bMhH.js → URDFLoader-CvMjtZ-x.js} +2 -2
  7. package/dist/{animationData-CF6benhM.js → animationData-BLdkUJ2X.js} +3 -3
  8. package/dist/{animationData-BfEyrEkb.cjs → animationData-D9-6Rod5.cjs} +1 -1
  9. package/dist/array-D7Bu5gb2.cjs +1 -0
  10. package/dist/{array-Dz0LlM28.js → array-DKwq_BSC.js} +38 -39
  11. package/dist/clone-BUCnBgnS.js +8 -0
  12. package/dist/clone-y_gmwkJo.cjs +1 -0
  13. package/dist/day-BNr9Td9D.cjs +7 -0
  14. package/dist/day-BV-VjzXX.js +2382 -0
  15. package/dist/{dayjs.min-bC5IyY3C.js → dayjs.min-B8ub8S6d.js} +4 -4
  16. package/dist/{dayjs.min-CSW85jLQ.cjs → dayjs.min-Bo5ALhPO.cjs} +1 -1
  17. package/dist/{iconfont-DV-mBuRs.js → iconfont-Cl-SDAtC.js} +2 -2
  18. package/dist/{iconfont-rvMUQHIL.cjs → iconfont-DpN6kvUK.cjs} +1 -1
  19. package/dist/index-6iwwUgL6.cjs +104 -0
  20. package/dist/{index-Dcp8sI4C.js → index-9V23Nn2F.js} +4 -4
  21. package/dist/index-9WLF0N-m.cjs +15 -0
  22. package/dist/{index-Ca3THBbJ.cjs → index-B0V9Wfze.cjs} +1 -1
  23. package/dist/index-B0cDSro0.cjs +1 -0
  24. package/dist/index-B4Yau3Cx.cjs +1 -0
  25. package/dist/index-B4u9cnxn.cjs +1 -0
  26. package/dist/{index-rW-jQkgq.js → index-B4yv_CI9.js} +9 -10
  27. package/dist/index-B5u9ckAG.cjs +1 -0
  28. package/dist/{index-C6gCT4vd.js → index-BGRqQYv0.js} +70 -71
  29. package/dist/{index-CbBP02RV.js → index-BLHM2RZs.js} +4 -4
  30. package/dist/{index-C4NN-IA4.js → index-BMt9iXGt.js} +16 -17
  31. package/dist/index-BO9LCv0L.js +327 -0
  32. package/dist/index-BTpsNI8m.cjs +1 -0
  33. package/dist/index-Bb9xuBcN.cjs +1 -0
  34. package/dist/{index-CHAqLCtD.js → index-Bieh0oMN.js} +8 -8
  35. package/dist/{index-BWpqDCVF.cjs → index-Bl1R6hLx.cjs} +1 -1
  36. package/dist/index-BndWdAyT.js +168 -0
  37. package/dist/index-BqtZ8oXB.cjs +1 -0
  38. package/dist/{index-CHIMUYG3.js → index-BxSJzmcq.js} +16 -17
  39. package/dist/{index-D0gKkud0.js → index-C3_fcg5b.js} +8 -20
  40. package/dist/{index-BSCoLGXF.js → index-CLasTJZ7.js} +318 -318
  41. package/dist/{index-0VkKesv_.js → index-CPuSbD0o.js} +13 -14
  42. package/dist/{index-DGwbEHLN.js → index-CUmttoQs.js} +6 -7
  43. package/dist/index-CWea8Hwx.cjs +2 -0
  44. package/dist/index-Cjsv9UB2.cjs +1 -0
  45. package/dist/{index-CHnN0kSC.js → index-CkJ5sZmH.js} +268 -279
  46. package/dist/{index-BPpYDffY.cjs → index-CyAk6NlY.cjs} +1 -1
  47. package/dist/index-Cz8oXtNa.cjs +1 -0
  48. package/dist/index-D0D-8tq3.cjs +1 -0
  49. package/dist/index-D28carCM.cjs +25 -0
  50. package/dist/{index-Ijbw1FIL.js → index-D2iun0qB.js} +18 -19
  51. package/dist/{index-BTgJ9oD-.cjs → index-D8TKh-Ur.cjs} +1 -1
  52. package/dist/index-DBl4_nFE.cjs +1 -0
  53. package/dist/{index-DMt7y2yA.js → index-DCBM-gqv.js} +104 -113
  54. package/dist/{index-COowXWF7.cjs → index-DCHyRwyR.cjs} +1 -1
  55. package/dist/index-DDz6oLBR.cjs +1 -0
  56. package/dist/{index-DWP-FYxV.js → index-DGaoFZNU.js} +13 -14
  57. package/dist/index-DJ3sA4Gm.cjs +1 -0
  58. package/dist/{index-c1EWDQO1.js → index-DKYHED4o.js} +1 -1
  59. package/dist/{index-CYgpY06q.js → index-DScuDjxN.js} +4 -4
  60. package/dist/{index-voXPz7Hq.js → index-DaHM_OEL.js} +251 -260
  61. package/dist/{index-S2ChvJMP.js → index-Dd6fkS6a.js} +1 -1
  62. package/dist/{index-D6Zkrpou.js → index-DehN_tZl.js} +13 -14
  63. package/dist/index-DfxDifWX.cjs +1 -0
  64. package/dist/{index-Bdh2uHRO.js → index-DimgHus_.js} +44 -45
  65. package/dist/index-DkR9zIgE.cjs +1 -0
  66. package/dist/index-DlDpjgK7.cjs +1 -0
  67. package/dist/{index-DN4OcDlg.js → index-Dmstdf9f.js} +1 -1
  68. package/dist/index-Ds0ibmGw.cjs +1 -0
  69. package/dist/{index-DLLST1Nd.js → index-DsfZZrDe.js} +11 -12
  70. package/dist/{index-Zvul3j_r.cjs → index-Dw5QRbm2.cjs} +1 -1
  71. package/dist/index-Dz06Dix4.js +21 -0
  72. package/dist/{index-C3lScvOV.cjs → index-Pmf6bCKe.cjs} +1 -1
  73. package/dist/index-_aEslAdL.cjs +1 -0
  74. package/dist/index-bs1KW4Mf.js +10008 -0
  75. package/dist/{index-CgjHHxqY.js → index-czdl81QC.js} +6 -7
  76. package/dist/index-fxwUfoBD.cjs +1 -0
  77. package/dist/index-jFQKdLGf.cjs +1 -0
  78. package/dist/{index-DyJCopUt.js → index-pfsYhNVv.js} +3 -4
  79. package/dist/index-qyNzhZ9p.js +68 -0
  80. package/dist/{index-9nQLsFiY.js → index-zwvfPNTm.js} +2 -2
  81. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BDgIVZve.js} +1950 -1956
  82. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dyd5heHe.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DAAbs6bU.cjs} +336 -336
  83. package/dist/main-BrOVZokA.cjs +11 -0
  84. package/dist/{main-Cd_mObtH.js → main-GGbIOSca.js} +8 -9
  85. package/dist/menu-CYazzvub.cjs +12 -0
  86. package/dist/menu-DGzm1FYA.js +5675 -0
  87. package/dist/menuIndex-Br2dXQqi.cjs +1 -0
  88. package/dist/menuIndex-CoVR5ix7.js +134 -0
  89. package/dist/ss-component.cjs +1 -1
  90. package/dist/ss-component.css +2 -2
  91. package/dist/ss-component.js +13 -13
  92. package/dist/ss-component2.cjs +1 -1
  93. package/dist/ss-component2.js +115 -10
  94. package/dist/ss-component3.cjs +1 -1
  95. package/dist/ss-component3.js +10 -5
  96. package/dist/{threeModel-CIZ5D8Df.js → threeModel-B8afF4RO.js} +4 -4
  97. package/dist/{threeModel-Dekl17Re.cjs → threeModel-BIcXUfRq.cjs} +1 -1
  98. package/dist/threePreview-CuXGNvBL.cjs +1 -0
  99. package/dist/{threePreview-B46ButBi.js → threePreview-DLxW-XYV.js} +6 -7
  100. package/dist/{threeSceneView-CoQQCgZ3.cjs → threeSceneView-DHahXsWx.cjs} +1 -1
  101. package/dist/{threeSceneView-D4mxD9hv.js → threeSceneView-RZtjgaQI.js} +14 -16
  102. package/dist/{threeSceneViewForCPMPIP-BR01ytzC.cjs → threeSceneViewForCPMPIP-0_i3LOfz.cjs} +1 -1
  103. package/dist/{threeSceneViewForCPMPIP-DTtZGOcw.js → threeSceneViewForCPMPIP-DMhM6ZvH.js} +10 -11
  104. package/dist/threeTrackPathView-CrlluuTz.cjs +1 -0
  105. package/dist/{threeTrackPathView-BQPS8ajS.js → threeTrackPathView-cclE9z18.js} +87 -88
  106. package/dist/threeViewerHost-BaEB4k1F.cjs +1 -0
  107. package/dist/{threeViewerHost-CsMI9jbX.js → threeViewerHost-LoU6OtMI.js} +10 -11
  108. package/dist/{urdfTree-umPKeRFh.cjs → urdfTree-BTD0A42y.cjs} +1 -1
  109. package/dist/{urdfTree-B118FC_3.js → urdfTree-RdS14ARy.js} +1 -1
  110. package/dist/{workpieceTreePanel-CwUXRyn3.cjs → workpieceTreePanel-CfwoCG1K.cjs} +1 -1
  111. package/dist/{workpieceTreePanel-D9TnLdIy.js → workpieceTreePanel-Q4_hCBXx.js} +4 -4
  112. package/package.json +1 -1
  113. package/dist/array-Dk18oefG.cjs +0 -1
  114. package/dist/clone-BDBSWARv.cjs +0 -1
  115. package/dist/clone-BqeCvECh.js +0 -8
  116. package/dist/index--E8u7lHy.cjs +0 -12
  117. package/dist/index-B38fQMRk.cjs +0 -1
  118. package/dist/index-BIg-Nt0x.cjs +0 -25
  119. package/dist/index-BQO25T-T.cjs +0 -1
  120. package/dist/index-BchGbZ1v.cjs +0 -15
  121. package/dist/index-Bio1_C_H.cjs +0 -1
  122. package/dist/index-BmJV5eVh.js +0 -4669
  123. package/dist/index-BtyugMgY.cjs +0 -1
  124. package/dist/index-BzeH13wt.cjs +0 -1
  125. package/dist/index-C3-1AlM-.js +0 -2765
  126. package/dist/index-C9baGOvW.js +0 -9647
  127. package/dist/index-CMsGT7Tl.cjs +0 -1
  128. package/dist/index-COTur3RT.cjs +0 -1
  129. package/dist/index-CUp0Z80f.cjs +0 -2
  130. package/dist/index-CoX9mofW.cjs +0 -1
  131. package/dist/index-CyQV3nI9.cjs +0 -1
  132. package/dist/index-DBhc2SoQ.cjs +0 -1
  133. package/dist/index-DBrXonf1.cjs +0 -1
  134. package/dist/index-DEfKSijb.cjs +0 -7
  135. package/dist/index-DNyLSjIf.cjs +0 -1
  136. package/dist/index-DOQApax-.cjs +0 -1
  137. package/dist/index-DtlQjI5L.cjs +0 -1
  138. package/dist/index-FJ_oMfF3.cjs +0 -1
  139. package/dist/index-L9DruvvE.cjs +0 -1
  140. package/dist/index-T25jN7df.cjs +0 -104
  141. package/dist/index-W6w3oiQ2.cjs +0 -1
  142. package/dist/index-ipcwULw-.js +0 -167
  143. package/dist/main-FOjt8u8O.cjs +0 -11
  144. package/dist/menu-7kw8Lwp_.cjs +0 -1
  145. package/dist/menu-CK0ndSHP.js +0 -1132
  146. package/dist/menuIndex-Ba-9R5jd.cjs +0 -1
  147. package/dist/menuIndex-DiNvd_FY.js +0 -125
  148. package/dist/obj/model.mtl +0 -42
  149. package/dist/obj/model.obj +0 -26110
  150. package/dist/threePreview-DcCfaIpB.cjs +0 -1
  151. package/dist/threeTrackPathView-C6IiddAw.cjs +0 -1
  152. package/dist/threeViewerHost-B3elQtpE.cjs +0 -1
  153. package/public/obj/model.mtl +0 -42
  154. package/public/obj/model.obj +0 -26110
@@ -1,22 +1,20 @@
1
1
  import { defineComponent as Le, ref as h, watch as ae, shallowRef as be, computed as Pe, onUnmounted as Ie, resolveComponent as U, createElementBlock as Ve, openBlock as Q, createElementVNode as u, createVNode as l, withCtx as M, createBlock as ye, createCommentVNode as ke, unref as X, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as qe, renderList as He, nextTick as Ke, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
- import { r as Te, s as Ye } from "./threeViewerHost-CsMI9jbX.js";
3
- import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-DV-mBuRs.js";
4
- import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-D9TnLdIy.js";
5
- import "./index-BmJV5eVh.js";
6
- import { c as st } from "./menu-CK0ndSHP.js";
7
- import "./dayjs.min-bC5IyY3C.js";
2
+ import { r as Te, s as Ye } from "./threeViewerHost-LoU6OtMI.js";
3
+ import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-Cl-SDAtC.js";
4
+ import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-Q4_hCBXx.js";
5
+ import { c as st } from "./menu-DGzm1FYA.js";
6
+ import "./dayjs.min-B8ub8S6d.js";
8
7
  import { y as it, E as j, z as rt, A as ct } from "./request-CoGtW0Ux.js";
9
8
  /* empty css */
10
- import { r as De, T as xe, V as D, p as q, q as ut, v as pt, j as Se, w as dt, L as mt, x as vt, y as ft, z as gt, F as ht, I as bt, J as yt, n as _t, K as wt } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js";
11
- import "./index-BSCoLGXF.js";
9
+ import { r as De, T as xe, V as D, p as q, q as ut, v as pt, j as Se, w as dt, L as mt, x as vt, y as ft, z as gt, F as ht, I as bt, J as yt, n as _t, K as wt } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BDgIVZve.js";
10
+ import "./index-CLasTJZ7.js";
12
11
  import "./index-BHtNKL1L.js";
13
12
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
14
- import { p as Be, q as Ct, s as kt } from "./index-C6gCT4vd.js";
15
- import "./index-CHIMUYG3.js";
16
- import "./index-C3-1AlM-.js";
17
- import "./index-DMt7y2yA.js";
18
- import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-CF6benhM.js";
19
- import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-B118FC_3.js";
13
+ import { p as Be, q as Ct, s as kt } from "./index-BGRqQYv0.js";
14
+ import "./index-BxSJzmcq.js";
15
+ import "./index-DCBM-gqv.js";
16
+ import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-BLdkUJ2X.js";
17
+ import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-RdS14ARy.js";
20
18
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
21
19
  import { s as Ft } from "./index-CnjGqJZS.js";
22
20
  import { T as Y } from "./svgIcon-4u4PW7Is.js";
@@ -1288,7 +1286,7 @@ ${G.value.join(" ")}
1288
1286
  ]);
1289
1287
  };
1290
1288
  }
1291
- }), ql = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-ec34be42"]]);
1289
+ }), Wl = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-ec34be42"]]);
1292
1290
  export {
1293
- ql as default
1291
+ Wl as default
1294
1292
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-B3elQtpE.cjs"),q=require("./iconfont-rvMUQHIL.cjs"),J=require("./workpieceTreePanel-CwUXRyn3.cjs");require("./index--E8u7lHy.cjs");const Ce=require("./menu-7kw8Lwp_.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dyd5heHe.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-umPKeRFh.cjs"),h=require("./request-BC2w2vGr.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-BfEyrEkb.cjs"),we=require("./MTLLoader-Dx_OCevv.cjs"),Se={class:"panel-content"},Pe={key:0,class:"animation-controls"},Te={class:"control-row"},Be={class:"control-row"},xe={class:"frame-info"},ze={class:"control-row"},De={key:1,class:"empty-state"},Le={class:"dialog-footer"},je=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),f=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-BaEB4k1F.cjs"),q=require("./iconfont-DpN6kvUK.cjs"),J=require("./workpieceTreePanel-CfwoCG1K.cjs"),Ce=require("./menu-CYazzvub.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DAAbs6bU.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-BTD0A42y.cjs"),h=require("./request-BC2w2vGr.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-D9-6Rod5.cjs"),we=require("./MTLLoader-PBhLgTVu.cjs"),Se={class:"panel-content"},Pe={key:0,class:"animation-controls"},Te={class:"control-row"},Be={class:"control-row"},xe={class:"frame-info"},ze={class:"control-row"},De={key:1,class:"empty-state"},Le={class:"dialog-footer"},je=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),f=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${S.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),M=e.computed(()=>s.value[f.value]||{});e.watch(()=>y.model,o=>{o?(u.value=new J.URDFRobotController(o),V.value=U.getAllLinkName(o),f.value=0):(u.value=null,V.value=[])},{immediate:!0});const D=o=>{if(o<0||o>=s.value.length){console.error(`帧索引 ${o} 超出范围`);return}const n=s.value[o];if(u.value){const p={};N.value.forEach(k=>{const r=parseFloat(n[k]);isNaN(r)||(p[k]=r)}),u.value.setJointAngles(p)}f.value=o,w.value=s.value.length>1?o/(s.value.length-1)*100:100},L=async o=>{try{for(let n=f.value;n<s.value.length;n++){if(o!==c)return;const p=s.value[n],k={};if(u.value)N.value.forEach(r=>{const d=parseFloat(p[r]);isNaN(d)||(k[r]=d)}),await u.value.animateToState(k,b.value,r=>{o===c&&(w.value=(n+r)/s.value.length*100)});else{if(await new Promise(r=>setTimeout(r,b.value)),o!==c)return;w.value=(n+1)/s.value.length*100}f.value=n}o===c&&(h.ElMessage.success("动画播放完成"),i.value="stopped",w.value=100)}catch(n){console.error("动画播放出错:",n),h.ElMessage.error("动画播放出错"),i.value="stopped"}},B=()=>{if(s.value.length===0){h.ElMessage.error("无动画数据");return}i.value==="stopped"&&(f.value=0,D(0)),i.value="playing",c++,L(c),h.ElMessage.info("动画播放中")},$=()=>{i.value==="playing"&&(c++,i.value="paused",h.ElMessage.info("动画已暂停"))},R=()=>{c++,i.value="stopped",f.value=0,w.value=0,D(0),h.ElMessage.info("动画已停止并重置")},G=()=>{i.value==="playing"?$():B()},x=o=>{c++,i.value="paused",D(o)},X=()=>{if(!T.value.trim()){h.ElMessage.warning("导入内容不能为空");return}const o=T.value.trim().split(`
@@ -1,17 +1,16 @@
1
1
  import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, createElementBlock as x, openBlock as g, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, withCtx as le, shallowRef as te, onMounted as Me, nextTick as me, onBeforeUnmount as Ee, withDirectives as I, vShow as W, unref as z, renderSlot as ve, createBlock as de } from "vue";
2
- import { s as pe } from "./threeViewerHost-CsMI9jbX.js";
3
- import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-DV-mBuRs.js";
4
- import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-D9TnLdIy.js";
5
- import "./index-BmJV5eVh.js";
6
- import { c as Ke } from "./menu-CK0ndSHP.js";
7
- import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js";
2
+ import { s as pe } from "./threeViewerHost-LoU6OtMI.js";
3
+ import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-Cl-SDAtC.js";
4
+ import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-Q4_hCBXx.js";
5
+ import { c as Ke } from "./menu-DGzm1FYA.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BDgIVZve.js";
8
7
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
9
- import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-B118FC_3.js";
8
+ import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-RdS14ARy.js";
10
9
  import { E as _ } from "./request-CoGtW0Ux.js";
11
10
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
11
  import { T as y } from "./svgIcon-4u4PW7Is.js";
13
- import { i as at } from "./animationData-CF6benhM.js";
14
- import { O as ot } from "./MTLLoader-C-XJYnXR.js";
12
+ import { i as at } from "./animationData-BLdkUJ2X.js";
13
+ import { O as ot } from "./MTLLoader-Ajg9K91w.js";
15
14
  const st = { class: "panel-content" }, it = {
16
15
  key: 0,
17
16
  class: "animation-controls"
@@ -535,7 +534,7 @@ ${R.value.join(" ")}
535
534
  ]);
536
535
  };
537
536
  }
538
- }), qt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
537
+ }), Zt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
539
538
  export {
540
- qt as default
539
+ Zt as default
541
540
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("./iconfont-DpN6kvUK.cjs"),p=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DAAbs6bU.cjs");require("./menu-CYazzvub.cjs");const K=require("./urdfTree-BTD0A42y.cjs"),I=require("./request-BC2w2vGr.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=require("./svgIcon-CDPAgQbj.cjs"),ge=require("./isString-DNBlKLZH.cjs");function ye(t=.5,o=4){const r=new p.Mesh(new p.ConeGeometry(t,o,32),new p.MeshStandardMaterial({color:"#919191ff",metalness:.3,roughness:.6})),s=r.geometry.parameters.height;return r.geometry.translate(0,-s/2,0),r.rotation.set(-90,0,0,"XYZ"),r}function Ce(t,o){t.position.copy(o)}function we(t,o,r=new p.Color(16711680)){const s=new p.Vector3;o.getWorldPosition(s);const a=t.geometry.attributes.position,n=t.geometry.attributes.color,l=new p.Color(55551);let c=1/0,f=-1;for(let u=0;u<a.count;u++){const v=new p.Vector3().fromBufferAttribute(a,u).distanceTo(s);v<c&&(c=v,f=u)}for(let u=0;u<n.count;u++)l.toArray(n.array,u*3);if(f!==-1){const u=r.toArray(),m=f*3+2;for(let v=0;v<m;v=v+3)n.array[v]=u[0],n.array[v+1]=u[1],n.array[v+2]=u[2]}n.needsUpdate=!0}function S(t,o,r,s=new p.Color(16711680)){Ce(t,o),we(r,t,s)}const ke={class:"panel-content"},_e={class:"animation-controls"},be={class:"control-row"},Ve={class:"control-row"},Ne={class:"frame-info"},Te={class:"control-row"},Ee=e.defineComponent({__name:"trackAnimationPanel",props:{cloud:{},knife:{},vectors:{}},emits:["getThreeData"],setup(t,{expose:o,emit:r}){const s=t,a=e.computed(()=>s.vectors),n=e.ref(!1),l=e.ref(0),c=e.ref(100);let f=!1;const u=g=>`第 ${g+1} 帧`,m=g=>{if(g<0||g>=a.value.length){console.error(`帧索引 ${g} 超出范围`);return}const y=a.value[g];l.value=g,S(s.knife,y,s.cloud)},v=async()=>{if(a.value.length===0){I.ElMessage.error("无法播放动画:无数据");return}if(!n.value){n.value=!0,f=!1,a.value.length-1===l.value&&(l.value=0);try{for(let g=l.value+1;g<a.value.length&&!f;g++)await new Promise(y=>setTimeout(y,c.value)),m(g);f||I.ElMessage.success("动画播放完成")}catch(g){console.error("动画播放出错:",g)}finally{n.value=!1}}},C=()=>{f=!0,n.value=!1,I.ElMessage.info("动画已停止")},N=g=>{n.value&&C(),m(g)},_=()=>{n.value&&C(),!(l.value+1>=a.value.length)&&m(l.value+1)},b=()=>{n.value&&C(),l.value!==0&&m(l.value-1)},h=()=>{l.value=0};return o({playAnimation:v,stopAnimation:C,forwardFrame:_,backwardFrame:b,resetAnimationFrame:h,reset:async()=>{await C(),h()}}),(g,y)=>{const L=e.resolveComponent("el-input-number"),B=e.resolveComponent("el-form-item"),D=e.resolveComponent("el-form"),q=e.resolveComponent("el-slider");return e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",_e,[e.createElementVNode("div",be,[e.createVNode(D,{"label-width":"auto",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(B,{label:"帧间隔 (ms):",prop:"frameDuration"},{default:e.withCtx(()=>[e.createVNode(L,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=z=>c.value=z),min:0,max:5e3,step:10,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),e.createElementVNode("div",Ve,[y[2]||(y[2]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Ne,e.toDisplayString(l.value+1)+" / "+e.toDisplayString(a.value.length),1)]),e.createElementVNode("div",Te,[y[3]||(y[3]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(q,{modelValue:l.value,"onUpdate:modelValue":y[1]||(y[1]=z=>l.value=z),min:0,max:a.value.length>0?a.value.length-1:0,step:1,"format-tooltip":u,onInput:N,disabled:a.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])])])])}}}),xe=R._export_sfc(Ee,[["__scopeId","data-v-f6fc7a8c"]]);function ze(t){const o=[];return t.forEach(r=>{const[s,a,n]=r.trim().split(/\s+/);o.push(+s,+a,+n)}),o}function U(t,o,r){switch(t){case"X":o.x=+r||0;break;case"Y":o.y=+r||0;break;case"Z":o.z=+r||0;break}}function Ae(t){const o=[],r=["X","Y","Z"];return t.forEach(s=>{const a={x:0,y:0,z:0},n=s.trim();if(!n)return;let l=null,c="";for(let f=0;f<(n==null?void 0:n.length);f++){const u=n[f],m=r.find(v=>v===u);if(m){l&&U(l,a,c),c="",l=m;continue}c=c+u}U(l,a,c),o.push(a.x,a.y,a.z)}),o}const Pe=t=>t==null?void 0:t.filter(r=>r.includes("=")),Me=t=>t.replace(/,/g,""),Fe=t=>t==null?void 0:t.map(r=>Me(r)),Ie=t=>{const o=Pe(t);return Fe(o)};function Ue(t){const o=Ie(t),r=[];return o.forEach(s=>{var v,C,N,_,b,h;let[a,n,l,c]=s.trim().split(/\s+/);n=(v=n==null?void 0:n.trim)==null?void 0:v.call(n),l=(C=l==null?void 0:l.trim)==null?void 0:C.call(l),c=(N=c==null?void 0:c.trim)==null?void 0:N.call(c);const[,f]=(_=n==null?void 0:n.split)==null?void 0:_.call(n,"="),[,u]=(b=l==null?void 0:l.split)==null?void 0:b.call(l,"="),[,m]=(h=c==null?void 0:c.split)==null?void 0:h.call(c,"=");r.push(+f,+u,+m)}),r}const Le=t=>t>="0"&&t<="9",Be=t=>t==="+"||t==="-",De=t=>t===".";function qe(t){return Le(t)||Be(t)||De(t)}function $e(t){const o=[],r=new Set(["X","Y","Z"]);return t.forEach(s=>{const a={x:0,y:0,z:0},n=s.trim();if(!n)return;let l=null,c="";for(let f=0;f<(n==null?void 0:n.length);f++){const u=n[f];if(u==="T")break;const m=r.has(u)?u:null,v=qe(u);if(m||!v){l&&U(l,a,c),l=m,c="";continue}c=c+u}l&&U(l,a,c),o.push(a.x,a.y,a.z)}),o}function je(t){return t==null?void 0:t.includes("=")}async function Xe(t){var a,n;const o=(a=t==null?void 0:t.trim())==null?void 0:a.split(/\r?\n/);if(je(t))return Ue(o);const r=o==null?void 0:o[0],s=(n=r==null?void 0:r.trim())==null?void 0:n.split(/\s+/);if((s==null?void 0:s.length)>=3)return ze(o);if((s==null?void 0:s.length)===1)return Ae(o)}async function Ye(t){const o=t.trim().split(/\r?\n/),r=[];return o.forEach(s=>{const a=s.trim().split(/\s+/);if(a.length!=3)return;const[n,l,c]=a;r.push(+n,+l,+c)}),r}async function Ze(t){const o=t.trim().split(/\r?\n/),r=[];return o.forEach(s=>{const a=s.trim().split(/\s+/);if(a.length!=3)return;const[n,l,c]=a;r.push(+n,+l,+c)}),r}async function Oe(t){let o=t.trim().split(/\r?\n/);return o=o.filter(s=>{const a=s.startsWith("X")||s.startsWith("Y")||s.startsWith("Z"),n=s.startsWith("G")&&(s.includes("X")||s.includes("Y")||s.includes("Z")),l=s.startsWith("N")&&(s.includes("X")||s.includes("Y")||s.includes("Z"));return a||n||l}),$e(o)}async function Ge(t,o){const{isCyd:r,isUv:s,isCpt:a,isNc:n}=o;return s?Xe(t):r?Ze(t):a?Ye(t):n?Oe(t):[]}function Ke(t){const o=[];for(let r=0;r<t.length;r+=3)o.push(new p.Vector3(t[r],t[r+1],t[r+2]));return o}function Re(t){const o=new p.BufferGeometry;o.setAttribute("position",new p.Float32BufferAttribute(t,3));const r=new p.LineBasicMaterial({color:55551,linewidth:3});return new p.Line(o,r)}function Se(t,o){if(!o||o.length<3)return;const{scene:r,camera:s,renderer:a,controls:n}=t();if(!r||!s||!a||!n)return;const l=Re(o);return l.name="轨迹路径",r.add(l),l}function We(t,o,r,s=4,a=50){let n=1/0,l=-1/0,c=1/0,f=-1/0,u=1/0,m=-1/0;for(let h=0;h<t.length;h+=3){const A=t[h],g=t[h+1],y=t[h+2];n=Math.min(n,A),l=Math.max(l,A),c=Math.min(c,g),f=Math.max(f,g),u=Math.min(u,y),m=Math.max(m,y)}const C=Math.sqrt((l-n)**2+(f-c)**2+(m-u)**2)*.05,N=p.MathUtils.degToRad(o.fov),_=2*Math.tan(N/2)*a,b=C/_*r.domElement.height*(s/4);return Math.min(.4,b)}function He(t){if(t.length%3!==0)return console.error("points array length is not a multiple of 3:",t),null;const o=new p.BufferGeometry;o.setAttribute("position",new p.Float32BufferAttribute(t,3));const r=new Float32Array(t.length);for(let n=0;n<t.length;n+=3)r[n]=0,r[n+1]=.847,r[n+2]=1;o.setAttribute("color",new p.BufferAttribute(r,3));const s=new p.PointsMaterial({vertexColors:!0,size:.4,sizeAttenuation:!0}),a=new p.Points(o,s);return s.needsUpdate=!0,a}function Je(t,o){if(!o)return;const{scene:r,camera:s,renderer:a,controls:n}=t();if(!r||!s||!a||!n)return;const l=He(o);if(!l)return;l.name="轨迹路径",r.add(l);const c=We(o,s,a,.1,50);return l.material.size=c,l}const Qe={class:"obj-viewer-container"},et={class:"buttonGroup-topLeft"},tt={class:"buttonGroup-left"},nt={class:"buttonGroup-right"},ot={class:"buttonGroup-bottom"},rt={class:"left-panel"},lt={class:"panel-header"},st={class:"panel-body"},it={class:"right-panel"},at={class:"panel-header"},ct={class:"panel-body"},ut={key:0,class:"loading-overlay"},dt=e.defineComponent({__name:"threeTrackPathView",props:{fileBlobs:{},threeData:{default:()=>""},trackFileType:{}},setup(t){const o=t,r=e.ref(null),s=e.ref(!1),a=e.ref(""),n=e.ref(),l=e.ref(!1),c=e.ref(""),f=e.ref(!1),u=e.ref(""),m=e.shallowRef(null),v=e.shallowRef(null),{currentModels:C,resetView:N,initThreeJS:_,handleResize:b,getThreeJSObjects:h,cleanup:A,setModels:g,setAndFitModels:y,axesHelperVisible:L,toggleAxesVisibility:B,zoomIn:D,zoomOut:q}=x.useThreeJS(r),{isAnimating:z,toggleAnimation:W,startAnimation:vt,stopAnimation:H}=x.useAnimation(h,C),{isClipping:J,activeClippingAxis:Y,toggleClipping:Q,updateClippingPlanes:ee}=x.useClipping(h,C),te=()=>{B()},ne=i=>{Y.value=i,ee()},$=i=>{l.value=!0,c.value=i,i==="剖面视图"&&!J.value&&Q()},j=i=>{f.value=!0,u.value=i},X=e.ref([]),P=e.ref([]),oe=e.computed(()=>{var d;return(d=o.trackFileType)==null?void 0:d.isUv}),re=e.computed(()=>{var d;return(d=o.trackFileType)==null?void 0:d.isCyd}),le=e.computed(()=>{var d;return(d=o.trackFileType)==null?void 0:d.isCpt}),T=e.computed(()=>{var d;return(d=o.trackFileType)==null?void 0:d.isNc}),Z=e.computed(()=>{const i=o.fileBlobs||[];return i==null?void 0:i[0]});let k=e.shallowRef(),E=e.shallowRef();const se=()=>{const{scene:i}=h();k.value&&i&&(x.disposeObj(k.value,i),k.value=null)},ie=()=>{const{scene:i}=h();E.value&&i&&(x.disposeObj(E.value,i),E.value=null)},O=()=>{se(),ie()},ae=async i=>{const d=URL.createObjectURL(i),M=await p.readFileText(d);if(URL.revokeObjectURL(d),ge.isString(M)){X.value=await Ge(M,o.trackFileType)||[];const V=X.value;oe.value&&(k.value=Se(h,V)),(re.value||le.value||T.value)&&(k.value=Je(h,V))}},ce=async()=>{var i,d;E.value=ye(),P.value=Ke(X.value),P.value&&P.value.length&&(S(E.value,P.value[0],k.value,new p.Color(16711680)),(d=(i=v.value)==null?void 0:i.add)==null||d.call(i,E.value))},G=async i=>{O(),await ae(i),k.value&&x.frameCameraToObject3D(h,k.value),T.value&&ce()};e.watch(()=>Z.value,async i=>{i&&await G(i)},{immediate:!0,deep:!0});const ue=async()=>{var i;await((i=n==null?void 0:n.value)==null?void 0:i.reset()),await G(Z.value)},de=()=>{var i;T.value&&((i=n==null?void 0:n.value)==null||i.playAnimation())},fe=()=>{var i;T.value&&((i=n==null?void 0:n.value)==null||i.stopAnimation())},ve=()=>{var i;T.value&&((i=n==null?void 0:n.value)==null||i.forwardFrame())},me=()=>{var i;T.value&&((i=n==null?void 0:n.value)==null||i.backwardFrame())},pe=()=>{_(),e.nextTick(()=>{r.value&&(F=new ResizeObserver(b),F.observe(r.value))});const i=h();v.value=i.scene,v.value&&(v.value.name="CPMPIP")},he=()=>{F&&F.disconnect(),z.value&&H(),O(),A()};let F=null;return e.onMounted(async()=>{try{pe()}catch(i){console.error("Three.js 初始化失败:",i),I.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{he()}),(i,d)=>{const M=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:r,class:"threejs-container"},null,512),e.createElementVNode("div",et,[e.createVNode(w.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:ue,title:"重置"}),e.createVNode(w.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大",onClick:e.unref(D)},null,8,["onClick"]),e.createVNode(w.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:e.unref(q)},null,8,["onClick"]),e.createVNode(w.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:e.unref(W),title:e.unref(z)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(w.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(L),onClick:te,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",tt,[e.renderSlot(i.$slots,"button-left",{switchRightPanel:$},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:d[0]||(d[0]=V=>$("场景树")),active:l.value&&c.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"clipping",size:"24",onClick:d[1]||(d[1]=V=>$("剖面视图")),active:l.value&&c.value==="剖面视图",title:"剖面视图"},null,8,["active"])]),e.createElementVNode("div",nt,[e.renderSlot(i.$slots,"button-right",{switchRightPanel:j},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:d[2]||(d[2]=V=>j("关节控制")),active:f.value&&u.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:d[3]||(d[3]=V=>j("动画仿真")),active:f.value&&u.value==="动画仿真"},null,8,["active"])]),e.createElementVNode("div",ot,[e.createVNode(w.ThreeSvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:me}),e.createVNode(w.ThreeSvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:de}),e.createVNode(w.ThreeSvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:ve}),e.createVNode(w.ThreeSvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:fe})]),e.withDirectives(e.createElementVNode("div",rt,[e.createElementVNode("div",lt,[e.createElementVNode("span",null,e.toDisplayString(c.value),1),e.createElementVNode("span",{class:"close",onClick:d[4]||(d[4]=V=>l.value=!1)}," X ")]),e.createElementVNode("div",st,[e.createVNode(M,{height:"100%"},{default:e.withCtx(()=>[c.value==="场景树"?(e.openBlock(),e.createBlock(K.UrdfTree,{key:0,model:m.value},null,8,["model"])):e.createCommentVNode("",!0),c.value==="剖面视图"?(e.openBlock(),e.createBlock(x.ClippingPanel,{key:1,value:e.unref(Y),onChange:ne},null,8,["value"])):e.createCommentVNode("",!0)]),_:1})])],512),[[e.vShow,l.value]]),e.withDirectives(e.createElementVNode("div",it,[e.createElementVNode("div",at,[e.createElementVNode("span",null,e.toDisplayString(u.value),1),e.createElementVNode("span",{class:"close",onClick:d[5]||(d[5]=V=>f.value=!1)}," X ")]),e.createElementVNode("div",ct,[e.createVNode(M,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(K.JointPanel,{model:m.value},null,8,["model"]),[[e.vShow,u.value==="关节控制"]]),e.withDirectives(e.createVNode(xe,{ref_key:"animationPanelRef",ref:n,cloud:e.unref(k),knife:e.unref(E),vectors:P.value},null,8,["cloud","knife","vectors"]),[[e.vShow,u.value==="动画仿真"&&T.value]])]),_:1})])],512),[[e.vShow,f.value]]),s.value?(e.openBlock(),e.createElementBlock("div",ut,[d[6]||(d[6]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(a.value),1)])):e.createCommentVNode("",!0)])}}}),ft=R._export_sfc(dt,[["__scopeId","data-v-7178b621"]]);exports.default=ft;
@@ -1,9 +1,8 @@
1
- import { defineComponent as ce, computed as U, ref as k, resolveComponent as j, createElementBlock as ee, openBlock as E, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as X, shallowRef as D, watch as je, onMounted as Ee, onBeforeUnmount as Xe, withDirectives as N, createCommentVNode as S, unref as A, renderSlot as ae, createBlock as le, vShow as Z, nextTick as Ye } from "vue";
2
- import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-DV-mBuRs.js";
3
- import { C as O, j as Oe, b2 as qe, w as Ge, V as te, x as ue, _ as fe, a4 as Ke, z as We, a3 as Je, a0 as Re, a1 as He, q as Qe, b3 as Se } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js";
4
- import "./index-BmJV5eVh.js";
5
- import "./menu-CK0ndSHP.js";
6
- import { U as et, J as tt } from "./urdfTree-B118FC_3.js";
1
+ import { defineComponent as ce, computed as U, ref as k, resolveComponent as j, createElementBlock as ee, openBlock as E, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as X, shallowRef as D, watch as je, onMounted as Ee, onBeforeUnmount as Xe, withDirectives as N, createCommentVNode as S, unref as A, renderSlot as ie, createBlock as le, vShow as Z, nextTick as Ye } from "vue";
2
+ import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-Cl-SDAtC.js";
3
+ import { C as O, j as Oe, b2 as qe, w as Ge, V as te, x as ue, _ as fe, a4 as Ke, z as We, a3 as Je, a0 as Re, a1 as He, q as Qe, b3 as Se } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BDgIVZve.js";
4
+ import "./menu-DGzm1FYA.js";
5
+ import { U as et, J as tt } from "./urdfTree-RdS14ARy.js";
7
6
  import { E as B } from "./request-CoGtW0Ux.js";
8
7
  import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
8
  import { T as w } from "./svgIcon-4u4PW7Is.js";
@@ -18,19 +17,19 @@ function ot(e = 0.5, n = 4) {
18
17
  // ↓ 降金属
19
18
  roughness: 0.6
20
19
  })
21
- ), i = o.geometry.parameters.height;
22
- return o.geometry.translate(0, -i / 2, 0), o.rotation.set(-90, 0, 0, "XYZ"), o;
20
+ ), a = o.geometry.parameters.height;
21
+ return o.geometry.translate(0, -a / 2, 0), o.rotation.set(-90, 0, 0, "XYZ"), o;
23
22
  }
24
23
  function st(e, n) {
25
24
  e.position.copy(n);
26
25
  }
27
- function it(e, n, o = new O(16711680)) {
28
- const i = new te();
29
- n.getWorldPosition(i);
26
+ function at(e, n, o = new O(16711680)) {
27
+ const a = new te();
28
+ n.getWorldPosition(a);
30
29
  const l = e.geometry.attributes.position, t = e.geometry.attributes.color, s = new O(55551);
31
30
  let r = 1 / 0, f = -1;
32
31
  for (let c = 0; c < l.count; c++) {
33
- const v = new te().fromBufferAttribute(l, c).distanceTo(i);
32
+ const v = new te().fromBufferAttribute(l, c).distanceTo(a);
34
33
  v < r && (r = v, f = c);
35
34
  }
36
35
  for (let c = 0; c < t.count; c++) s.toArray(t.array, c * 3);
@@ -41,10 +40,10 @@ function it(e, n, o = new O(16711680)) {
41
40
  }
42
41
  t.needsUpdate = !0;
43
42
  }
44
- function de(e, n, o, i = new O(16711680)) {
45
- st(e, n), it(o, e, i);
43
+ function de(e, n, o, a = new O(16711680)) {
44
+ st(e, n), at(o, e, a);
46
45
  }
47
- const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt = { class: "control-row" }, ct = { class: "control-row" }, ut = { class: "frame-info" }, ft = { class: "control-row" }, vt = /* @__PURE__ */ ce({
46
+ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt = { class: "control-row" }, ct = { class: "control-row" }, ut = { class: "frame-info" }, ft = { class: "control-row" }, vt = /* @__PURE__ */ ce({
48
47
  __name: "trackAnimationPanel",
49
48
  props: {
50
49
  cloud: {},
@@ -53,7 +52,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
53
52
  },
54
53
  emits: ["getThreeData"],
55
54
  setup(e, { expose: n, emit: o }) {
56
- const i = e, l = U(() => i.vectors), t = k(!1), s = k(0), r = k(100);
55
+ const a = e, l = U(() => a.vectors), t = k(!1), s = k(0), r = k(100);
57
56
  let f = !1;
58
57
  const c = (g) => `第 ${g + 1} 帧`, m = (g) => {
59
58
  if (g < 0 || g >= l.value.length) {
@@ -61,7 +60,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
61
60
  return;
62
61
  }
63
62
  const y = l.value[g];
64
- s.value = g, de(i.knife, y, i.cloud);
63
+ s.value = g, de(a.knife, y, a.cloud);
65
64
  }, v = async () => {
66
65
  if (l.value.length === 0) {
67
66
  B.error("无法播放动画:无数据");
@@ -94,7 +93,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
94
93
  await C(), h();
95
94
  } }), (g, y) => {
96
95
  const G = j("el-input-number"), K = j("el-form-item"), W = j("el-form"), J = j("el-slider");
97
- return E(), ee("div", at, [
96
+ return E(), ee("div", it, [
98
97
  d("div", lt, [
99
98
  d("div", rt, [
100
99
  p(W, {
@@ -148,8 +147,8 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
148
147
  function mt(e) {
149
148
  const n = [];
150
149
  return e.forEach((o) => {
151
- const [i, l, t] = o.trim().split(/\s+/);
152
- n.push(+i, +l, +t);
150
+ const [a, l, t] = o.trim().split(/\s+/);
151
+ n.push(+a, +l, +t);
153
152
  }), n;
154
153
  }
155
154
  function q(e, n, o) {
@@ -167,12 +166,12 @@ function q(e, n, o) {
167
166
  }
168
167
  function pt(e) {
169
168
  const n = [], o = ["X", "Y", "Z"];
170
- return e.forEach((i) => {
169
+ return e.forEach((a) => {
171
170
  const l = {
172
171
  x: 0,
173
172
  y: 0,
174
173
  z: 0
175
- }, t = i.trim();
174
+ }, t = a.trim();
176
175
  if (!t)
177
176
  return;
178
177
  let s = null, r = "";
@@ -193,9 +192,9 @@ const ht = (e) => e == null ? void 0 : e.filter((o) => o.includes("=")), gt = (e
193
192
  };
194
193
  function wt(e) {
195
194
  const n = Ct(e), o = [];
196
- return n.forEach((i) => {
195
+ return n.forEach((a) => {
197
196
  var v, C, x, _, T, h;
198
- let [l, t, s, r] = i.trim().split(/\s+/);
197
+ let [l, t, s, r] = a.trim().split(/\s+/);
199
198
  t = (v = t == null ? void 0 : t.trim) == null ? void 0 : v.call(t), s = (C = s == null ? void 0 : s.trim) == null ? void 0 : C.call(s), r = (x = r == null ? void 0 : r.trim) == null ? void 0 : x.call(r);
200
199
  const [, f] = (_ = t == null ? void 0 : t.split) == null ? void 0 : _.call(t, "="), [, c] = (T = s == null ? void 0 : s.split) == null ? void 0 : T.call(s, "="), [, m] = (h = r == null ? void 0 : r.split) == null ? void 0 : h.call(r, "=");
201
200
  o.push(+f, +c, +m);
@@ -207,12 +206,12 @@ function Tt(e) {
207
206
  }
208
207
  function zt(e) {
209
208
  const n = [], o = /* @__PURE__ */ new Set(["X", "Y", "Z"]);
210
- return e.forEach((i) => {
209
+ return e.forEach((a) => {
211
210
  const l = {
212
211
  x: 0,
213
212
  y: 0,
214
213
  z: 0
215
- }, t = i.trim();
214
+ }, t = a.trim();
216
215
  if (!t)
217
216
  return;
218
217
  let s = null, r = "";
@@ -238,16 +237,16 @@ async function xt(e) {
238
237
  const n = (l = e == null ? void 0 : e.trim()) == null ? void 0 : l.split(/\r?\n/);
239
238
  if (At(e))
240
239
  return wt(n);
241
- const o = n == null ? void 0 : n[0], i = (t = o == null ? void 0 : o.trim()) == null ? void 0 : t.split(/\s+/);
242
- if ((i == null ? void 0 : i.length) >= 3)
240
+ const o = n == null ? void 0 : n[0], a = (t = o == null ? void 0 : o.trim()) == null ? void 0 : t.split(/\s+/);
241
+ if ((a == null ? void 0 : a.length) >= 3)
243
242
  return mt(n);
244
- if ((i == null ? void 0 : i.length) === 1)
243
+ if ((a == null ? void 0 : a.length) === 1)
245
244
  return pt(n);
246
245
  }
247
246
  async function Pt(e) {
248
247
  const n = e.trim().split(/\r?\n/), o = [];
249
- return n.forEach((i) => {
250
- const l = i.trim().split(/\s+/);
248
+ return n.forEach((a) => {
249
+ const l = a.trim().split(/\s+/);
251
250
  if (l.length != 3)
252
251
  return;
253
252
  const [t, s, r] = l;
@@ -256,8 +255,8 @@ async function Pt(e) {
256
255
  }
257
256
  async function Ft(e) {
258
257
  const n = e.trim().split(/\r?\n/), o = [];
259
- return n.forEach((i) => {
260
- const l = i.trim().split(/\s+/);
258
+ return n.forEach((a) => {
259
+ const l = a.trim().split(/\s+/);
261
260
  if (l.length != 3)
262
261
  return;
263
262
  const [t, s, r] = l;
@@ -266,14 +265,14 @@ async function Ft(e) {
266
265
  }
267
266
  async function Mt(e) {
268
267
  let n = e.trim().split(/\r?\n/);
269
- return n = n.filter((i) => {
270
- const l = i.startsWith("X") || i.startsWith("Y") || i.startsWith("Z"), t = i.startsWith("G") && (i.includes("X") || i.includes("Y") || i.includes("Z")), s = i.startsWith("N") && (i.includes("X") || i.includes("Y") || i.includes("Z"));
268
+ return n = n.filter((a) => {
269
+ const l = a.startsWith("X") || a.startsWith("Y") || a.startsWith("Z"), t = a.startsWith("G") && (a.includes("X") || a.includes("Y") || a.includes("Z")), s = a.startsWith("N") && (a.includes("X") || a.includes("Y") || a.includes("Z"));
271
270
  return l || t || s;
272
271
  }), zt(n);
273
272
  }
274
273
  async function Ut(e, n) {
275
- const { isCyd: o, isUv: i, isCpt: l, isNc: t } = n;
276
- return i ? xt(e) : o ? Ft(e) : l ? Pt(e) : t ? Mt(e) : [];
274
+ const { isCyd: o, isUv: a, isCpt: l, isNc: t } = n;
275
+ return a ? xt(e) : o ? Ft(e) : l ? Pt(e) : t ? Mt(e) : [];
277
276
  }
278
277
  function Lt(e) {
279
278
  const n = [];
@@ -293,19 +292,19 @@ function Vt(e) {
293
292
  function $t(e, n) {
294
293
  if (!n || n.length < 3)
295
294
  return;
296
- const { scene: o, camera: i, renderer: l, controls: t } = e();
297
- if (!o || !i || !l || !t)
295
+ const { scene: o, camera: a, renderer: l, controls: t } = e();
296
+ if (!o || !a || !l || !t)
298
297
  return;
299
298
  const s = Vt(n);
300
299
  return s.name = "轨迹路径", o.add(s), s;
301
300
  }
302
- function jt(e, n, o, i = 4, l = 50) {
301
+ function jt(e, n, o, a = 4, l = 50) {
303
302
  let t = 1 / 0, s = -1 / 0, r = 1 / 0, f = -1 / 0, c = 1 / 0, m = -1 / 0;
304
303
  for (let h = 0; h < e.length; h += 3) {
305
304
  const L = e[h], g = e[h + 1], y = e[h + 2];
306
305
  t = Math.min(t, L), s = Math.max(s, L), r = Math.min(r, g), f = Math.max(f, g), c = Math.min(c, y), m = Math.max(m, y);
307
306
  }
308
- const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, x = Qe.degToRad(n.fov), _ = 2 * Math.tan(x / 2) * l, T = C / _ * o.domElement.height * (i / 4);
307
+ const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, x = Qe.degToRad(n.fov), _ = 2 * Math.tan(x / 2) * l, T = C / _ * o.domElement.height * (a / 4);
309
308
  return Math.min(0.4, T);
310
309
  }
311
310
  function Et(e) {
@@ -317,25 +316,25 @@ function Et(e) {
317
316
  for (let t = 0; t < e.length; t += 3)
318
317
  o[t] = 0, o[t + 1] = 0.847, o[t + 2] = 1;
319
318
  n.setAttribute("color", new Je(o, 3));
320
- const i = new Re({
319
+ const a = new Re({
321
320
  vertexColors: !0,
322
321
  size: 0.4,
323
322
  // 像素世界单位
324
323
  sizeAttenuation: !0
325
- }), l = new He(n, i);
326
- return i.needsUpdate = !0, l;
324
+ }), l = new He(n, a);
325
+ return a.needsUpdate = !0, l;
327
326
  }
328
327
  function Xt(e, n) {
329
328
  if (!n)
330
329
  return;
331
- const { scene: o, camera: i, renderer: l, controls: t } = e();
332
- if (!o || !i || !l || !t)
330
+ const { scene: o, camera: a, renderer: l, controls: t } = e();
331
+ if (!o || !a || !l || !t)
333
332
  return;
334
333
  const s = Et(n);
335
334
  if (!s)
336
335
  return;
337
336
  s.name = "轨迹路径", o.add(s);
338
- const r = jt(n, i, l, 0.1, 50);
337
+ const r = jt(n, a, l, 0.1, 50);
339
338
  return s.material.size = r, s;
340
339
  }
341
340
  const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft" }, Nt = { class: "buttonGroup-left" }, Zt = { class: "buttonGroup-right" }, Bt = { class: "buttonGroup-bottom" }, It = { class: "left-panel" }, Ot = { class: "panel-header" }, qt = { class: "panel-body" }, Gt = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Jt = {
@@ -349,7 +348,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
349
348
  trackFileType: {}
350
349
  },
351
350
  setup(e) {
352
- const n = e, o = k(null), i = k(!1), l = k(""), t = k(), s = k(!1), r = k(""), f = k(!1), c = k(""), m = D(null), v = D(null), {
351
+ const n = e, o = k(null), a = k(!1), l = k(""), t = k(), s = k(!1), r = k(""), f = k(!1), c = k(""), m = D(null), v = D(null), {
353
352
  currentModels: C,
354
353
  resetView: x,
355
354
  initThreeJS: _,
@@ -364,12 +363,12 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
364
363
  zoomOut: J
365
364
  } = De(o), { isAnimating: M, toggleAnimation: me, startAnimation: Ht, stopAnimation: pe } = Ne(h, C), { isClipping: he, activeClippingAxis: ne, toggleClipping: ge, updateClippingPlanes: ye } = Ze(h, C), Ce = () => {
366
365
  K();
367
- }, we = (a) => {
368
- ne.value = a, ye();
369
- }, R = (a) => {
370
- s.value = !0, r.value = a, a === "剖面视图" && !he.value && ge();
371
- }, H = (a) => {
372
- f.value = !0, c.value = a;
366
+ }, we = (i) => {
367
+ ne.value = i, ye();
368
+ }, R = (i) => {
369
+ s.value = !0, r.value = i, i === "剖面视图" && !he.value && ge();
370
+ }, H = (i) => {
371
+ f.value = !0, c.value = i;
373
372
  }, Q = k([]), V = k([]), ke = U(() => {
374
373
  var u;
375
374
  return (u = n.trackFileType) == null ? void 0 : u.isUv;
@@ -383,58 +382,58 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
383
382
  var u;
384
383
  return (u = n.trackFileType) == null ? void 0 : u.isNc;
385
384
  }), oe = U(() => {
386
- const a = n.fileBlobs || [];
387
- return a == null ? void 0 : a[0];
385
+ const i = n.fileBlobs || [];
386
+ return i == null ? void 0 : i[0];
388
387
  });
389
388
  let b = D(), F = D();
390
389
  const Te = () => {
391
- const { scene: a } = h();
392
- b.value && a && (re(b.value, a), b.value = null);
390
+ const { scene: i } = h();
391
+ b.value && i && (re(b.value, i), b.value = null);
393
392
  }, ze = () => {
394
- const { scene: a } = h();
395
- F.value && a && (re(F.value, a), F.value = null);
393
+ const { scene: i } = h();
394
+ F.value && i && (re(F.value, i), F.value = null);
396
395
  }, se = () => {
397
396
  Te(), ze();
398
- }, Ae = async (a) => {
399
- const u = URL.createObjectURL(a), $ = await Se(u);
397
+ }, Ae = async (i) => {
398
+ const u = URL.createObjectURL(i), $ = await Se(u);
400
399
  if (URL.revokeObjectURL(u), nt($)) {
401
400
  Q.value = await Ut($, n.trackFileType) || [];
402
401
  const z = Q.value;
403
402
  ke.value && (b.value = $t(h, z)), (be.value || _e.value || P.value) && (b.value = Xt(h, z));
404
403
  }
405
404
  }, xe = async () => {
406
- var a, u;
407
- F.value = ot(), V.value = Lt(Q.value), V.value && V.value.length && (de(F.value, V.value[0], b.value, new O(16711680)), (u = (a = v.value) == null ? void 0 : a.add) == null || u.call(a, F.value));
408
- }, ie = async (a) => {
409
- se(), await Ae(a), b.value && Ie(h, b.value), P.value && xe();
405
+ var i, u;
406
+ F.value = ot(), V.value = Lt(Q.value), V.value && V.value.length && (de(F.value, V.value[0], b.value, new O(16711680)), (u = (i = v.value) == null ? void 0 : i.add) == null || u.call(i, F.value));
407
+ }, ae = async (i) => {
408
+ se(), await Ae(i), b.value && Ie(h, b.value), P.value && xe();
410
409
  };
411
- je(() => oe.value, async (a) => {
412
- a && await ie(a);
410
+ je(() => oe.value, async (i) => {
411
+ i && await ae(i);
413
412
  }, {
414
413
  immediate: !0,
415
414
  deep: !0
416
415
  });
417
416
  const Pe = async () => {
418
- var a;
419
- await ((a = t == null ? void 0 : t.value) == null ? void 0 : a.reset()), await ie(oe.value);
417
+ var i;
418
+ await ((i = t == null ? void 0 : t.value) == null ? void 0 : i.reset()), await ae(oe.value);
420
419
  }, Fe = () => {
421
- var a;
422
- P.value && ((a = t == null ? void 0 : t.value) == null || a.playAnimation());
420
+ var i;
421
+ P.value && ((i = t == null ? void 0 : t.value) == null || i.playAnimation());
423
422
  }, Me = () => {
424
- var a;
425
- P.value && ((a = t == null ? void 0 : t.value) == null || a.stopAnimation());
423
+ var i;
424
+ P.value && ((i = t == null ? void 0 : t.value) == null || i.stopAnimation());
426
425
  }, Ue = () => {
427
- var a;
428
- P.value && ((a = t == null ? void 0 : t.value) == null || a.forwardFrame());
426
+ var i;
427
+ P.value && ((i = t == null ? void 0 : t.value) == null || i.forwardFrame());
429
428
  }, Le = () => {
430
- var a;
431
- P.value && ((a = t == null ? void 0 : t.value) == null || a.backwardFrame());
429
+ var i;
430
+ P.value && ((i = t == null ? void 0 : t.value) == null || i.backwardFrame());
432
431
  }, Ve = () => {
433
432
  _(), Ye(() => {
434
433
  o.value && (Y = new ResizeObserver(T), Y.observe(o.value));
435
434
  });
436
- const a = h();
437
- v.value = a.scene, v.value && (v.value.name = "CPMPIP");
435
+ const i = h();
436
+ v.value = i.scene, v.value && (v.value.name = "CPMPIP");
438
437
  }, $e = () => {
439
438
  Y && Y.disconnect(), M.value && pe(), se(), L();
440
439
  };
@@ -442,12 +441,12 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
442
441
  return Ee(async () => {
443
442
  try {
444
443
  Ve();
445
- } catch (a) {
446
- console.error("Three.js 初始化失败:", a), B.error("渲染引擎初始化失败!");
444
+ } catch (i) {
445
+ console.error("Three.js 初始化失败:", i), B.error("渲染引擎初始化失败!");
447
446
  }
448
447
  }), Xe(() => {
449
448
  $e();
450
- }), (a, u) => {
449
+ }), (i, u) => {
451
450
  const $ = j("el-scrollbar");
452
451
  return E(), ee("div", Yt, [
453
452
  d("div", {
@@ -489,7 +488,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
489
488
  }, null, 8, ["active"])
490
489
  ]),
491
490
  d("div", Nt, [
492
- ae(a.$slots, "button-left", { switchRightPanel: R }, void 0, !0),
491
+ ie(i.$slots, "button-left", { switchRightPanel: R }, void 0, !0),
493
492
  p(w, {
494
493
  name: "jiegoushu",
495
494
  size: "24",
@@ -506,7 +505,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
506
505
  }, null, 8, ["active"])
507
506
  ]),
508
507
  d("div", Zt, [
509
- ae(a.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
508
+ ie(i.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
510
509
  p(w, {
511
510
  name: "guanjiekongzhi",
512
511
  size: "24",
@@ -609,14 +608,14 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
609
608
  ], 512), [
610
609
  [Z, f.value]
611
610
  ]),
612
- i.value ? (E(), ee("div", Jt, [
611
+ a.value ? (E(), ee("div", Jt, [
613
612
  u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
614
613
  d("p", null, X(l.value), 1)
615
614
  ])) : S("", !0)
616
615
  ]);
617
616
  };
618
617
  }
619
- }), cn = /* @__PURE__ */ ve(Rt, [["__scopeId", "data-v-7178b621"]]);
618
+ }), rn = /* @__PURE__ */ ve(Rt, [["__scopeId", "data-v-7178b621"]]);
620
619
  export {
621
- cn as default
620
+ rn as default
622
621
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("./menu-CYazzvub.cjs"),S=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DAAbs6bU.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),F={SINGLE:"单机",DOUBLE:"双机"},R={ROBOT:1,PIPECOMPARSION:2},i={ROBOT_SCENE:"robot",TRACK_PATH:"trackPath",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},b=d.defineStore("threeState",{state:()=>({data:{files:[],data:{}}}),actions:{setData(v){this.data=v},getData(){return this.data}}});function I(){const v=d.useMenuState(d.pinia),{platform:g}=d.storeToRefs(v),P=b(d.pinia),c=["uv","cyd","nc"],m=["urdf"],r=["obj","stl"],T=[...c,...m,...r],f=t=>{if(!C())throw new Error("不是三维系统");P.setData(t)},y=()=>P.getData(),C=()=>g.value==="three",l=t=>S.getFileExtension(t),p=t=>{if(!t)return!1;const o=l(t);return T==null?void 0:T.includes(o)},E=t=>{if(!t)return!1;const o=l(t);return r==null?void 0:r.includes(o)},h=t=>{if(!t)return!1;const o=l(t);return c==null?void 0:c.includes(o)},u=t=>{if(!t)return{isCpt:!1,isCyd:!1,isUv:!1,isNc:!1};const o=l(t),a=c==null?void 0:c.find(k=>k===o);return{isCpt:a==="cpt",isCyd:a==="cyd",isUv:a==="uv",isNc:a==="nc"}},_=t=>{if(!t)return!1;const o=l(t);return m==null?void 0:m.includes(o)},B=t=>C()&&p(t),n=t=>({url:t,extension:l(t)});return{getData:y,setData:f,isThreeSystem:C,isUrdf:_,isGeneralFile:E,isTrackPathFile:h,isThreeFile:p,isUseBackdrop:B,initTrackFileType:u,getFileExtension:l,getFileInfo:n,getFilesInfo:t=>{const o=[];for(let a=0;a<t.length;a++){const w=t[a],k=n(w);o.push(k)}return o}}}const N={class:"three-platform mv-inline"},V={class:"top-menu"},A={key:4,class:"loading"},M=e.defineComponent({__name:"threeViewerHost",props:{files:{default:()=>[]},threeData:{},componentType:{},width:{default:"100%"},height:{default:"100%"}},setup(v){const g=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-DHahXsWx.cjs"))),P=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-CuXGNvBL.cjs"))),c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-CrlluuTz.cjs"))),m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-0_i3LOfz.cjs"))),r=v,T=d.useMenuState(d.pinia),{platName:f}=d.storeToRefs(T),{isUrdf:y,isTrackPathFile:C}=I(),l=e.computed(()=>{var n;return(n=r==null?void 0:r.files)==null?void 0:n.map(s=>{const{url:t}=s;return t})}),p=e.computed(()=>{var t;const n=(t=r==null?void 0:r.files)==null?void 0:t[0];return(n==null?void 0:n.extension)||""}),E=e.computed(()=>{var n,s;return(s=(n=r==null?void 0:r.threeData)==null?void 0:n.data)==null?void 0:s.trackFileType}),h=e.computed(()=>{if(r.componentType)switch(r.componentType){case"robot":return i.ROBOT_SCENE;case"track":return i.TRACK_PATH;case"cpmpip":return i.CPMPIP_SCENE;case"preview":return i.PREVIEW}return(f==null?void 0:f.value)===S.platNameConstants.CPMPIP&&y(p.value)?i.CPMPIP_SCENE:(f==null?void 0:f.value)===S.platNameConstants.ROBOT&&y(p.value)?i.ROBOT_SCENE:C(p.value)&&E.value?i.TRACK_PATH:i.PREVIEW}),u=e.ref([]),_=e.ref(!1);async function B(n){if(!n||!n.length){u.value=[];return}_.value=!0;try{const s=await Promise.all(n.map(t=>S.downloadFile(t)));u.value=s}catch(s){console.error("文件下载时发生错误:",s),u.value=[]}finally{_.value=!1}}return e.watch(()=>l.value,async n=>{await B(n||[])},{immediate:!0,deep:!0}),(n,s)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",V,[e.renderSlot(n.$slots,"top-menu",{},void 0,!0)]),h.value===e.unref(i).ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(g),{key:0,fileBlobs:u.value,threeData:r.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(n.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(n.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileBlobs","threeData"])):h.value===e.unref(i).TRACK_PATH?(e.openBlock(),e.createBlock(e.unref(c),{key:1,fileBlobs:u.value,threeData:r.threeData,trackFileType:E.value},{"button-left":e.withCtx(()=>[e.renderSlot(n.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(n.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileBlobs","threeData","trackFileType"])):h.value===e.unref(i).CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(m),{key:2,fileBlobs:u.value,threeData:r.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(n.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(n.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileBlobs","threeData"])):h.value===e.unref(i).PREVIEW?(e.openBlock(),e.createBlock(e.unref(P),{key:3,fileBlobs:u.value},{"button-left":e.withCtx(()=>[e.renderSlot(n.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(n.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileBlobs"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("div",A," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)]))}}),O=D._export_sfc(M,[["__scopeId","data-v-9798f55b"]]),H=Object.freeze(Object.defineProperty({__proto__:null,default:O},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=O;exports.robotMode=F;exports.sceneType=R;exports.threeViewerHost=H;exports.useThreeState=b;exports.useThreeSystem=I;
@@ -1,12 +1,11 @@
1
1
  import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H, createElementBlock as N, openBlock as T, createElementVNode as K, createBlock as B, createCommentVNode as V, renderSlot as u, unref as m, withCtx as d } from "vue";
2
- import { d as W, p as D, s as A } from "./index-BmJV5eVh.js";
3
- import { u as $ } from "./menu-CK0ndSHP.js";
4
- import { g as j, t as M, u as L } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js";
2
+ import { N as W, u as A, p as D, s as $ } from "./menu-DGzm1FYA.js";
3
+ import { g as j, t as M, u as L } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BDgIVZve.js";
5
4
  import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const se = {
5
+ const re = {
7
6
  SINGLE: "单机",
8
7
  DOUBLE: "双机"
9
- }, oe = {
8
+ }, se = {
10
9
  ROBOT: 1,
11
10
  PIPECOMPARSION: 2
12
11
  }, a = {
@@ -35,7 +34,7 @@ const se = {
35
34
  }
36
35
  });
37
36
  function Y() {
38
- const E = $(D), { platform: O } = A(E), y = z(D), i = ["uv", "cyd", "nc"], p = ["urdf"], n = ["obj", "stl"], P = [...i, ...p, ...n], f = (e) => {
37
+ const E = A(D), { platform: O } = $(E), y = z(D), i = ["uv", "cyd", "nc"], p = ["urdf"], n = ["obj", "stl"], P = [...i, ...p, ...n], f = (e) => {
39
38
  if (!g())
40
39
  throw new Error("不是三维系统");
41
40
  y.setData(e);
@@ -113,7 +112,7 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
113
112
  height: { default: "100%" }
114
113
  },
115
114
  setup(E) {
116
- const O = b(() => import("./threeSceneView-D4mxD9hv.js")), y = b(() => import("./threePreview-B46ButBi.js")), i = b(() => import("./threeTrackPathView-BQPS8ajS.js")), p = b(() => import("./threeSceneViewForCPMPIP-DTtZGOcw.js")), n = E, P = $(D), { platName: f } = A(P), { isUrdf: _, isTrackPathFile: g } = Y(), c = I(() => {
115
+ const O = b(() => import("./threeSceneView-RZtjgaQI.js")), y = b(() => import("./threePreview-DLxW-XYV.js")), i = b(() => import("./threeTrackPathView-cclE9z18.js")), p = b(() => import("./threeSceneViewForCPMPIP-DMhM6ZvH.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = Y(), c = I(() => {
117
116
  var t;
118
117
  return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
119
118
  const { url: e } = s;
@@ -217,15 +216,15 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
217
216
  C.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) : V("", !0)
218
217
  ]));
219
218
  }
220
- }), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-9798f55b"]]), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
219
+ }), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-9798f55b"]]), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
221
220
  __proto__: null,
222
221
  default: Z
223
222
  }, Symbol.toStringTag, { value: "Module" }));
224
223
  export {
225
224
  Z as T,
226
225
  Y as a,
227
- se as r,
228
- oe as s,
229
- ae as t,
226
+ re as r,
227
+ se as s,
228
+ oe as t,
230
229
  z as u
231
230
  };