ss-component-new 1.2.97 → 1.2.99
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-B4z0XNO-.js +304 -0
- package/dist/MTLLoader-n_3HPhif.cjs +2 -0
- package/dist/OBJLoader-C_JaUegI.cjs +5 -0
- package/dist/OBJLoader-Dilcv9TL.js +356 -0
- package/dist/{OrbitControls-B85G8nPk.cjs → OrbitControls-8LBwRzcq.cjs} +1 -1
- package/dist/{OrbitControls-DFhYzlF3.js → OrbitControls-Cz47Q27N.js} +1 -1
- package/dist/{animationData-DfKVkFbz.js → animationData-C8lM4zZj.js} +1 -1
- package/dist/{animationData-DxBvEqB1.cjs → animationData-CKcPDmLp.cjs} +1 -1
- package/dist/{iconfont-C7kE-QbU.cjs → iconfont-B1cUqs_N.cjs} +1 -1
- package/dist/{iconfont-WOKNi2xx.js → iconfont-CUWS5tNH.js} +2 -2
- package/dist/{index-D0hovh9R.cjs → index-2hqZ_tND.cjs} +1 -1
- package/dist/{index-331j518H.cjs → index-AuEh0RiU.cjs} +1 -1
- package/dist/{index-D_igus4A.cjs → index-B2UPNwqJ.cjs} +1 -1
- package/dist/{index-BYk9Fb6p.js → index-BCvmfE-Q.js} +3 -3
- package/dist/{index-DeOwZgqL.js → index-BDw8DIQx.js} +130 -130
- package/dist/{index-CqI3frdZ.js → index-BPv8txj6.js} +6 -6
- package/dist/{index-DgZVeYqH.js → index-BQaejVqo.js} +1 -1
- package/dist/{index-DSPjcpWK.cjs → index-Ba16ouw0.cjs} +1 -1
- package/dist/{index-D_RGoDln.js → index-BaSO3EEl.js} +3 -3
- package/dist/{index-DHZMd8iK.cjs → index-BdSiNUC0.cjs} +1 -1
- package/dist/{index-BDxPlbe2.cjs → index-BfU8GMj1.cjs} +1 -1
- package/dist/{index-Cppt0AsF.cjs → index-BjKKDSDx.cjs} +1 -1
- package/dist/{index-C-dlFxRJ.cjs → index-BqgfejIC.cjs} +1 -1
- package/dist/{index-BODyH6MD.js → index-BxONUPjM.js} +1 -1
- package/dist/{index-BFzMf0GC.js → index-Byp3gJNW.js} +1 -1
- package/dist/{index-DJ6qg2Mo.js → index-C7ZsHeLt.js} +3 -3
- package/dist/{index-B-AhHUV1.js → index-C9p_wwJ7.js} +6 -6
- package/dist/{index-BoTiP0aV.js → index-CKlt750z.js} +1 -1
- package/dist/{index-CQRJ3pLh.cjs → index-CQwDw3-2.cjs} +1 -1
- package/dist/{index-hhS08X8b.js → index-CR1Ng5ip.js} +3 -3
- package/dist/{index-D6u590uA.cjs → index-CZIqVNof.cjs} +1 -1
- package/dist/{index-iErxMZBi.cjs → index-C_208RkZ.cjs} +1 -1
- package/dist/{index-S1LIIzCa.cjs → index-CqZ1E-Mt.cjs} +1 -1
- package/dist/{index-DHjtOySN.js → index-CrNsPd4D.js} +2 -2
- package/dist/{index-DrzK0O_g.cjs → index-CvQCAGWI.cjs} +1 -1
- package/dist/{index-Cnk_4Zz5.cjs → index-CyCcPnZb.cjs} +1 -1
- package/dist/{index-BI7g3c_u.js → index-CyE5qCBb.js} +13 -13
- package/dist/{index-DHBoRe9V.cjs → index-D32pAhQk.cjs} +1 -1
- package/dist/{index-DRfVnLTN.js → index-DAUjjqaD.js} +391 -391
- package/dist/{index-DbDM-XfB.cjs → index-DQTlc6Gq.cjs} +1 -1
- package/dist/{index-B_zjoT4m.js → index-DTilOAv_.js} +2 -2
- package/dist/{index-_PP-dSm3.cjs → index-D_22J0ok.cjs} +1 -1
- package/dist/{index-iZ9BRKg5.js → index-DboUMA_C.js} +1 -1
- package/dist/{index-BXv3aZ7v.js → index-DgMQpO6g.js} +1 -1
- package/dist/{index-CPAXrzNY.cjs → index-Dh6GqpZF.cjs} +1 -1
- package/dist/{index-CZPnP0uy.cjs → index-DhqEoDPT.cjs} +1 -1
- package/dist/{index-CeGM8aBH.js → index-DlwlGkyt.js} +2 -2
- package/dist/{index-6sZXjGGz.cjs → index-DtDmxPdD.cjs} +1 -1
- package/dist/{index-kLDMroPk.js → index-GxmJC9kr.js} +1 -1
- package/dist/{index-CLOUp_4j.cjs → index-XKn5AuYT.cjs} +1 -1
- package/dist/{index-Cr5if46q.js → index-mEKMjplD.js} +1 -1
- package/dist/{index-Bhha7SY3.js → index-vglZ0qjT.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DSlAeFA3.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DKwCF412.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-ERjMISIK.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DqIuWlps.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-3GcG1eTD.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js} +8908 -8949
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dzyqt2Z-.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs} +302 -302
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-mJB_yl_P.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cpyo5jke.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DODc2KPN.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cq8VF9uK.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-BH0DRFVE.js → index.vue_vue_type_style_index_1_lang-B_HCEX9y.js} +6 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-BRFs_L5R.cjs → index.vue_vue_type_style_index_1_lang-rTLLuvuo.cjs} +5 -5
- package/dist/loaderUtil-B0djdt91.js +5 -0
- package/dist/loaderUtil-CaWWb8db.cjs +1 -0
- package/dist/{main-Z5UMyCj6.js → main-DHx-3OSy.js} +2 -2
- package/dist/{main-B541MQH8.cjs → main-DS156sQ4.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-tKq0hvaK.cjs → threeModel-CfIK1rQB.cjs} +1 -1
- package/dist/{threeModel-BcjGbIJZ.js → threeModel-WYCdw_Ff.js} +4 -4
- package/dist/{threePreview-BnPMGQ2H.js → threePreview-C29AR7Mr.js} +310 -305
- package/dist/threePreview-Ci8TnUQ8.cjs +1 -0
- package/dist/{threeSceneView-DVUTlm6F.cjs → threeSceneView-C2MDCMux.cjs} +2 -2
- package/dist/{threeSceneView-BUD002PP.js → threeSceneView-F15mW1mm.js} +7 -7
- package/dist/threeSceneViewForCPMPIP-DK4G_ZpP.js +687 -0
- package/dist/threeSceneViewForCPMPIP-DuPZn_qv.cjs +5 -0
- package/dist/threeTrackPathView-C4eBUMef.cjs +370 -0
- package/dist/{threeTrackPathView-DDCEu3Gx.js → threeTrackPathView-DMj6YGxT.js} +436 -427
- package/dist/{threeViewerHost-BVeUteVd.js → threeViewerHost-C9ipsMff.js} +2 -2
- package/dist/{threeViewerHost-Sda_AoRw.cjs → threeViewerHost-CW6JmOUJ.cjs} +2 -2
- package/dist/{urdfTree-Br9VYqKp.cjs → urdfTree-CTiMB7ge.cjs} +1 -1
- package/dist/{urdfTree-DaWvX-6R.js → urdfTree-DGEACy9-.js} +1 -1
- package/dist/{workpieceTreePanel-BdRaFNRp.js → workpieceTreePanel-C1gy5a8r.js} +53 -52
- package/dist/workpieceTreePanel-Ded0Gqke.cjs +1 -0
- package/package.json +1 -1
- package/dist/MTLLoader-DnouUI-8.js +0 -657
- package/dist/MTLLoader-zZDM0NQh.cjs +0 -6
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/dist/threePreview-DD0br2ae.cjs +0 -1
- package/dist/threeSceneViewForCPMPIP-BYYbyqD7.cjs +0 -5
- package/dist/threeSceneViewForCPMPIP-D4RC4BAo.js +0 -683
- package/dist/threeTrackPathView-BvUihuyk.cjs +0 -370
- package/dist/workpieceTreePanel-Z3aVdOWB.cjs +0 -1
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),U=require("./iconfont-B1cUqs_N.cjs"),d=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs"),W=require("./index-C8qRkCgn.cjs"),ie=require("./OBJLoader-C_JaUegI.cjs"),Y=require("./MTLLoader-n_3HPhif.cjs"),H=require("./svgIcon-CUM54R6L.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function $(f,t){if(t===d.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(t===d.TriangleFanDrawMode||t===d.TriangleStripDrawMode){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const i=e.count-2,n=[];if(t===d.TriangleFanDrawMode)for(let r=1;r<=i;r++)n.push(e.getX(0)),n.push(e.getX(r)),n.push(e.getX(r+1));else for(let r=0;r<i;r++)r%2===0?(n.push(e.getX(r)),n.push(e.getX(r+1)),n.push(e.getX(r+2))):(n.push(e.getX(r+2)),n.push(e.getX(r+1)),n.push(e.getX(r)));n.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=f.clone();return s.setIndex(n),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),f}class ae extends d.Loader{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new fe(e)}),this.register(function(e){return new he(e)}),this.register(function(e){return new Le(e)}),this.register(function(e){return new _e(e)}),this.register(function(e){return new Ae(e)}),this.register(function(e){return new me(e)}),this.register(function(e){return new ge(e)}),this.register(function(e){return new Te(e)}),this.register(function(e){return new Re(e)}),this.register(function(e){return new de(e)}),this.register(function(e){return new xe(e)}),this.register(function(e){return new pe(e)}),this.register(function(e){return new Me(e)}),this.register(function(e){return new Ee(e)}),this.register(function(e){return new le(e)}),this.register(function(e){return new Se(e)}),this.register(function(e){return new ye(e)})}load(t,e,i,n){const s=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=d.LoaderUtils.extractUrlBase(t);r=d.LoaderUtils.resolveURL(c,this.path)}else r=d.LoaderUtils.extractUrlBase(t);this.manager.itemStart(t);const a=function(c){n?n(c):console.error(c),s.manager.itemError(t),s.manager.itemEnd(t)},o=new d.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(c){try{s.parse(c,r,function(u){e(u),s.manager.itemEnd(t)},a)}catch(u){a(u)}},i,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,i,n){let s;const r={},a={},o=new TextDecoder;if(typeof t=="string")s=JSON.parse(t);else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===te){try{r[M.KHR_BINARY_GLTF]=new we(t)}catch(l){n&&n(l);return}s=JSON.parse(r[M.KHR_BINARY_GLTF].content)}else s=JSON.parse(o.decode(t));else s=t;if(s.asset===void 0||s.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Be(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(s.extensionsUsed)for(let u=0;u<s.extensionsUsed.length;++u){const l=s.extensionsUsed[u],h=s.extensionsRequired||[];switch(l){case M.KHR_MATERIALS_UNLIT:r[l]=new ue;break;case M.KHR_DRACO_MESH_COMPRESSION:r[l]=new be(s,this.dracoLoader);break;case M.KHR_TEXTURE_TRANSFORM:r[l]=new Ne;break;case M.KHR_MESH_QUANTIZATION:r[l]=new Ce;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(i,n)}parseAsync(t,e){const i=this;return new Promise(function(n,s){i.parse(t,e,n,s)})}}function ce(){let f={};return{get:function(t){return f[t]},add:function(t,e){f[t]=e},remove:function(t){delete f[t]},removeAll:function(){f={}}}}const M={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class le{constructor(t){this.parser=t,this.name=M.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,n=e.length;i<n;i++){const s=e[i];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(t){const e=this.parser,i="light:"+t;let n=e.cache.get(i);if(n)return n;const s=e.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[t];let c;const u=new d.Color(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],d.LinearSRGBColorSpace);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new d.DirectionalLight(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new d.PointLight(u),c.distance=l;break;case"spot":c=new d.SpotLight(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),O(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+t),n=Promise.resolve(c),e.cache.add(i,n),n}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,i=this.parser,s=i.json.nodes[t],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return i._getNodeRef(e.cache,a,o)})}}class ue{constructor(){this.name=M.KHR_MATERIALS_UNLIT}getMaterialType(){return d.MeshBasicMaterial}extendParams(t,e,i){const n=[];t.color=new d.Color(1,1,1),t.opacity=1;const s=e.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const r=s.baseColorFactor;t.color.setRGB(r[0],r[1],r[2],d.LinearSRGBColorSpace),t.opacity=r[3]}s.baseColorTexture!==void 0&&n.push(i.assignTexture(t,"map",s.baseColorTexture,d.SRGBColorSpace))}return Promise.all(n)}}class de{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name].emissiveStrength;return s!==void 0&&(e.emissiveIntensity=s),Promise.resolve()}}class fe{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];if(r.clearcoatFactor!==void 0&&(e.clearcoat=r.clearcoatFactor),r.clearcoatTexture!==void 0&&s.push(i.assignTexture(e,"clearcoatMap",r.clearcoatTexture)),r.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=r.clearcoatRoughnessFactor),r.clearcoatRoughnessTexture!==void 0&&s.push(i.assignTexture(e,"clearcoatRoughnessMap",r.clearcoatRoughnessTexture)),r.clearcoatNormalTexture!==void 0&&(s.push(i.assignTexture(e,"clearcoatNormalMap",r.clearcoatNormalTexture)),r.clearcoatNormalTexture.scale!==void 0)){const a=r.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new d.Vector2(a,a)}return Promise.all(s)}}class he{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_DISPERSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class pe{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];return r.iridescenceFactor!==void 0&&(e.iridescence=r.iridescenceFactor),r.iridescenceTexture!==void 0&&s.push(i.assignTexture(e,"iridescenceMap",r.iridescenceTexture)),r.iridescenceIor!==void 0&&(e.iridescenceIOR=r.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),r.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=r.iridescenceThicknessMinimum),r.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=r.iridescenceThicknessMaximum),r.iridescenceThicknessTexture!==void 0&&s.push(i.assignTexture(e,"iridescenceThicknessMap",r.iridescenceThicknessTexture)),Promise.all(s)}}class me{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_SHEEN}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[];e.sheenColor=new d.Color(0,0,0),e.sheenRoughness=0,e.sheen=1;const r=n.extensions[this.name];if(r.sheenColorFactor!==void 0){const a=r.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],d.LinearSRGBColorSpace)}return r.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=r.sheenRoughnessFactor),r.sheenColorTexture!==void 0&&s.push(i.assignTexture(e,"sheenColorMap",r.sheenColorTexture,d.SRGBColorSpace)),r.sheenRoughnessTexture!==void 0&&s.push(i.assignTexture(e,"sheenRoughnessMap",r.sheenRoughnessTexture)),Promise.all(s)}}class ge{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];return r.transmissionFactor!==void 0&&(e.transmission=r.transmissionFactor),r.transmissionTexture!==void 0&&s.push(i.assignTexture(e,"transmissionMap",r.transmissionTexture)),Promise.all(s)}}class Te{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_VOLUME}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];e.thickness=r.thicknessFactor!==void 0?r.thicknessFactor:0,r.thicknessTexture!==void 0&&s.push(i.assignTexture(e,"thicknessMap",r.thicknessTexture)),e.attenuationDistance=r.attenuationDistance||1/0;const a=r.attenuationColor||[1,1,1];return e.attenuationColor=new d.Color().setRGB(a[0],a[1],a[2],d.LinearSRGBColorSpace),Promise.all(s)}}class Re{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_IOR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class xe{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_SPECULAR}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];e.specularIntensity=r.specularFactor!==void 0?r.specularFactor:1,r.specularTexture!==void 0&&s.push(i.assignTexture(e,"specularIntensityMap",r.specularTexture));const a=r.specularColorFactor||[1,1,1];return e.specularColor=new d.Color().setRGB(a[0],a[1],a[2],d.LinearSRGBColorSpace),r.specularColorTexture!==void 0&&s.push(i.assignTexture(e,"specularColorMap",r.specularColorTexture,d.SRGBColorSpace)),Promise.all(s)}}class Ee{constructor(t){this.parser=t,this.name=M.EXT_MATERIALS_BUMP}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];return e.bumpScale=r.bumpFactor!==void 0?r.bumpFactor:1,r.bumpTexture!==void 0&&s.push(i.assignTexture(e,"bumpMap",r.bumpTexture)),Promise.all(s)}}class Me{constructor(t){this.parser=t,this.name=M.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const i=this.parser.json.materials[t];return!i.extensions||!i.extensions[this.name]?null:d.MeshPhysicalMaterial}extendMaterialParams(t,e){const i=this.parser,n=i.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],r=n.extensions[this.name];return r.anisotropyStrength!==void 0&&(e.anisotropy=r.anisotropyStrength),r.anisotropyRotation!==void 0&&(e.anisotropyRotation=r.anisotropyRotation),r.anisotropyTexture!==void 0&&s.push(i.assignTexture(e,"anisotropyMap",r.anisotropyTexture)),Promise.all(s)}}class Le{constructor(t){this.parser=t,this.name=M.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,i=e.json,n=i.textures[t];if(!n.extensions||!n.extensions[this.name])return null;const s=n.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,s.source,r)}}class _e{constructor(t){this.parser=t,this.name=M.EXT_TEXTURE_WEBP}loadTexture(t){const e=this.name,i=this.parser,n=i.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const r=s.extensions[e],a=n.images[r.source];let o=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(o=c)}return i.loadTextureImage(t,r.source,o)}}class Ae{constructor(t){this.parser=t,this.name=M.EXT_TEXTURE_AVIF}loadTexture(t){const e=this.name,i=this.parser,n=i.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const r=s.extensions[e],a=n.images[r.source];let o=i.textureLoader;if(a.uri){const c=i.options.manager.getHandler(a.uri);c!==null&&(o=c)}return i.loadTextureImage(t,r.source,o)}}class Se{constructor(t){this.name=M.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const n=i.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const o=n.byteOffset||0,c=n.byteLength||0,u=n.count,l=n.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,n.mode,n.filter).then(function(m){return m.buffer}):r.ready.then(function(){const m=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(m),u,l,h,n.mode,n.filter),m})})}else return null}}class ye{constructor(t){this.name=M.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const n=e.meshes[i.mesh];for(const c of n.primitives)if(c.mode!==I.TRIANGLES&&c.mode!==I.TRIANGLE_STRIP&&c.mode!==I.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=i.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,m=[];for(const g of l){const E=new d.Matrix4,T=new d.Vector3,R=new d.Quaternion,L=new d.Vector3(1,1,1),S=new d.InstancedMesh(g.geometry,g.material,h);for(let x=0;x<h;x++)o.TRANSLATION&&T.fromBufferAttribute(o.TRANSLATION,x),o.ROTATION&&R.fromBufferAttribute(o.ROTATION,x),o.SCALE&&L.fromBufferAttribute(o.SCALE,x),S.setMatrixAt(x,E.compose(T,R,L));for(const x in o)if(x==="_COLOR_0"){const w=o[x];S.instanceColor=new d.InstancedBufferAttribute(w.array,w.itemSize,w.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&g.geometry.setAttribute(x,o[x]);d.Object3D.prototype.copy.call(S,g),this.parser.assignFinalMaterial(S),m.push(S)}return u.isGroup?(u.clear(),u.add(...m),u):m[0]}))}}const te="glTF",B=12,J={JSON:1313821514,BIN:5130562};class we{constructor(t){this.name=M.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,B),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==te)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-B,s=new DataView(t,B);let r=0;for(;r<n;){const a=s.getUint32(r,!0);r+=4;const o=s.getUint32(r,!0);if(r+=4,o===J.JSON){const c=new Uint8Array(t,B+r,a);this.content=i.decode(c)}else if(o===J.BIN){const c=B+r;this.body=t.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class be{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=M.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const i=this.json,n=this.dracoLoader,s=t.extensions[this.name].bufferView,r=t.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=z[u]||u.toLowerCase();a[l]=r[u]}for(const u in t.attributes){const l=z[u]||u.toLowerCase();if(r[u]!==void 0){const h=i.accessors[t.attributes[u]],m=G[h.componentType];c[l]=m.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",s).then(function(u){return new Promise(function(l,h){n.decodeDracoFile(u,function(m){for(const g in m.attributes){const E=m.attributes[g],T=o[g];T!==void 0&&(E.normalized=T)}l(m)},a,c,d.LinearSRGBColorSpace,h)})})}}class Ne{constructor(){this.name=M.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class Ce{constructor(){this.name=M.KHR_MESH_QUANTIZATION}}class ne extends d.Interpolant{constructor(t,e,i,n){super(t,e,i,n)}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,s=t*n*3+n;for(let r=0;r!==n;r++)e[r]=i[s+r];return e}interpolate_(t,e,i,n){const s=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=n-e,l=(i-e)/u,h=l*l,m=h*l,g=t*c,E=g-c,T=-2*m+3*h,R=m-h,L=1-T,S=R-h+l;for(let x=0;x!==a;x++){const w=r[E+x+a],C=r[E+x+o]*u,N=r[g+x+a],v=r[g+x]*u;s[x]=L*w+S*C+T*N+R*v}return s}}const Ie=new d.Quaternion;class ve extends ne{interpolate_(t,e,i,n){const s=super.interpolate_(t,e,i,n);return Ie.fromArray(s).normalize().toArray(s),s}}const I={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},G={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Q={9728:d.NearestFilter,9729:d.LinearFilter,9984:d.NearestMipmapNearestFilter,9985:d.LinearMipmapNearestFilter,9986:d.NearestMipmapLinearFilter,9987:d.LinearMipmapLinearFilter},Z={33071:d.ClampToEdgeWrapping,33648:d.MirroredRepeatWrapping,10497:d.RepeatWrapping},V={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},z={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},F={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Oe={CUBICSPLINE:void 0,LINEAR:d.InterpolateLinear,STEP:d.InterpolateDiscrete},j={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function ke(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new d.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:d.FrontSide})),f.DefaultMaterial}function D(f,t,e){for(const i in e.extensions)f[i]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=e.extensions[i])}function O(f,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(f.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Pe(f,t,e){let i=!1,n=!1,s=!1;for(let c=0,u=t.length;c<u;c++){const l=t[c];if(l.POSITION!==void 0&&(i=!0),l.NORMAL!==void 0&&(n=!0),l.COLOR_0!==void 0&&(s=!0),i&&n&&s)break}if(!i&&!n&&!s)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=t.length;c<u;c++){const l=t[c];if(i){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(n){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(s){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return i&&(f.morphAttributes.position=u),n&&(f.morphAttributes.normal=l),s&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function Fe(f,t){if(f.updateMorphTargets(),t.weights!==void 0)for(let e=0,i=t.weights.length;e<i;e++)f.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let i=0,n=e.length;i<n;i++)f.morphTargetDictionary[e[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function De(f){let t;const e=f.extensions&&f.extensions[M.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+K(e.attributes):t=f.indices+":"+K(f.attributes)+":"+f.mode,f.targets!==void 0)for(let i=0,n=f.targets.length;i<n;i++)t+=":"+K(f.targets[i]);return t}function K(f){let t="";const e=Object.keys(f).sort();for(let i=0,n=e.length;i<n;i++)t+=e[i]+":"+f[e[i]]+";";return t}function X(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function He(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Ge=new d.Matrix4;class Be{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new ce,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,n=-1,s=!1,r=-1;if(typeof navigator<"u"){const a=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);n=i&&o?parseInt(o[1],10):-1,s=a.indexOf("Firefox")>-1,r=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&n<17||s&&r<98?this.textureLoader=new d.TextureLoader(this.options.manager):this.textureLoader=new d.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new d.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(r){const a={scene:r[0][n.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:n.asset,parser:i,userData:{}};return D(s,a,n),O(a,n),Promise.all(i._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let n=0,s=e.length;n<s;n++){const r=e[n].joints;for(let a=0,o=r.length;a<o;a++)t[r[a]].isBone=!0}for(let n=0,s=t.length;n<s;n++){const r=t[n];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(i[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,i){if(t.refs[e]<=1)return i;const n=i.clone(),s=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())s(u,a.children[c])};return s(i,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i<e.length;i++){const n=t(e[i]);if(n)return n}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const i=[];for(let n=0;n<e.length;n++){const s=t(e[n]);s&&i.push(s)}return i}getDependency(t,e){const i=t+":"+e;let n=this.cache.get(i);if(!n){switch(t){case"scene":n=this.loadScene(e);break;case"node":n=this._invokeOne(function(s){return s.loadNode&&s.loadNode(e)});break;case"mesh":n=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(e)});break;case"accessor":n=this.loadAccessor(e);break;case"bufferView":n=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(e)});break;case"buffer":n=this.loadBuffer(e);break;case"material":n=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(e)});break;case"texture":n=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(e)});break;case"skin":n=this.loadSkin(e);break;case"animation":n=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(e)});break;case"camera":n=this.loadCamera(e);break;default:if(n=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(t,e)}),!n)throw new Error("Unknown type: "+t);break}this.cache.add(i,n)}return n}getDependencies(t){let e=this.cache.get(t);if(!e){const i=this,n=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(n.map(function(s,r){return i.getDependency(t,r)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],i=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[M.KHR_BINARY_GLTF].body);const n=this.options;return new Promise(function(s,r){i.load(d.LoaderUtils.resolveURL(e.uri,n.path),s,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(i){const n=e.byteLength||0,s=e.byteOffset||0;return i.slice(s,s+n)})}loadAccessor(t){const e=this,i=this.json,n=this.json.accessors[t];if(n.bufferView===void 0&&n.sparse===void 0){const r=V[n.type],a=G[n.componentType],o=n.normalized===!0,c=new a(n.count*r);return Promise.resolve(new d.BufferAttribute(c,r,o))}const s=[];return n.bufferView!==void 0?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),n.sparse!==void 0&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then(function(r){const a=r[0],o=V[n.type],c=G[n.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=n.byteOffset||0,m=n.bufferView!==void 0?i.bufferViews[n.bufferView].byteStride:void 0,g=n.normalized===!0;let E,T;if(m&&m!==l){const R=Math.floor(h/m),L="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+R+":"+n.count;let S=e.cache.get(L);S||(E=new c(a,R*m,n.count*m/u),S=new d.InterleavedBuffer(E,m/u),e.cache.add(L,S)),T=new d.InterleavedBufferAttribute(S,o,h%m/u,g)}else a===null?E=new c(n.count*o):E=new c(a,h,n.count*o),T=new d.BufferAttribute(E,o,g);if(n.sparse!==void 0){const R=V.SCALAR,L=G[n.sparse.indices.componentType],S=n.sparse.indices.byteOffset||0,x=n.sparse.values.byteOffset||0,w=new L(r[1],S,n.sparse.count*R),C=new c(r[2],x,n.sparse.count*o);a!==null&&(T=new d.BufferAttribute(T.array.slice(),T.itemSize,T.normalized)),T.normalized=!1;for(let N=0,v=w.length;N<v;N++){const A=w[N];if(T.setX(A,C[N*o]),o>=2&&T.setY(A,C[N*o+1]),o>=3&&T.setZ(A,C[N*o+2]),o>=4&&T.setW(A,C[N*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}T.normalized=g}return T})}loadTexture(t){const e=this.json,i=this.options,s=e.textures[t].source,r=e.images[s];let a=this.textureLoader;if(r.uri){const o=i.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(t,s,a)}loadTextureImage(t,e,i){const n=this,s=this.json,r=s.textures[t],a=s.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,i).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(s.samplers||{})[r.sampler]||{};return u.magFilter=Q[h.magFilter]||d.LinearFilter,u.minFilter=Q[h.minFilter]||d.LinearMipmapLinearFilter,u.wrapS=Z[h.wrapS]||d.RepeatWrapping,u.wrapT=Z[h.wrapT]||d.RepeatWrapping,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==d.NearestFilter&&u.minFilter!==d.LinearFilter,n.associations.set(u,{textures:t}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(t,e){const i=this,n=this.json,s=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(l=>l.clone());const r=n.images[t],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=i.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,m){let g=h;e.isImageBitmapLoader===!0&&(g=function(E){const T=new d.Texture(E);T.needsUpdate=!0,h(T)}),e.load(d.LoaderUtils.resolveURL(l,s.path),g,void 0,m)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),O(l,r),l.userData.mimeType=r.mimeType||He(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[t]=u,u}assignTexture(t,e,i,n){const s=this;return this.getDependency("texture",i.index).then(function(r){if(!r)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(r=r.clone(),r.channel=i.texCoord),s.extensions[M.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[M.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=s.associations.get(r);r=s.extensions[M.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),s.associations.set(r,o)}}return n!==void 0&&(r.colorSpace=n),t[e]=r,r})}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const n=e.attributes.tangent===void 0,s=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+i.uuid;let o=this.cache.get(a);o||(o=new d.PointsMaterial,d.Material.prototype.copy.call(o,i),o.color.copy(i.color),o.map=i.map,o.sizeAttenuation=!1,this.cache.add(a,o)),i=o}else if(t.isLine){const a="LineBasicMaterial:"+i.uuid;let o=this.cache.get(a);o||(o=new d.LineBasicMaterial,d.Material.prototype.copy.call(o,i),o.color.copy(i.color),o.map=i.map,this.cache.add(a,o)),i=o}if(n||s||r){let a="ClonedMaterial:"+i.uuid+":";n&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=i.clone(),s&&(o.vertexColors=!0),r&&(o.flatShading=!0),n&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(i))),i=o}t.material=i}getMaterialType(){return d.MeshStandardMaterial}loadMaterial(t){const e=this,i=this.json,n=this.extensions,s=i.materials[t];let r;const a={},o=s.extensions||{},c=[];if(o[M.KHR_MATERIALS_UNLIT]){const l=n[M.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,s,e))}else{const l=s.pbrMetallicRoughness||{};if(a.color=new d.Color(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],d.LinearSRGBColorSpace),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,d.SRGBColorSpace)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(t,a)})))}s.doubleSided===!0&&(a.side=d.DoubleSide);const u=s.alphaMode||j.OPAQUE;if(u===j.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===j.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&r!==d.MeshBasicMaterial&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new d.Vector2(1,1),s.normalTexture.scale!==void 0)){const l=s.normalTexture.scale;a.normalScale.set(l,l)}if(s.occlusionTexture!==void 0&&r!==d.MeshBasicMaterial&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&r!==d.MeshBasicMaterial){const l=s.emissiveFactor;a.emissive=new d.Color().setRGB(l[0],l[1],l[2],d.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&r!==d.MeshBasicMaterial&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,d.SRGBColorSpace)),Promise.all(c).then(function(){const l=new r(a);return s.name&&(l.name=s.name),O(l,s),e.associations.set(l,{materials:t}),s.extensions&&D(n,l,s),l})}createUniqueName(t){const e=d.PropertyBinding.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,n=this.primitiveCache;function s(a){return i[M.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return ee(o,a,e)})}const r=[];for(let a=0,o=t.length;a<o;a++){const c=t[a],u=De(c),l=n[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[M.KHR_DRACO_MESH_COMPRESSION]?h=s(c):h=ee(new d.BufferGeometry,c,e),n[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(t){const e=this,i=this.json,n=this.extensions,s=i.meshes[t],r=s.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?ke(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let m=0,g=u.length;m<g;m++){const E=u[m],T=r[m];let R;const L=c[m];if(T.mode===I.TRIANGLES||T.mode===I.TRIANGLE_STRIP||T.mode===I.TRIANGLE_FAN||T.mode===void 0)R=s.isSkinnedMesh===!0?new d.SkinnedMesh(E,L):new d.Mesh(E,L),R.isSkinnedMesh===!0&&R.normalizeSkinWeights(),T.mode===I.TRIANGLE_STRIP?R.geometry=$(R.geometry,d.TriangleStripDrawMode):T.mode===I.TRIANGLE_FAN&&(R.geometry=$(R.geometry,d.TriangleFanDrawMode));else if(T.mode===I.LINES)R=new d.LineSegments(E,L);else if(T.mode===I.LINE_STRIP)R=new d.Line(E,L);else if(T.mode===I.LINE_LOOP)R=new d.LineLoop(E,L);else if(T.mode===I.POINTS)R=new d.Points(E,L);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+T.mode);Object.keys(R.geometry.morphAttributes).length>0&&Fe(R,s),R.name=e.createUniqueName(s.name||"mesh_"+t),O(R,s),T.extensions&&D(n,R,T),e.assignFinalMaterial(R),l.push(R)}for(let m=0,g=l.length;m<g;m++)e.associations.set(l[m],{meshes:t,primitives:m});if(l.length===1)return s.extensions&&D(n,l[0],s),l[0];const h=new d.Group;s.extensions&&D(n,h,s),e.associations.set(h,{meshes:t});for(let m=0,g=l.length;m<g;m++)h.add(l[m]);return h})}loadCamera(t){let e;const i=this.json.cameras[t],n=i[i.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?e=new d.PerspectiveCamera(d.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):i.type==="orthographic"&&(e=new d.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),i.name&&(e.name=this.createUniqueName(i.name)),O(e,i),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],i=[];for(let n=0,s=e.joints.length;n<s;n++)i.push(this._loadNodeShallow(e.joints[n]));return e.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",e.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(n){const s=n.pop(),r=n,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new d.Matrix4;s!==null&&h.fromArray(s.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new d.Skeleton(a,o)})}loadAnimation(t){const e=this.json,i=this,n=e.animations[t],s=n.name?n.name:"animation_"+t,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=n.channels.length;l<h;l++){const m=n.channels[l],g=n.samplers[m.sampler],E=m.target,T=E.node,R=n.parameters!==void 0?n.parameters[g.input]:g.input,L=n.parameters!==void 0?n.parameters[g.output]:g.output;E.node!==void 0&&(r.push(this.getDependency("node",T)),a.push(this.getDependency("accessor",R)),o.push(this.getDependency("accessor",L)),c.push(g),u.push(E))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],m=l[1],g=l[2],E=l[3],T=l[4],R=[];for(let L=0,S=h.length;L<S;L++){const x=h[L],w=m[L],C=g[L],N=E[L],v=T[L];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const A=i._createAnimationTracks(x,w,C,N,v);if(A)for(let k=0;k<A.length;k++)R.push(A[k])}return new d.AnimationClip(s,void 0,R)})}createNodeMesh(t){const e=this.json,i=this,n=e.nodes[t];return n.mesh===void 0?null:i.getDependency("mesh",n.mesh).then(function(s){const r=i._getNodeRef(i.meshCache,n.mesh,s);return n.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=n.weights.length;o<c;o++)a.morphTargetInfluences[o]=n.weights[o]}),r})}loadNode(t){const e=this.json,i=this,n=e.nodes[t],s=i._loadNodeShallow(t),r=[],a=n.children||[];for(let c=0,u=a.length;c<u;c++)r.push(i.getDependency("node",a[c]));const o=n.skin===void 0?Promise.resolve(null):i.getDependency("skin",n.skin);return Promise.all([s,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(m){m.isSkinnedMesh&&m.bind(h,Ge)});for(let m=0,g=l.length;m<g;m++)u.add(l[m]);return u})}_loadNodeShallow(t){const e=this.json,i=this.extensions,n=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const s=e.nodes[t],r=s.name?n.createUniqueName(s.name):"",a=[],o=n._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(t)});return o&&a.push(o),s.camera!==void 0&&a.push(n.getDependency("camera",s.camera).then(function(c){return n._getNodeRef(n.cameraCache,s.camera,c)})),n._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(t)}).forEach(function(c){a.push(c)}),this.nodeCache[t]=Promise.all(a).then(function(c){let u;if(s.isBone===!0?u=new d.Bone:c.length>1?u=new d.Group:c.length===1?u=c[0]:u=new d.Object3D,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(s.name&&(u.userData.name=s.name,u.name=r),O(u,s),s.extensions&&D(i,u,s),s.matrix!==void 0){const l=new d.Matrix4;l.fromArray(s.matrix),u.applyMatrix4(l)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);if(!n.associations.has(u))n.associations.set(u,{});else if(s.mesh!==void 0&&n.meshCache.refs[s.mesh]>1){const l=n.associations.get(u);n.associations.set(u,{...l})}return n.associations.get(u).nodes=t,u}),this.nodeCache[t]}loadScene(t){const e=this.extensions,i=this.json.scenes[t],n=this,s=new d.Group;i.name&&(s.name=n.createUniqueName(i.name)),O(s,i),i.extensions&&D(e,s,i);const r=i.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(n.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++)s.add(o[u]);const c=u=>{const l=new Map;for(const[h,m]of n.associations)(h instanceof d.Material||h instanceof d.Texture)&&l.set(h,m);return u.traverse(h=>{const m=n.associations.get(h);m!=null&&l.set(h,m)}),l};return n.associations=c(s),s})}_createAnimationTracks(t,e,i,n,s){const r=[],a=t.name?t.name:t.uuid,o=[];F[s.path]===F.weights?t.traverse(function(h){h.morphTargetInfluences&&o.push(h.name?h.name:h.uuid)}):o.push(a);let c;switch(F[s.path]){case F.weights:c=d.NumberKeyframeTrack;break;case F.rotation:c=d.QuaternionKeyframeTrack;break;case F.translation:case F.scale:c=d.VectorKeyframeTrack;break;default:switch(i.itemSize){case 1:c=d.NumberKeyframeTrack;break;case 2:case 3:default:c=d.VectorKeyframeTrack;break}break}const u=n.interpolation!==void 0?Oe[n.interpolation]:d.InterpolateLinear,l=this._getArrayFromAccessor(i);for(let h=0,m=o.length;h<m;h++){const g=new c(o[h]+"."+F[s.path],e.array,l,u);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(g),r.push(g)}return r}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const i=X(e.constructor),n=new Float32Array(e.length);for(let s=0,r=e.length;s<r;s++)n[s]=e[s]*i;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(i){const n=this instanceof d.QuaternionKeyframeTrack?ve:ne;return new n(this.times,this.values,this.getValueSize()/3,i)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Ue(f,t,e){const i=t.attributes,n=new d.Box3;if(i.POSITION!==void 0){const a=e.json.accessors[i.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(n.set(new d.Vector3(o[0],o[1],o[2]),new d.Vector3(c[0],c[1],c[2])),a.normalized){const u=X(G[a.componentType]);n.min.multiplyScalar(u),n.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=t.targets;if(s!==void 0){const a=new d.Vector3,o=new d.Vector3;for(let c=0,u=s.length;c<u;c++){const l=s[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],m=h.min,g=h.max;if(m!==void 0&&g!==void 0){if(o.setX(Math.max(Math.abs(m[0]),Math.abs(g[0]))),o.setY(Math.max(Math.abs(m[1]),Math.abs(g[1]))),o.setZ(Math.max(Math.abs(m[2]),Math.abs(g[2]))),h.normalized){const E=X(G[h.componentType]);o.multiplyScalar(E)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(a)}f.boundingBox=n;const r=new d.Sphere;n.getCenter(r.center),r.radius=n.min.distanceTo(n.max)/2,f.boundingSphere=r}function ee(f,t,e){const i=t.attributes,n=[];function s(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in i){const a=z[r]||r.toLowerCase();a in f.attributes||n.push(s(i[r],a))}if(t.indices!==void 0&&!f.index){const r=e.getDependency("accessor",t.indices).then(function(a){f.setIndex(a)});n.push(r)}return d.ColorManagement.workingColorSpace!==d.LinearSRGBColorSpace&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${d.ColorManagement.workingColorSpace}" not supported.`),O(f,t),Ue(f,t,e),Promise.all(n).then(function(){return t.targets!==void 0?Pe(f,t.targets,e):f})}function Ve(){const f=p.ref(!1),t=p.ref(""),e=p.shallowRef([]),i=p.ref(null),n=new Y.MTLLoader,s=new ie.OBJLoader,r=new Y.STLLoader,a=new ae;return{isLoading:f,loadingProgress:t,loadedModels:e,error:i,loadModelsFromBlobs:async c=>{var m;if(!c||c.length===0){console.warn("loadModelsFromBlobs 加载的文件数组为空!");return}f.value=!0,t.value="准备加载...",e.value=[],i.value=null;const u=new Map;c.forEach(g=>{g instanceof File&&u.set(g.name.toLowerCase(),g)});const l=[],h=[];try{for(const g of c){const E=g.name||"unknown_file",T=(m=E.split(".").pop())==null?void 0:m.toLowerCase();if(T==="mtl")continue;const R=URL.createObjectURL(g);l.push(R);let L=null;const S=x=>{const w=x.lengthComputable?x.loaded/x.total*100:0;t.value=`正在加载 ${E}... ${Math.round(w)}%`};switch(t.value=`正在加载 ${E}... 0%`,T){case"obj":const x=E.replace(/\.obj$/i,".mtl").toLowerCase();if(u.has(x)){const v=u.get(x),A=URL.createObjectURL(v);l.push(A);const k=await n.loadAsync(A);k.preload(),s.setMaterials(k)}else s.setMaterials(null);L=await s.loadAsync(R,S);break;case"stl":const w=await r.loadAsync(R,S),C=new d.MeshPhongMaterial({color:11184810,specular:1118481,shininess:200});L=new d.Mesh(w,C);break;case"gltf":case"glb":L=(await a.loadAsync(R,S)).scene;break;default:console.warn(`不支持的文件类型: .${T}`),t.value=`不支持的文件类型: ${E}`;continue}L&&(L.userData.boundingBox=new d.Box3().setFromObject(L),h.push(L))}e.value=h,t.value="加载完成!"}catch(g){throw console.error("加载模型时出错:",g),i.value=`加载失败: ${g.message||"未知错误"}`,t.value="加载失败!",e.value=[],g}finally{f.value=!1,l.forEach(g=>URL.revokeObjectURL(g))}}}}const je={class:"obj-viewer-container"},Ke={class:"buttonGroup-topLeft"},ze={class:"buttonGroup-left"},Xe={class:"buttonGroup-right"},qe={class:"left-panel"},We={class:"panel-header"},Ye={key:0,class:"clipping-content"},$e={class:"radio-group"},Je={class:"radio-label"},Qe={class:"radio-label"},Ze={class:"radio-label"},et={class:"radio-label"},tt={key:0,class:"loading-overlay"},nt=p.defineComponent({__name:"threePreview",props:{fileBlobs:{default:()=>[]}},setup(f){const t=f,e=p.ref(null),i=p.ref(!1),n=p.ref(""),{currentModels:s,resetView:r,initThreeJS:a,handleResize:o,getThreeJSObjects:c,cleanup:u,setModels:l,axesHelperVisible:h,toggleAxesVisibility:m,zoomIn:g,zoomOut:E}=U.useThreeJS(e),{isLoading:T,loadingProgress:R,loadedModels:L,error:S,loadModelsFromBlobs:x}=Ve(),{isAnimating:w,toggleAnimation:C,stopAnimation:N}=U.useAnimation(c,s),{isClipping:v,activeClippingAxis:A,toggleClipping:k,updateClippingPlanes:P}=U.useClipping(c,s),se=()=>{m()};p.watch(()=>t.fileBlobs,y=>{y&&y.length>0&&x(y).catch(_=>{console.error("加载错误:",_)})},{immediate:!0,deep:!0}),p.watch(L,y=>{y&&y.length>0&&l(y)}),p.watch(S,y=>{y&&W.ElMessage.error(`模型加载失败: ${y}`)});const q=y=>{i.value=!0,n.value=y,y==="剖面视图"&&!v.value&&k()};return p.onMounted(async()=>{await p.nextTick();try{a(),window.addEventListener("resize",o)}catch(y){console.error("Three.js 初始化失败:",y),W.ElMessage.error("渲染引擎初始化失败!")}}),p.onBeforeUnmount(()=>{n.value="",window.removeEventListener("resize",o),w.value&&N(),u()}),(y,_)=>{const re=p.resolveComponent("el-scrollbar");return p.openBlock(),p.createElementBlock("div",je,[p.createElementVNode("div",{ref_key:"threejsContainer",ref:e,class:"threejs-container"},null,512),p.createElementVNode("div",Ke,[p.createVNode(H.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:p.unref(r),title:"重置"},null,8,["onClick"]),p.createVNode(H.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大",onClick:p.unref(g)},null,8,["onClick"]),p.createVNode(H.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:p.unref(E)},null,8,["onClick"]),p.createVNode(H.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:p.unref(C),title:p.unref(w)?"停止动画":"动画视图"},null,8,["onClick","title"]),p.createVNode(H.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:p.unref(h),onClick:se,title:"显隐坐标轴"},null,8,["active"])]),p.createElementVNode("div",ze,[p.renderSlot(y.$slots,"button-left",{switchRightPanel:q},void 0,!0),p.createVNode(H.ThreeSvgIcon,{name:"clipping",size:"24",onClick:_[0]||(_[0]=b=>q("剖面视图")),active:i.value&&n.value==="剖面视图",title:"剖面视图"},null,8,["active"])]),p.createElementVNode("div",Xe,[p.renderSlot(y.$slots,"button-right",{},void 0,!0)]),_[15]||(_[15]=p.createElementVNode("div",{class:"buttonGroup-bottom"},null,-1)),p.withDirectives(p.createElementVNode("div",qe,[p.createElementVNode("div",We,[p.createElementVNode("span",null,p.toDisplayString(n.value),1),p.createElementVNode("span",{class:"close",onClick:_[1]||(_[1]=b=>i.value=!1)}," X ")]),p.createVNode(re,{"max-height":"650px"},{default:p.withCtx(()=>[n.value==="剖面视图"?(p.openBlock(),p.createElementBlock("div",Ye,[p.createElementVNode("div",$e,[p.createElementVNode("label",Je,[p.withDirectives(p.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":_[2]||(_[2]=b=>p.isRef(A)?A.value=b:null),onChange:_[3]||(_[3]=(...b)=>p.unref(P)&&p.unref(P)(...b))},null,544),[[p.vModelRadio,p.unref(A)]]),_[10]||(_[10]=p.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),p.createElementVNode("label",Qe,[p.withDirectives(p.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":_[4]||(_[4]=b=>p.isRef(A)?A.value=b:null),onChange:_[5]||(_[5]=(...b)=>p.unref(P)&&p.unref(P)(...b))},null,544),[[p.vModelRadio,p.unref(A)]]),_[11]||(_[11]=p.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),p.createElementVNode("label",Ze,[p.withDirectives(p.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":_[6]||(_[6]=b=>p.isRef(A)?A.value=b:null),onChange:_[7]||(_[7]=(...b)=>p.unref(P)&&p.unref(P)(...b))},null,544),[[p.vModelRadio,p.unref(A)]]),_[12]||(_[12]=p.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),p.createElementVNode("label",et,[p.withDirectives(p.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":_[8]||(_[8]=b=>p.isRef(A)?A.value=b:null),onChange:_[9]||(_[9]=(...b)=>p.unref(P)&&p.unref(P)(...b))},null,544),[[p.vModelRadio,p.unref(A)]]),_[13]||(_[13]=p.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):p.createCommentVNode("",!0)]),_:1})],512),[[p.vShow,i.value]]),p.unref(T)?(p.openBlock(),p.createElementBlock("div",tt,[_[14]||(_[14]=p.createElementVNode("div",{class:"loading-spinner"},null,-1)),p.createElementVNode("p",null,p.toDisplayString(p.unref(R)),1)])):p.createCommentVNode("",!0)])}}}),st=oe._export_sfc(nt,[["__scopeId","data-v-98467d5e"]]);exports.default=st;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-Ded0Gqke.cjs"),de=require("./iconfont-B1cUqs_N.cjs"),A=require("./index-C8qRkCgn.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs");require("./index.vue_vue_type_style_index_1_lang-B8_elAaU.cjs");require("./index-BpPyaNFa.cjs");const Q=require("./index-DhufphmT.cjs");require("./index.vue_vue_type_style_index_1_lang-rTLLuvuo.cjs");require("./index-a6bC3A9D.cjs");const Ce=require("./animationData-CKcPDmLp.cjs"),ne=require("./urdfTree-CTiMB7ge.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=require("./dataUtil-B4sGo38_.cjs"),$=require("./svgIcon-CUM54R6L.cjs"),Z=.001,H=a.MathUtils.degToRad,Ne=new a.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:a.DoubleSide});function Te(y=.005,v=64){const g=new a.CatmullRomCurve3([new a.Vector3(0,0,0),new a.Vector3(0,0,0)]),l=new a.TubeGeometry(g,v,y,16,!1),h=Ne;return new a.Mesh(l,h)}const ke=y=>y.reduce((v,g)=>{let l=0;const h=g.Y??0,V=g.C??0,u=g.R??0;return h>0&&(l+=h),V>0&&u>0&&(l+=u*H(V)),v+l},0),Me=y=>{const v=[],g=y.Y??0,l=y.B??0,h=y.C??0,V=y.R??0,u={pos:new a.Vector3(0,0,0),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};if(!g&&!h)return v;if(v.push(u.pos.clone()),l!==0){const C=new a.Matrix4().makeRotationAxis(u.localY,H(l));u.localX.applyMatrix4(C),u.localZ.applyMatrix4(C)}if(g>0&&(u.pos.add(u.localY.clone().multiplyScalar(g*Z)),v.push(u.pos.clone())),h>0&&V>0){const C=H(h),c=V*Z,_=u.pos.clone().add(u.localX.clone().multiplyScalar(-c)),s=Math.max(16,Math.ceil(h/5));for(let p=1;p<=s;p++){const n=C*p/s,d=new a.Matrix4().makeRotationAxis(u.localZ,n),b=u.localX.clone().multiplyScalar(c).applyMatrix4(d),x=_.clone().add(b);v.push(x)}}return v};function Se(y,v){const g=new a.Group;g.name="CompletePipe";const l={pos:new a.Vector3(0,0,0),localX:new a.Vector3(1,0,0),localY:new a.Vector3(0,1,0),localZ:new a.Vector3(0,0,1)};let h=0,V=1;for(let u=0;u<y.length;u++){const C=y[u],c=C.Y??0,_=C.B??0,s=C.C??0,p=C.R??0;if(_!==0){const n=new a.Matrix4().makeRotationAxis(l.localY,H(_));l.localX.applyMatrix4(n),l.localZ.applyMatrix4(n)}if(c>0){const n=l.pos.clone();l.pos.add(l.localY.clone().multiplyScalar(c*Z));const d=l.pos.clone(),r=Pe(n,d,v*Z);r.userData={segmentType:"straight",segmentIndex:h,frameIndex:u,length:c,frame:{Y:c,B:_,C:s,R:p}},r.name=`直段_${h}`,g.add(r);const b=n.clone();De(g,V,b,v*Z),h++}if(s>0&&p>0){const n=H(s),d=p*Z,r=[];r.push(l.pos.clone());const b=l.pos.clone().add(l.localX.clone().multiplyScalar(-d)),x=Math.max(16,Math.ceil(s/5));for(let S=1;S<=x;S++){const T=n*S/x,k=new a.Matrix4().makeRotationAxis(l.localZ,T),E=l.localX.clone().multiplyScalar(d).applyMatrix4(k),w=b.clone().add(E);r.push(w)}const f=Re(r,v*Z);f.userData={segmentType:"bend",segmentIndex:h,frameIndex:u,angle:s,radius:p,centerPoint:b.toArray(),frame:{Y:c,B:_,C:s,R:p}},f.name=`弯段_${h}`,g.add(f),Math.floor(r.length/2),r[0],l.pos=r[r.length-1].clone();const M=new a.Matrix4().makeRotationAxis(l.localZ,n);l.localY.applyMatrix4(M),l.localX.applyMatrix4(M),h++,V++}}return g}function De(y,v,g,l){const h=new a.Vector3(0,l*2,l*5),V=g.clone().add(h),u=[g,V],C=new a.BufferGeometry().setFromPoints(u),c=new a.LineDashedMaterial({color:16711680,dashSize:l*.5,gapSize:l*.3,linewidth:1}),_=new a.Line(C,c);_.computeLineDistances(),y.add(_);const s=document.createElement("canvas"),p=s.getContext("2d");s.width=128,s.height=128,p.clearRect(0,0,128,128),p.fillStyle="#FF0000",p.font="bold 80px Arial",p.textAlign="center",p.textBaseline="middle",p.fillText(v.toString(),64,64);const n=new a.CanvasTexture(s),d=new a.SpriteMaterial({map:n,transparent:!0,depthTest:!1,depthWrite:!1}),r=new a.Sprite(d),b=l*3;r.scale.set(b,b,1),r.position.copy(V),r.name=`Label_${v}`,r.userData={labelNumber:v},y.add(r)}function Pe(y,v,g){const l=new a.LineCurve3(y,v),h=new a.TubeGeometry(l,2,g,18,!1);return new a.Mesh(h,Ne)}function Re(y,v){const g=new a.CatmullRomCurve3(y,!1,"catmullrom",.01),l=new a.TubeGeometry(g,Math.max(16,y.length*2),v,18,!1);return new a.Mesh(l,Ne)}function _e(y,v,g,l,h,V=0){let u=v.slice(0,h+1);const C=v[h+1];if(C&&V>0){const r={...C,B:(C.B??0)*V,C:(C.C??0)*V};u.push(r)}const c=ke(u),_=Math.max(0,g-c),s=[];s.push(new a.Vector3(0,0,0));const p=new a.Vector3(0,_*Z,0);_>0&&s.push(p);let n={pos:p.clone(),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};const d=[];for(let r=u.length-1;r>=0;r--){const b=u[r],x=Me(b);if(x.length>0){const f=x.map(k=>{const D=k.clone(),E=new a.Matrix4;return E.makeBasis(n.localX,n.localY,n.localZ),D.applyMatrix4(E),D.add(n.pos)});d.push(f);const M=f[f.length-1];n.pos=M.clone();const S=b.B??0,T=b.C??0;if(S!==0){const k=new a.Matrix4().makeRotationAxis(n.localY,H(S));n.localX.applyMatrix4(k),n.localZ.applyMatrix4(k)}if(T>0){const k=H(T),D=new a.Matrix4().makeRotationAxis(n.localZ,k);n.localY.applyMatrix4(D),n.localX.applyMatrix4(D)}}}for(const r of d)r.length>1&&s.push(...r.slice(1));s.length<2&&s.push(new a.Vector3(0,.001,0));try{const r=new a.CatmullRomCurve3(s,!1,"catmullrom",.01),b=new a.TubeGeometry(r,Math.max(2,s.length*4),l*Z,18,!1);y.geometry.dispose(),y.geometry=b}catch(r){console.error("管件更新失败",r)}}function xe(y,v,g,l=0){let h=y.slice(0,g+1);const V=y[g+1];if(V&&l>0){const n={...V,B:(V.B??0)*l,C:(V.C??0)*l};h.push(n)}const u=ke(h),C=Math.max(0,v-u),c=[];c.push(new a.Vector3(0,0,0));const _=new a.Vector3(0,C*Z,0);C>0&&c.push(_);let s={pos:_.clone(),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};const p=[];for(let n=h.length-1;n>=0;n--){const d=h[n],r=Me(d);if(r.length>0){const b=r.map(S=>{const T=S.clone(),k=new a.Matrix4;return k.makeBasis(s.localX,s.localY,s.localZ),T.applyMatrix4(k),T.add(s.pos)});p.push(b);const x=b[b.length-1];s.pos=x.clone();const f=d.B??0,M=d.C??0;if(f!==0){const S=new a.Matrix4().makeRotationAxis(s.localY,H(f));s.localX.applyMatrix4(S),s.localZ.applyMatrix4(S)}if(M>0){const S=H(M),T=new a.Matrix4().makeRotationAxis(s.localZ,S);s.localY.applyMatrix4(T),s.localX.applyMatrix4(T)}}}for(const n of p)n.length>1&&c.push(...n.slice(1));return c.length<2&&c.push(new a.Vector3(0,.001,0)),c}function Ee(y,v,g,l,h,V,u,C=0,c=0){const _=h-c,s=xe(l,_,u,C);let n=xe(g,c,u,C);n.forEach(r=>r.y=-r.y),n.reverse();const d=[...n,...s];try{const r=new a.CatmullRomCurve3(d,!1,"catmullrom",.01),b=new a.TubeGeometry(r,Math.max(2,d.length*4),V*Z,18,!1);v.geometry.dispose(),y.geometry.dispose(),v.parent&&v.parent.remove(v),y.geometry=b}catch(r){console.error("管件更新失败",r)}}const Be={class:"panel-content"},Ae={class:"action-bar"},$e={class:"animation-controls"},ze={class:"control-row"},Fe={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ue={class:"progress-bar"},Ie={class:"dialog-footer"},Ge=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(y,{expose:v,emit:g}){const l=y,h=g,V=e.ref(),u=e.ref();e.watch(()=>l.threeData,t=>{const o=t==null?void 0:t.data;u.value=o==null?void 0:o.type},{immediate:!0});const C=async()=>{if(!sessionStorage.getItem("systemKey")){h("getThreeData");return}let o={};u.value===X.robotMode.SINGLE&&(o=await Ce.fetchSingleRobotAnimationData()),u.value===X.robotMode.DOUBLE&&(o=await Ce.fetchDoubleRobotAnimationData());const{initialPipeLength:i=0,pipeRadius:m=0,clampLength:N=0,animationData:Y}=o;T.value=i,k.value=m,D.value=N,V.value=Y;const O=A.cloneDeep(V.value),K=ce(z.value),q=(O==null?void 0:O["输出(动画数据)"])||[];c.value=q.length?q:[K]},c=e.ref([]),_=e.ref(!1),s=e.ref(""),p=e.ref(!1),n=e.ref(0),d=e.ref(0),r=e.ref(1e3);let b=!1;const x=e.ref(null),f=e.shallowRef(null),M=e.shallowRef(null),S=e.shallowRef(null),T=e.ref(0),k=e.ref(12.5),D=e.ref(30),E=e.ref([]),w=e.ref(null),U=e.computed(()=>l.model?ne.getNonFixedJoints(l.model).map(i=>i.name):[]),j=e.ref(["Y","B","C","R"]),z=e.computed(()=>[...U.value,...j.value]),F=e.computed(()=>z.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
2
|
${z.value.join(" ")}
|
|
3
3
|
0 0 0 ...
|
|
4
4
|
1 2 3 ...`:"请先加载模型。"),J=()=>c.value.map(t=>({Y:parseFloat(t.Y)||0,B:parseFloat(t.B)||0,C:parseFloat(t.C)||0,R:parseFloat(t.R)||0})),I=()=>{const t=[],o=[];return c.value.forEach(i=>{const{Y1:m,B1:N,C1:Y,R1:O,Y2:K,B2:q,C2:ie,R2:B}=i;t.push({Y:parseFloat(m)||0,B:parseFloat(N)||0,C:parseFloat(Y)||0,R:parseFloat(O)||0}),o.push({Y:parseFloat(K)||0,B:parseFloat(q)||0,C:parseFloat(ie)||0,R:parseFloat(B)||0})}),{posPipeYbcr:t,negPipeYbcr:o}},L=(t=0,o=0)=>{if(f.value&&M.value){const i=I();Ee(f.value,M.value,i.posPipeYbcr,i.negPipeYbcr,T.value,k.value,t,o,D.value)}else if(f.value){const i=J();_e(f.value,i,T.value,k.value,t,o)}},W=t=>{if(t<0||t>=c.value.length){console.error(`帧索引 ${t} 超出范围`);return}const o=c.value[t];if(console.log(`应用第 ${t} 帧数据 ${o}`),n.value=t,x.value){const i={};U.value.forEach(m=>{const N=parseFloat(o[m]);isNaN(N)||(i[m]=N)}),x.value.setJointAngles(i)}L(t,0)},P=async()=>{if(c.value.length===0){A.ElMessage.error("无法播放动画:无数据");return}if(!p.value){p.value=!0,b=!1,c.value.length-1===n.value&&(n.value=0);try{for(let t=n.value+1;t<c.value.length&&!b;t++){n.value=t;const o=c.value[t],i={};x.value&&U.value.forEach(m=>{const N=parseFloat(o[m]);isNaN(N)||(i[m]=N)}),x.value?await x.value.animateToState(i,r.value,m=>{d.value=(t+m)/c.value.length*100,L(t-1,m)}):(await new Promise(m=>setTimeout(m,r.value)),d.value=(t+1)/c.value.length*100)}b||A.ElMessage.success("动画播放完成")}catch(t){console.error("动画播放出错:",t),A.ElMessage.error("动画播放出错")}finally{p.value=!1,d.value=0}}},R=()=>{b=!0,p.value=!1,d.value=0,A.ElMessage.info("动画已停止")},ae=()=>{n.value=0},G=()=>{if(f.value&&M.value){const t=I();Ee(f.value,M.value,t.posPipeYbcr,t.negPipeYbcr,T.value,k.value,-1,0,D.value)}else if(f.value){const t=J();_e(f.value,t,T.value,k.value,-1,0)}},oe=()=>{x.value&&x.value.resetToZero(),G(),ae(),A.ElMessage.success("机器人和管件已重置")},pe=t=>`第 ${t+1} 帧`,me=t=>{p.value&&R(),W(t)},ve=()=>{p.value&&R(),!(n.value+1>=c.value.length)&&W(n.value+1)},fe=()=>{p.value&&R(),n.value!==0&&W(n.value-1)},se=()=>{S.value&&(S.value.visible=!0),f.value&&f.value.parent&&f.value.parent.remove(f.value),S.value=null,f.value=null,M.value=null},ce=t=>t==null?void 0:t.reduce((o,i)=>(o[i]="0",o),{});e.watch(z,(t,o)=>{if(JSON.stringify(t)!==JSON.stringify(o))if(t.length>0){const i=ce(t);c.value=[i]}else c.value=[]},{immediate:!0});const re=e.ref(0),ge=t=>{re.value=t},te=(t,o)=>{if(!t||!o)return;const i=ne.getTargetJoint(t,o),m=Te();m.visible=!1,i==null||i.add(m)},le=t=>{x.value=new X.URDFRobotController(t),E.value=ne.getAllLinkName(t),w.value="Pipe_Joint"},he=()=>{x.value=null,E.value=[],w.value=null},Ve=t=>{le(t),te(t,w.value),ge(re.value+1),oe()};e.watch(()=>l.model,t=>{if(se(),t){Ve(t);return}he()},{immediate:!0});const ue=t=>{var i,m;const o=new a.Mesh(t.geometry.clone(),t.material);return o.name="managed_pipe_clone",(m=(i=t==null?void 0:t.parent)==null?void 0:i.add)==null||m.call(i,o),o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),o};e.watch([w,D,T,re],([t,o])=>{if(se(),l.model&&t){const i=ne.getMeshFromJoint(l.model,t);if(console.log(i,"meshToReplace"),i&&i.parent){S.value=i,i.visible=!1;const m=ue(i);if(u.value===X.robotMode.SINGLE&&(m.position.y-=o*.001),f.value=m,u.value===X.robotMode.DOUBLE){const N=ue(i);M.value=N}L(0,0)}else t&&console.warn(`在 link '${t}' 中未找到可替换的网格或其没有父级。`)}});const ye=async()=>{if(z.value.length===0){A.ElMessage.warning("没有可导出的表头");return}const t=z.value.join(" ");try{await navigator.clipboard.writeText(t),A.ElMessage.success("表头已成功复制到剪贴板!")}catch(o){console.error("复制失败:",o),A.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},be=()=>{if(!s.value.trim()){A.ElMessage.warning("导入内容不能为空");return}const t=s.value.trim().split(`
|
|
5
|
-
`).filter(Y=>Y.trim()!=="");if(t.length<2){A.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const o=t[0].split(" ").map(Y=>Y.trim()),i={};if(o.forEach((Y,O)=>{z.value.includes(Y)&&(i[O]=Y)}),Object.keys(i).length===0){A.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const N=t.slice(1).map(Y=>{const O=Y.split(" "),K={};return z.value.forEach(q=>{K[q]="0"}),Object.entries(i).forEach(([q,ie])=>{const B=O[parseInt(q)];B!==void 0&&B.trim()!==""&&(K[ie]=B.trim())}),K});N.length>0?(c.value=N,A.ElMessage.success(`成功导入 ${N.length} 行数据!`),_.value=!1,s.value=""):A.ElMessage.error("未能解析到有效数据,请检查格式。")};return e.onUnmounted(()=>{se(),b=!0}),v({playAnimation:P,stopAnimation:R,forwardFrame:ve,backwardFrame:fe}),(t,o)=>{const i=e.resolveComponent("el-icon"),m=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-form-item"),Y=e.resolveComponent("el-form"),O=e.resolveComponent("el-slider"),K=e.resolveComponent("el-progress"),q=e.resolveComponent("el-input"),ie=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ae,[e.createVNode(Q._sfc_main,{onClick:C,modelValue:"获取数据"}),e.createVNode(Q._sfc_main,{onClick:ye,disabled:z.value.length===0,modelValue:"导出表头"},null,8,["disabled"]),e.createVNode(Q._sfc_main,{modelValue:"播放",onClick:P,disabled:c.value.length===0||p.value,buttonType:"primary"},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createBlock(i,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(A.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["disabled"]),e.createVNode(Q._sfc_main,{onClick:R,modelValue:"停止",buttonType:"danger"}),e.createVNode(Q._sfc_main,{onClick:oe,modelValue:"重置",buttonType:"primary"})]),e.createElementVNode("div",$e,[e.createElementVNode("div",ze,[e.createVNode(Y,{"label-width":"auto",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(N,{label:"帧间隔 (ms):",prop:"frameDuration"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=B=>r.value=B),min:100,max:5e3,step:100,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"管件总长 (mm):",prop:"initialPipeLength"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:T.value,"onUpdate:modelValue":o[1]||(o[1]=B=>T.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"管件半径 (mm):",prop:"pipeRadius"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:k.value,"onUpdate:modelValue":o[2]||(o[2]=B=>k.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"夹持长度 (mm):",prop:"clampLength"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:D.value,"onUpdate:modelValue":o[3]||(o[3]=B=>D.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),o[10]||(o[10]=e.createElementVNode("div",{class:"control-row"},[e.createElementVNode("label",null,"管件 Mesh:")],-1)),e.createElementVNode("div",Fe,[o[8]||(o[8]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Ye,e.toDisplayString(n.value+1)+" / "+e.toDisplayString(c.value.length),1)]),e.createElementVNode("div",Le,[o[9]||(o[9]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(O,{modelValue:n.value,"onUpdate:modelValue":o[4]||(o[4]=B=>n.value=B),min:0,max:c.value.length>0?c.value.length-1:0,step:1,"format-tooltip":pe,onInput:me,disabled:c.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",Ue,[e.createVNode(K,{percentage:d.value,"show-text":!1,"stroke-width":6},null,8,["percentage"])])]),e.createVNode(ie,{modelValue:_.value,"onUpdate:modelValue":o[7]||(o[7]=B=>_.value=B),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Ie,[e.createVNode(Q._sfc_main,{modelValue:"取消",onClick:o[6]||(o[6]=B=>_.value=!1)}),e.createVNode(Q._sfc_main,{modelValue:"确认导入",onClick:be,type:"primary"})])]),default:e.withCtx(()=>[o[11]||(o[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(q,{modelValue:s.value,"onUpdate:modelValue":o[5]||(o[5]=B=>s.value=B),type:"textarea",rows:10,placeholder:F.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),je=we._export_sfc(Ge,[["__scopeId","data-v-ca681456"]]),Oe=async()=>{const y=["工件库","弯管"],v=await ee.getMenuData(y),g=ee.getTargetGroup("工件列表",v),l=ee.getMainKeysFromGroup(g);return l==null?void 0:l.map(V=>({name:V,mainKey:V}))},Xe=async y=>{const v=["工件库","弯管"],g=await ee.getDetailData(v,y),l=ee.getTargetGroup("弯管基础参数",g),h=ee.getTargetGroup("弯管特征尺寸",g),V={outerDiameter:0,ybcrList:[]},u=ee.getFormData(l),C=ee.getTableData(h);return V.outerDiameter=(u==null?void 0:u.外径)||0,V.ybcrList=C||[],V},Ze={class:"pipe-analysis-dialog-header"},qe={class:"header-right"},Je={class:"pipe-analysis-dialog-body"},We={class:"panel-left"},Ke={class:"pipe-analysis-input"},He={class:"input-params"},Qe={class:"pipe-analysis-output"},et={class:"ouput-params"},tt=e.defineComponent({__name:"pipeAnalysisPanel",emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(y,{expose:v,emit:g}){const l=e.ref(null),h=e.shallowRef(null),{initThreeJS:V,handleResize:u,cleanup:C,clearAllModels:c,addModelAndFit:_}=de.useThreeJS(l);e.ref(null);const s=e.ref({file:null,pipe:""});e.ref(null),e.ref(!1);const p=e.ref([]),n=E=>{p.value=E};e.ref("ybcr");const d=e.ref({form:{},list:[],reverse:!1}),r=E=>{const{length:w,outerDiameter:U,innerDiameter:j,thickness:z,ybcrList:F}=E||{};d.value.form={length:w,outerDiameter:U,innerDiameter:j,thickness:z},d.value.list=F},b=()=>{const{form:E,list:w}=d.value,{outerDiameter:U}=E,j=U/2,z=w==null?void 0:w.map(J=>{const{y:I,b:L,c:W,r:P,Y:R,B:ae,C:G,R:oe}=J;return R?{Y:R,B:ae,C:G,R:oe}:{Y:I,B:L,C:W,R:P}});c();const F=Se(z,j);_(F)},x=e.ref(!1),f=()=>{const E=x.value;x.value=!E},M=e.ref(!1),S=()=>{M.value=!1},T=()=>{M.value=!0},k=async()=>{const E=await Oe();n(E)},D=async E=>{const w=await Xe(E);r(w)};return e.watch(()=>d,()=>{b()},{deep:!0}),e.watch(()=>l,()=>{try{if(h.value)return;V(),window.addEventListener("resize",u)}catch(E){console.error("Three.js 初始化失败:",E),A.ElMessage.error("渲染引擎初始化失败!")}},{deep:!0}),e.onMounted(async()=>{k()}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",u),C()}),v({openDialog:T}),(E,w)=>{const U=e.resolveComponent("el-icon"),j=e.resolveComponent("el-option"),z=e.resolveComponent("el-select"),F=e.resolveComponent("el-form-item"),J=e.resolveComponent("el-form"),I=e.resolveComponent("el-input"),L=e.resolveComponent("el-table-column"),W=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(Q.ssDialog,{class:"pipe-analysis-dialog",visible:M.value,onBeforeDestroy:E.onDestroy,showClose:!1,fullScreen:x.value},{header:e.withCtx(()=>[e.createElementVNode("div",Ze,[w[6]||(w[6]=e.createElementVNode("div",{class:"header-left",title:"管件解析"}," 管件解析 ",-1)),e.createElementVNode("div",qe,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(A.full_screen_default),{onClick:f})]),_:1}),e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(A.close_default),{onClick:S})]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Je,[e.createElementVNode("div",We,[e.createElementVNode("div",Ke,[w[7]||(w[7]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输入")],-1)),e.createElementVNode("div",He,[e.createVNode(J,{model:s.value,"label-width":"auto","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(F,{label:"弯管"},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:s.value.pipe,"onUpdate:modelValue":w[0]||(w[0]=P=>s.value.pipe=P),placeholder:"请选择弯管",onChange:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,P=>(e.openBlock(),e.createBlock(j,{label:P.name,value:P.mainKey},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),e.createElementVNode("div",Qe,[e.createVNode(F,{label:"加工方向"},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:d.value.reverse,"onUpdate:modelValue":w[1]||(w[1]=P=>d.value.reverse=P),placeholder:"请选择加工方向"},{default:e.withCtx(()=>[e.createVNode(j,{label:"正向",value:!1}),e.createVNode(j,{label:"反向",value:!0})]),_:1},8,["modelValue"])]),_:1}),w[8]||(w[8]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输出(弯管基础参数)")],-1)),e.createElementVNode("div",et,[e.createVNode(J,{model:d.value.form,"label-width":"auto","label-position":"top",inline:!0},{default:e.withCtx(()=>[e.createVNode(F,{label:"管长"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.length,"onUpdate:modelValue":w[2]||(w[2]=P=>d.value.form.length=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"外径"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.outerDiameter,"onUpdate:modelValue":w[3]||(w[3]=P=>d.value.form.outerDiameter=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"内径"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.innerDiameter,"onUpdate:modelValue":w[4]||(w[4]=P=>d.value.form.innerDiameter=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"壁厚"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.thickness,"onUpdate:modelValue":w[5]||(w[5]=P=>d.value.form.thickness=P)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),e.createVNode(W,{ref:"singleTableRef",data:d.value.list,"highlight-current-rowstyle":"width: 100%"},{default:e.withCtx(()=>[e.createVNode(L,{type:"index",width:"50"}),e.createVNode(L,{property:"y",label:"Y"}),e.createVNode(L,{property:"b",label:"B"}),e.createVNode(L,{property:"c",label:"C"}),e.createVNode(L,{property:"r",label:"R"})]),_:1},8,["data"])])])]),e.createElementVNode("div",{class:"panel-right",ref_key:"threejsContainer",ref:l},null,512)])]),_:1},8,["visible","onBeforeDestroy","fullScreen"])}}}),ot=we._export_sfc(tt,[["__scopeId","data-v-61e834a4"]]),lt={class:"obj-viewer-container"},nt={class:"pipe-comparison"},at={ref:"pipe1",class:"pipe-container"},st={ref:"pipe2",class:"pipe-container"},rt={class:"buttonGroup-topLeft"},it={class:"buttonGroup-left"},ct={class:"buttonGroup-right"},ut={class:"buttonGroup-bottom"},dt={class:"top-panel"},pt={class:"panel-header"},mt={class:"panel-body"},vt={class:"left-panel"},ft={class:"panel-header"},gt={class:"panel-body"},ht={key:1,class:"clipping-content"},Vt={class:"radio-group"},yt={class:"radio-label"},bt={class:"radio-label"},wt={class:"radio-label"},Nt={class:"radio-label"},Ct={class:"right-panel"},_t={class:"panel-header"},xt={class:"panel-body"},Et={key:0,class:"loading-overlay"},kt=e.defineComponent({__name:"threeSceneView",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{}},emits:["getAnimationData","getThreeData"],setup(y,{emit:v}){const g=v,l=y,h=e.ref(X.sceneType.ROBOT),V=e.ref(null),u=e.ref(),C=e.ref(!1),c=e.ref(""),_=e.ref(!1),s=e.ref(""),p=e.ref(!1),n=e.ref(""),d=e.ref(!1),r=e.ref(""),b=e.shallowRef(null),x=e.shallowRef(null),f=e.ref(),{currentModels:M,resetView:S,initThreeJS:T,handleResize:k,getThreeJSObjects:D,cleanup:E,setModels:w,axesHelperVisible:U,toggleAxesVisibility:j,zoomIn:z,zoomOut:F}=de.useThreeJS(V),{loadSceneFromFile:J}=X.useUrdfLoader(D,M,C,c),{isAnimating:I,toggleAnimation:L,stopAnimation:W}=de.useAnimation(D,M),{isClipping:P,activeClippingAxis:R,toggleClipping:ae,updateClippingPlanes:G}=de.useClipping(D,M),{initRaycaster:oe,selectedObject3D:pe,setSelectedObjVisible:me,updatePosition:ve,updateRotation:fe,dispose:se}=X.useRaycaster(V,D,M),ce=()=>{j()},re=e.computed(()=>h.value===X.sceneType.ROBOT),ge=e.computed(()=>h.value===X.sceneType.PIPECOMPARSION),te=t=>{_.value=!0,s.value=t,t==="剖面视图"&&!P.value&&ae()},le=t=>{p.value=!0,n.value=t,t==="动画仿真"&&g("getAnimationData")},he=()=>{g("getThreeData")},Ve=()=>{var t;(t=f==null?void 0:f.value)==null||t.playAnimation()},ue=()=>{var t;(t=f==null?void 0:f.value)==null||t.stopAnimation()},ye=()=>{var t;(t=f==null?void 0:f.value)==null||t.forwardFrame()},be=()=>{var t;(t=f==null?void 0:f.value)==null||t.backwardFrame()};return e.watch(()=>l.fileBlobs,t=>{if(t&&t.length>0){const o=t[0];if(!o.name.toLowerCase().endsWith(".urdf"))return;J(o).then(i=>{b.value=i}).catch(i=>{console.error("加载URDF文件时发生错误:",i),A.ElMessage.error("加载urdf模型失败"),b.value=null})}else b.value=null},{immediate:!0,deep:!0}),e.watch(b,t=>{w(t?[t]:[]),oe()}),e.onMounted(async()=>{await e.nextTick();try{T(),window.addEventListener("resize",k);const t=D();x.value=t.scene}catch(t){console.error("Three.js 初始化失败:",t),A.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{s.value="",n.value="",window.removeEventListener("resize",k),I.value&&W(),E(),se()}),(t,o)=>{const i=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",lt,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:V,class:"threejs-container"},null,512),[[e.vShow,re.value]]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,null,512),e.createElementVNode("div",st,null,512)],512),[[e.vShow,ge.value]]),e.createElementVNode("div",rt,[e.createVNode($.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:e.unref(S),title:"重置"},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大",onClick:e.unref(z)},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:e.unref(F)},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:e.unref(L),title:e.unref(I)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode($.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(U),onClick:ce,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",it,[e.renderSlot(t.$slots,"button-left",{switchRightPanel:te},void 0,!0),e.createVNode($.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:o[0]||(o[0]=m=>te("场景树")),active:_.value&&s.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"clipping",size:"24",onClick:o[1]||(o[1]=m=>te("剖面视图")),active:_.value&&s.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"zhaozi",size:"24",onClick:o[2]||(o[2]=m=>te("工件树")),active:_.value&&s.value==="工件树",title:"工件 "},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",onClick:o[3]||(o[3]=m=>te("场景4"))})]),e.createElementVNode("div",ct,[e.renderSlot(t.$slots,"button-right",{switchRightPanel:le},void 0,!0),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode($.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:o[4]||(o[4]=m=>le("关节控制")),active:p.value&&n.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:o[5]||(o[5]=m=>le("动画仿真")),active:p.value&&n.value==="动画仿真"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:o[6]||(o[6]=m=>le("urdf动画")),active:p.value&&n.value==="urdf动画"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ut,[e.createVNode($.ThreeSvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:be}),e.createVNode($.ThreeSvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Ve}),e.createVNode($.ThreeSvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:ye}),e.createVNode($.ThreeSvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:ue})]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:o[7]||(o[7]=m=>d.value=!1)}," X ")]),e.createElementVNode("div",mt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"top-panel",{topPanelType:r.value},void 0,!0)]),_:3})])],512),[[e.vShow,d.value]]),e.withDirectives(e.createElementVNode("div",vt,[e.createElementVNode("div",ft,[e.createElementVNode("span",null,e.toDisplayString(s.value),1),e.createElementVNode("span",{class:"close",onClick:o[8]||(o[8]=m=>_.value=!1)}," X ")]),e.createElementVNode("div",gt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>{var m;return[s.value==="场景树"?(e.openBlock(),e.createBlock(ne.UrdfTree,{key:0,model:b.value},null,8,["model"])):e.createCommentVNode("",!0),s.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",Vt,[e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":o[9]||(o[9]=N=>e.isRef(R)?R.value=N:null),onChange:o[10]||(o[10]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[18]||(o[18]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",bt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":o[11]||(o[11]=N=>e.isRef(R)?R.value=N:null),onChange:o[12]||(o[12]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[19]||(o[19]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":o[13]||(o[13]=N=>e.isRef(R)?R.value=N:null),onChange:o[14]||(o[14]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[20]||(o[20]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":o[15]||(o[15]=N=>e.isRef(R)?R.value=N:null),onChange:o[16]||(o[16]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[21]||(o[21]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),s.value==="工件树"?(e.openBlock(),e.createBlock(X.WorkpieceTreePanel,{key:2,model:(m=e.unref(pe))==null?void 0:m.obj,onVisibleChange:e.unref(me),onUpdatePosition:e.unref(ve),onUpdateRotation:e.unref(fe)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,_.value]]),e.withDirectives(e.createElementVNode("div",Ct,[e.createElementVNode("div",_t,[e.createElementVNode("span",null,e.toDisplayString(n.value),1),e.createElementVNode("span",{class:"close",onClick:o[17]||(o[17]=m=>p.value=!1)}," X ")]),e.createElementVNode("div",xt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne.JointPanel,{model:b.value},null,8,["model"]),[[e.vShow,n.value==="关节控制"]]),e.withDirectives(e.createVNode(je,{ref_key:"animationPanelRef",ref:f,model:b.value,onGetThreeData:he,threeData:l.threeData},null,8,["model","threeData"]),[[e.vShow,n.value==="动画仿真"]]),e.renderSlot(t.$slots,"right-panel",{rightPanelType:n.value},void 0,!0)]),_:3})])],512),[[e.vShow,p.value]]),C.value?(e.openBlock(),e.createElementBlock("div",Et,[o[22]||(o[22]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(c.value),1)])):e.createCommentVNode("",!0),e.createVNode(ot,{ref_key:"pipeAnalysisPanelRef",ref:u},null,512)])}}}),Mt=we._export_sfc(kt,[["__scopeId","data-v-6edeedc9"]]);exports.default=Mt;
|
|
5
|
+
`).filter(Y=>Y.trim()!=="");if(t.length<2){A.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const o=t[0].split(" ").map(Y=>Y.trim()),i={};if(o.forEach((Y,O)=>{z.value.includes(Y)&&(i[O]=Y)}),Object.keys(i).length===0){A.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const N=t.slice(1).map(Y=>{const O=Y.split(" "),K={};return z.value.forEach(q=>{K[q]="0"}),Object.entries(i).forEach(([q,ie])=>{const B=O[parseInt(q)];B!==void 0&&B.trim()!==""&&(K[ie]=B.trim())}),K});N.length>0?(c.value=N,A.ElMessage.success(`成功导入 ${N.length} 行数据!`),_.value=!1,s.value=""):A.ElMessage.error("未能解析到有效数据,请检查格式。")};return e.onUnmounted(()=>{se(),b=!0}),v({playAnimation:P,stopAnimation:R,forwardFrame:ve,backwardFrame:fe}),(t,o)=>{const i=e.resolveComponent("el-icon"),m=e.resolveComponent("el-input-number"),N=e.resolveComponent("el-form-item"),Y=e.resolveComponent("el-form"),O=e.resolveComponent("el-slider"),K=e.resolveComponent("el-progress"),q=e.resolveComponent("el-input"),ie=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",Be,[e.createElementVNode("div",Ae,[e.createVNode(Q._sfc_main,{onClick:C,modelValue:"获取数据"}),e.createVNode(Q._sfc_main,{onClick:ye,disabled:z.value.length===0,modelValue:"导出表头"},null,8,["disabled"]),e.createVNode(Q._sfc_main,{modelValue:"播放",onClick:P,disabled:c.value.length===0||p.value,buttonType:"primary"},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createBlock(i,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(A.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["disabled"]),e.createVNode(Q._sfc_main,{onClick:R,modelValue:"停止",buttonType:"danger"}),e.createVNode(Q._sfc_main,{onClick:oe,modelValue:"重置",buttonType:"primary"})]),e.createElementVNode("div",$e,[e.createElementVNode("div",ze,[e.createVNode(Y,{"label-width":"auto",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(N,{label:"帧间隔 (ms):",prop:"frameDuration"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=B=>r.value=B),min:100,max:5e3,step:100,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"管件总长 (mm):",prop:"initialPipeLength"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:T.value,"onUpdate:modelValue":o[1]||(o[1]=B=>T.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"管件半径 (mm):",prop:"pipeRadius"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:k.value,"onUpdate:modelValue":o[2]||(o[2]=B=>k.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(N,{label:"夹持长度 (mm):",prop:"clampLength"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:D.value,"onUpdate:modelValue":o[3]||(o[3]=B=>D.value=B),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),o[10]||(o[10]=e.createElementVNode("div",{class:"control-row"},[e.createElementVNode("label",null,"管件 Mesh:")],-1)),e.createElementVNode("div",Fe,[o[8]||(o[8]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Ye,e.toDisplayString(n.value+1)+" / "+e.toDisplayString(c.value.length),1)]),e.createElementVNode("div",Le,[o[9]||(o[9]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(O,{modelValue:n.value,"onUpdate:modelValue":o[4]||(o[4]=B=>n.value=B),min:0,max:c.value.length>0?c.value.length-1:0,step:1,"format-tooltip":pe,onInput:me,disabled:c.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",Ue,[e.createVNode(K,{percentage:d.value,"show-text":!1,"stroke-width":6},null,8,["percentage"])])]),e.createVNode(ie,{modelValue:_.value,"onUpdate:modelValue":o[7]||(o[7]=B=>_.value=B),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Ie,[e.createVNode(Q._sfc_main,{modelValue:"取消",onClick:o[6]||(o[6]=B=>_.value=!1)}),e.createVNode(Q._sfc_main,{modelValue:"确认导入",onClick:be,type:"primary"})])]),default:e.withCtx(()=>[o[11]||(o[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(q,{modelValue:s.value,"onUpdate:modelValue":o[5]||(o[5]=B=>s.value=B),type:"textarea",rows:10,placeholder:F.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),je=we._export_sfc(Ge,[["__scopeId","data-v-34ca745a"]]),Oe=async()=>{const y=["工件库","弯管"],v=await ee.getMenuData(y),g=ee.getTargetGroup("工件列表",v),l=ee.getMainKeysFromGroup(g);return l==null?void 0:l.map(V=>({name:V,mainKey:V}))},Xe=async y=>{const v=["工件库","弯管"],g=await ee.getDetailData(v,y),l=ee.getTargetGroup("弯管基础参数",g),h=ee.getTargetGroup("弯管特征尺寸",g),V={outerDiameter:0,ybcrList:[]},u=ee.getFormData(l),C=ee.getTableData(h);return V.outerDiameter=(u==null?void 0:u.外径)||0,V.ybcrList=C||[],V},Ze={class:"pipe-analysis-dialog-header"},qe={class:"header-right"},Je={class:"pipe-analysis-dialog-body"},We={class:"panel-left"},Ke={class:"pipe-analysis-input"},He={class:"input-params"},Qe={class:"pipe-analysis-output"},et={class:"ouput-params"},tt=e.defineComponent({__name:"pipeAnalysisPanel",emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(y,{expose:v,emit:g}){const l=e.ref(null),h=e.shallowRef(null),{initThreeJS:V,handleResize:u,cleanup:C,clearAllModels:c,addModelAndFit:_}=de.useThreeJS(l);e.ref(null);const s=e.ref({file:null,pipe:""});e.ref(null),e.ref(!1);const p=e.ref([]),n=E=>{p.value=E};e.ref("ybcr");const d=e.ref({form:{},list:[],reverse:!1}),r=E=>{const{length:w,outerDiameter:U,innerDiameter:j,thickness:z,ybcrList:F}=E||{};d.value.form={length:w,outerDiameter:U,innerDiameter:j,thickness:z},d.value.list=F},b=()=>{const{form:E,list:w}=d.value,{outerDiameter:U}=E,j=U/2,z=w==null?void 0:w.map(J=>{const{y:I,b:L,c:W,r:P,Y:R,B:ae,C:G,R:oe}=J;return R?{Y:R,B:ae,C:G,R:oe}:{Y:I,B:L,C:W,R:P}});c();const F=Se(z,j);_(F)},x=e.ref(!1),f=()=>{const E=x.value;x.value=!E},M=e.ref(!1),S=()=>{M.value=!1},T=()=>{M.value=!0},k=async()=>{const E=await Oe();n(E)},D=async E=>{const w=await Xe(E);r(w)};return e.watch(()=>d,()=>{b()},{deep:!0}),e.watch(()=>l,()=>{try{if(h.value)return;V(),window.addEventListener("resize",u)}catch(E){console.error("Three.js 初始化失败:",E),A.ElMessage.error("渲染引擎初始化失败!")}},{deep:!0}),e.onMounted(async()=>{k()}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",u),C()}),v({openDialog:T}),(E,w)=>{const U=e.resolveComponent("el-icon"),j=e.resolveComponent("el-option"),z=e.resolveComponent("el-select"),F=e.resolveComponent("el-form-item"),J=e.resolveComponent("el-form"),I=e.resolveComponent("el-input"),L=e.resolveComponent("el-table-column"),W=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(Q.ssDialog,{class:"pipe-analysis-dialog",visible:M.value,onBeforeDestroy:E.onDestroy,showClose:!1,fullScreen:x.value},{header:e.withCtx(()=>[e.createElementVNode("div",Ze,[w[6]||(w[6]=e.createElementVNode("div",{class:"header-left",title:"管件解析"}," 管件解析 ",-1)),e.createElementVNode("div",qe,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(A.full_screen_default),{onClick:f})]),_:1}),e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(A.close_default),{onClick:S})]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Je,[e.createElementVNode("div",We,[e.createElementVNode("div",Ke,[w[7]||(w[7]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输入")],-1)),e.createElementVNode("div",He,[e.createVNode(J,{model:s.value,"label-width":"auto","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(F,{label:"弯管"},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:s.value.pipe,"onUpdate:modelValue":w[0]||(w[0]=P=>s.value.pipe=P),placeholder:"请选择弯管",onChange:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,P=>(e.openBlock(),e.createBlock(j,{label:P.name,value:P.mainKey},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])])]),e.createElementVNode("div",Qe,[e.createVNode(F,{label:"加工方向"},{default:e.withCtx(()=>[e.createVNode(z,{modelValue:d.value.reverse,"onUpdate:modelValue":w[1]||(w[1]=P=>d.value.reverse=P),placeholder:"请选择加工方向"},{default:e.withCtx(()=>[e.createVNode(j,{label:"正向",value:!1}),e.createVNode(j,{label:"反向",value:!0})]),_:1},8,["modelValue"])]),_:1}),w[8]||(w[8]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输出(弯管基础参数)")],-1)),e.createElementVNode("div",et,[e.createVNode(J,{model:d.value.form,"label-width":"auto","label-position":"top",inline:!0},{default:e.withCtx(()=>[e.createVNode(F,{label:"管长"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.length,"onUpdate:modelValue":w[2]||(w[2]=P=>d.value.form.length=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"外径"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.outerDiameter,"onUpdate:modelValue":w[3]||(w[3]=P=>d.value.form.outerDiameter=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"内径"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.innerDiameter,"onUpdate:modelValue":w[4]||(w[4]=P=>d.value.form.innerDiameter=P)},null,8,["modelValue"])]),_:1}),e.createVNode(F,{label:"壁厚"},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:d.value.form.thickness,"onUpdate:modelValue":w[5]||(w[5]=P=>d.value.form.thickness=P)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),e.createVNode(W,{ref:"singleTableRef",data:d.value.list,"highlight-current-rowstyle":"width: 100%"},{default:e.withCtx(()=>[e.createVNode(L,{type:"index",width:"50"}),e.createVNode(L,{property:"y",label:"Y"}),e.createVNode(L,{property:"b",label:"B"}),e.createVNode(L,{property:"c",label:"C"}),e.createVNode(L,{property:"r",label:"R"})]),_:1},8,["data"])])])]),e.createElementVNode("div",{class:"panel-right",ref_key:"threejsContainer",ref:l},null,512)])]),_:1},8,["visible","onBeforeDestroy","fullScreen"])}}}),ot=we._export_sfc(tt,[["__scopeId","data-v-61e834a4"]]),lt={class:"obj-viewer-container"},nt={class:"pipe-comparison"},at={ref:"pipe1",class:"pipe-container"},st={ref:"pipe2",class:"pipe-container"},rt={class:"buttonGroup-topLeft"},it={class:"buttonGroup-left"},ct={class:"buttonGroup-right"},ut={class:"buttonGroup-bottom"},dt={class:"top-panel"},pt={class:"panel-header"},mt={class:"panel-body"},vt={class:"left-panel"},ft={class:"panel-header"},gt={class:"panel-body"},ht={key:1,class:"clipping-content"},Vt={class:"radio-group"},yt={class:"radio-label"},bt={class:"radio-label"},wt={class:"radio-label"},Nt={class:"radio-label"},Ct={class:"right-panel"},_t={class:"panel-header"},xt={class:"panel-body"},Et={key:0,class:"loading-overlay"},kt=e.defineComponent({__name:"threeSceneView",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{}},emits:["getAnimationData","getThreeData"],setup(y,{emit:v}){const g=v,l=y,h=e.ref(X.sceneType.ROBOT),V=e.ref(null),u=e.ref(),C=e.ref(!1),c=e.ref(""),_=e.ref(!1),s=e.ref(""),p=e.ref(!1),n=e.ref(""),d=e.ref(!1),r=e.ref(""),b=e.shallowRef(null),x=e.shallowRef(null),f=e.ref(),{currentModels:M,resetView:S,initThreeJS:T,handleResize:k,getThreeJSObjects:D,cleanup:E,setModels:w,axesHelperVisible:U,toggleAxesVisibility:j,zoomIn:z,zoomOut:F}=de.useThreeJS(V),{loadSceneFromFile:J}=X.useUrdfLoader(D,M,C,c),{isAnimating:I,toggleAnimation:L,stopAnimation:W}=de.useAnimation(D,M),{isClipping:P,activeClippingAxis:R,toggleClipping:ae,updateClippingPlanes:G}=de.useClipping(D,M),{initRaycaster:oe,selectedObject3D:pe,setSelectedObjVisible:me,updatePosition:ve,updateRotation:fe,dispose:se}=X.useRaycaster(V,D,M),ce=()=>{j()},re=e.computed(()=>h.value===X.sceneType.ROBOT),ge=e.computed(()=>h.value===X.sceneType.PIPECOMPARSION),te=t=>{_.value=!0,s.value=t,t==="剖面视图"&&!P.value&&ae()},le=t=>{p.value=!0,n.value=t,t==="动画仿真"&&g("getAnimationData")},he=()=>{g("getThreeData")},Ve=()=>{var t;(t=f==null?void 0:f.value)==null||t.playAnimation()},ue=()=>{var t;(t=f==null?void 0:f.value)==null||t.stopAnimation()},ye=()=>{var t;(t=f==null?void 0:f.value)==null||t.forwardFrame()},be=()=>{var t;(t=f==null?void 0:f.value)==null||t.backwardFrame()};return e.watch(()=>l.fileBlobs,t=>{if(t&&t.length>0){const o=t[0];if(!o.name.toLowerCase().endsWith(".urdf"))return;J(o).then(i=>{b.value=i}).catch(i=>{console.error("加载URDF文件时发生错误:",i),A.ElMessage.error("加载urdf模型失败"),b.value=null})}else b.value=null},{immediate:!0,deep:!0}),e.watch(b,t=>{w(t?[t]:[]),oe()}),e.onMounted(async()=>{await e.nextTick();try{T(),window.addEventListener("resize",k);const t=D();x.value=t.scene}catch(t){console.error("Three.js 初始化失败:",t),A.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{s.value="",n.value="",window.removeEventListener("resize",k),I.value&&W(),E(),se()}),(t,o)=>{const i=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",lt,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:V,class:"threejs-container"},null,512),[[e.vShow,re.value]]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,null,512),e.createElementVNode("div",st,null,512)],512),[[e.vShow,ge.value]]),e.createElementVNode("div",rt,[e.createVNode($.ThreeSvgIcon,{name:"viewReset",size:"24",onClick:e.unref(S),title:"重置"},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"fangda",size:"24",title:"放大",onClick:e.unref(z)},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:e.unref(F)},null,8,["onClick"]),e.createVNode($.ThreeSvgIcon,{name:"lookAround",size:"24",onClick:e.unref(L),title:e.unref(I)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode($.ThreeSvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(U),onClick:ce,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",it,[e.renderSlot(t.$slots,"button-left",{switchRightPanel:te},void 0,!0),e.createVNode($.ThreeSvgIcon,{name:"jiegoushu",size:"24",onClick:o[0]||(o[0]=m=>te("场景树")),active:_.value&&s.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"clipping",size:"24",onClick:o[1]||(o[1]=m=>te("剖面视图")),active:_.value&&s.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"zhaozi",size:"24",onClick:o[2]||(o[2]=m=>te("工件树")),active:_.value&&s.value==="工件树",title:"工件 "},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",onClick:o[3]||(o[3]=m=>te("场景4"))})]),e.createElementVNode("div",ct,[e.renderSlot(t.$slots,"button-right",{switchRightPanel:le},void 0,!0),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode($.ThreeSvgIcon,{name:"guanjiekongzhi",size:"24",onClick:o[4]||(o[4]=m=>le("关节控制")),active:p.value&&n.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:o[5]||(o[5]=m=>le("动画仿真")),active:p.value&&n.value==="动画仿真"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:o[6]||(o[6]=m=>le("urdf动画")),active:p.value&&n.value==="urdf动画"},null,8,["active"]),e.createVNode($.ThreeSvgIcon,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ut,[e.createVNode($.ThreeSvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:be}),e.createVNode($.ThreeSvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Ve}),e.createVNode($.ThreeSvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:ye}),e.createVNode($.ThreeSvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:ue})]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:o[7]||(o[7]=m=>d.value=!1)}," X ")]),e.createElementVNode("div",mt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"top-panel",{topPanelType:r.value},void 0,!0)]),_:3})])],512),[[e.vShow,d.value]]),e.withDirectives(e.createElementVNode("div",vt,[e.createElementVNode("div",ft,[e.createElementVNode("span",null,e.toDisplayString(s.value),1),e.createElementVNode("span",{class:"close",onClick:o[8]||(o[8]=m=>_.value=!1)}," X ")]),e.createElementVNode("div",gt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>{var m;return[s.value==="场景树"?(e.openBlock(),e.createBlock(ne.UrdfTree,{key:0,model:b.value},null,8,["model"])):e.createCommentVNode("",!0),s.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",Vt,[e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":o[9]||(o[9]=N=>e.isRef(R)?R.value=N:null),onChange:o[10]||(o[10]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[18]||(o[18]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",bt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":o[11]||(o[11]=N=>e.isRef(R)?R.value=N:null),onChange:o[12]||(o[12]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[19]||(o[19]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":o[13]||(o[13]=N=>e.isRef(R)?R.value=N:null),onChange:o[14]||(o[14]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[20]||(o[20]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":o[15]||(o[15]=N=>e.isRef(R)?R.value=N:null),onChange:o[16]||(o[16]=(...N)=>e.unref(G)&&e.unref(G)(...N))},null,544),[[e.vModelRadio,e.unref(R)]]),o[21]||(o[21]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),s.value==="工件树"?(e.openBlock(),e.createBlock(X.WorkpieceTreePanel,{key:2,model:(m=e.unref(pe))==null?void 0:m.obj,onVisibleChange:e.unref(me),onUpdatePosition:e.unref(ve),onUpdateRotation:e.unref(fe)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,_.value]]),e.withDirectives(e.createElementVNode("div",Ct,[e.createElementVNode("div",_t,[e.createElementVNode("span",null,e.toDisplayString(n.value),1),e.createElementVNode("span",{class:"close",onClick:o[17]||(o[17]=m=>p.value=!1)}," X ")]),e.createElementVNode("div",xt,[e.createVNode(i,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(ne.JointPanel,{model:b.value},null,8,["model"]),[[e.vShow,n.value==="关节控制"]]),e.withDirectives(e.createVNode(je,{ref_key:"animationPanelRef",ref:f,model:b.value,onGetThreeData:he,threeData:l.threeData},null,8,["model","threeData"]),[[e.vShow,n.value==="动画仿真"]]),e.renderSlot(t.$slots,"right-panel",{rightPanelType:n.value},void 0,!0)]),_:3})])],512),[[e.vShow,p.value]]),C.value?(e.openBlock(),e.createElementBlock("div",Et,[o[22]||(o[22]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(c.value),1)])):e.createCommentVNode("",!0),e.createVNode(ot,{ref_key:"pipeAnalysisPanelRef",ref:u},null,512)])}}}),Mt=we._export_sfc(kt,[["__scopeId","data-v-6edeedc9"]]);exports.default=Mt;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent as Oe, ref as b, watch as se, shallowRef as me, computed as ye, onUnmounted as Qe, resolveComponent as j, createElementBlock as we, openBlock as te, createElementVNode as o, createVNode as l, withCtx as D, createBlock as _e, createCommentVNode as be, unref as V, toDisplayString as de, onMounted as We, onBeforeUnmount as Ie, Fragment as et, renderList as tt, nextTick as lt, withDirectives as q, vShow as re, renderSlot as xe, isRef as De, vModelRadio as Te } from "vue";
|
|
2
|
-
import { r as Re, U as ot, s as Ee, u as nt, a as at, W as st } from "./workpieceTreePanel-
|
|
3
|
-
import { u as Ke, a as it, b as rt } from "./iconfont-
|
|
2
|
+
import { r as Re, U as ot, s as Ee, u as nt, a as at, W as st } from "./workpieceTreePanel-C1gy5a8r.js";
|
|
3
|
+
import { u as Ke, a as it, b as rt } from "./iconfont-CUWS5tNH.js";
|
|
4
4
|
import { ag as ut, c as ct, E as O, aW as pt, aw as dt } from "./index-BUYYl2Pc.js";
|
|
5
|
-
import { t as Ve, T as Ce, V as $, r as Q, s as mt, u as vt, k as Me, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
5
|
+
import { t as Ve, T as Ce, V as $, r as Q, s as mt, u as vt, k as Me, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js";
|
|
6
6
|
import "./index.vue_vue_type_style_index_1_lang-Cg1p_3ne.js";
|
|
7
7
|
import "./index-BHtNKL1L.js";
|
|
8
8
|
import { _ as ue, s as Pt } from "./index-DRizRbU3.js";
|
|
9
|
-
import "./index.vue_vue_type_style_index_1_lang-
|
|
9
|
+
import "./index.vue_vue_type_style_index_1_lang-B_HCEX9y.js";
|
|
10
10
|
import "./index-CV2JWX-7.js";
|
|
11
|
-
import { f as xt, a as Dt } from "./animationData-
|
|
12
|
-
import { g as Tt, a as Rt, b as Vt, c as Mt, U as St, J as At } from "./urdfTree-
|
|
11
|
+
import { f as xt, a as Dt } from "./animationData-C8lM4zZj.js";
|
|
12
|
+
import { g as Tt, a as Rt, b as Vt, c as Mt, U as St, J as At } from "./urdfTree-DGEACy9-.js";
|
|
13
13
|
import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
import { g as $t, a as je, d as zt, c as Ft, e as Yt, b as Lt } from "./dataUtil-DQX9rTvE.js";
|
|
15
15
|
import { T as U } from "./svgIcon-D-_fXUBL.js";
|
|
@@ -676,7 +676,7 @@ ${E.value.join(" ")}
|
|
|
676
676
|
]);
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
}), Qt = /* @__PURE__ */ Xe(Ht, [["__scopeId", "data-v-
|
|
679
|
+
}), Qt = /* @__PURE__ */ Xe(Ht, [["__scopeId", "data-v-34ca745a"]]), el = async () => {
|
|
680
680
|
const f = await $t(["工件库", "弯管"]), g = je("工件列表", f), n = zt(g);
|
|
681
681
|
return n == null ? void 0 : n.map((y) => ({
|
|
682
682
|
name: y,
|