ss-component-new 1.3.338 → 1.3.340
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.
- package/dist/{MTLLoader-BPkDlKQY.js → MTLLoader-C-XJYnXR.js} +1 -1
- package/dist/{MTLLoader-BSAD_hGU.cjs → MTLLoader-Dx_OCevv.cjs} +1 -1
- package/dist/{OrbitControls-DmrQ6Qms.cjs → OrbitControls-B55yzIKX.cjs} +1 -1
- package/dist/{OrbitControls-BmF9oSwu.js → OrbitControls-BB87FyuR.js} +1 -1
- package/dist/{URDFLoader-yNcNWc8y.js → URDFLoader-DgP2bMhH.js} +2 -2
- package/dist/{URDFLoader-BX2xO-G6.cjs → URDFLoader-Uh4bBb-n.cjs} +1 -1
- package/dist/{animationData-Fzp5MGPx.cjs → animationData-BfEyrEkb.cjs} +1 -1
- package/dist/{animationData-D0Wf5oqE.js → animationData-CF6benhM.js} +3 -3
- package/dist/array-Dk18oefG.cjs +1 -0
- package/dist/{array-qvvk1rzy.js → array-Dz0LlM28.js} +15 -14
- package/dist/clone-BDBSWARv.cjs +1 -0
- package/dist/clone-BqeCvECh.js +8 -0
- package/dist/{dayjs.min-BuNwfEqV.cjs → dayjs.min-CSW85jLQ.cjs} +1 -1
- package/dist/{dayjs.min-k4eV5VaF.js → dayjs.min-bC5IyY3C.js} +15 -15
- package/dist/{iconfont-DoIvvZJ4.js → iconfont-DV-mBuRs.js} +2 -2
- package/dist/{iconfont-RzjRJt3k.cjs → iconfont-rvMUQHIL.cjs} +1 -1
- package/dist/index--E8u7lHy.cjs +12 -0
- package/dist/{index-3SrvYl-e.js → index-0VkKesv_.js} +16 -15
- package/dist/{index-yzO3VRjc.js → index-9nQLsFiY.js} +2 -2
- package/dist/index-B38fQMRk.cjs +1 -0
- package/dist/index-BIg-Nt0x.cjs +25 -0
- package/dist/{index-CLWqjd6p.cjs → index-BPpYDffY.cjs} +1 -1
- package/dist/index-BQO25T-T.cjs +1 -0
- package/dist/{index-CFeJYmGf.js → index-BSCoLGXF.js} +123 -122
- package/dist/{index-DNAGMKpI.cjs → index-BTgJ9oD-.cjs} +1 -1
- package/dist/{index-DslJemMC.cjs → index-BWpqDCVF.cjs} +1 -1
- package/dist/index-BchGbZ1v.cjs +15 -0
- package/dist/{index-DlViTF82.js → index-Bdh2uHRO.js} +45 -44
- package/dist/index-Bio1_C_H.cjs +1 -0
- package/dist/index-BmJV5eVh.js +4669 -0
- package/dist/index-BtyugMgY.cjs +1 -0
- package/dist/index-BzeH13wt.cjs +1 -0
- package/dist/{index-CdrI3q21.js → index-C3-1AlM-.js} +11 -10
- package/dist/{index-DcFINcWZ.cjs → index-C3lScvOV.cjs} +1 -1
- package/dist/{index--rPeSICn.js → index-C4NN-IA4.js} +17 -16
- package/dist/{index-Le8Yusb8.js → index-C6gCT4vd.js} +71 -70
- package/dist/{index--edHnTba.js → index-C9baGOvW.js} +171 -170
- package/dist/{index-CQivR-lI.js → index-CHAqLCtD.js} +8 -7
- package/dist/{index-v-ovngKr.js → index-CHIMUYG3.js} +11 -10
- package/dist/{index-CTcYkvWl.js → index-CHnN0kSC.js} +17 -16
- package/dist/index-CMsGT7Tl.cjs +1 -0
- package/dist/index-COTur3RT.cjs +1 -0
- package/dist/index-COowXWF7.cjs +1 -0
- package/dist/index-CUp0Z80f.cjs +2 -0
- package/dist/{index-CKRf8Ami.js → index-CYgpY06q.js} +1 -1
- package/dist/{index-Cw_Pv2mr.cjs → index-Ca3THBbJ.cjs} +1 -1
- package/dist/{index-KjGumfMh.js → index-CbBP02RV.js} +2 -2
- package/dist/{index-hc0ka42R.js → index-CgjHHxqY.js} +7 -6
- package/dist/index-CoX9mofW.cjs +1 -0
- package/dist/index-CyQV3nI9.cjs +1 -0
- package/dist/{index-CzLk74Qf.js → index-D0gKkud0.js} +13 -12
- package/dist/{index-CzSyQ5Dz.js → index-D6Zkrpou.js} +14 -13
- package/dist/index-DBhc2SoQ.cjs +1 -0
- package/dist/index-DBrXonf1.cjs +1 -0
- package/dist/index-DEfKSijb.cjs +7 -0
- package/dist/{index-Dhr09zBK.js → index-DGwbEHLN.js} +7 -6
- package/dist/{index-cetb2cxj.js → index-DLLST1Nd.js} +11 -10
- package/dist/{index-Nlcszcxu.js → index-DMt7y2yA.js} +26 -25
- package/dist/{index-DDsxDvtn.js → index-DN4OcDlg.js} +1 -1
- package/dist/index-DNyLSjIf.cjs +1 -0
- package/dist/index-DOQApax-.cjs +1 -0
- package/dist/{index-sRpRqcWY.js → index-DWP-FYxV.js} +11 -10
- package/dist/{index-BRsJCA7J.js → index-Dcp8sI4C.js} +2 -2
- package/dist/index-DtlQjI5L.cjs +1 -0
- package/dist/{index-BJ3dWzJE.js → index-DyJCopUt.js} +4 -3
- package/dist/index-FJ_oMfF3.cjs +1 -0
- package/dist/{index-DTXDYM2Y.js → index-Ijbw1FIL.js} +8 -7
- package/dist/{index-DYLcmfM7.cjs → index-L9DruvvE.cjs} +1 -1
- package/dist/{index-CFfsuz29.js → index-S2ChvJMP.js} +1 -1
- package/dist/index-T25jN7df.cjs +104 -0
- package/dist/index-W6w3oiQ2.cjs +1 -0
- package/dist/{index-DzisQWri.cjs → index-Zvul3j_r.cjs} +1 -1
- package/dist/{index-jXcRil4X.js → index-c1EWDQO1.js} +1 -1
- package/dist/index-ipcwULw-.js +167 -0
- package/dist/{index-Dz46J_oX.js → index-rW-jQkgq.js} +14 -13
- package/dist/{index-DN-hIpic.js → index-voXPz7Hq.js} +8 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CqftJ73D.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CHrvpoVb.js} +1956 -1950
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-GYMecS8S.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dyd5heHe.cjs} +336 -336
- package/dist/{main-CSmrLXc1.js → main-Cd_mObtH.js} +9 -8
- package/dist/main-FOjt8u8O.cjs +11 -0
- package/dist/menu-7kw8Lwp_.cjs +1 -0
- package/dist/menu-CK0ndSHP.js +1132 -0
- package/dist/{menuIndex-H4svQtY4.cjs → menuIndex-Ba-9R5jd.cjs} +1 -1
- package/dist/{menuIndex-DnIGdu3r.js → menuIndex-DiNvd_FY.js} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +13 -13
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -115
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +5 -10
- package/dist/{threeModel-DVoiGwQY.js → threeModel-CIZ5D8Df.js} +4 -4
- package/dist/{threeModel-DMLcMdcO.cjs → threeModel-Dekl17Re.cjs} +1 -1
- package/dist/{threePreview-BlBYsSIY.js → threePreview-B46ButBi.js} +7 -6
- package/dist/threePreview-DcCfaIpB.cjs +1 -0
- package/dist/{threeSceneView-DxmqccX0.cjs → threeSceneView-CoQQCgZ3.cjs} +1 -1
- package/dist/{threeSceneView-DmElWi83.js → threeSceneView-D4mxD9hv.js} +16 -15
- package/dist/{threeSceneViewForCPMPIP-CG3vUmL9.cjs → threeSceneViewForCPMPIP-BR01ytzC.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-BiCRauu-.js → threeSceneViewForCPMPIP-DTtZGOcw.js} +11 -10
- package/dist/{threeTrackPathView-PNsjrZQ4.js → threeTrackPathView-BQPS8ajS.js} +88 -87
- package/dist/threeTrackPathView-C6IiddAw.cjs +1 -0
- package/dist/threeViewerHost-B3elQtpE.cjs +1 -0
- package/dist/{threeViewerHost-DZOE1mqQ.js → threeViewerHost-CsMI9jbX.js} +15 -14
- package/dist/{urdfTree-6H5q4vZJ.js → urdfTree-B118FC_3.js} +1 -1
- package/dist/{urdfTree-BHCNo0In.cjs → urdfTree-umPKeRFh.cjs} +1 -1
- package/dist/{workpieceTreePanel-hvdMKyB1.cjs → workpieceTreePanel-CwUXRyn3.cjs} +1 -1
- package/dist/{workpieceTreePanel-vIuHvU5P.js → workpieceTreePanel-D9TnLdIy.js} +4 -4
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/array-pgerzJif.cjs +0 -1
- package/dist/clone-CD9irwJl.cjs +0 -1
- package/dist/clone-NBEQjHYy.js +0 -8
- package/dist/index-B03AQcTh.cjs +0 -25
- package/dist/index-BKkBbMbq.cjs +0 -1
- package/dist/index-BypZhlZy.cjs +0 -1
- package/dist/index-C0M6Lcz7.cjs +0 -1
- package/dist/index-C3ub7esH.cjs +0 -1
- package/dist/index-CKFKnWYs.cjs +0 -1
- package/dist/index-CMCBjpMf.cjs +0 -1
- package/dist/index-CYl8EVmW.cjs +0 -1
- package/dist/index-CfnRQDoO.cjs +0 -1
- package/dist/index-CjBKQL-I.cjs +0 -7
- package/dist/index-Ckzoh1F1.cjs +0 -1
- package/dist/index-Czr_BmcF.cjs +0 -104
- package/dist/index-D76hP8qR.cjs +0 -1
- package/dist/index-D9ZxWMRp.cjs +0 -1
- package/dist/index-DIhyy3bB.cjs +0 -1
- package/dist/index-DNi-yN1x.cjs +0 -1
- package/dist/index-DdM-FFFt.cjs +0 -1
- package/dist/index-DxmeuinP.cjs +0 -15
- package/dist/index-HhzebblY.cjs +0 -1
- package/dist/index-LkCWNS6C.cjs +0 -1
- package/dist/index-Ud1yGLeD.js +0 -154
- package/dist/index-nMK8yuAt.cjs +0 -1
- package/dist/index-sTz1k0DD.cjs +0 -2
- package/dist/main-CzYhl2gc.cjs +0 -11
- package/dist/menu-CtDRlErv.cjs +0 -12
- package/dist/menu-z-45O0EF.js +0 -5667
- package/dist/threePreview-BPEiRaxd.cjs +0 -1
- package/dist/threeTrackPathView-217IAm4H.cjs +0 -1
- package/dist/threeViewerHost-DcxUb5_x.cjs +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
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-
|
|
3
|
-
import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-
|
|
4
|
-
import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
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";
|
|
7
8
|
import { y as it, E as j, z as rt, A as ct } from "./request-CoGtW0Ux.js";
|
|
8
9
|
/* empty css */
|
|
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-
|
|
10
|
-
import "./index-
|
|
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";
|
|
11
12
|
import "./index-BHtNKL1L.js";
|
|
12
13
|
import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
13
|
-
import { p as Be, q as Ct, s as kt } from "./index-
|
|
14
|
-
import "./index-
|
|
15
|
-
import "./index-
|
|
16
|
-
import "./index-
|
|
17
|
-
import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-
|
|
18
|
-
import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-
|
|
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";
|
|
19
20
|
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
20
21
|
import { s as Ft } from "./index-CnjGqJZS.js";
|
|
21
22
|
import { T as Y } from "./svgIcon-4u4PW7Is.js";
|
|
@@ -1287,7 +1288,7 @@ ${G.value.join(" ")}
|
|
|
1287
1288
|
]);
|
|
1288
1289
|
};
|
|
1289
1290
|
}
|
|
1290
|
-
}),
|
|
1291
|
+
}), ql = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-ec34be42"]]);
|
|
1291
1292
|
export {
|
|
1292
|
-
|
|
1293
|
+
ql as default
|
|
1293
1294
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-
|
|
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 分隔):
|
|
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,16 +1,17 @@
|
|
|
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-
|
|
3
|
-
import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-
|
|
4
|
-
import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-
|
|
5
|
-
import
|
|
6
|
-
import "./
|
|
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";
|
|
7
8
|
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
8
|
-
import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-
|
|
9
|
+
import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-B118FC_3.js";
|
|
9
10
|
import { E as _ } from "./request-CoGtW0Ux.js";
|
|
10
11
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
12
|
import { T as y } from "./svgIcon-4u4PW7Is.js";
|
|
12
|
-
import { i as at } from "./animationData-
|
|
13
|
-
import { O as ot } from "./MTLLoader-
|
|
13
|
+
import { i as at } from "./animationData-CF6benhM.js";
|
|
14
|
+
import { O as ot } from "./MTLLoader-C-XJYnXR.js";
|
|
14
15
|
const st = { class: "panel-content" }, it = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "animation-controls"
|
|
@@ -534,7 +535,7 @@ ${R.value.join(" ")}
|
|
|
534
535
|
]);
|
|
535
536
|
};
|
|
536
537
|
}
|
|
537
|
-
}),
|
|
538
|
+
}), qt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
|
|
538
539
|
export {
|
|
539
|
-
|
|
540
|
+
qt as default
|
|
540
541
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
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
|
|
2
|
-
import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-
|
|
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-
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
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";
|
|
6
7
|
import { E as B } from "./request-CoGtW0Ux.js";
|
|
7
8
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
9
|
import { T as w } from "./svgIcon-4u4PW7Is.js";
|
|
@@ -17,19 +18,19 @@ function ot(e = 0.5, n = 4) {
|
|
|
17
18
|
// ↓ 降金属
|
|
18
19
|
roughness: 0.6
|
|
19
20
|
})
|
|
20
|
-
),
|
|
21
|
-
return o.geometry.translate(0, -
|
|
21
|
+
), i = o.geometry.parameters.height;
|
|
22
|
+
return o.geometry.translate(0, -i / 2, 0), o.rotation.set(-90, 0, 0, "XYZ"), o;
|
|
22
23
|
}
|
|
23
24
|
function st(e, n) {
|
|
24
25
|
e.position.copy(n);
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
const
|
|
28
|
-
n.getWorldPosition(
|
|
27
|
+
function it(e, n, o = new O(16711680)) {
|
|
28
|
+
const i = new te();
|
|
29
|
+
n.getWorldPosition(i);
|
|
29
30
|
const l = e.geometry.attributes.position, t = e.geometry.attributes.color, s = new O(55551);
|
|
30
31
|
let r = 1 / 0, f = -1;
|
|
31
32
|
for (let c = 0; c < l.count; c++) {
|
|
32
|
-
const v = new te().fromBufferAttribute(l, c).distanceTo(
|
|
33
|
+
const v = new te().fromBufferAttribute(l, c).distanceTo(i);
|
|
33
34
|
v < r && (r = v, f = c);
|
|
34
35
|
}
|
|
35
36
|
for (let c = 0; c < t.count; c++) s.toArray(t.array, c * 3);
|
|
@@ -40,10 +41,10 @@ function at(e, n, o = new O(16711680)) {
|
|
|
40
41
|
}
|
|
41
42
|
t.needsUpdate = !0;
|
|
42
43
|
}
|
|
43
|
-
function de(e, n, o,
|
|
44
|
-
st(e, n),
|
|
44
|
+
function de(e, n, o, i = new O(16711680)) {
|
|
45
|
+
st(e, n), it(o, e, i);
|
|
45
46
|
}
|
|
46
|
-
const
|
|
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({
|
|
47
48
|
__name: "trackAnimationPanel",
|
|
48
49
|
props: {
|
|
49
50
|
cloud: {},
|
|
@@ -52,7 +53,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
52
53
|
},
|
|
53
54
|
emits: ["getThreeData"],
|
|
54
55
|
setup(e, { expose: n, emit: o }) {
|
|
55
|
-
const
|
|
56
|
+
const i = e, l = U(() => i.vectors), t = k(!1), s = k(0), r = k(100);
|
|
56
57
|
let f = !1;
|
|
57
58
|
const c = (g) => `第 ${g + 1} 帧`, m = (g) => {
|
|
58
59
|
if (g < 0 || g >= l.value.length) {
|
|
@@ -60,7 +61,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
63
|
const y = l.value[g];
|
|
63
|
-
s.value = g, de(
|
|
64
|
+
s.value = g, de(i.knife, y, i.cloud);
|
|
64
65
|
}, v = async () => {
|
|
65
66
|
if (l.value.length === 0) {
|
|
66
67
|
B.error("无法播放动画:无数据");
|
|
@@ -93,7 +94,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
93
94
|
await C(), h();
|
|
94
95
|
} }), (g, y) => {
|
|
95
96
|
const G = j("el-input-number"), K = j("el-form-item"), W = j("el-form"), J = j("el-slider");
|
|
96
|
-
return E(), ee("div",
|
|
97
|
+
return E(), ee("div", at, [
|
|
97
98
|
d("div", lt, [
|
|
98
99
|
d("div", rt, [
|
|
99
100
|
p(W, {
|
|
@@ -147,8 +148,8 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
147
148
|
function mt(e) {
|
|
148
149
|
const n = [];
|
|
149
150
|
return e.forEach((o) => {
|
|
150
|
-
const [
|
|
151
|
-
n.push(+
|
|
151
|
+
const [i, l, t] = o.trim().split(/\s+/);
|
|
152
|
+
n.push(+i, +l, +t);
|
|
152
153
|
}), n;
|
|
153
154
|
}
|
|
154
155
|
function q(e, n, o) {
|
|
@@ -166,12 +167,12 @@ function q(e, n, o) {
|
|
|
166
167
|
}
|
|
167
168
|
function pt(e) {
|
|
168
169
|
const n = [], o = ["X", "Y", "Z"];
|
|
169
|
-
return e.forEach((
|
|
170
|
+
return e.forEach((i) => {
|
|
170
171
|
const l = {
|
|
171
172
|
x: 0,
|
|
172
173
|
y: 0,
|
|
173
174
|
z: 0
|
|
174
|
-
}, t =
|
|
175
|
+
}, t = i.trim();
|
|
175
176
|
if (!t)
|
|
176
177
|
return;
|
|
177
178
|
let s = null, r = "";
|
|
@@ -192,9 +193,9 @@ const ht = (e) => e == null ? void 0 : e.filter((o) => o.includes("=")), gt = (e
|
|
|
192
193
|
};
|
|
193
194
|
function wt(e) {
|
|
194
195
|
const n = Ct(e), o = [];
|
|
195
|
-
return n.forEach((
|
|
196
|
+
return n.forEach((i) => {
|
|
196
197
|
var v, C, x, _, T, h;
|
|
197
|
-
let [l, t, s, r] =
|
|
198
|
+
let [l, t, s, r] = i.trim().split(/\s+/);
|
|
198
199
|
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);
|
|
199
200
|
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, "=");
|
|
200
201
|
o.push(+f, +c, +m);
|
|
@@ -206,12 +207,12 @@ function Tt(e) {
|
|
|
206
207
|
}
|
|
207
208
|
function zt(e) {
|
|
208
209
|
const n = [], o = /* @__PURE__ */ new Set(["X", "Y", "Z"]);
|
|
209
|
-
return e.forEach((
|
|
210
|
+
return e.forEach((i) => {
|
|
210
211
|
const l = {
|
|
211
212
|
x: 0,
|
|
212
213
|
y: 0,
|
|
213
214
|
z: 0
|
|
214
|
-
}, t =
|
|
215
|
+
}, t = i.trim();
|
|
215
216
|
if (!t)
|
|
216
217
|
return;
|
|
217
218
|
let s = null, r = "";
|
|
@@ -237,16 +238,16 @@ async function xt(e) {
|
|
|
237
238
|
const n = (l = e == null ? void 0 : e.trim()) == null ? void 0 : l.split(/\r?\n/);
|
|
238
239
|
if (At(e))
|
|
239
240
|
return wt(n);
|
|
240
|
-
const o = n == null ? void 0 : n[0],
|
|
241
|
-
if ((
|
|
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)
|
|
242
243
|
return mt(n);
|
|
243
|
-
if ((
|
|
244
|
+
if ((i == null ? void 0 : i.length) === 1)
|
|
244
245
|
return pt(n);
|
|
245
246
|
}
|
|
246
247
|
async function Pt(e) {
|
|
247
248
|
const n = e.trim().split(/\r?\n/), o = [];
|
|
248
|
-
return n.forEach((
|
|
249
|
-
const l =
|
|
249
|
+
return n.forEach((i) => {
|
|
250
|
+
const l = i.trim().split(/\s+/);
|
|
250
251
|
if (l.length != 3)
|
|
251
252
|
return;
|
|
252
253
|
const [t, s, r] = l;
|
|
@@ -255,8 +256,8 @@ async function Pt(e) {
|
|
|
255
256
|
}
|
|
256
257
|
async function Ft(e) {
|
|
257
258
|
const n = e.trim().split(/\r?\n/), o = [];
|
|
258
|
-
return n.forEach((
|
|
259
|
-
const l =
|
|
259
|
+
return n.forEach((i) => {
|
|
260
|
+
const l = i.trim().split(/\s+/);
|
|
260
261
|
if (l.length != 3)
|
|
261
262
|
return;
|
|
262
263
|
const [t, s, r] = l;
|
|
@@ -265,14 +266,14 @@ async function Ft(e) {
|
|
|
265
266
|
}
|
|
266
267
|
async function Mt(e) {
|
|
267
268
|
let n = e.trim().split(/\r?\n/);
|
|
268
|
-
return n = n.filter((
|
|
269
|
-
const l =
|
|
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"));
|
|
270
271
|
return l || t || s;
|
|
271
272
|
}), zt(n);
|
|
272
273
|
}
|
|
273
274
|
async function Ut(e, n) {
|
|
274
|
-
const { isCyd: o, isUv:
|
|
275
|
-
return
|
|
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) : [];
|
|
276
277
|
}
|
|
277
278
|
function Lt(e) {
|
|
278
279
|
const n = [];
|
|
@@ -292,19 +293,19 @@ function Vt(e) {
|
|
|
292
293
|
function $t(e, n) {
|
|
293
294
|
if (!n || n.length < 3)
|
|
294
295
|
return;
|
|
295
|
-
const { scene: o, camera:
|
|
296
|
-
if (!o || !
|
|
296
|
+
const { scene: o, camera: i, renderer: l, controls: t } = e();
|
|
297
|
+
if (!o || !i || !l || !t)
|
|
297
298
|
return;
|
|
298
299
|
const s = Vt(n);
|
|
299
300
|
return s.name = "轨迹路径", o.add(s), s;
|
|
300
301
|
}
|
|
301
|
-
function jt(e, n, o,
|
|
302
|
+
function jt(e, n, o, i = 4, l = 50) {
|
|
302
303
|
let t = 1 / 0, s = -1 / 0, r = 1 / 0, f = -1 / 0, c = 1 / 0, m = -1 / 0;
|
|
303
304
|
for (let h = 0; h < e.length; h += 3) {
|
|
304
305
|
const L = e[h], g = e[h + 1], y = e[h + 2];
|
|
305
306
|
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);
|
|
306
307
|
}
|
|
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 * (
|
|
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);
|
|
308
309
|
return Math.min(0.4, T);
|
|
309
310
|
}
|
|
310
311
|
function Et(e) {
|
|
@@ -316,25 +317,25 @@ function Et(e) {
|
|
|
316
317
|
for (let t = 0; t < e.length; t += 3)
|
|
317
318
|
o[t] = 0, o[t + 1] = 0.847, o[t + 2] = 1;
|
|
318
319
|
n.setAttribute("color", new Je(o, 3));
|
|
319
|
-
const
|
|
320
|
+
const i = new Re({
|
|
320
321
|
vertexColors: !0,
|
|
321
322
|
size: 0.4,
|
|
322
323
|
// 像素世界单位
|
|
323
324
|
sizeAttenuation: !0
|
|
324
|
-
}), l = new He(n,
|
|
325
|
-
return
|
|
325
|
+
}), l = new He(n, i);
|
|
326
|
+
return i.needsUpdate = !0, l;
|
|
326
327
|
}
|
|
327
328
|
function Xt(e, n) {
|
|
328
329
|
if (!n)
|
|
329
330
|
return;
|
|
330
|
-
const { scene: o, camera:
|
|
331
|
-
if (!o || !
|
|
331
|
+
const { scene: o, camera: i, renderer: l, controls: t } = e();
|
|
332
|
+
if (!o || !i || !l || !t)
|
|
332
333
|
return;
|
|
333
334
|
const s = Et(n);
|
|
334
335
|
if (!s)
|
|
335
336
|
return;
|
|
336
337
|
s.name = "轨迹路径", o.add(s);
|
|
337
|
-
const r = jt(n,
|
|
338
|
+
const r = jt(n, i, l, 0.1, 50);
|
|
338
339
|
return s.material.size = r, s;
|
|
339
340
|
}
|
|
340
341
|
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 = {
|
|
@@ -348,7 +349,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
348
349
|
trackFileType: {}
|
|
349
350
|
},
|
|
350
351
|
setup(e) {
|
|
351
|
-
const n = e, o = k(null),
|
|
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), {
|
|
352
353
|
currentModels: C,
|
|
353
354
|
resetView: x,
|
|
354
355
|
initThreeJS: _,
|
|
@@ -363,12 +364,12 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
363
364
|
zoomOut: J
|
|
364
365
|
} = 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 = () => {
|
|
365
366
|
K();
|
|
366
|
-
}, we = (
|
|
367
|
-
ne.value =
|
|
368
|
-
}, R = (
|
|
369
|
-
s.value = !0, r.value =
|
|
370
|
-
}, H = (
|
|
371
|
-
f.value = !0, c.value =
|
|
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;
|
|
372
373
|
}, Q = k([]), V = k([]), ke = U(() => {
|
|
373
374
|
var u;
|
|
374
375
|
return (u = n.trackFileType) == null ? void 0 : u.isUv;
|
|
@@ -382,58 +383,58 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
382
383
|
var u;
|
|
383
384
|
return (u = n.trackFileType) == null ? void 0 : u.isNc;
|
|
384
385
|
}), oe = U(() => {
|
|
385
|
-
const
|
|
386
|
-
return
|
|
386
|
+
const a = n.fileBlobs || [];
|
|
387
|
+
return a == null ? void 0 : a[0];
|
|
387
388
|
});
|
|
388
389
|
let b = D(), F = D();
|
|
389
390
|
const Te = () => {
|
|
390
|
-
const { scene:
|
|
391
|
-
b.value &&
|
|
391
|
+
const { scene: a } = h();
|
|
392
|
+
b.value && a && (re(b.value, a), b.value = null);
|
|
392
393
|
}, ze = () => {
|
|
393
|
-
const { scene:
|
|
394
|
-
F.value &&
|
|
394
|
+
const { scene: a } = h();
|
|
395
|
+
F.value && a && (re(F.value, a), F.value = null);
|
|
395
396
|
}, se = () => {
|
|
396
397
|
Te(), ze();
|
|
397
|
-
}, Ae = async (
|
|
398
|
-
const u = URL.createObjectURL(
|
|
398
|
+
}, Ae = async (a) => {
|
|
399
|
+
const u = URL.createObjectURL(a), $ = await Se(u);
|
|
399
400
|
if (URL.revokeObjectURL(u), nt($)) {
|
|
400
401
|
Q.value = await Ut($, n.trackFileType) || [];
|
|
401
402
|
const z = Q.value;
|
|
402
403
|
ke.value && (b.value = $t(h, z)), (be.value || _e.value || P.value) && (b.value = Xt(h, z));
|
|
403
404
|
}
|
|
404
405
|
}, xe = async () => {
|
|
405
|
-
var
|
|
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 = (
|
|
407
|
-
},
|
|
408
|
-
se(), await Ae(
|
|
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();
|
|
409
410
|
};
|
|
410
|
-
je(() => oe.value, async (
|
|
411
|
-
|
|
411
|
+
je(() => oe.value, async (a) => {
|
|
412
|
+
a && await ie(a);
|
|
412
413
|
}, {
|
|
413
414
|
immediate: !0,
|
|
414
415
|
deep: !0
|
|
415
416
|
});
|
|
416
417
|
const Pe = async () => {
|
|
417
|
-
var
|
|
418
|
-
await ((
|
|
418
|
+
var a;
|
|
419
|
+
await ((a = t == null ? void 0 : t.value) == null ? void 0 : a.reset()), await ie(oe.value);
|
|
419
420
|
}, Fe = () => {
|
|
420
|
-
var
|
|
421
|
-
P.value && ((
|
|
421
|
+
var a;
|
|
422
|
+
P.value && ((a = t == null ? void 0 : t.value) == null || a.playAnimation());
|
|
422
423
|
}, Me = () => {
|
|
423
|
-
var
|
|
424
|
-
P.value && ((
|
|
424
|
+
var a;
|
|
425
|
+
P.value && ((a = t == null ? void 0 : t.value) == null || a.stopAnimation());
|
|
425
426
|
}, Ue = () => {
|
|
426
|
-
var
|
|
427
|
-
P.value && ((
|
|
427
|
+
var a;
|
|
428
|
+
P.value && ((a = t == null ? void 0 : t.value) == null || a.forwardFrame());
|
|
428
429
|
}, Le = () => {
|
|
429
|
-
var
|
|
430
|
-
P.value && ((
|
|
430
|
+
var a;
|
|
431
|
+
P.value && ((a = t == null ? void 0 : t.value) == null || a.backwardFrame());
|
|
431
432
|
}, Ve = () => {
|
|
432
433
|
_(), Ye(() => {
|
|
433
434
|
o.value && (Y = new ResizeObserver(T), Y.observe(o.value));
|
|
434
435
|
});
|
|
435
|
-
const
|
|
436
|
-
v.value =
|
|
436
|
+
const a = h();
|
|
437
|
+
v.value = a.scene, v.value && (v.value.name = "CPMPIP");
|
|
437
438
|
}, $e = () => {
|
|
438
439
|
Y && Y.disconnect(), M.value && pe(), se(), L();
|
|
439
440
|
};
|
|
@@ -441,12 +442,12 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
441
442
|
return Ee(async () => {
|
|
442
443
|
try {
|
|
443
444
|
Ve();
|
|
444
|
-
} catch (
|
|
445
|
-
console.error("Three.js 初始化失败:",
|
|
445
|
+
} catch (a) {
|
|
446
|
+
console.error("Three.js 初始化失败:", a), B.error("渲染引擎初始化失败!");
|
|
446
447
|
}
|
|
447
448
|
}), Xe(() => {
|
|
448
449
|
$e();
|
|
449
|
-
}), (
|
|
450
|
+
}), (a, u) => {
|
|
450
451
|
const $ = j("el-scrollbar");
|
|
451
452
|
return E(), ee("div", Yt, [
|
|
452
453
|
d("div", {
|
|
@@ -488,7 +489,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
488
489
|
}, null, 8, ["active"])
|
|
489
490
|
]),
|
|
490
491
|
d("div", Nt, [
|
|
491
|
-
|
|
492
|
+
ae(a.$slots, "button-left", { switchRightPanel: R }, void 0, !0),
|
|
492
493
|
p(w, {
|
|
493
494
|
name: "jiegoushu",
|
|
494
495
|
size: "24",
|
|
@@ -505,7 +506,7 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
505
506
|
}, null, 8, ["active"])
|
|
506
507
|
]),
|
|
507
508
|
d("div", Zt, [
|
|
508
|
-
|
|
509
|
+
ae(a.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
|
|
509
510
|
p(w, {
|
|
510
511
|
name: "guanjiekongzhi",
|
|
511
512
|
size: "24",
|
|
@@ -608,14 +609,14 @@ const Yt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
608
609
|
], 512), [
|
|
609
610
|
[Z, f.value]
|
|
610
611
|
]),
|
|
611
|
-
|
|
612
|
+
i.value ? (E(), ee("div", Jt, [
|
|
612
613
|
u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
|
|
613
614
|
d("p", null, X(l.value), 1)
|
|
614
615
|
])) : S("", !0)
|
|
615
616
|
]);
|
|
616
617
|
};
|
|
617
618
|
}
|
|
618
|
-
}),
|
|
619
|
+
}), cn = /* @__PURE__ */ ve(Rt, [["__scopeId", "data-v-7178b621"]]);
|
|
619
620
|
export {
|
|
620
|
-
|
|
621
|
+
cn as default
|
|
621
622
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("./iconfont-rvMUQHIL.cjs"),p=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dyd5heHe.cjs");require("./index--E8u7lHy.cjs");require("./menu-7kw8Lwp_.cjs");const K=require("./urdfTree-umPKeRFh.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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),h=require("./index--E8u7lHy.cjs"),b=require("./menu-7kw8Lwp_.cjs"),S=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dyd5heHe.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={SINGLE:"单机",DOUBLE:"双机"},N={ROBOT:1,PIPECOMPARSION:2},i={ROBOT_SCENE:"robot",TRACK_PATH:"trackPath",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},I=h.defineStore("threeState",{state:()=>({data:{files:[],data:{}}}),actions:{setData(v){this.data=v},getData(){return this.data}}});function O(){const v=b.useMenuState(h.pinia),{platform:g}=h.storeToRefs(v),P=I(h.pinia),c=["uv","cyd","nc"],d=["urdf"],r=["obj","stl"],T=[...c,...d,...r],f=t=>{if(!C())throw new Error("不是三维系统");P.setData(t)},y=()=>P.getData(),C=()=>g.value==="three",u=t=>S.getFileExtension(t),m=t=>{if(!t)return!1;const o=u(t);return T==null?void 0:T.includes(o)},E=t=>{if(!t)return!1;const o=u(t);return r==null?void 0:r.includes(o)},p=t=>{if(!t)return!1;const o=u(t);return c==null?void 0:c.includes(o)},l=t=>{if(!t)return{isCpt:!1,isCyd:!1,isUv:!1,isNc:!1};const o=u(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=u(t);return d==null?void 0:d.includes(o)},B=t=>C()&&m(t),n=t=>({url:t,extension:u(t)});return{getData:y,setData:f,isThreeSystem:C,isUrdf:_,isGeneralFile:E,isTrackPathFile:p,isThreeFile:m,isUseBackdrop:B,initTrackFileType:l,getFileExtension:u,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 V={class:"three-platform mv-inline"},A={class:"top-menu"},M={key:4,class:"loading"},H=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-CoQQCgZ3.cjs"))),P=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-DcCfaIpB.cjs"))),c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-C6IiddAw.cjs"))),d=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-BR01ytzC.cjs"))),r=v,T=b.useMenuState(h.pinia),{platName:f}=h.storeToRefs(T),{isUrdf:y,isTrackPathFile:C}=O(),u=e.computed(()=>{var n;return(n=r==null?void 0:r.files)==null?void 0:n.map(s=>{const{url:t}=s;return t})}),m=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}),p=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(m.value)?i.CPMPIP_SCENE:(f==null?void 0:f.value)===S.platNameConstants.ROBOT&&y(m.value)?i.ROBOT_SCENE:C(m.value)&&E.value?i.TRACK_PATH:i.PREVIEW}),l=e.ref([]),_=e.ref(!1);async function B(n){if(!n||!n.length){l.value=[];return}_.value=!0;try{const s=await Promise.all(n.map(t=>S.downloadFile(t)));l.value=s}catch(s){console.error("文件下载时发生错误:",s),l.value=[]}finally{_.value=!1}}return e.watch(()=>u.value,async n=>{await B(n||[])},{immediate:!0,deep:!0}),(n,s)=>(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",A,[e.renderSlot(n.$slots,"top-menu",{},void 0,!0)]),p.value===e.unref(i).ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(g),{key:0,fileBlobs:l.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"])):p.value===e.unref(i).TRACK_PATH?(e.openBlock(),e.createBlock(e.unref(c),{key:1,fileBlobs:l.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"])):p.value===e.unref(i).CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(d),{key:2,fileBlobs:l.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"])):p.value===e.unref(i).PREVIEW?(e.openBlock(),e.createBlock(e.unref(P),{key:3,fileBlobs:l.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",M," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)]))}}),D=F._export_sfc(H,[["__scopeId","data-v-9798f55b"]]),q=Object.freeze(Object.defineProperty({__proto__:null,default:D},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=D;exports.robotMode=R;exports.sceneType=N;exports.threeViewerHost=q;exports.useThreeState=I;exports.useThreeSystem=O;
|
|
@@ -1,11 +1,12 @@
|
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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";
|
|
4
5
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const
|
|
6
|
+
const se = {
|
|
6
7
|
SINGLE: "单机",
|
|
7
8
|
DOUBLE: "双机"
|
|
8
|
-
},
|
|
9
|
+
}, oe = {
|
|
9
10
|
ROBOT: 1,
|
|
10
11
|
PIPECOMPARSION: 2
|
|
11
12
|
}, a = {
|
|
@@ -34,7 +35,7 @@ const re = {
|
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
function Y() {
|
|
37
|
-
const E =
|
|
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) => {
|
|
38
39
|
if (!g())
|
|
39
40
|
throw new Error("不是三维系统");
|
|
40
41
|
y.setData(e);
|
|
@@ -112,7 +113,7 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
112
113
|
height: { default: "100%" }
|
|
113
114
|
},
|
|
114
115
|
setup(E) {
|
|
115
|
-
const O = b(() => import("./threeSceneView-
|
|
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(() => {
|
|
116
117
|
var t;
|
|
117
118
|
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
|
|
118
119
|
const { url: e } = s;
|
|
@@ -137,7 +138,7 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
137
138
|
case "preview":
|
|
138
139
|
return a.PREVIEW;
|
|
139
140
|
}
|
|
140
|
-
return (f == null ? void 0 : f.value) ===
|
|
141
|
+
return (f == null ? void 0 : f.value) === M.CPMPIP && _(h.value) ? a.CPMPIP_SCENE : (f == null ? void 0 : f.value) === M.ROBOT && _(h.value) ? a.ROBOT_SCENE : g(h.value) && S.value ? a.TRACK_PATH : a.PREVIEW;
|
|
141
142
|
}), l = R([]), C = R(!1);
|
|
142
143
|
async function k(t) {
|
|
143
144
|
if (!t || !t.length) {
|
|
@@ -212,19 +213,19 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
212
213
|
u(t.$slots, "management-page", {}, void 0, !0)
|
|
213
214
|
]),
|
|
214
215
|
_: 3
|
|
215
|
-
}, 8, ["fileBlobs"])) :
|
|
216
|
-
C.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) :
|
|
216
|
+
}, 8, ["fileBlobs"])) : V("", !0),
|
|
217
|
+
C.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) : V("", !0)
|
|
217
218
|
]));
|
|
218
219
|
}
|
|
219
|
-
}), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-9798f55b"]]),
|
|
220
|
+
}), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-9798f55b"]]), ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
220
221
|
__proto__: null,
|
|
221
222
|
default: Z
|
|
222
223
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
223
224
|
export {
|
|
224
225
|
Z as T,
|
|
225
226
|
Y as a,
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
se as r,
|
|
228
|
+
oe as s,
|
|
229
|
+
ae as t,
|
|
229
230
|
z as u
|
|
230
231
|
};
|