ss-component-new 1.3.49 → 1.3.50
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-D-urUdrf.cjs → MTLLoader-CEOtxyh2.cjs} +1 -1
- package/dist/{MTLLoader-EdMOXCr9.js → MTLLoader-GkOcupU3.js} +40 -40
- package/dist/{OrbitControls-Bqm95jie.js → OrbitControls-BFsEQ8wY.js} +1 -1
- package/dist/{OrbitControls-CsZhoVbh.cjs → OrbitControls-Cg-eGwSp.cjs} +1 -1
- package/dist/{URDFLoader-Dv2_yu9H.cjs → URDFLoader-VqEU-Bt0.cjs} +1 -1
- package/dist/{URDFLoader-Dj_qDDyi.js → URDFLoader-ehXmhBFT.js} +200 -200
- package/dist/{animationData-B3clqdCz.js → animationData-5o0D2SPA.js} +18 -18
- package/dist/{animationData-j8q9GL9s.cjs → animationData-h3_OEBhG.cjs} +1 -1
- package/dist/{array-DBmb_dbA.cjs → array-DN-yv0nl.cjs} +1 -1
- package/dist/{array-CuxW2kDp.js → array-_E6SKuKJ.js} +4 -4
- package/dist/{iconfont-CNymCHn6.cjs → iconfont-D0Cr9kuj.cjs} +1 -1
- package/dist/{iconfont-CvYchHEP.js → iconfont-DCFi7bPb.js} +46 -46
- package/dist/{index-CNydDYrN.cjs → index-B-1umMBk.cjs} +1 -1
- package/dist/{index-DQQGHkNg.cjs → index-B1U12Kov.cjs} +1 -1
- package/dist/{index-CISOplCk.js → index-B2iB_sIJ.js} +7 -8
- package/dist/{index-C2uQtrJb.js → index-B6jDYtpC.js} +8 -8
- package/dist/{index-BU_tmMwb.js → index-B7QR-Lou.js} +2 -2
- package/dist/index-BEQHIheQ.cjs +1 -0
- package/dist/{index-BeljvnZD.cjs → index-BFKHCjkd.cjs} +1 -1
- package/dist/{index-DAMlyIHp.js → index-BFMsMcD8.js} +4936 -5119
- package/dist/{index-C--Cb4yz.cjs → index-BJWrNIga.cjs} +1 -1
- package/dist/index-BJac5xKn.cjs +1 -0
- package/dist/{index-DOMPCPNk.js → index-BQSHrnLz.js} +3 -3
- package/dist/{index-Dqqp33r1.cjs → index-BZST7lPo.cjs} +11 -11
- package/dist/{index-COudEqtW.js → index-B_4AbtRg.js} +7 -7
- package/dist/{index-DVccu9rG.js → index-BdgLWDfL.js} +2111 -2353
- package/dist/{index-XroQ9gxP.js → index-BfEF_JC6.js} +7 -7
- package/dist/{index-CS4i2VJg.js → index-BgDSEEhr.js} +7 -7
- package/dist/{index-BRRItZG6.js → index-BnlicLlu.js} +2 -2
- package/dist/{index-N47WYmXL.cjs → index-C0KanvaS.cjs} +1 -1
- package/dist/{index-DvkpICHb.js → index-C1QaJ_Nu.js} +3 -3
- package/dist/{index-BvlEnbTN.js → index-CFn5-3eu.js} +2 -2
- package/dist/index-CGchY9n4.cjs +1 -0
- package/dist/{index-DQdNqcDC.js → index-CJIRsR3f.js} +2 -2
- package/dist/{index-CwhxnRyA.js → index-CX12hzsx.js} +1545 -1510
- package/dist/{index-D7dH9fVy.js → index-ClKAqw9M.js} +8 -8
- package/dist/{index-Dnry90NJ.js → index-CnKvPKWE.js} +3 -3
- package/dist/{index-CW3QZYd0.cjs → index-Cw_ZOIg_.cjs} +1 -1
- package/dist/{index-CaQxsLai.js → index-CwiUgaGI.js} +5 -5
- package/dist/index-D3MoBe24.cjs +15 -0
- package/dist/index-D6D9SCPa.cjs +1 -0
- package/dist/{index-DfcsvIY5.cjs → index-DB8oLdoK.cjs} +1 -1
- package/dist/{index-B94M9CMw.cjs → index-DLPQoVA6.cjs} +1 -1
- package/dist/{index-D3_jq7cX.cjs → index-DQJPWEqk.cjs} +1 -1
- package/dist/{index-9nY56-QR.cjs → index-DYQ5ZvYh.cjs} +1 -1
- package/dist/{index-CVLV7-M9.js → index-DYSziVz4.js} +9 -9
- package/dist/{index-BKrkAcBB.cjs → index-DcLb0XZD.cjs} +1 -1
- package/dist/{index-C9K9NG79.cjs → index-Dg5D5xCR.cjs} +1 -1
- package/dist/{index-DO_oafZe.js → index-Dg8irIqw.js} +5 -5
- package/dist/{index-DECdW2FW.js → index-DgVgB13t.js} +1 -1
- package/dist/{index-7G6RnWL-.js → index-DnkflWQf.js} +1 -1
- package/dist/{index-DLsU_7sc.js → index-DrFxQ8Ki.js} +2 -2
- package/dist/{index-D1TGlpbP.cjs → index-DwaW_eAE.cjs} +1 -1
- package/dist/{index-CGAzwavt.js → index-DzkWy2PD.js} +638 -639
- package/dist/{index-osT7gQ0k.cjs → index-F3XHv6p-.cjs} +1 -1
- package/dist/{index-DaObODQd.cjs → index-FrwJsit5.cjs} +1 -1
- package/dist/{index-CebyFRzl.cjs → index-KJ5I6heb.cjs} +1 -1
- package/dist/{index-CVhEAMxc.cjs → index-WSa1Enje.cjs} +1 -1
- package/dist/{index-C4Y_0Pqx.js → index-Wkp3bFzx.js} +1 -1
- package/dist/{index-MtuCSFch.js → index-XyzV8czh.js} +3 -3
- package/dist/{index-BBpfH3U5.cjs → index-aliiazw8.cjs} +1 -1
- package/dist/{index-B_ab3YNj.js → index-hkchRNAV.js} +10 -11
- package/dist/{index-CZ_1yrbo.cjs → index-tADecIkG.cjs} +1 -1
- package/dist/{index-DhdGSuCy.cjs → index-z2md-yku.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dim6PXfX.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCz-I5jm.js} +27358 -26694
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BimFR8f6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DD10WrJ2.cjs} +392 -382
- package/dist/{index.vue_vue_type_style_index_1_lang-DlkNXxzZ.cjs → index.vue_vue_type_style_index_1_lang-CdWzb_V-.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-RJi0lv4v.js → index.vue_vue_type_style_index_1_lang-LDqCgKnI.js} +57 -57
- package/dist/{main-aZoig-Ic.cjs → main-Bv2Plrj7.cjs} +1 -1
- package/dist/{main-CKRcAjah.js → main-CsLazQpe.js} +4 -4
- package/dist/{menuIndex-BOUigvDC.cjs → menuIndex-CnGLkky9.cjs} +1 -1
- package/dist/{menuIndex-C1JdgI18.js → menuIndex-I5ECgNWt.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +15 -15
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-BZ92nN2I.js → threeModel-Cnyc_Xfm.js} +45 -45
- package/dist/{threeModel-DocL2Wps.cjs → threeModel-Dy7yCJzh.cjs} +1 -1
- package/dist/{threePreview-Bg9IDV16.js → threePreview-CAXTHct3.js} +137 -137
- package/dist/{threePreview-rZ-Mn3yx.cjs → threePreview-rc0Y3L69.cjs} +1 -1
- package/dist/{threeSceneView-D9GroZ9j.cjs → threeSceneView-BUb8pd-o.cjs} +1 -1
- package/dist/{threeSceneView-FqQJ7ZrG.js → threeSceneView-DsioOlOb.js} +137 -137
- package/dist/{threeSceneViewForCPMPIP-WugeC6sT.cjs → threeSceneViewForCPMPIP-D6en-lGr.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-BKeIA1xt.js → threeSceneViewForCPMPIP-vG44vNGe.js} +8 -8
- package/dist/{threeTrackPathView-Dx18ZIwF.js → threeTrackPathView-BaONHAhM.js} +56 -56
- package/dist/{threeTrackPathView-BE28zw_v.cjs → threeTrackPathView-CZTeW2Pq.cjs} +1 -1
- package/dist/{threeViewerHost-Dn4RvDFi.js → threeViewerHost-CLtCJAE_.js} +14 -14
- package/dist/{threeViewerHost-ZjhprZMr.cjs → threeViewerHost-DO4F_9O0.cjs} +1 -1
- package/dist/{urdfTree-C_IB0S4H.cjs → urdfTree-CnCpOTGQ.cjs} +1 -1
- package/dist/{urdfTree-D4JGxfMF.js → urdfTree-DrdQVTXa.js} +1 -1
- package/dist/{workpieceTreePanel-Di9vo3vC.cjs → workpieceTreePanel-BFPaqDJD.cjs} +1 -1
- package/dist/{workpieceTreePanel-jgqhd2py.js → workpieceTreePanel-BLpxZYf-.js} +72 -72
- package/package.json +1 -1
- package/dist/index-3m8kfH7_.js +0 -38
- package/dist/index-BM--4cI-.cjs +0 -1
- package/dist/index-DX9jk8Sp.cjs +0 -11
- package/dist/index-Dc1Bh93L.cjs +0 -1
- package/dist/index-LEeC_fJN.cjs +0 -1
- package/dist/index-syxWjmqB.cjs +0 -15
- package/dist/index-ytduJbtp.cjs +0 -1
|
@@ -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-DO4F_9O0.cjs"),q=require("./iconfont-D0Cr9kuj.cjs"),J=require("./workpieceTreePanel-BFPaqDJD.cjs"),Ce=require("./index-BZST7lPo.cjs"),h=require("./index-C5pQXH0_.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DD10WrJ2.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-CnCpOTGQ.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-h3_OEBhG.cjs"),we=require("./MTLLoader-CEOtxyh2.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 ...`:"请先加载模型。"),$=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("动画播放中")},M=()=>{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"?M():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,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-
|
|
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 { c as Ke } from "./index-
|
|
2
|
+
import { s as pe } from "./threeViewerHost-CLtCJAE_.js";
|
|
3
|
+
import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-DCFi7bPb.js";
|
|
4
|
+
import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-BLpxZYf-.js";
|
|
5
|
+
import { c as Ke } from "./index-CX12hzsx.js";
|
|
6
6
|
import { E as _ } from "./index-B8HqIYd5.js";
|
|
7
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
7
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCz-I5jm.js";
|
|
8
8
|
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-
|
|
9
|
+
import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-DrdQVTXa.js";
|
|
10
10
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
import { T as y } from "./svgIcon-4u4PW7Is.js";
|
|
12
|
-
import { i as at } from "./animationData-
|
|
13
|
-
import { O as ot } from "./MTLLoader-
|
|
12
|
+
import { i as at } from "./animationData-5o0D2SPA.js";
|
|
13
|
+
import { O as ot } from "./MTLLoader-GkOcupU3.js";
|
|
14
14
|
const st = { class: "panel-content" }, it = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "animation-controls"
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, createElementBlock as ee, openBlock as X, createElementVNode as d, createVNode as p, withCtx as
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import "./index-
|
|
5
|
-
import { U as et, J as tt } from "./urdfTree-
|
|
6
|
-
import { E as
|
|
1
|
+
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, createElementBlock as ee, openBlock as X, createElementVNode as d, createVNode as p, withCtx as B, toDisplayString as Y, shallowRef as Z, watch as Ee, onMounted as Xe, onBeforeUnmount as Ye, withDirectives as D, createCommentVNode as S, unref as A, renderSlot as ie, createBlock as le, vShow as I, nextTick as je } from "vue";
|
|
2
|
+
import { u as Ze, a as De, b as Ie, C as Ne, f as Be, d as re } from "./iconfont-DCFi7bPb.js";
|
|
3
|
+
import { Q as O, a1 as Oe, bI as Ge, aE as We, V as te, aG as ue, aT as fe, aZ as qe, aI as Ke, aY as Je, aV as Re, aW as He, ab as Qe, bJ as Se } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCz-I5jm.js";
|
|
4
|
+
import "./index-CX12hzsx.js";
|
|
5
|
+
import { U as et, J as tt } from "./urdfTree-DrdQVTXa.js";
|
|
6
|
+
import { E as N } from "./index-B8HqIYd5.js";
|
|
7
7
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
import { T as w } from "./svgIcon-4u4PW7Is.js";
|
|
9
9
|
import { i as nt } from "./isString-FfOeP713.js";
|
|
10
10
|
function ot(e = 0.5, n = 4) {
|
|
11
11
|
const o = new Oe(
|
|
12
12
|
new Ge(e, n, 32),
|
|
13
|
-
new
|
|
13
|
+
new We({
|
|
14
14
|
color: "#919191ff",
|
|
15
15
|
// 再提一档灰度
|
|
16
16
|
metalness: 0.3,
|
|
@@ -63,7 +63,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
63
63
|
s.value = g, de(a.knife, y, a.cloud);
|
|
64
64
|
}, v = async () => {
|
|
65
65
|
if (l.value.length === 0) {
|
|
66
|
-
|
|
66
|
+
N.error("无法播放动画:无数据");
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
if (!t.value) {
|
|
@@ -71,7 +71,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
71
71
|
try {
|
|
72
72
|
for (let g = s.value + 1; g < l.value.length && !f; g++)
|
|
73
73
|
await new Promise((y) => setTimeout(y, r.value)), m(g);
|
|
74
|
-
f ||
|
|
74
|
+
f || N.success("动画播放完成");
|
|
75
75
|
} catch (g) {
|
|
76
76
|
console.error("动画播放出错:", g);
|
|
77
77
|
} finally {
|
|
@@ -79,7 +79,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}, C = () => {
|
|
82
|
-
f = !0, t.value = !1,
|
|
82
|
+
f = !0, t.value = !1, N.info("动画已停止");
|
|
83
83
|
}, P = (g) => {
|
|
84
84
|
t.value && C(), m(g);
|
|
85
85
|
}, _ = () => {
|
|
@@ -92,21 +92,21 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
92
92
|
return n({ playAnimation: v, stopAnimation: C, forwardFrame: _, backwardFrame: T, resetAnimationFrame: h, reset: async () => {
|
|
93
93
|
await C(), h();
|
|
94
94
|
} }), (g, y) => {
|
|
95
|
-
const
|
|
95
|
+
const W = E("el-input-number"), q = E("el-form-item"), K = E("el-form"), J = E("el-slider");
|
|
96
96
|
return X(), ee("div", it, [
|
|
97
97
|
d("div", lt, [
|
|
98
98
|
d("div", rt, [
|
|
99
|
-
p(
|
|
99
|
+
p(K, {
|
|
100
100
|
"label-width": "auto",
|
|
101
101
|
style: { width: "100%" }
|
|
102
102
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
p(
|
|
103
|
+
default: B(() => [
|
|
104
|
+
p(q, {
|
|
105
105
|
label: "帧间隔 (ms):",
|
|
106
106
|
prop: "frameDuration"
|
|
107
107
|
}, {
|
|
108
|
-
default:
|
|
109
|
-
p(
|
|
108
|
+
default: B(() => [
|
|
109
|
+
p(W, {
|
|
110
110
|
modelValue: r.value,
|
|
111
111
|
"onUpdate:modelValue": y[0] || (y[0] = (M) => r.value = M),
|
|
112
112
|
min: 0,
|
|
@@ -123,7 +123,7 @@ const it = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
123
123
|
]),
|
|
124
124
|
d("div", ct, [
|
|
125
125
|
y[2] || (y[2] = d("label", null, "当前帧:", -1)),
|
|
126
|
-
d("span", ut,
|
|
126
|
+
d("span", ut, Y(s.value + 1) + " / " + Y(l.value.length), 1)
|
|
127
127
|
]),
|
|
128
128
|
d("div", ft, [
|
|
129
129
|
y[3] || (y[3] = d("label", null, "动画进度:", -1)),
|
|
@@ -283,11 +283,11 @@ function Lt(e) {
|
|
|
283
283
|
function Vt(e) {
|
|
284
284
|
const n = new ue();
|
|
285
285
|
n.setAttribute("position", new fe(e, 3));
|
|
286
|
-
const o = new
|
|
286
|
+
const o = new qe({
|
|
287
287
|
color: 55551,
|
|
288
288
|
linewidth: 3
|
|
289
289
|
});
|
|
290
|
-
return new
|
|
290
|
+
return new Ke(n, o);
|
|
291
291
|
}
|
|
292
292
|
function $t(e, n) {
|
|
293
293
|
if (!n || n.length < 3)
|
|
@@ -324,7 +324,7 @@ function Xt(e) {
|
|
|
324
324
|
}), l = new He(n, a);
|
|
325
325
|
return a.needsUpdate = !0, l;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Yt(e, n) {
|
|
328
328
|
if (!n)
|
|
329
329
|
return;
|
|
330
330
|
const { scene: o, camera: a, renderer: l, controls: t } = e();
|
|
@@ -337,7 +337,7 @@ function jt(e, n) {
|
|
|
337
337
|
const r = Et(n, a, l, 0.1, 50);
|
|
338
338
|
return s.material.size = r, s;
|
|
339
339
|
}
|
|
340
|
-
const
|
|
340
|
+
const jt = { class: "obj-viewer-container" }, Zt = { class: "buttonGroup-topLeft" }, Dt = { class: "buttonGroup-left" }, It = { class: "buttonGroup-right" }, Nt = { class: "buttonGroup-bottom" }, Bt = { class: "left-panel" }, Ot = { class: "panel-header" }, Gt = { class: "panel-body" }, Wt = { class: "right-panel" }, qt = { class: "panel-header" }, Kt = { class: "panel-body" }, Jt = {
|
|
341
341
|
key: 0,
|
|
342
342
|
class: "loading-overlay"
|
|
343
343
|
}, Rt = /* @__PURE__ */ ce({
|
|
@@ -348,7 +348,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
348
348
|
trackFileType: {}
|
|
349
349
|
},
|
|
350
350
|
setup(e) {
|
|
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 =
|
|
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 = Z(null), v = Z(null), {
|
|
352
352
|
currentModels: C,
|
|
353
353
|
resetView: P,
|
|
354
354
|
initThreeJS: _,
|
|
@@ -357,12 +357,12 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
357
357
|
cleanup: L,
|
|
358
358
|
setModels: g,
|
|
359
359
|
setAndFitModels: y,
|
|
360
|
-
axesHelperVisible:
|
|
361
|
-
toggleAxesVisibility:
|
|
362
|
-
zoomIn:
|
|
360
|
+
axesHelperVisible: W,
|
|
361
|
+
toggleAxesVisibility: q,
|
|
362
|
+
zoomIn: K,
|
|
363
363
|
zoomOut: J
|
|
364
|
-
} =
|
|
365
|
-
|
|
364
|
+
} = Ze(o), { isAnimating: M, toggleAnimation: me, startAnimation: Ht, stopAnimation: pe } = De(h, C), { isClipping: he, activeClippingAxis: ne, toggleClipping: ge, updateClippingPlanes: ye } = Ie(h, C), Ce = () => {
|
|
365
|
+
q();
|
|
366
366
|
}, we = (i) => {
|
|
367
367
|
ne.value = i, ye();
|
|
368
368
|
}, R = (i) => {
|
|
@@ -385,7 +385,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
385
385
|
const i = n.fileBlobs || [];
|
|
386
386
|
return i == null ? void 0 : i[0];
|
|
387
387
|
});
|
|
388
|
-
let b =
|
|
388
|
+
let b = Z(), F = Z();
|
|
389
389
|
const Te = () => {
|
|
390
390
|
const { scene: i } = h();
|
|
391
391
|
b.value && i && (re(b.value, i), b.value = null);
|
|
@@ -399,13 +399,13 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
399
399
|
if (URL.revokeObjectURL(u), nt($)) {
|
|
400
400
|
Q.value = await Ut($, n.trackFileType) || [];
|
|
401
401
|
const z = Q.value;
|
|
402
|
-
ke.value && (b.value = $t(h, z)), (be.value || _e.value || x.value) && (b.value =
|
|
402
|
+
ke.value && (b.value = $t(h, z)), (be.value || _e.value || x.value) && (b.value = Yt(h, z));
|
|
403
403
|
}
|
|
404
404
|
}, Pe = async () => {
|
|
405
405
|
var i, u;
|
|
406
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
407
|
}, ae = async (i) => {
|
|
408
|
-
se(), await Ae(i), b.value &&
|
|
408
|
+
se(), await Ae(i), b.value && Be(h, b.value), x.value && Pe();
|
|
409
409
|
};
|
|
410
410
|
Ee(() => oe.value, async (i) => {
|
|
411
411
|
i && await ae(i);
|
|
@@ -429,32 +429,32 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
429
429
|
var i;
|
|
430
430
|
x.value && ((i = t == null ? void 0 : t.value) == null || i.backwardFrame());
|
|
431
431
|
}, Ve = () => {
|
|
432
|
-
_(),
|
|
433
|
-
o.value && (
|
|
432
|
+
_(), je(() => {
|
|
433
|
+
o.value && (j = new ResizeObserver(T), j.observe(o.value));
|
|
434
434
|
});
|
|
435
435
|
const i = h();
|
|
436
436
|
v.value = i.scene, v.value && (v.value.name = "CPMPIP");
|
|
437
437
|
}, $e = () => {
|
|
438
|
-
|
|
438
|
+
j && j.disconnect(), M.value && pe(), se(), L();
|
|
439
439
|
};
|
|
440
|
-
let
|
|
440
|
+
let j = null;
|
|
441
441
|
return Xe(async () => {
|
|
442
442
|
try {
|
|
443
443
|
Ve();
|
|
444
444
|
} catch (i) {
|
|
445
|
-
console.error("Three.js 初始化失败:", i),
|
|
445
|
+
console.error("Three.js 初始化失败:", i), N.error("渲染引擎初始化失败!");
|
|
446
446
|
}
|
|
447
|
-
}),
|
|
447
|
+
}), Ye(() => {
|
|
448
448
|
$e();
|
|
449
449
|
}), (i, u) => {
|
|
450
450
|
const $ = E("el-scrollbar");
|
|
451
|
-
return X(), ee("div",
|
|
451
|
+
return X(), ee("div", jt, [
|
|
452
452
|
d("div", {
|
|
453
453
|
ref_key: "threejsContainer",
|
|
454
454
|
ref: o,
|
|
455
455
|
class: "threejs-container"
|
|
456
456
|
}, null, 512),
|
|
457
|
-
d("div",
|
|
457
|
+
d("div", Zt, [
|
|
458
458
|
p(w, {
|
|
459
459
|
name: "viewReset",
|
|
460
460
|
size: "24",
|
|
@@ -465,7 +465,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
465
465
|
name: "fangda",
|
|
466
466
|
size: "24",
|
|
467
467
|
title: "放大",
|
|
468
|
-
onClick: A(
|
|
468
|
+
onClick: A(K)
|
|
469
469
|
}, null, 8, ["onClick"]),
|
|
470
470
|
p(w, {
|
|
471
471
|
name: "suoxiao",
|
|
@@ -482,7 +482,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
482
482
|
p(w, {
|
|
483
483
|
name: "zuobiaoxi",
|
|
484
484
|
size: "24",
|
|
485
|
-
active: A(
|
|
485
|
+
active: A(W),
|
|
486
486
|
onClick: Ce,
|
|
487
487
|
title: "显隐坐标轴"
|
|
488
488
|
}, null, 8, ["active"])
|
|
@@ -504,7 +504,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
504
504
|
title: "剖面视图"
|
|
505
505
|
}, null, 8, ["active"])
|
|
506
506
|
]),
|
|
507
|
-
d("div",
|
|
507
|
+
d("div", It, [
|
|
508
508
|
ie(i.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
|
|
509
509
|
p(w, {
|
|
510
510
|
name: "guanjiekongzhi",
|
|
@@ -521,7 +521,7 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
521
521
|
active: f.value && c.value === "动画仿真"
|
|
522
522
|
}, null, 8, ["active"])
|
|
523
523
|
]),
|
|
524
|
-
d("div",
|
|
524
|
+
d("div", Nt, [
|
|
525
525
|
p(w, {
|
|
526
526
|
name: "kuaitui",
|
|
527
527
|
size: "24",
|
|
@@ -551,9 +551,9 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
551
551
|
onClick: Me
|
|
552
552
|
})
|
|
553
553
|
]),
|
|
554
|
-
D(d("div",
|
|
554
|
+
D(d("div", Bt, [
|
|
555
555
|
d("div", Ot, [
|
|
556
|
-
d("span", null,
|
|
556
|
+
d("span", null, Y(r.value), 1),
|
|
557
557
|
d("span", {
|
|
558
558
|
class: "close",
|
|
559
559
|
onClick: u[4] || (u[4] = (z) => s.value = !1)
|
|
@@ -561,12 +561,12 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
561
561
|
]),
|
|
562
562
|
d("div", Gt, [
|
|
563
563
|
p($, { height: "100%" }, {
|
|
564
|
-
default:
|
|
564
|
+
default: B(() => [
|
|
565
565
|
r.value === "场景树" ? (X(), le(et, {
|
|
566
566
|
key: 0,
|
|
567
567
|
model: m.value
|
|
568
568
|
}, null, 8, ["model"])) : S("", !0),
|
|
569
|
-
r.value === "剖面视图" ? (X(), le(
|
|
569
|
+
r.value === "剖面视图" ? (X(), le(Ne, {
|
|
570
570
|
key: 1,
|
|
571
571
|
value: A(ne),
|
|
572
572
|
onChange: we
|
|
@@ -576,21 +576,21 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
576
576
|
})
|
|
577
577
|
])
|
|
578
578
|
], 512), [
|
|
579
|
-
[
|
|
579
|
+
[I, s.value]
|
|
580
580
|
]),
|
|
581
|
-
D(d("div",
|
|
582
|
-
d("div",
|
|
583
|
-
d("span", null,
|
|
581
|
+
D(d("div", Wt, [
|
|
582
|
+
d("div", qt, [
|
|
583
|
+
d("span", null, Y(c.value), 1),
|
|
584
584
|
d("span", {
|
|
585
585
|
class: "close",
|
|
586
586
|
onClick: u[5] || (u[5] = (z) => f.value = !1)
|
|
587
587
|
}, " X ")
|
|
588
588
|
]),
|
|
589
|
-
d("div",
|
|
589
|
+
d("div", Kt, [
|
|
590
590
|
p($, { height: "100%" }, {
|
|
591
|
-
default:
|
|
591
|
+
default: B(() => [
|
|
592
592
|
D(p(tt, { model: m.value }, null, 8, ["model"]), [
|
|
593
|
-
[
|
|
593
|
+
[I, c.value === "关节控制"]
|
|
594
594
|
]),
|
|
595
595
|
D(p(dt, {
|
|
596
596
|
ref_key: "animationPanelRef",
|
|
@@ -599,18 +599,18 @@ const Nt = { class: "obj-viewer-container" }, Yt = { class: "buttonGroup-topLeft
|
|
|
599
599
|
knife: A(F),
|
|
600
600
|
vectors: V.value
|
|
601
601
|
}, null, 8, ["cloud", "knife", "vectors"]), [
|
|
602
|
-
[
|
|
602
|
+
[I, c.value === "动画仿真" && x.value]
|
|
603
603
|
])
|
|
604
604
|
]),
|
|
605
605
|
_: 1
|
|
606
606
|
})
|
|
607
607
|
])
|
|
608
608
|
], 512), [
|
|
609
|
-
[
|
|
609
|
+
[I, f.value]
|
|
610
610
|
]),
|
|
611
611
|
a.value ? (X(), ee("div", Jt, [
|
|
612
612
|
u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
|
|
613
|
-
d("p", null,
|
|
613
|
+
d("p", null, Y(l.value), 1)
|
|
614
614
|
])) : S("", !0)
|
|
615
615
|
]);
|
|
616
616
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("./iconfont-CNymCHn6.cjs"),p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BimFR8f6.cjs");require("./index-Dqqp33r1.cjs");const K=require("./urdfTree-C_IB0S4H.cjs"),I=require("./index-C5pQXH0_.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=require("./svgIcon-CDPAgQbj.cjs"),ge=require("./isString-Cdf6R00a.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"},Ve={class:"control-row"},be={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)},V=()=>{n.value&&C(),l.value!==0&&m(l.value-1)},h=()=>{l.value=0};return o({playAnimation:v,stopAnimation:C,forwardFrame:_,backwardFrame:V,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"),$=e.resolveComponent("el-slider");return e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",_e,[e.createElementVNode("div",Ve,[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",be,[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($,{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,_,V,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]=(V=l==null?void 0:l.split)==null?void 0:V.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 $e(t){return Le(t)||Be(t)||De(t)}function je(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=$e(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 qe(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(qe(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}),je(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,V=C/_*r.domElement.height*(s/4);return Math.min(.4,V)}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:V,getThreeJSObjects:h,cleanup:A,setModels:g,setAndFitModels:y,axesHelperVisible:L,toggleAxesVisibility:B,zoomIn:D,zoomOut:$}=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()},j=i=>{l.value=!0,c.value=i,i==="剖面视图"&&!J.value&&Q()},q=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 b=X.value;oe.value&&(k.value=Se(h,b)),(re.value||le.value||T.value)&&(k.value=Je(h,b))}},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(V),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($)},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:j},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:d[0]||(d[0]=b=>j("场景树")),active:l.value&&c.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"clipping",size:"24",onClick:d[1]||(d[1]=b=>j("剖面视图")),active:l.value&&c.value==="剖面视图",title:"剖面视图"},null,8,["active"])]),e.createElementVNode("div",nt,[e.renderSlot(i.$slots,"button-right",{switchRightPanel:q},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:d[2]||(d[2]=b=>q("关节控制")),active:f.value&&u.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:d[3]||(d[3]=b=>q("动画仿真")),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]=b=>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]=b=>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
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("./iconfont-D0Cr9kuj.cjs"),p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DD10WrJ2.cjs");require("./index-BZST7lPo.cjs");const K=require("./urdfTree-CnCpOTGQ.cjs"),I=require("./index-C5pQXH0_.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),w=require("./svgIcon-CDPAgQbj.cjs"),ge=require("./isString-Cdf6R00a.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"},Ve={class:"control-row"},be={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)},V=()=>{n.value&&C(),l.value!==0&&m(l.value-1)},h=()=>{l.value=0};return o({playAnimation:v,stopAnimation:C,forwardFrame:_,backwardFrame:V,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"),$=e.resolveComponent("el-slider");return e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",_e,[e.createElementVNode("div",Ve,[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",be,[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($,{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,_,V,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]=(V=l==null?void 0:l.split)==null?void 0:V.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 $e(t){return Le(t)||Be(t)||De(t)}function je(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=$e(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 qe(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(qe(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}),je(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,V=C/_*r.domElement.height*(s/4);return Math.min(.4,V)}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:V,getThreeJSObjects:h,cleanup:A,setModels:g,setAndFitModels:y,axesHelperVisible:L,toggleAxesVisibility:B,zoomIn:D,zoomOut:$}=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()},j=i=>{l.value=!0,c.value=i,i==="剖面视图"&&!J.value&&Q()},q=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 b=X.value;oe.value&&(k.value=Se(h,b)),(re.value||le.value||T.value)&&(k.value=Je(h,b))}},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(V),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($)},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:j},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:d[0]||(d[0]=b=>j("场景树")),active:l.value&&c.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"clipping",size:"24",onClick:d[1]||(d[1]=b=>j("剖面视图")),active:l.value&&c.value==="剖面视图",title:"剖面视图"},null,8,["active"])]),e.createElementVNode("div",nt,[e.renderSlot(i.$slots,"button-right",{switchRightPanel:q},void 0,!0),e.createVNode(w.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:d[2]||(d[2]=b=>q("关节控制")),active:f.value&&u.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(w.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:d[3]||(d[3]=b=>q("动画仿真")),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]=b=>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]=b=>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,6 +1,6 @@
|
|
|
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 {
|
|
3
|
-
import { e as j,
|
|
2
|
+
import { h as W, u as A, p as D, s as $ } from "./index-CX12hzsx.js";
|
|
3
|
+
import { e as j, aC as M, ae as L } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCz-I5jm.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const re = {
|
|
6
6
|
SINGLE: "单机",
|
|
@@ -35,10 +35,10 @@ const re = {
|
|
|
35
35
|
});
|
|
36
36
|
function Y() {
|
|
37
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) => {
|
|
38
|
-
if (!
|
|
38
|
+
if (!C())
|
|
39
39
|
throw new Error("不是三维系统");
|
|
40
40
|
y.setData(e);
|
|
41
|
-
}, _ = () => y.getData(),
|
|
41
|
+
}, _ = () => y.getData(), C = () => O.value === "three", c = (e) => j(e), h = (e) => {
|
|
42
42
|
if (!e)
|
|
43
43
|
return !1;
|
|
44
44
|
const r = c(e);
|
|
@@ -68,20 +68,20 @@ function Y() {
|
|
|
68
68
|
isUv: o === "uv",
|
|
69
69
|
isNc: o === "nc"
|
|
70
70
|
};
|
|
71
|
-
},
|
|
71
|
+
}, g = (e) => {
|
|
72
72
|
if (!e)
|
|
73
73
|
return !1;
|
|
74
74
|
const r = c(e);
|
|
75
75
|
return p == null ? void 0 : p.includes(r);
|
|
76
|
-
}, k = (e) =>
|
|
76
|
+
}, k = (e) => C() && h(e), t = (e) => ({
|
|
77
77
|
url: e,
|
|
78
78
|
extension: c(e)
|
|
79
79
|
});
|
|
80
80
|
return {
|
|
81
81
|
getData: _,
|
|
82
82
|
setData: f,
|
|
83
|
-
isThreeSystem:
|
|
84
|
-
isUrdf:
|
|
83
|
+
isThreeSystem: C,
|
|
84
|
+
isUrdf: g,
|
|
85
85
|
isGeneralFile: S,
|
|
86
86
|
isTrackPathFile: v,
|
|
87
87
|
isThreeFile: h,
|
|
@@ -112,7 +112,7 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
112
112
|
height: { default: "100%" }
|
|
113
113
|
},
|
|
114
114
|
setup(E) {
|
|
115
|
-
const O = b(() => import("./threeSceneView-
|
|
115
|
+
const O = b(() => import("./threeSceneView-DsioOlOb.js")), y = b(() => import("./threePreview-CAXTHct3.js")), i = b(() => import("./threeTrackPathView-BaONHAhM.js")), p = b(() => import("./threeSceneViewForCPMPIP-vG44vNGe.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: C } = Y(), c = I(() => {
|
|
116
116
|
var t;
|
|
117
117
|
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
|
|
118
118
|
const { url: e } = s;
|
|
@@ -137,21 +137,21 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
137
137
|
case "preview":
|
|
138
138
|
return a.PREVIEW;
|
|
139
139
|
}
|
|
140
|
-
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 :
|
|
141
|
-
}), l = R([]),
|
|
140
|
+
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 : C(h.value) && S.value ? a.TRACK_PATH : a.PREVIEW;
|
|
141
|
+
}), l = R([]), g = R(!1);
|
|
142
142
|
async function k(t) {
|
|
143
143
|
if (!t || !t.length) {
|
|
144
144
|
l.value = [];
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
g.value = !0;
|
|
148
148
|
try {
|
|
149
149
|
const s = await Promise.all(t.map((e) => L(e)));
|
|
150
150
|
l.value = s;
|
|
151
151
|
} catch (s) {
|
|
152
152
|
console.error("文件下载时发生错误:", s), l.value = [];
|
|
153
153
|
} finally {
|
|
154
|
-
|
|
154
|
+
g.value = !1;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
return H(
|
|
@@ -213,7 +213,7 @@ const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
213
213
|
]),
|
|
214
214
|
_: 3
|
|
215
215
|
}, 8, ["fileBlobs"])) : V("", !0),
|
|
216
|
-
|
|
216
|
+
g.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) : V("", !0)
|
|
217
217
|
]));
|
|
218
218
|
}
|
|
219
219
|
}), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-9798f55b"]]), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./index-BZST7lPo.cjs"),S=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DD10WrJ2.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-BUb8pd-o.cjs"))),P=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-rc0Y3L69.cjs"))),c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-CZTeW2Pq.cjs"))),m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-D6en-lGr.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 +1 @@
|
|
|
1
|
-
"use strict";const n=require("vue"),k=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";const n=require("vue"),k=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DD10WrJ2.cjs"),x=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),J=(o,a)=>{if(!a)return null;const i=o.joints[a];return i||null},V=(o,a)=>{if(!a)return null;const i=J(o,a);if(!i)return null;let u=null;return i.traverse(c=>{c instanceof k.Mesh&&!u&&(u=c)}),u},F=(o,a)=>{if(!a)return null;const i=o.links[a];return i||null},L=(o,a)=>{if(!a)return null;const i=F(o,a);if(!i)return null;let u=null;return i.traverse(c=>{c instanceof k.Mesh&&!u&&(u=c)}),u},E=o=>{const a=o.joints;return Object.values(a)},M=o=>E(o).filter(u=>u.jointType!=="fixed"),N=o=>{const a=o.links;return Object.keys(a)},w={class:"panel-content"},B={key:0,class:"joints-list"},b={class:"joint-info-row"},I={class:"joint-left"},S={class:"joint-name"},C={class:"joint-range"},D={class:"joint-type"},P={key:0,class:"joint-control-row"},T={class:"slider-container"},U=["min","max","value","onInput"],A={class:"value-display"},R={class:"joint-value"},q={class:"unit"},O={key:1,class:"empty-state"},K=n.defineComponent({__name:"urdfJointPanel",props:{model:{}},setup(o,{expose:a}){const i=o,u=n.ref([]),c=n.ref(null),f=(r,e=!1)=>r==="revolute"?e?Math.PI:-Math.PI:r==="prismatic"?e?1:-1:0,h=r=>{if(!r||!r.joints)return console.warn("URDF模型无效或不包含关节信息"),[];const e=[];return E(r).forEach(l=>{var d,p;if(l.jointType==="fixed")return;let t={lower:((d=l.limit)==null?void 0:d.lower)??f(l.jointType,!1),upper:((p=l.limit)==null?void 0:p.upper)??f(l.jointType,!0)};l.jointType==="continuous"&&(t={lower:-10*Math.PI,upper:10*Math.PI}),e.push({name:l.name,type:l.jointType||"unknown",limit:t,currentValue:l.angle||0,urdfJoint:l})}),e},m=(r,e)=>{var d;const s=u.value.find(p=>p.name===r);if(!s)return;const l=parseFloat(e),t=Math.max(s.limit.lower,Math.min(s.limit.upper,l));s.currentValue=t,(d=i.model)!=null&&d.setJointValue?i.model.setJointValue(r,t):s.urdfJoint.setJointValue(t)},_=()=>{u.value.forEach(r=>{(r.type==="revolute"||r.type==="continuous"||r.type==="prismatic")&&m(r.name,0)})},g=()=>{i.model&&u.value.forEach(r=>{r.urdfJoint.angle!==void 0&&r.currentValue!==r.urdfJoint.angle&&(r.currentValue=r.urdfJoint.angle)})},v=()=>{const r=()=>{g(),c.value=requestAnimationFrame(r)};r()},y=()=>{c.value&&(cancelAnimationFrame(c.value),c.value=null)};return n.watch(()=>i.model,r=>{r?u.value=h(r):u.value=[]},{immediate:!0}),n.onMounted(()=>{v()}),n.onUnmounted(()=>{y()}),a({resetAllJoints:_}),(r,e)=>(n.openBlock(),n.createElementBlock("div",w,[u.value.length>0?(n.openBlock(),n.createElementBlock("div",B,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(u.value,s=>(n.openBlock(),n.createElementBlock("div",{key:s.name,class:"joint-item"},[n.createElementVNode("div",b,[n.createElementVNode("div",I,[n.createElementVNode("span",S,n.toDisplayString(s.name),1),n.createElementVNode("span",C," ["+n.toDisplayString(s.limit.lower.toFixed(2))+", "+n.toDisplayString(s.limit.upper.toFixed(2))+"] ",1)]),n.createElementVNode("span",D,n.toDisplayString(s.type),1)]),s.type==="revolute"||s.type==="prismatic"||s.type==="continuous"?(n.openBlock(),n.createElementBlock("div",P,[n.createElementVNode("div",T,[n.createElementVNode("input",{type:"range",min:s.limit.lower,max:s.limit.upper,step:"0.001",value:s.currentValue,onInput:l=>m(s.name,l.target.value),class:"joint-slider"},null,40,U)]),n.createElementVNode("div",A,[n.createElementVNode("span",R,n.toDisplayString(s.currentValue?Number(s.currentValue).toFixed(3):"0.000"),1),n.createElementVNode("span",q,n.toDisplayString(s.type==="prismatic"?"m":"rad"),1)])])):n.createCommentVNode("",!0)]))),128))])):(n.openBlock(),n.createElementBlock("div",O,e[0]||(e[0]=[n.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}}),$=x._export_sfc(K,[["__scopeId","data-v-750b831d"]]),H={class:"panel-content"},z="id",G={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:o=>["breadth","firstLevel"].includes(o)}},emits:["nodeClick"],setup(o,{emit:a}){const i=o,u=a,c=n.ref([]),f={children:"children",label:"label"},h=e=>{u("nodeClick",e)},m=(e,s=0)=>{const l=[];return Array.isArray(e)&&(e==null?void 0:e.length)>0&&e.forEach(t=>{if(!(t!=null&&t.isMesh)&&((t==null?void 0:t.type)==="URDFJoint"||(t==null?void 0:t.type)==="URDFLink")){const d={name:t==null?void 0:t.name,label:t==null?void 0:t.name,show:!0,level:s+1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:m(t==null?void 0:t.children,s+1),path:t==null?void 0:t.name};l.push(d)}}),l},_=e=>e?[{name:e==null?void 0:e.name,label:e==null?void 0:e.name,show:!0,level:1,isPenultimate:!1,type:e==null?void 0:e.type,id:e==null?void 0:e.id,limit:(e==null?void 0:e.limit)??"",children:m(e==null?void 0:e.children,1)||[],path:e==null?void 0:e.name}]:[],g=(e,s)=>{const l=[],t=[...e];for(;t.length>0&&l.length<s;){const d=t.shift();d.children&&d.children.length>0&&(l.push(d.id),t.push(...d.children))}return l},v=(e,s)=>{const l=[];return e.forEach(t=>{if(t.children&&t.children.length>0){l.push(t.id);const d=t.children.filter(p=>p.children&&p.children.length>0).slice(0,s).map(p=>p.id);l.push(...d)}}),l.slice(0,s+1)},y=n.computed(()=>!c.value||c.value.length===0?[]:i.expandStrategy==="firstLevel"?v(c.value,i.maxExpandCount):g(c.value,i.maxExpandCount)),r=n.computed(()=>[{name:"场景",label:"场景",show:!0,level:1,isPenultimate:!1,type:"场景",id:"场景",children:i!=null&&i.model?_(i.model):[],path:"场景"}]);return n.watch(r,e=>{c.value=JSON.parse(JSON.stringify(e))},{immediate:!0}),(e,s)=>{const l=n.resolveComponent("el-tree");return n.openBlock(),n.createElementBlock("div",H,[n.createVNode(l,{data:c.value,props:f,"default-expanded-keys":y.value,"node-key":z,onNodeClick:h},null,8,["data","default-expanded-keys"])])}}},Q=x._export_sfc(G,[["__scopeId","data-v-cfde50c3"]]);exports.JointPanel=$;exports.UrdfTree=Q;exports.getAllLinkName=N;exports.getMeshFromJoint=V;exports.getMeshFromLink=L;exports.getNonFixedJoints=M;exports.getTargetJoint=J;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as I, ref as F, watch as M, onMounted as C, onUnmounted as E, createElementBlock as m, openBlock as f, Fragment as P, renderList as T, createElementVNode as c, createCommentVNode as U, toDisplayString as h, computed as L, resolveComponent as S, createVNode as A } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { a1 as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCz-I5jm.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const D = (i, a) => {
|
|
5
5
|
if (!a)
|