ss-component-new 1.2.57 → 1.2.59
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/animationData-CEkMmPAJ.js +111 -0
- package/dist/animationData-FLuoH13j.cjs +1 -0
- package/dist/{iconfont-Du5a0yIR.js → iconfont-Dp3iGl32.js} +318 -244
- package/dist/iconfont-ji7A-_XJ.cjs +1 -0
- package/dist/icons/svg/CopyAddMenu.svg +1 -0
- package/dist/icons/svg/DeleteMenu.svg +1 -0
- package/dist/icons/svg/FixedMenu.svg +1 -0
- package/dist/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/dist/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/{index-BMMCYEsB.js → index--qwZeW47.js} +1 -1
- package/dist/{index-DtlFU8RR.cjs → index-B1U77nyf.cjs} +1 -1
- package/dist/index-BEfSpHE6.js +17 -0
- package/dist/{index-CEkY4nFt.js → index-BFHCLxvz.js} +1 -1
- package/dist/index-BN4opOSk.cjs +1 -0
- package/dist/{index-B55haWsS.js → index-BNES2eKm.js} +1 -1
- package/dist/{index-kXlrQUA8.js → index-BTwRUubF.js} +2 -2
- package/dist/{index-DmfzZIKw.cjs → index-BYIlecoJ.cjs} +1 -1
- package/dist/{index-D0NMKMU8.cjs → index-BgwYXT31.cjs} +1 -1
- package/dist/{index-hL7adbcf.js → index-BiUFu7a_.js} +1500 -1636
- package/dist/{index-DYopbovE.js → index-BooTgcW2.js} +1633 -1632
- package/dist/{index-CJVA_tHw.cjs → index-BxEjroD6.cjs} +1 -1
- package/dist/index-C14Eek69.js +32 -0
- package/dist/index-C8IFPtAJ.js +12233 -0
- package/dist/index-C9C84gkB.cjs +1 -0
- package/dist/{index-BO7R6DCb.cjs → index-CDW8XzWT.cjs} +1 -1
- package/dist/index-CHzlphv9.cjs +1 -0
- package/dist/{index-vrO7i-BX.cjs → index-CWG2zhJZ.cjs} +1 -1
- package/dist/{index-DURGsNBh.js → index-ChyicQIl.js} +1 -1
- package/dist/index-D57Bv8co.cjs +1 -0
- package/dist/{index-BPiXU1VF.js → index-DAJoy_Z5.js} +1 -1
- package/dist/{index-DhbAgrix.cjs → index-DIpWkFjh.cjs} +1 -1
- package/dist/index-DLU6Qv3w.cjs +15 -0
- package/dist/{index-BQWUpvXk.js → index-DN40xEbb.js} +2 -2
- package/dist/{index-HsZY-XbO.js → index-DNs7ujiq.js} +1 -1
- package/dist/{index-C8x2JQx7.cjs → index-DXGiAs1G.cjs} +1 -1
- package/dist/{index-D3cFqWf8.js → index-DZQjq0ZR.js} +1 -1
- package/dist/index-DkNldOC0.cjs +1 -0
- package/dist/{index-CgHWXZbW.cjs → index-DuamAhUi.cjs} +1 -1
- package/dist/index-DvgAOa6m.js +2858 -0
- package/dist/{index-By-PfzqJ.js → index-FUWILZwY.js} +16 -16
- package/dist/{index-C9QGZutp.cjs → index-JXXdn01K.cjs} +1 -1
- package/dist/{index-Du-GlV8c.cjs → index-LVKvj2hU.cjs} +1 -1
- package/dist/{index-D2vsFTnY.js → index-OLQpbvuS.js} +6 -6
- package/dist/{index-JGSZNtiO.js → index-YoJfAd5X.js} +1 -1
- package/dist/{index-BgLb2tvo.js → index-bcbWOGXs.js} +3 -3
- package/dist/{index-cOj9uZ5B.cjs → index-gcSJbApQ.cjs} +1 -1
- package/dist/index-lP-_9Gsb.cjs +1 -0
- package/dist/index-qDBAJZN2.cjs +1 -0
- package/dist/{index-GShz2NEi.js → index-rPWz6KHn.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bff2sYnQ.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DkxmFS5P.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D6uh0ooh.js} +10026 -10039
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-DlyCfLDJ.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-Dt5lXvbN.js +195 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-BEmLh6pe.js → index.vue_vue_type_style_index_1_lang-BUhvhTqt.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Dsas9C9w.cjs → index.vue_vue_type_style_index_1_lang-DDYxgdQk.cjs} +1 -1
- package/dist/{main-B59ixZA7.js → main-ChUyYPuq.js} +2 -2
- package/dist/{main-B3gx12Xo.cjs → main-D-bdppOV.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-CxRJigCx.cjs → threeModel-CDFo3As-.cjs} +1 -1
- package/dist/{threeModel-ardn7Q2K.js → threeModel-DcuAlWjb.js} +2 -2
- package/dist/{threePreview-L8T-JdQL.js → threePreview-DhMkG1np.js} +350 -380
- package/dist/threePreview-q4R-oAs6.cjs +1 -0
- package/dist/threeSceneView-CAsVH82L.cjs +5 -0
- package/dist/threeSceneView-Dav7AGkH.js +1288 -0
- package/dist/threeSceneViewForCPMPIP-9__8NGa5.cjs +5 -0
- package/dist/threeSceneViewForCPMPIP-DxFYivgN.js +599 -0
- package/dist/threeTrackPathView-B7yrSLKq.cjs +370 -0
- package/dist/{threeTrackPathView-gTDb6Ckq.js → threeTrackPathView-DXCMl3aZ.js} +307 -376
- package/dist/{xlsx-ByPOQ6N_.js → threeViewerHost-BNnzz6WM.js} +4414 -4032
- package/dist/threeViewerHost-D70yS3z2.cjs +104 -0
- package/dist/{workpieceTreePanel-GlMrvoGI.js → workpieceTreePanel-CCbVIIlm.js} +92 -101
- package/dist/workpieceTreePanel-KdP9UaVe.cjs +1 -0
- package/package.json +1 -1
- package/public/icons/svg/CopyAddMenu.svg +1 -0
- package/public/icons/svg/DeleteMenu.svg +1 -0
- package/public/icons/svg/FixedMenu.svg +1 -0
- package/public/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/public/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/animationData-CSjRG83z.cjs +0 -1
- package/dist/animationData-DgukZCiZ.js +0 -69
- package/dist/dataUtil-Bg8jgTaT.js +0 -52
- package/dist/dataUtil-CflXOlIl.cjs +0 -1
- package/dist/fileUtil-CVIZ039M.js +0 -99
- package/dist/fileUtil-DugRTZPB.cjs +0 -1
- package/dist/iconfont-BUDQryy4.cjs +0 -1
- package/dist/index-BAkz3vaY.js +0 -12229
- package/dist/index-BE76NHis.js +0 -2848
- package/dist/index-CXGkiovm.cjs +0 -1
- package/dist/index-CaV-J52G.cjs +0 -1
- package/dist/index-D4y4pCNq.cjs +0 -1
- package/dist/index-DKQuP1UM.cjs +0 -1
- package/dist/index-DhPNGzbc.cjs +0 -1
- package/dist/index-fw0RZg-d.cjs +0 -15
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-til9urRl.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-5Hi_RNl1.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-DIFWhOl8.js +0 -212
- package/dist/threePreview-5-O-sZIc.cjs +0 -1
- package/dist/threeSceneView-BYl4rYgi.js +0 -1369
- package/dist/threeSceneView-igg9HZ8X.cjs +0 -5
- package/dist/threeSceneViewForCPMPIP-C-o-rOZ9.js +0 -662
- package/dist/threeSceneViewForCPMPIP-DfPj5iau.cjs +0 -5
- package/dist/threeTrackPathView-CgjLFXmL.cjs +0 -370
- package/dist/threeViewerHost-DvAkN_z-.js +0 -322
- package/dist/threeViewerHost-PGblwq3d.cjs +0 -1
- package/dist/workpieceTreePanel-Cr4nTOQE.cjs +0 -1
- package/dist/xlsx-BPHygxEf.cjs +0 -104
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs"),A=require("./workpieceTreePanel-Cr4nTOQE.cjs"),Z=require("./iconfont-BUDQryy4.cjs"),p=require("./index-C8qRkCgn.cjs"),Q=require("./index-B2xsH_Wl.cjs"),G=require("./urdfTree-CPEMi7wo.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CUM54R6L.cjs"),De=require("./animationData-CSjRG83z.cjs"),Me=require("./MTLLoader-BlLfoBce.cjs"),oe=require("./index-CXGkiovm.cjs"),$e={class:"panel-content"},Be={class:"action-bar"},ze={key:0,class:"animation-controls"},Le={class:"control-row"},Re={class:"control-row"},Ue={class:"frame-info"},je={class:"control-row"},Ae={key:1,class:"empty-state"},Ie={class:"dialog-footer"},Oe=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(B,{expose:I}){const k=B,o=e.ref([]),w=e.ref(!1),C=e.ref(""),v=e.ref("stopped"),c=e.ref(0),y=e.ref(0),z=e.ref(10),S=e.ref(null);let h=0;const O=e.ref([]),T=e.computed(()=>k.model?G.getNonFixedJoints(k.model).map(m=>m.name):[]),P=e.computed(()=>[...T.value]),W=e.computed(()=>P.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
|
-
${P.value.join(" ")}
|
|
3
|
-
0 0 0 ...
|
|
4
|
-
1 2 3 ...`:"请先加载模型。"),R=e.computed(()=>o.value[c.value]||{});e.watch(()=>k.model,s=>{s?(S.value=new A.URDFRobotController(s),O.value=G.getAllLinkName(s),c.value=0):(S.value=null,O.value=[])},{immediate:!0});const U=s=>{if(s<0||s>=o.value.length){console.error(`帧索引 ${s} 超出范围`);return}const n=o.value[s];if(S.value){const m={};T.value.forEach(N=>{const i=parseFloat(n[N]);isNaN(i)||(m[N]=i)}),S.value.setJointAngles(m)}c.value=s,y.value=o.value.length>1?s/(o.value.length-1)*100:100},H=async s=>{try{for(let n=c.value;n<o.value.length;n++){if(s!==h)return;const m=o.value[n],N={};if(S.value)T.value.forEach(i=>{const r=parseFloat(m[i]);isNaN(r)||(N[i]=r)}),await S.value.animateToState(N,z.value,i=>{s===h&&(y.value=(n+i)/o.value.length*100)});else{if(await new Promise(i=>setTimeout(i,z.value)),s!==h)return;y.value=(n+1)/o.value.length*100}c.value=n}s===h&&(p.ElMessage.success("动画播放完成"),v.value="stopped",y.value=100)}catch(n){console.error("动画播放出错:",n),p.ElMessage.error("动画播放出错"),v.value="stopped"}},_=()=>{if(o.value.length===0){p.ElMessage.error("无动画数据");return}v.value==="stopped"&&(c.value=0,U(0)),v.value="playing",h++,H(h),p.ElMessage.info("动画播放中")},V=()=>{v.value==="playing"&&(h++,v.value="paused",p.ElMessage.info("动画已暂停"))},D=()=>{h++,v.value="stopped",c.value=0,y.value=0,U(0),p.ElMessage.info("动画已停止并重置")},E=()=>{v.value==="playing"?V():_()},F=s=>{h++,v.value="paused",U(s)},q=()=>{if(!C.value.trim()){p.ElMessage.warning("导入内容不能为空");return}const s=C.value.trim().split(`
|
|
5
|
-
`).filter(r=>r.trim()!=="");if(s.length<2){p.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const n=s[0].split(" ").map(r=>r.trim()),m={};if(n.forEach((r,d)=>{P.value.includes(r)&&(m[d]=r)}),Object.keys(m).length===0){p.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const i=s.slice(1).map(r=>{const d=r.split(" "),M={};return P.value.forEach(j=>{M[j]="0"}),Object.entries(m).forEach(([j,L])=>{const J=d[parseInt(j)];J!==void 0&&J.trim()!==""&&(M[L]=J.trim())}),M});i.length>0?(o.value=i,p.ElMessage.success(`成功导入 ${i.length} 行数据!`),w.value=!1,C.value="",D()):p.ElMessage.error("未能解析到有效数据,请检查格式。")};e.watch(()=>k.xyzbcList,()=>{k.xyzbcList&&(o.value=p.cloneDeep(k.xyzbcList))},{immediate:!0});const x=s=>`第 ${s+1} 帧`;return I({handlePlayPause:E,playAnimation:_,pauseAnimation:V,stopAnimation:D}),e.onUnmounted(()=>{h++}),(s,n)=>{const m=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-slider"),i=e.resolveComponent("el-input"),r=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",$e,[e.createElementVNode("div",Be,[e.createVNode(Q._sfc_main,{onClick:n[0]||(n[0]=d=>w.value=!0),disabled:P.value.length===0,modelValue:"导入数据"},null,8,["disabled"])]),o.value.length>0?(e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("div",Le,[n[6]||(n[6]=e.createElementVNode("label",null,"帧间隔 (ms):",-1)),e.createVNode(m,{modelValue:z.value,"onUpdate:modelValue":n[1]||(n[1]=d=>z.value=d),min:10,max:5e3,step:100,size:"small",style:{width:"120px"}},null,8,["modelValue"])]),e.createElementVNode("div",Re,[n[7]||(n[7]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Ue,e.toDisplayString(c.value+1)+" / "+e.toDisplayString(o.value.length),1)]),e.createElementVNode("div",je,[n[8]||(n[8]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(N,{modelValue:c.value,"onUpdate:modelValue":n[2]||(n[2]=d=>c.value=d),min:0,max:o.value.length>0?o.value.length-1:0,step:1,"format-tooltip":x,onInput:F,disabled:o.value.length===0||v.value==="playing",style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",null,[n[9]||(n[9]=e.createElementVNode("label",null,"当前帧数据:",-1)),e.createElementVNode("div",null,[R.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(R.value,(d,M)=>(e.openBlock(),e.createElementBlock("div",{key:M},e.toDisplayString(M)+": "+e.toDisplayString(d),1))),128)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),o.value.length===0?(e.openBlock(),e.createElementBlock("div",Ae,n[10]||(n[10]=[e.createElementVNode("p",null,"请先导入数据",-1)]))):e.createCommentVNode("",!0),e.createVNode(r,{modelValue:w.value,"onUpdate:modelValue":n[5]||(n[5]=d=>w.value=d),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Ie,[e.createVNode(Q._sfc_main,{modelValue:"取消",onClick:n[4]||(n[4]=d=>w.value=!1)}),e.createVNode(Q._sfc_main,{modelValue:"确认导入",onClick:q,type:"primary"})])]),default:e.withCtx(()=>[n[11]||(n[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(i,{modelValue:C.value,"onUpdate:modelValue":n[3]||(n[3]=d=>C.value=d),type:"textarea",rows:10,placeholder:W.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),ae=se._export_sfc(Oe,[["__scopeId","data-v-06bc34b3"]]),Fe=async B=>await new Me.OBJLoader().loadAsync(B),qe=async B=>await Fe(B),Je={class:"obj-viewer-container"},Ge={class:"buttonGroup-top"},He={class:"buttonGroup-topLeft"},Xe={class:"buttonGroup-left"},Ke={class:"buttonGroup-right"},We={class:"buttonGroup-bottom"},Ye={class:"top-panel"},Ze={class:"panel-header"},Qe={class:"panel-body"},et={class:"left-panel"},tt={class:"panel-header"},lt={class:"panel-body"},nt={key:1,class:"clipping-content"},ot={class:"radio-group"},at={class:"radio-label"},st={class:"radio-label"},it={class:"radio-label"},rt={class:"radio-label"},ut={class:"right-panel"},ct={class:"panel-header"},dt={class:"panel-body"},vt={key:0,class:"loading-overlay"},mt=e.defineComponent({__name:"threeSceneViewForCPMPIP",props:{fileBlobs:{default:()=>[]},threeData:{}},emits:["getAnimationData","getThreeData"],setup(B,{emit:I}){const k=I,o=B,w=e.inject("setManagementPageTitle"),C=e.inject("setManagementPageVisible"),v=e.computed(()=>{var t,a;return(a=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:a.machine}),c=e.computed(()=>{var t,a;return(a=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:a.workpieceInfo}),y=e.computed(()=>{var t,a;return(a=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:a.knife}),z=e.ref([]),S=async l=>{!l||!l.isExtra||(await h(l),w==null||w(l==null?void 0:l.pageName),C==null||C(!0))},h=oe.debounce(async l=>{await oe.onPageBack();const{mainKey:t,baseMenuPath:a}=l||{};Te.copyAdd(a,t)},500);e.watch(()=>[v.value,c.value,y.value],()=>{var f,u,le,ne;const l=[],t={pageName:"机床",name:"机床",label:"机床",type:"机床",id:"机床",path:"机床",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};v.value&&t.children.push({isExtra:!0,pageName:"机床",mainKey:v.value,label:v.value,baseMenuPath:"设备库/机床"});const a={pageName:"工件",name:"工件",label:"工件",type:"工件",id:"工件",path:"工件",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};c.value&&a.children.push({isExtra:!0,type:(f=c.value)==null?void 0:f.type,pageName:"工件",mainKey:(u=c.value)==null?void 0:u.name,label:(le=c.value)==null?void 0:le.name,baseMenuPath:`工件库/${(ne=c.value)==null?void 0:ne.type}`});const K={pageName:"刀具",name:"刀具",label:"刀具",type:"刀具",id:"刀具",path:"刀具",children:[],show:!0,isPenultimate:!1};y.value&&K.children.push({isExtra:!0,pageName:"刀具",mainKey:y.value,label:y.value,baseMenuPath:"设备库/刀具"}),l.push(t,a,K),z.value=l},{immediate:!0});const O=e.ref([]),T=e.computed(()=>{var t,a;return(a=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:a.csvUrl});e.watch(()=>T.value,async()=>{if(console.log("three data",o==null?void 0:o.threeData),console.log("csvUrl",T.value),T.value){const l=await De.initXYZBCList(T.value);O.value=l}},{immediate:!0});const P=e.computed(()=>{var t,a;return(a=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:a.bladeObjUrl}),W=e.ref(A.sceneType.ROBOT),R=e.ref(null),U=e.ref(!1),H=e.ref(""),_=e.ref(!1),V=e.ref(""),D=e.ref(!1),E=e.ref(""),F=e.ref(!1),q=e.ref(""),x=e.shallowRef(null),s=e.ref("叶片模型"),n=e.shallowRef(null),m=e.shallowRef(null),N=e.shallowRef(null),i=e.ref(ae),{currentModels:r,resetView:d,initThreeJS:M,handleResize:j,getThreeJSObjects:L,cleanup:J,setModels:ee,axesHelperVisible:ie,toggleAxesVisibility:re}=Z.useThreeJS(R),{loadSceneFromFile:ue}=A.useUrdfLoader(L,r,U,H),{isAnimating:te,toggleAnimation:ce,stopAnimation:de}=Z.useAnimation(L,r),{isClipping:ve,activeClippingAxis:b,toggleClipping:me,updateClippingPlanes:$}=Z.useClipping(L,r),{initRaycaster:pe,selectedObject3D:fe,setSelectedObjVisible:ge,updatePosition:he,updateRotation:Ve,dispose:be}=A.useRaycaster(R,L,r),Ne=()=>{re()},ye=e.computed(()=>W.value===A.sceneType.ROBOT),Ee=l=>{q.value=l,F.value=!0},X=l=>{_.value=!0,V.value=l,l==="剖面视图"&&!ve.value&&me()},Y=l=>{D.value=!0,E.value=l,l==="动画仿真"&&k("getAnimationData")},ke=()=>{var l;(l=i.value)==null||l.handlePlayPause()},we=()=>{var l;(l=i.value)==null||l.pauseAnimation()},Ce=()=>{var l;(l=i.value)==null||l.stopAnimation()},Pe=(l,t)=>G.getMeshFromLink(l,t),_e=async l=>{const t=Pe(l,s.value);if(m.value=t,console.log("bladeObjUrl",P.value),t&&t.parent&&P.value){const a=await qe(P.value);a.name="blade_clone",t.parent.add(a),a.position.copy(t.position),a.rotation.copy(t.rotation),a.scale.copy(t.scale),t.visible=!1,n.value=a}else s.value&&console.warn(`在 Blade '${s.value}' 中未找到可替换的网格或其没有父级。`)};e.watch(()=>o.fileBlobs,l=>{if(l&&l.length>0){const t=l[0];if(!t.name.toLowerCase().endsWith(".urdf"))return;ue(t).then(a=>{x.value=a,a&&_e(a)}).catch(a=>{console.error("加载URDF文件时发生错误:",a),p.ElMessage.error("加载urdf模型失败"),x.value=null})}else x.value=null},{immediate:!0,deep:!0}),e.watch(x,l=>{ee(l?[l]:[]),pe()});const xe=()=>{M(),window.addEventListener("resize",j);const l=L();N.value=l.scene},Se=()=>{V.value="",E.value="",window.removeEventListener("resize",j),te.value&&de(),J(),be()};return e.onMounted(async()=>{await e.nextTick();try{xe()}catch(l){console.error("Three.js 初始化失败:",l),p.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{Se()}),(l,t)=>{const a=e.resolveComponent("el-scrollbar"),K=e.resolveComponent("PipeAnalysisPanel");return e.openBlock(),e.createElementBlock("div",Je,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:R,class:"threejs-container"},null,512),[[e.vShow,ye.value]]),e.createElementVNode("div",Ge,[e.renderSlot(l.$slots,"button-top",{switchTopPanel:Ee},void 0,!0),e.renderSlot(l.$slots,"logout",{},void 0,!0)]),e.createElementVNode("div",He,[e.createVNode(g.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:e.unref(d),title:"重置"},null,8,["onClick"]),e.createVNode(g.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大"}),e.createVNode(g.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(g.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:e.unref(ce),title:e.unref(te)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(g.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(ie),onClick:Ne,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",Xe,[e.renderSlot(l.$slots,"button-left",{switchRightPanel:X},void 0,!0),e.createVNode(g.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:t[0]||(t[0]=f=>X("场景树")),active:_.value&&V.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(g.ThreeSvgIcon,{name:"clipping",size:"24",onClick:t[1]||(t[1]=f=>X("剖面视图")),active:_.value&&V.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(g.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",onClick:t[2]||(t[2]=f=>X("工件树")),active:_.value&&V.value==="工件树"},null,8,["active"])]),e.createElementVNode("div",Ke,[e.renderSlot(l.$slots,"button-right",{switchRightPanel:Y},void 0,!0),e.createVNode(g.ThreeSvgIcon,{name:"jichuangxuanze",size:"24",onClick:t[3]||(t[3]=f=>Y("机床控制")),active:D.value&&E.value==="机床控制",title:"机床控制"},null,8,["active"]),e.createVNode(g.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:t[4]||(t[4]=f=>Y("动画仿真")),active:D.value&&E.value==="动画仿真"},null,8,["active"])]),e.createElementVNode("div",We,[e.createVNode(g.ThreeSvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:ke}),e.createVNode(g.ThreeSvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:we}),e.createVNode(g.ThreeSvgIcon,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:Ce})]),e.withDirectives(e.createElementVNode("div",Ye,[e.createElementVNode("div",Ze,[e.createElementVNode("span",null,e.toDisplayString(q.value),1),e.createElementVNode("span",{class:"close",onClick:t[5]||(t[5]=f=>F.value=!1)}," X ")]),e.createElementVNode("div",Qe,[e.createVNode(a,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"top-panel",{topPanelType:q.value},void 0,!0)]),_:3})])],512),[[e.vShow,F.value]]),e.withDirectives(e.createElementVNode("div",et,[e.createElementVNode("div",tt,[e.createElementVNode("span",null,e.toDisplayString(V.value),1),e.createElementVNode("span",{class:"close",onClick:t[6]||(t[6]=f=>_.value=!1)}," X ")]),e.createElementVNode("div",lt,[e.createVNode(a,{height:"100%"},{default:e.withCtx(()=>{var f;return[V.value==="场景树"?(e.openBlock(),e.createBlock(G.UrdfTree,{key:0,model:x.value,extraNodes:z.value,onNodeClick:S},null,8,["model","extraNodes"])):e.createCommentVNode("",!0),V.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",nt,[e.createElementVNode("div",ot,[e.createElementVNode("label",at,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":t[7]||(t[7]=u=>e.isRef(b)?b.value=u:null),onChange:t[8]||(t[8]=(...u)=>e.unref($)&&e.unref($)(...u))},null,544),[[e.vModelRadio,e.unref(b)]]),t[16]||(t[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",st,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":t[9]||(t[9]=u=>e.isRef(b)?b.value=u:null),onChange:t[10]||(t[10]=(...u)=>e.unref($)&&e.unref($)(...u))},null,544),[[e.vModelRadio,e.unref(b)]]),t[17]||(t[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",it,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":t[11]||(t[11]=u=>e.isRef(b)?b.value=u:null),onChange:t[12]||(t[12]=(...u)=>e.unref($)&&e.unref($)(...u))},null,544),[[e.vModelRadio,e.unref(b)]]),t[18]||(t[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",rt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":t[13]||(t[13]=u=>e.isRef(b)?b.value=u:null),onChange:t[14]||(t[14]=(...u)=>e.unref($)&&e.unref($)(...u))},null,544),[[e.vModelRadio,e.unref(b)]]),t[19]||(t[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),V.value==="工件树"?(e.openBlock(),e.createBlock(A.WorkpieceTreePanel,{key:2,model:(f=e.unref(fe))==null?void 0:f.obj,onVisibleChange:e.unref(ge),onUpdatePosition:e.unref(he),onUpdateRotation:e.unref(Ve)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,_.value]]),e.withDirectives(e.createElementVNode("div",ut,[e.createElementVNode("div",ct,[e.createElementVNode("span",null,e.toDisplayString(E.value),1),e.createElementVNode("span",{class:"close",onClick:t[15]||(t[15]=f=>D.value=!1)}," X ")]),e.createElementVNode("div",dt,[e.createVNode(a,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(G.JointPanel,{model:x.value},null,8,["model"]),[[e.vShow,E.value==="机床控制"]]),e.withDirectives(e.createVNode(ae,{model:x.value,scene:N.value,xyzbcList:O.value,ref_key:"urdfAnimationPanelRef",ref:i},null,8,["model","scene","xyzbcList"]),[[e.vShow,E.value==="动画仿真"]]),e.renderSlot(l.$slots,"right-panel",{rightPanelType:E.value},void 0,!0)]),_:3})])],512),[[e.vShow,D.value]]),U.value?(e.openBlock(),e.createElementBlock("div",vt,[t[20]||(t[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(H.value),1)])):e.createCommentVNode("",!0),e.createVNode(K,{ref:"pipeAnalysisPanelRef"},null,512)])}}}),pt=se._export_sfc(mt,[["__scopeId","data-v-0d251d70"]]);exports.default=pt;
|
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),O=require("./iconfont-BUDQryy4.cjs"),l=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-fAuSnfOH.cjs"),ye=require("./fileUtil-DugRTZPB.cjs"),we=require("./index-C8qRkCgn.cjs"),J=require("./urdfTree-CPEMi7wo.cjs"),y=require("./svgIcon-CUM54R6L.cjs"),xe=require("./isString--eJE54G5.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=new l.Box3,R=new l.Vector3;class oe extends l.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],i=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(o),this.setAttribute("position",new l.Float32BufferAttribute(e,3)),this.setAttribute("uv",new l.Float32BufferAttribute(i,2))}applyMatrix4(e){const i=this.attributes.instanceStart,o=this.attributes.instanceEnd;return i!==void 0&&(i.applyMatrix4(e),o.applyMatrix4(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new l.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceStart",new l.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceEnd",new l.InterleavedBufferAttribute(o,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new l.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceColorStart",new l.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceColorEnd",new l.InterleavedBufferAttribute(o,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new l.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const i=e.geometry;return this.setPositions(i.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new l.Box3);const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;e!==void 0&&i!==void 0&&(this.boundingBox.setFromBufferAttribute(e),K.setFromBufferAttribute(i),this.boundingBox.union(K))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new l.Sphere),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;if(e!==void 0&&i!==void 0){const o=this.boundingSphere.center;this.boundingBox.getCenter(o);let n=0;for(let c=0,d=e.count;c<d;c++)R.fromBufferAttribute(e,c),n=Math.max(n,o.distanceToSquared(R)),R.fromBufferAttribute(i,c),n=Math.max(n,o.distanceToSquared(R));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}l.UniformsLib.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new l.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};l.ShaderLib.line={uniforms:l.UniformsUtils.merge([l.UniformsLib.common,l.UniformsLib.fog,l.UniformsLib.line]),vertexShader:`
|
|
2
|
-
#include <common>
|
|
3
|
-
#include <color_pars_vertex>
|
|
4
|
-
#include <fog_pars_vertex>
|
|
5
|
-
#include <logdepthbuf_pars_vertex>
|
|
6
|
-
#include <clipping_planes_pars_vertex>
|
|
7
|
-
|
|
8
|
-
uniform float linewidth;
|
|
9
|
-
uniform vec2 resolution;
|
|
10
|
-
|
|
11
|
-
attribute vec3 instanceStart;
|
|
12
|
-
attribute vec3 instanceEnd;
|
|
13
|
-
|
|
14
|
-
attribute vec3 instanceColorStart;
|
|
15
|
-
attribute vec3 instanceColorEnd;
|
|
16
|
-
|
|
17
|
-
#ifdef WORLD_UNITS
|
|
18
|
-
|
|
19
|
-
varying vec4 worldPos;
|
|
20
|
-
varying vec3 worldStart;
|
|
21
|
-
varying vec3 worldEnd;
|
|
22
|
-
|
|
23
|
-
#ifdef USE_DASH
|
|
24
|
-
|
|
25
|
-
varying vec2 vUv;
|
|
26
|
-
|
|
27
|
-
#endif
|
|
28
|
-
|
|
29
|
-
#else
|
|
30
|
-
|
|
31
|
-
varying vec2 vUv;
|
|
32
|
-
|
|
33
|
-
#endif
|
|
34
|
-
|
|
35
|
-
#ifdef USE_DASH
|
|
36
|
-
|
|
37
|
-
uniform float dashScale;
|
|
38
|
-
attribute float instanceDistanceStart;
|
|
39
|
-
attribute float instanceDistanceEnd;
|
|
40
|
-
varying float vLineDistance;
|
|
41
|
-
|
|
42
|
-
#endif
|
|
43
|
-
|
|
44
|
-
void trimSegment( const in vec4 start, inout vec4 end ) {
|
|
45
|
-
|
|
46
|
-
// trim end segment so it terminates between the camera plane and the near plane
|
|
47
|
-
|
|
48
|
-
// conservative estimate of the near plane
|
|
49
|
-
float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
|
|
50
|
-
float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
|
|
51
|
-
float nearEstimate = - 0.5 * b / a;
|
|
52
|
-
|
|
53
|
-
float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
|
|
54
|
-
|
|
55
|
-
end.xyz = mix( start.xyz, end.xyz, alpha );
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
void main() {
|
|
60
|
-
|
|
61
|
-
#ifdef USE_COLOR
|
|
62
|
-
|
|
63
|
-
vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
|
|
64
|
-
|
|
65
|
-
#endif
|
|
66
|
-
|
|
67
|
-
#ifdef USE_DASH
|
|
68
|
-
|
|
69
|
-
vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
|
|
70
|
-
vUv = uv;
|
|
71
|
-
|
|
72
|
-
#endif
|
|
73
|
-
|
|
74
|
-
float aspect = resolution.x / resolution.y;
|
|
75
|
-
|
|
76
|
-
// camera space
|
|
77
|
-
vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
|
|
78
|
-
vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
|
|
79
|
-
|
|
80
|
-
#ifdef WORLD_UNITS
|
|
81
|
-
|
|
82
|
-
worldStart = start.xyz;
|
|
83
|
-
worldEnd = end.xyz;
|
|
84
|
-
|
|
85
|
-
#else
|
|
86
|
-
|
|
87
|
-
vUv = uv;
|
|
88
|
-
|
|
89
|
-
#endif
|
|
90
|
-
|
|
91
|
-
// special case for perspective projection, and segments that terminate either in, or behind, the camera plane
|
|
92
|
-
// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
|
|
93
|
-
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly
|
|
94
|
-
// perhaps there is a more elegant solution -- WestLangley
|
|
95
|
-
|
|
96
|
-
bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
|
|
97
|
-
|
|
98
|
-
if ( perspective ) {
|
|
99
|
-
|
|
100
|
-
if ( start.z < 0.0 && end.z >= 0.0 ) {
|
|
101
|
-
|
|
102
|
-
trimSegment( start, end );
|
|
103
|
-
|
|
104
|
-
} else if ( end.z < 0.0 && start.z >= 0.0 ) {
|
|
105
|
-
|
|
106
|
-
trimSegment( end, start );
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// clip space
|
|
113
|
-
vec4 clipStart = projectionMatrix * start;
|
|
114
|
-
vec4 clipEnd = projectionMatrix * end;
|
|
115
|
-
|
|
116
|
-
// ndc space
|
|
117
|
-
vec3 ndcStart = clipStart.xyz / clipStart.w;
|
|
118
|
-
vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
|
|
119
|
-
|
|
120
|
-
// direction
|
|
121
|
-
vec2 dir = ndcEnd.xy - ndcStart.xy;
|
|
122
|
-
|
|
123
|
-
// account for clip-space aspect ratio
|
|
124
|
-
dir.x *= aspect;
|
|
125
|
-
dir = normalize( dir );
|
|
126
|
-
|
|
127
|
-
#ifdef WORLD_UNITS
|
|
128
|
-
|
|
129
|
-
vec3 worldDir = normalize( end.xyz - start.xyz );
|
|
130
|
-
vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) );
|
|
131
|
-
vec3 worldUp = normalize( cross( worldDir, tmpFwd ) );
|
|
132
|
-
vec3 worldFwd = cross( worldDir, worldUp );
|
|
133
|
-
worldPos = position.y < 0.5 ? start: end;
|
|
134
|
-
|
|
135
|
-
// height offset
|
|
136
|
-
float hw = linewidth * 0.5;
|
|
137
|
-
worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp;
|
|
138
|
-
|
|
139
|
-
// don't extend the line if we're rendering dashes because we
|
|
140
|
-
// won't be rendering the endcaps
|
|
141
|
-
#ifndef USE_DASH
|
|
142
|
-
|
|
143
|
-
// cap extension
|
|
144
|
-
worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir;
|
|
145
|
-
|
|
146
|
-
// add width to the box
|
|
147
|
-
worldPos.xyz += worldFwd * hw;
|
|
148
|
-
|
|
149
|
-
// endcaps
|
|
150
|
-
if ( position.y > 1.0 || position.y < 0.0 ) {
|
|
151
|
-
|
|
152
|
-
worldPos.xyz -= worldFwd * 2.0 * hw;
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
#endif
|
|
157
|
-
|
|
158
|
-
// project the worldpos
|
|
159
|
-
vec4 clip = projectionMatrix * worldPos;
|
|
160
|
-
|
|
161
|
-
// shift the depth of the projected points so the line
|
|
162
|
-
// segments overlap neatly
|
|
163
|
-
vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
|
|
164
|
-
clip.z = clipPose.z * clip.w;
|
|
165
|
-
|
|
166
|
-
#else
|
|
167
|
-
|
|
168
|
-
vec2 offset = vec2( dir.y, - dir.x );
|
|
169
|
-
// undo aspect ratio adjustment
|
|
170
|
-
dir.x /= aspect;
|
|
171
|
-
offset.x /= aspect;
|
|
172
|
-
|
|
173
|
-
// sign flip
|
|
174
|
-
if ( position.x < 0.0 ) offset *= - 1.0;
|
|
175
|
-
|
|
176
|
-
// endcaps
|
|
177
|
-
if ( position.y < 0.0 ) {
|
|
178
|
-
|
|
179
|
-
offset += - dir;
|
|
180
|
-
|
|
181
|
-
} else if ( position.y > 1.0 ) {
|
|
182
|
-
|
|
183
|
-
offset += dir;
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// adjust for linewidth
|
|
188
|
-
offset *= linewidth;
|
|
189
|
-
|
|
190
|
-
// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
|
|
191
|
-
offset /= resolution.y;
|
|
192
|
-
|
|
193
|
-
// select end
|
|
194
|
-
vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
|
|
195
|
-
|
|
196
|
-
// back to clip space
|
|
197
|
-
offset *= clip.w;
|
|
198
|
-
|
|
199
|
-
clip.xy += offset;
|
|
200
|
-
|
|
201
|
-
#endif
|
|
202
|
-
|
|
203
|
-
gl_Position = clip;
|
|
204
|
-
|
|
205
|
-
vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
|
|
206
|
-
|
|
207
|
-
#include <logdepthbuf_vertex>
|
|
208
|
-
#include <clipping_planes_vertex>
|
|
209
|
-
#include <fog_vertex>
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
`,fragmentShader:`
|
|
213
|
-
uniform vec3 diffuse;
|
|
214
|
-
uniform float opacity;
|
|
215
|
-
uniform float linewidth;
|
|
216
|
-
|
|
217
|
-
#ifdef USE_DASH
|
|
218
|
-
|
|
219
|
-
uniform float dashOffset;
|
|
220
|
-
uniform float dashSize;
|
|
221
|
-
uniform float gapSize;
|
|
222
|
-
|
|
223
|
-
#endif
|
|
224
|
-
|
|
225
|
-
varying float vLineDistance;
|
|
226
|
-
|
|
227
|
-
#ifdef WORLD_UNITS
|
|
228
|
-
|
|
229
|
-
varying vec4 worldPos;
|
|
230
|
-
varying vec3 worldStart;
|
|
231
|
-
varying vec3 worldEnd;
|
|
232
|
-
|
|
233
|
-
#ifdef USE_DASH
|
|
234
|
-
|
|
235
|
-
varying vec2 vUv;
|
|
236
|
-
|
|
237
|
-
#endif
|
|
238
|
-
|
|
239
|
-
#else
|
|
240
|
-
|
|
241
|
-
varying vec2 vUv;
|
|
242
|
-
|
|
243
|
-
#endif
|
|
244
|
-
|
|
245
|
-
#include <common>
|
|
246
|
-
#include <color_pars_fragment>
|
|
247
|
-
#include <fog_pars_fragment>
|
|
248
|
-
#include <logdepthbuf_pars_fragment>
|
|
249
|
-
#include <clipping_planes_pars_fragment>
|
|
250
|
-
|
|
251
|
-
vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
|
|
252
|
-
|
|
253
|
-
float mua;
|
|
254
|
-
float mub;
|
|
255
|
-
|
|
256
|
-
vec3 p13 = p1 - p3;
|
|
257
|
-
vec3 p43 = p4 - p3;
|
|
258
|
-
|
|
259
|
-
vec3 p21 = p2 - p1;
|
|
260
|
-
|
|
261
|
-
float d1343 = dot( p13, p43 );
|
|
262
|
-
float d4321 = dot( p43, p21 );
|
|
263
|
-
float d1321 = dot( p13, p21 );
|
|
264
|
-
float d4343 = dot( p43, p43 );
|
|
265
|
-
float d2121 = dot( p21, p21 );
|
|
266
|
-
|
|
267
|
-
float denom = d2121 * d4343 - d4321 * d4321;
|
|
268
|
-
|
|
269
|
-
float numer = d1343 * d4321 - d1321 * d4343;
|
|
270
|
-
|
|
271
|
-
mua = numer / denom;
|
|
272
|
-
mua = clamp( mua, 0.0, 1.0 );
|
|
273
|
-
mub = ( d1343 + d4321 * ( mua ) ) / d4343;
|
|
274
|
-
mub = clamp( mub, 0.0, 1.0 );
|
|
275
|
-
|
|
276
|
-
return vec2( mua, mub );
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
void main() {
|
|
281
|
-
|
|
282
|
-
float alpha = opacity;
|
|
283
|
-
vec4 diffuseColor = vec4( diffuse, alpha );
|
|
284
|
-
|
|
285
|
-
#include <clipping_planes_fragment>
|
|
286
|
-
|
|
287
|
-
#ifdef USE_DASH
|
|
288
|
-
|
|
289
|
-
if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
|
|
290
|
-
|
|
291
|
-
if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
|
|
292
|
-
|
|
293
|
-
#endif
|
|
294
|
-
|
|
295
|
-
#ifdef WORLD_UNITS
|
|
296
|
-
|
|
297
|
-
// Find the closest points on the view ray and the line segment
|
|
298
|
-
vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
|
|
299
|
-
vec3 lineDir = worldEnd - worldStart;
|
|
300
|
-
vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
|
|
301
|
-
|
|
302
|
-
vec3 p1 = worldStart + lineDir * params.x;
|
|
303
|
-
vec3 p2 = rayEnd * params.y;
|
|
304
|
-
vec3 delta = p1 - p2;
|
|
305
|
-
float len = length( delta );
|
|
306
|
-
float norm = len / linewidth;
|
|
307
|
-
|
|
308
|
-
#ifndef USE_DASH
|
|
309
|
-
|
|
310
|
-
#ifdef USE_ALPHA_TO_COVERAGE
|
|
311
|
-
|
|
312
|
-
float dnorm = fwidth( norm );
|
|
313
|
-
alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
|
|
314
|
-
|
|
315
|
-
#else
|
|
316
|
-
|
|
317
|
-
if ( norm > 0.5 ) {
|
|
318
|
-
|
|
319
|
-
discard;
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
#endif
|
|
324
|
-
|
|
325
|
-
#endif
|
|
326
|
-
|
|
327
|
-
#else
|
|
328
|
-
|
|
329
|
-
#ifdef USE_ALPHA_TO_COVERAGE
|
|
330
|
-
|
|
331
|
-
// artifacts appear on some hardware if a derivative is taken within a conditional
|
|
332
|
-
float a = vUv.x;
|
|
333
|
-
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
|
|
334
|
-
float len2 = a * a + b * b;
|
|
335
|
-
float dlen = fwidth( len2 );
|
|
336
|
-
|
|
337
|
-
if ( abs( vUv.y ) > 1.0 ) {
|
|
338
|
-
|
|
339
|
-
alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
#else
|
|
344
|
-
|
|
345
|
-
if ( abs( vUv.y ) > 1.0 ) {
|
|
346
|
-
|
|
347
|
-
float a = vUv.x;
|
|
348
|
-
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
|
|
349
|
-
float len2 = a * a + b * b;
|
|
350
|
-
|
|
351
|
-
if ( len2 > 1.0 ) discard;
|
|
352
|
-
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
#endif
|
|
356
|
-
|
|
357
|
-
#endif
|
|
358
|
-
|
|
359
|
-
#include <logdepthbuf_fragment>
|
|
360
|
-
#include <color_fragment>
|
|
361
|
-
|
|
362
|
-
gl_FragColor = vec4( diffuseColor.rgb, alpha );
|
|
363
|
-
|
|
364
|
-
#include <tonemapping_fragment>
|
|
365
|
-
#include <colorspace_fragment>
|
|
366
|
-
#include <fog_fragment>
|
|
367
|
-
#include <premultiplied_alpha_fragment>
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
`};class $ extends l.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:l.UniformsUtils.clone(l.ShaderLib.line.uniforms),vertexShader:l.ShaderLib.line.vertexShader,fragmentShader:l.ShaderLib.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?this.defines.USE_ALPHA_TO_COVERAGE="":delete this.defines.USE_ALPHA_TO_COVERAGE)}}const G=new l.Vector4,Q=new l.Vector3,ee=new l.Vector3,w=new l.Vector4,x=new l.Vector4,V=new l.Vector4,H=new l.Vector3,q=new l.Matrix4,S=new l.Line3,te=new l.Vector3,F=new l.Box3,W=new l.Sphere,_=new l.Vector4;let U,B;function ne(s,e,i){return _.set(0,0,-e,1).applyMatrix4(s.projectionMatrix),_.multiplyScalar(1/_.w),_.x=B/i.width,_.y=B/i.height,_.applyMatrix4(s.projectionMatrixInverse),_.multiplyScalar(1/_.w),Math.abs(Math.max(_.x,_.y))}function be(s,e){const i=s.matrixWorld,o=s.geometry,n=o.attributes.instanceStart,c=o.attributes.instanceEnd,d=Math.min(o.instanceCount,n.count);for(let a=0,u=d;a<u;a++){S.start.fromBufferAttribute(n,a),S.end.fromBufferAttribute(c,a),S.applyMatrix4(i);const f=new l.Vector3,p=new l.Vector3;U.distanceSqToSegment(S.start,S.end,p,f),p.distanceTo(f)<B*.5&&e.push({point:p,pointOnLine:f,distance:U.origin.distanceTo(p),object:s,face:null,faceIndex:a,uv:null,uv1:null})}}function ze(s,e,i){const o=e.projectionMatrix,c=s.material.resolution,d=s.matrixWorld,a=s.geometry,u=a.attributes.instanceStart,f=a.attributes.instanceEnd,p=Math.min(a.instanceCount,u.count),v=-e.near;U.at(1,V),V.w=1,V.applyMatrix4(e.matrixWorldInverse),V.applyMatrix4(o),V.multiplyScalar(1/V.w),V.x*=c.x/2,V.y*=c.y/2,V.z=0,H.copy(V),q.multiplyMatrices(e.matrixWorldInverse,d);for(let h=0,T=p;h<T;h++){if(w.fromBufferAttribute(u,h),x.fromBufferAttribute(f,h),w.w=1,x.w=1,w.applyMatrix4(q),x.applyMatrix4(q),w.z>v&&x.z>v)continue;if(w.z>v){const C=w.z-x.z,N=(w.z-v)/C;w.lerp(x,N)}else if(x.z>v){const C=x.z-w.z,N=(x.z-v)/C;x.lerp(w,N)}w.applyMatrix4(o),x.applyMatrix4(o),w.multiplyScalar(1/w.w),x.multiplyScalar(1/x.w),w.x*=c.x/2,w.y*=c.y/2,x.x*=c.x/2,x.y*=c.y/2,S.start.copy(w),S.start.z=0,S.end.copy(x),S.end.z=0;const A=S.closestPointToPointParameter(H,!0);S.at(A,te);const b=l.MathUtils.lerp(w.z,x.z,A),z=b>=-1&&b<=1,I=H.distanceTo(te)<B*.5;if(z&&I){S.start.fromBufferAttribute(u,h),S.end.fromBufferAttribute(f,h),S.start.applyMatrix4(d),S.end.applyMatrix4(d);const C=new l.Vector3,N=new l.Vector3;U.distanceSqToSegment(S.start,S.end,N,C),i.push({point:N,pointOnLine:C,distance:U.origin.distanceTo(N),object:s,face:null,faceIndex:h,uv:null,uv1:null})}}}class Ee extends l.Mesh{constructor(e=new oe,i=new $({color:Math.random()*16777215})){super(e,i),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,i=e.attributes.instanceStart,o=e.attributes.instanceEnd,n=new Float32Array(2*i.count);for(let d=0,a=0,u=i.count;d<u;d++,a+=2)Q.fromBufferAttribute(i,d),ee.fromBufferAttribute(o,d),n[a]=a===0?0:n[a-1],n[a+1]=n[a]+Q.distanceTo(ee);const c=new l.InstancedInterleavedBuffer(n,2,1);return e.setAttribute("instanceDistanceStart",new l.InterleavedBufferAttribute(c,1,0)),e.setAttribute("instanceDistanceEnd",new l.InterleavedBufferAttribute(c,1,1)),this}raycast(e,i){const o=this.material.worldUnits,n=e.camera;n===null&&!o&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const c=e.params.Line2!==void 0&&e.params.Line2.threshold||0;U=e.ray;const d=this.matrixWorld,a=this.geometry,u=this.material;B=u.linewidth+c,a.boundingSphere===null&&a.computeBoundingSphere(),W.copy(a.boundingSphere).applyMatrix4(d);let f;if(o)f=B*.5;else{const v=Math.max(n.near,W.distanceToPoint(U.origin));f=ne(n,v,u.resolution)}if(W.radius+=f,U.intersectsSphere(W)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),F.copy(a.boundingBox).applyMatrix4(d);let p;if(o)p=B*.5;else{const v=Math.max(n.near,F.distanceToPoint(U.origin));p=ne(n,v,u.resolution)}F.expandByScalar(p),U.intersectsBox(F)!==!1&&(o?be(this,i):ze(this,n,i))}onBeforeRender(e){const i=this.material.uniforms;i&&i.resolution&&(e.getViewport(G),this.material.uniforms.resolution.value.set(G.z,G.w))}}class se extends oe{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const i=e.length-3,o=new Float32Array(2*i);for(let n=0;n<i;n+=3)o[2*n]=e[n],o[2*n+1]=e[n+1],o[2*n+2]=e[n+2],o[2*n+3]=e[n+3],o[2*n+4]=e[n+4],o[2*n+5]=e[n+5];return super.setPositions(o),this}setColors(e){const i=e.length-3,o=new Float32Array(2*i);for(let n=0;n<i;n+=3)o[2*n]=e[n],o[2*n+1]=e[n+1],o[2*n+2]=e[n+2],o[2*n+3]=e[n+3],o[2*n+4]=e[n+4],o[2*n+5]=e[n+5];return super.setColors(o),this}setFromPoints(e){const i=e.length-1,o=new Float32Array(6*i);for(let n=0;n<i;n++)o[6*n]=e[n].x,o[6*n+1]=e[n].y,o[6*n+2]=e[n].z||0,o[6*n+3]=e[n+1].x,o[6*n+4]=e[n+1].y,o[6*n+5]=e[n+1].z||0;return super.setPositions(o),this}fromLine(e){const i=e.geometry;return this.setPositions(i.attributes.position.array),this}}class Ce extends Ee{constructor(e=new se,i=new $({color:Math.random()*16777215})){super(e,i),this.isLine2=!0,this.type="Line2"}}function Ve(s){const e=[];return s.forEach(i=>{const[o,n,c]=i.trim().split(/\s+/);e.push(+o,+n,+c)}),e}function ie(s,e,i){switch(s){case"X":e.x=+i||0;break;case"Y":e.y=+i||0;break;case"Z":e.z=+i||0;break}}function _e(s){const e=[],i=["X","Y","Z"];return s.forEach(o=>{const n={x:0,y:0,z:0},c=o.trim();if(!c)return;let d=null,a="";for(let u=0;u<(c==null?void 0:c.length);u++){const f=c[u],p=i.find(v=>v===f);if(p){d&&ie(d,n,a),a="",d=p;continue}a=a+f}ie(d,n,a),e.push(n.x,n.y,n.z)}),e}const Ue=s=>s==null?void 0:s.filter(i=>i.includes("=")),Te=s=>s.replace(/,/g,""),Ae=s=>s==null?void 0:s.map(i=>Te(i)),Ne=s=>{const e=Ue(s);return Ae(e)};function Me(s){const e=Ne(s),i=[];return e.forEach(o=>{var v,h,T,L,A,b;let[n,c,d,a]=o.trim().split(/\s+/);c=(v=c==null?void 0:c.trim)==null?void 0:v.call(c),d=(h=d==null?void 0:d.trim)==null?void 0:h.call(d),a=(T=a==null?void 0:a.trim)==null?void 0:T.call(a);const[,u]=(L=c==null?void 0:c.split)==null?void 0:L.call(c,"="),[,f]=(A=d==null?void 0:d.split)==null?void 0:A.call(d,"="),[,p]=(b=a==null?void 0:a.split)==null?void 0:b.call(a,"=");i.push(+u,+f,+p)}),i}function Le(s){return s==null?void 0:s.includes("=")}async function Be(s){var n,c;const e=(n=s==null?void 0:s.trim())==null?void 0:n.split(/\r?\n/);if(Le(s))return Me(e);const i=e==null?void 0:e[0],o=(c=i==null?void 0:i.trim())==null?void 0:c.split(/\s+/);if((o==null?void 0:o.length)>=3)return Ve(e);if((o==null?void 0:o.length)===1)return _e(e)}async function Ie(s){const e=s.trim().split(/\r?\n/),i=[];return e.forEach(o=>{const n=o.trim().split(/\s+/);if(n.length!=3)return;const[c,d,a]=n;i.push(+c,+d,+a)}),i}async function Pe(s){const e=s.trim().split(/\r?\n/),i=[];return e.forEach(o=>{const n=o.trim().split(/\s+/);if(n.length!=3)return;const[c,d,a]=n;i.push(+c,+d,+a)}),i}async function ke(s,e){const{isCyd:i,isUv:o,isCpt:n}=e;return o?Be(s):i?Pe(s):n?Ie(s):[]}function De(s,e){if(!e||e.length<3)return;const{scene:i,camera:o,renderer:n,controls:c}=s();if(!i||!o||!n||!c)return;const d=[];for(let h=0;h<e.length;h+=3)d.push(new l.Vector3(e[h],e[h+1],e[h+2]));const u=new l.CatmullRomCurve3(d,!1,"catmullrom",.5).getPoints(150).flatMap(h=>[h.x,h.y,h.z]),f=new se;f.setPositions(u);const p=new $({color:55551,linewidth:3,resolution:new l.Vector2(window.innerWidth,window.innerHeight)}),v=new Ce(f,p);return v.name="轨迹路径",i.add(v),v}function Oe(s,e,i,o=4,n=50){let c=1/0,d=-1/0,a=1/0,u=-1/0,f=1/0,p=-1/0;for(let b=0;b<s.length;b+=3){const z=s[b],I=s[b+1],C=s[b+2];c=Math.min(c,z),d=Math.max(d,z),a=Math.min(a,I),u=Math.max(u,I),f=Math.min(f,C),p=Math.max(p,C)}const h=Math.sqrt((d-c)**2+(u-a)**2+(p-f)**2)*.05,T=l.MathUtils.degToRad(e.fov),L=2*Math.tan(T/2)*n,A=h/L*i.domElement.height*(o/4);return Math.max(1,A)}function je(s){const e=new l.BufferGeometry;e.setAttribute("position",new l.Float32BufferAttribute(s,3));const i=new l.PointsMaterial({color:55551,size:1,sizeAttenuation:!1});return new l.Points(e,i)}function Re(s,e){if(!e)return;const{scene:i,camera:o,renderer:n,controls:c}=s();if(!i||!o||!n||!c)return;const d=je(e);d.name="轨迹路径",i.add(d);const a=Oe(e,o,n,.5,50);return d.material.size=a,d}const Fe={class:"obj-viewer-container"},We={class:"buttonGroup-top"},Ge={class:"buttonGroup-topLeft"},He={class:"buttonGroup-left"},qe={class:"buttonGroup-right"},$e={class:"buttonGroup-bottom"},Xe={class:"left-panel"},Ye={class:"panel-header"},Ze={class:"panel-body"},Je={key:1,class:"clipping-content"},Ke={class:"radio-group"},Qe={class:"radio-label"},et={class:"radio-label"},tt={class:"radio-label"},nt={class:"radio-label"},it={class:"right-panel"},ot={class:"panel-header"},st={class:"panel-body"},rt={key:0,class:"loading-overlay"},at=t.defineComponent({__name:"threeTrackPathView",props:{fileUrls:{},threeData:{default:()=>""},trackFileType:{}},emits:["getAnimationData","getThreeData"],setup(s,{emit:e}){const i=e,o=s,n=t.ref(null),c=t.ref(!1),d=t.ref(""),a=t.ref(!1),u=t.ref(""),f=t.ref(!1),p=t.ref(""),v=t.shallowRef(null),h=t.shallowRef(null),{currentModels:T,resetView:L,initThreeJS:A,handleResize:b,getThreeJSObjects:z,cleanup:I,axesHelperVisible:C,toggleAxesVisibility:N}=O.useThreeJS(n),{isAnimating:X,toggleAnimation:re,stopAnimation:ae}=O.useAnimation(z,T),{isClipping:le,activeClippingAxis:E,toggleClipping:ce,updateClippingPlanes:M}=O.useClipping(z,T),de=()=>{N()},k=m=>{a.value=!0,u.value=m,m==="剖面视图"&&!le.value&&ce()},j=m=>{f.value=!0,p.value=m,m==="动画仿真"&&i("getAnimationData")},Y=t.ref([]),ue=t.computed(()=>{var r;return(r=o.trackFileType)==null?void 0:r.isUv}),fe=t.computed(()=>{var r;return(r=o.trackFileType)==null?void 0:r.isCyd}),pe=t.computed(()=>{var r;return(r=o.trackFileType)==null?void 0:r.isCpt}),me=t.computed(()=>{const m=o.fileUrls||[];return m==null?void 0:m[0]});let P=null;const Z=()=>{const{scene:m}=z();P&&m&&(O.disposeObj(P,m),P=null)},he=async m=>{const r=await ye.readFileText(m);if(xe.isString(r)){Y.value=await ke(r,o.trackFileType)||[];const D=Y.value;ue.value&&(P=De(z,D)),(fe.value||pe.value)&&(P=Re(z,D)),O.frameCameraToMesh(z,P)}};t.watch(()=>me.value,async m=>{m&&(Z(),await he(m))},{immediate:!0,deep:!0});const ve=()=>{A(),window.addEventListener("resize",b);const m=z();h.value=m.scene,h.value&&(h.value.name="CPMPIP")},ge=()=>{window.removeEventListener("resize",b),X.value&&ae(),Z(),I()};return t.onMounted(async()=>{try{ve()}catch(m){console.error("Three.js 初始化失败:",m),we.ElMessage.error("渲染引擎初始化失败!")}}),t.onBeforeUnmount(()=>{ge()}),(m,r)=>{const D=t.resolveComponent("el-scrollbar");return t.openBlock(),t.createElementBlock("div",Fe,[t.createElementVNode("div",{ref_key:"threejsContainer",ref:n,class:"threejs-container"},null,512),t.createElementVNode("div",We,[t.createVNode(y.ThreeSvgIcon,{name:"guanjianjiexi",size:"34"}),t.createVNode(y.ThreeSvgIcon,{name:"guanjiekongzhi",size:"34"}),t.createVNode(y.ThreeSvgIcon,{name:"gongyishengcheng",size:"34"}),t.createVNode(y.ThreeSvgIcon,{name:"buchangshezhi",size:"34"}),t.createVNode(y.ThreeSvgIcon,{name:"shuchujiagongchengxu",size:"34"})]),t.createElementVNode("div",Ge,[t.createVNode(y.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:t.unref(L),title:"重置"},null,8,["onClick"]),t.createVNode(y.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大"}),t.createVNode(y.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小"}),t.createVNode(y.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:t.unref(re),title:t.unref(X)?"停止动画":"动画视图"},null,8,["onClick","title"]),t.createVNode(y.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:t.unref(C),onClick:de,title:"显隐坐标轴"},null,8,["active"])]),t.createElementVNode("div",He,[t.renderSlot(m.$slots,"button-left",{switchRightPanel:k},void 0,!0),t.createVNode(y.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:r[0]||(r[0]=g=>k("场景树")),active:a.value&&u.value==="场景树",title:"场景树"},null,8,["active"]),t.createVNode(y.ThreeSvgIcon,{name:"clipping",size:"24",onClick:r[1]||(r[1]=g=>k("剖面视图")),active:a.value&&u.value==="剖面视图",title:"剖面视图"},null,8,["active"]),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",onClick:r[2]||(r[2]=g=>k("场景树3"))}),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",onClick:r[3]||(r[3]=g=>k("场景4"))})]),t.createElementVNode("div",qe,[t.renderSlot(m.$slots,"button-right",{switchRightPanel:j},void 0,!0),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"}),t.createVNode(y.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:r[4]||(r[4]=g=>j("关节控制")),active:f.value&&p.value==="关节控制",title:"关节控制"},null,8,["active"]),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:r[5]||(r[5]=g=>j("动画仿真")),active:f.value&&p.value==="动画仿真"},null,8,["active"]),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:r[6]||(r[6]=g=>j("urdf动画")),active:f.value&&p.value==="urdf动画"},null,8,["active"]),t.createVNode(y.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"})]),t.createElementVNode("div",$e,[t.createVNode(y.ThreeSvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:r[7]||(r[7]=()=>{})}),t.createVNode(y.ThreeSvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:r[8]||(r[8]=()=>{})}),t.createVNode(y.ThreeSvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:r[9]||(r[9]=()=>{})}),t.createVNode(y.ThreeSvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:r[10]||(r[10]=()=>{})}),t.createVNode(y.ThreeSvgIcon,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:r[11]||(r[11]=()=>{})})]),t.withDirectives(t.createElementVNode("div",Xe,[t.createElementVNode("div",Ye,[t.createElementVNode("span",null,t.toDisplayString(u.value),1),t.createElementVNode("span",{class:"close",onClick:r[12]||(r[12]=g=>a.value=!1)}," X ")]),t.createElementVNode("div",Ze,[t.createVNode(D,{height:"100%"},{default:t.withCtx(()=>[u.value==="场景树"?(t.openBlock(),t.createBlock(J.UrdfTree,{key:0,model:v.value},null,8,["model"])):t.createCommentVNode("",!0),u.value==="剖面视图"?(t.openBlock(),t.createElementBlock("div",Je,[t.createElementVNode("div",Ke,[t.createElementVNode("label",Qe,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":r[13]||(r[13]=g=>t.isRef(E)?E.value=g:null),onChange:r[14]||(r[14]=(...g)=>t.unref(M)&&t.unref(M)(...g))},null,544),[[t.vModelRadio,t.unref(E)]]),r[22]||(r[22]=t.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),t.createElementVNode("label",et,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":r[15]||(r[15]=g=>t.isRef(E)?E.value=g:null),onChange:r[16]||(r[16]=(...g)=>t.unref(M)&&t.unref(M)(...g))},null,544),[[t.vModelRadio,t.unref(E)]]),r[23]||(r[23]=t.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),t.createElementVNode("label",tt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":r[17]||(r[17]=g=>t.isRef(E)?E.value=g:null),onChange:r[18]||(r[18]=(...g)=>t.unref(M)&&t.unref(M)(...g))},null,544),[[t.vModelRadio,t.unref(E)]]),r[24]||(r[24]=t.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),t.createElementVNode("label",nt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":r[19]||(r[19]=g=>t.isRef(E)?E.value=g:null),onChange:r[20]||(r[20]=(...g)=>t.unref(M)&&t.unref(M)(...g))},null,544),[[t.vModelRadio,t.unref(E)]]),r[25]||(r[25]=t.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):t.createCommentVNode("",!0)]),_:1})])],512),[[t.vShow,a.value]]),t.withDirectives(t.createElementVNode("div",it,[t.createElementVNode("div",ot,[t.createElementVNode("span",null,t.toDisplayString(p.value),1),t.createElementVNode("span",{class:"close",onClick:r[21]||(r[21]=g=>f.value=!1)}," X ")]),t.createElementVNode("div",st,[t.createVNode(D,{height:"100%"},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(J.JointPanel,{model:v.value},null,8,["model"]),[[t.vShow,p.value==="关节控制"]])]),_:1})])],512),[[t.vShow,f.value]]),c.value?(t.openBlock(),t.createElementBlock("div",rt,[r[26]||(r[26]=t.createElementVNode("div",{class:"loading-spinner"},null,-1)),t.createElementVNode("p",null,t.toDisplayString(d.value),1)])):t.createCommentVNode("",!0)])}}}),lt=Se._export_sfc(at,[["__scopeId","data-v-c3ad7441"]]);exports.default=lt;
|