ss-component-new 1.3.445 → 1.3.447
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/{array-N6lc4Br5.js → array-BamRuoOD.js} +2 -2
- package/dist/{array-B26XuS0b.cjs → array-btZYLqUK.cjs} +1 -1
- package/dist/{index-D0z8dy9n.js → index-B72-4yf7.js} +1 -1
- package/dist/{index-DU8CpKRf.js → index-BHTcqooS.js} +7 -7
- package/dist/{index-CPMaO9p7.cjs → index-BVDaFrR1.cjs} +10 -10
- package/dist/{index-D0e_qlck.js → index-BuKQQPdl.js} +2 -2
- package/dist/{index-B3acTv0R.js → index-C-z-Nlg9.js} +1 -1
- package/dist/{index-BVXoe8kB.cjs → index-C1FnwRUu.cjs} +1 -1
- package/dist/{index-Df2Ticej.cjs → index-C7RhO6sY.cjs} +1 -1
- package/dist/{index-CakAYeCc.js → index-CBXxToaR.js} +2 -2
- package/dist/{index-BkV08RrG.cjs → index-CCs8JfeG.cjs} +1 -1
- package/dist/{index-CBn_Sxx-.js → index-Cd0RwOH4.js} +2 -2
- package/dist/{index-CF8HtruB.cjs → index-CpwW2U4S.cjs} +1 -1
- package/dist/{index-BcUnmNF5.js → index-CzjnoeKD.js} +3 -3
- package/dist/{index-B0C_JfTz.cjs → index-D-j5ega_.cjs} +1 -1
- package/dist/{index-BdcM3AgH.cjs → index-D9epS32a.cjs} +1 -1
- package/dist/{index-Co4pwN6L.js → index-DFUcqAnm.js} +1 -1
- package/dist/{index-BIitwvo2.js → index-DI3TtkkA.js} +2191 -2186
- package/dist/{index-DAQkBDvd.cjs → index-DTKhT44W.cjs} +1 -1
- package/dist/{index-BlZJ8BR2.cjs → index-DdGEVAoz.cjs} +1 -1
- package/dist/{index-BPBzffO_.cjs → index-Dfo0qUQb.cjs} +1 -1
- package/dist/{index-MMgFaywW.js → index-Dg22_ZeG.js} +1 -1
- package/dist/{index-DAE5FhqV.cjs → index-DqxQx4BR.cjs} +1 -1
- package/dist/{index-Du9ewqL6.js → index-RWivHsXr.js} +1 -1
- package/dist/{index-BnNMFmBu.js → index-t1up3rVy.js} +1 -1
- package/dist/{index-3B7_j5gR.cjs → index-wA8Et9Q3.cjs} +1 -1
- package/dist/{main-B85RX9Vd.cjs → main-BMtNW6cb.cjs} +1 -1
- package/dist/{main-CsBHfJ6s.js → main-DW827WGq.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-CVWskoMT.js → threeModel-CJT7ouCQ.js} +1 -1
- package/dist/{threeModel-DkECy3_w.cjs → threeModel-vePnqmZ4.cjs} +1 -1
- package/dist/{threeSceneView-CXZcdFL6.cjs → threeSceneView-BWxf-cVH.cjs} +1 -1
- package/dist/{threeSceneView-so-PHf1-.js → threeSceneView-CGKt1WlS.js} +3 -3
- package/dist/{threeSceneViewForCPMPIP-YTdQQduY.js → threeSceneViewForCPMPIP-B5YgmLd-.js} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CfGNYlv5.cjs → threeSceneViewForCPMPIP-ClxNNEo3.cjs} +1 -1
- package/dist/{threeViewerHost-B_0ydlRz.js → threeViewerHost-B5GraQL0.js} +1 -1
- package/dist/{threeViewerHost-Dme0JKp-.cjs → threeViewerHost-D0tSdUbT.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
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-
|
|
2
|
+
import { r as Te, s as Ye } from "./threeViewerHost-B5GraQL0.js";
|
|
3
3
|
import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-kof-t-Oh.js";
|
|
4
4
|
import { U as lt, u as ot, a as nt, W as at } from "./workpieceTreePanel-Dou3yknm.js";
|
|
5
5
|
import { c as st } from "./index-D6RGTlCo.js";
|
|
6
6
|
import { a9 as it, E as j, ap as rt, aq as ct } from "./request-XJsZ4h2T.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { p as De, T as xe, V as D, n as q, o as ut, s as pt, h as Se, t as dt, L as mt, u as vt, v as ft, w as gt, x as ht, y as bt, z as yt, l as _t, F as wt } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BPcdPEE5.js";
|
|
9
|
-
import "./index-
|
|
9
|
+
import "./index-DI3TtkkA.js";
|
|
10
10
|
import "./index-BHtNKL1L.js";
|
|
11
11
|
import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
12
12
|
import { y as Be, z as Ct, A as kt } from "./index-CmJoUVma.js";
|
|
13
|
-
import "./index-
|
|
13
|
+
import "./index-C-z-Nlg9.js";
|
|
14
14
|
import "./index-D1UnVGMH.js";
|
|
15
15
|
import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-M0ZPGMne.js";
|
|
16
16
|
import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-ilk9ZvH3.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { s as pe } from "./threeViewerHost-B5GraQL0.js";
|
|
3
3
|
import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-kof-t-Oh.js";
|
|
4
4
|
import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-Dou3yknm.js";
|
|
5
5
|
import { c as Ke } from "./index-D6RGTlCo.js";
|
|
@@ -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-D0tSdUbT.cjs"),q=require("./iconfont-BWb856Sc.cjs"),J=require("./workpieceTreePanel-psliSrxN.cjs"),Ce=require("./index-Dom0zBom.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-Cl-Ete0V.cjs"),h=require("./request-Dl8yi2iS.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-DnRszQps.cjs"),we=require("./MTLLoader-B5SKHnGa.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(`
|
|
@@ -112,7 +112,7 @@ const Y = { 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-CGKt1WlS.js")), y = b(() => import("./threePreview-B6F8FDdJ.js")), i = b(() => import("./threeTrackPathView-BNZmWUNv.js")), p = b(() => import("./threeSceneViewForCPMPIP-B5YgmLd-.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = z(), 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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),d=require("./index-Dom0zBom.cjs"),S=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.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-
|
|
1
|
+
"use strict";const e=require("vue"),d=require("./index-Dom0zBom.cjs"),S=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DTWSzwUy.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-BWxf-cVH.cjs"))),P=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-CCLl0t2L.cjs"))),c=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-CTSE5lvC.cjs"))),m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-ClxNNEo3.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;
|