ss-component-new 1.1.1007 → 1.2.1

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.
Files changed (132) hide show
  1. package/dist/OrbitControls-D1lM0xvz.cjs +1 -0
  2. package/dist/OrbitControls-DI8fa9gz.js +419 -0
  3. package/dist/STLLoader-KxFIlfhN.cjs +6 -0
  4. package/dist/STLLoader-memlq1bT.js +609 -0
  5. package/dist/{animationData-Bu38Hl4M.js → animationData-BDq02_ir.js} +14 -14
  6. package/dist/animationData-BRDoJBuV.cjs +1 -0
  7. package/dist/{array-DljC5ibo.js → array-A59WrroX.js} +1 -1
  8. package/dist/{array-BPHS7JFA.cjs → array-BtZq8qON.cjs} +1 -1
  9. package/dist/config.js +1 -1
  10. package/dist/{iconfont-pt17sMx3.js → iconfont-7cEds3Xj.js} +2 -2
  11. package/dist/{iconfont-t5epssvu.cjs → iconfont-CsuwJCas.cjs} +1 -1
  12. package/dist/{index-d6tSWKtY.cjs → index-1z9RrjZc.cjs} +1 -1
  13. package/dist/{index-QSIG57Cs.cjs → index-6t33eejU.cjs} +1 -1
  14. package/dist/{index-DqAoBcTD.cjs → index-B1ul2ExO.cjs} +1 -1
  15. package/dist/{index-BlbmO49N.js → index-B35e4i9n.js} +2 -2
  16. package/dist/{index-Da8C2puT.js → index-B9j8fCyS.js} +2 -2
  17. package/dist/index-BB6zZsmY.cjs +1 -0
  18. package/dist/{index-Cxyot1Se.js → index-BTrjEMt1.js} +4 -4
  19. package/dist/{index-CZ3UyOmT.cjs → index-B_k7wRBo.cjs} +1 -1
  20. package/dist/{index-B2lf8ui6.cjs → index-BdL8I_2i.cjs} +1 -1
  21. package/dist/{index-DQ4-s08u.js → index-BeTQ6ief.js} +4 -4
  22. package/dist/{index--7AqRoC1.js → index-BgJn4mlV.js} +4 -4
  23. package/dist/{index-BCeME5xm.js → index-BqCCREh3.js} +6 -6
  24. package/dist/{index-D3DLg4SF.js → index-BvPC1LSv.js} +18 -18
  25. package/dist/{index-oNErZJKp.js → index-BwjuTBrR.js} +1 -1
  26. package/dist/index-BxPnA2or.js +7294 -0
  27. package/dist/{index-CabdCJxd.js → index-C23iUpXa.js} +7 -7
  28. package/dist/{index-VfEaAkaq.cjs → index-C3CD2NW8.cjs} +1 -1
  29. package/dist/{index-DmXN3-YT.js → index-C461j30b.js} +1 -1
  30. package/dist/{index-B8xZFJ-x.js → index-C6Uddqal.js} +2 -2
  31. package/dist/{index-BtHzGwZt.js → index-CFg3-0Tk.js} +2 -2
  32. package/dist/{index-BstWDfX-.cjs → index-CJzA3AAO.cjs} +1 -1
  33. package/dist/{index-BRJVgxUP.cjs → index-CNJzNn6z.cjs} +1 -1
  34. package/dist/{index-C-KrU6Qo.cjs → index-CVl84S8B.cjs} +1 -1
  35. package/dist/{index-CZEK1c2_.js → index-CYp77kPp.js} +176 -176
  36. package/dist/{index-BCIKC9PE.js → index-C_VamYcq.js} +6 -6
  37. package/dist/{index-CmlXlH2b.cjs → index-CjI5pDiU.cjs} +1 -1
  38. package/dist/{index-efKjAh7G.cjs → index-CrWFG4Wb.cjs} +1 -1
  39. package/dist/{index-DIehhXd9.cjs → index-Crd4LGue.cjs} +1 -1
  40. package/dist/{index-feAp8_X8.cjs → index-CtG-uyjY.cjs} +1 -1
  41. package/dist/{index-DHy1RHXi.cjs → index-CtPy-3S1.cjs} +1 -1
  42. package/dist/{index-D3VTHlZh.js → index-CvEj4aiY.js} +4 -4
  43. package/dist/{index-DzcelPVu.cjs → index-Cx302rHQ.cjs} +1 -1
  44. package/dist/{index-BrsIZVyD.cjs → index-CxnH4vfV.cjs} +1 -1
  45. package/dist/{index-hsKO-I_N.js → index-Cz03X-rX.js} +1 -1
  46. package/dist/{index-DxggSUtV.cjs → index-D8S0DVkq.cjs} +1 -1
  47. package/dist/{index-BuBVqjpx.js → index-DH0dVg0N.js} +7 -7
  48. package/dist/{index-oCii55Zs.cjs → index-DIm3MBK_.cjs} +1 -1
  49. package/dist/{index-CnqhOUek.js → index-DNE4QDIf.js} +3 -3
  50. package/dist/{index-BCXz_U9h.cjs → index-DQTI3BuS.cjs} +1 -1
  51. package/dist/{index-De9VWWmT.cjs → index-DS3OziT5.cjs} +1 -1
  52. package/dist/{index-Hm2_zeiV.js → index-DVvt9_w0.js} +1 -1
  53. package/dist/{index-DqhAoamS.cjs → index-DmB0dlGH.cjs} +1 -1
  54. package/dist/index-Dn9I5-1H.cjs +1 -0
  55. package/dist/{index-s1sBvg7-.cjs → index-DqaA5Rvx.cjs} +1 -1
  56. package/dist/{index-Bu-yHmJc.cjs → index-DqquxuCt.cjs} +1 -1
  57. package/dist/{index-DsIUgynO.js → index-DygW4mGC.js} +6 -6
  58. package/dist/{index-1gIP1dMc.cjs → index-HFf3Z0Ft.cjs} +1 -1
  59. package/dist/{index-BvDv1IKK.cjs → index-Kg96Vvn5.cjs} +1 -1
  60. package/dist/{index-DaBbEkRJ.js → index-N7dEiXLQ.js} +13 -13
  61. package/dist/index-TXrydBPq.cjs +1 -0
  62. package/dist/{index-BcBpmCfF.cjs → index-XQxaEXgz.cjs} +1 -1
  63. package/dist/{index-BHNtRl-8.js → index-Y5i13RsM.js} +3 -3
  64. package/dist/{index-CrKg8KZt.js → index-YQnrEK_K.js} +1069 -1061
  65. package/dist/{index-Jyps1gRD.js → index-aneoZx5F.js} +24 -24
  66. package/dist/{index-BdY8Qg-6.cjs → index-byBdKAky.cjs} +1 -1
  67. package/dist/{index-DWuAa5Ws.js → index-db5CgGrA.js} +394 -394
  68. package/dist/{index-TwtUdAMm.js → index-dqBbhGfy.js} +6 -6
  69. package/dist/{index-Dw_nYMhJ.cjs → index-gjDjqhNq.cjs} +2 -2
  70. package/dist/{index-K1m0RQMs.js → index-nq9fleOT.js} +2 -2
  71. package/dist/{index-oI1HUneF.js → index-qoqka5Nb.js} +1 -1
  72. package/dist/{index-DZHLGAn0.js → index-wHil9Fox.js} +2 -2
  73. package/dist/{index-Dtk-Fgm3.js → index-wq8KZGnQ.js} +5 -5
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CPiIzB84.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CzcK5mCc.cjs} +1 -1
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DC4zFlOQ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dmm4yqcc.js} +2 -2
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DMhv31o4.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-B0Ivzvcp.js} +6 -6
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DV4d1URg.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-xm0hMPwT.cjs} +1 -1
  78. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CMx9TLjC.cjs +56 -0
  79. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Czu5g16A.js +37436 -0
  80. package/dist/{index.vue_vue_type_style_index_1_lang-DgDibOnl.js → index.vue_vue_type_style_index_1_lang-AXp5rRSK.js} +76 -76
  81. package/dist/{index.vue_vue_type_style_index_1_lang-B1fiFPmj.js → index.vue_vue_type_style_index_1_lang-BxEXAMMV.js} +5012 -5100
  82. package/dist/{index.vue_vue_type_style_index_1_lang-CwJCb_rE.cjs → index.vue_vue_type_style_index_1_lang-CXwGS60-.cjs} +45 -46
  83. package/dist/{index.vue_vue_type_style_index_1_lang-B2vK-1an.cjs → index.vue_vue_type_style_index_1_lang-j5HrYuvy.cjs} +1 -1
  84. package/dist/{isString-D3DhambW.js → isString-BNK38WbE.js} +1 -1
  85. package/dist/{isString-ChvWbctO.cjs → isString-BmAegMGI.cjs} +1 -1
  86. package/dist/{main-YesjKNW0.cjs → main-BgpAXuSa.cjs} +1 -1
  87. package/dist/{main-DjvWp72p.js → main-t7yIujwl.js} +5 -5
  88. package/dist/ss-component.cjs +1 -1
  89. package/dist/ss-component.css +1 -1
  90. package/dist/ss-component.js +11 -11
  91. package/dist/ss-component2.cjs +1 -1
  92. package/dist/ss-component2.js +12 -12
  93. package/dist/three-viewport-gizmo-BxFHxv_x.js +18587 -0
  94. package/dist/three-viewport-gizmo-CwaL5sMV.cjs +4195 -0
  95. package/dist/{threeLatheView-DfSxRY8B.cjs → threeLatheView-BzHB-t_G.cjs} +1 -1
  96. package/dist/{threeLatheView-Mc00lYo0.js → threeLatheView-sTBlm0tt.js} +4 -4
  97. package/dist/{threeModel-DgfyuwYi.js → threeModel-11Yk8w2d.js} +5 -5
  98. package/dist/{threeModel-B7tOOzr9.cjs → threeModel-BudPgWiX.cjs} +1 -1
  99. package/dist/threePreview-Cy7NY-gw.cjs +1 -0
  100. package/dist/threePreview-DPyqhBkJ.js +1873 -0
  101. package/dist/threeSceneView-Bwed326O.js +1469 -0
  102. package/dist/threeSceneView-DT-STxuj.cjs +5 -0
  103. package/dist/{threeSceneViewForCPMPIP-Dw2bZRas.js → threeSceneViewForCPMPIP-PgPPGBxu.js} +90 -91
  104. package/dist/{threeSceneViewForCPMPIP-fWzzwARt.cjs → threeSceneViewForCPMPIP-RRDb_tZ0.cjs} +3 -3
  105. package/dist/{threeViewerHost-C9qoD_Tp.cjs → threeViewerHost-Brgx-J3Q.cjs} +1 -1
  106. package/dist/{threeViewerHost-D6c0lK4U.js → threeViewerHost-k5I66uBW.js} +8 -8
  107. package/dist/useRayCaster-CLcetetd.cjs +1 -0
  108. package/dist/{useRayCaster-Y_Q5getG.js → useRayCaster-TCYe6KMI.js} +14 -14
  109. package/package.json +1 -1
  110. package/public/config.js +1 -1
  111. package/dist/OrbitControls-C0QRmW6_.js +0 -458
  112. package/dist/OrbitControls-Co_9huz0.cjs +0 -1
  113. package/dist/STLLoader-CiUjaQtA.js +0 -657
  114. package/dist/STLLoader-RU7KqloS.cjs +0 -6
  115. package/dist/animationData-BjR16KKI.cjs +0 -1
  116. package/dist/index-BIg5JGtJ.js +0 -3370
  117. package/dist/index-BgImAL2B.cjs +0 -1
  118. package/dist/index-BuijIgJr.cjs +0 -1
  119. package/dist/index-Daqeta0F.cjs +0 -1
  120. package/dist/index-LnraLHWy.js +0 -7214
  121. package/dist/index-ama5teB1.cjs +0 -1
  122. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CycvdKIn.js +0 -34104
  123. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DnbT8HgZ.cjs +0 -56
  124. package/dist/isUndefined-7lpU02Ef.cjs +0 -1
  125. package/dist/isUndefined-BqsKWawv.js +0 -84
  126. package/dist/three-viewport-gizmo-BV37JzRa.cjs +0 -4197
  127. package/dist/three-viewport-gizmo-CkQ98n-T.js +0 -26015
  128. package/dist/threePreview-ByUYJkts.cjs +0 -1
  129. package/dist/threePreview-CkZ9LLXO.js +0 -1972
  130. package/dist/threeSceneView-BxK4ycgs.js +0 -1472
  131. package/dist/threeSceneView-DK1eRng9.cjs +0 -5
  132. package/dist/useRayCaster-BkcK_aF1.cjs +0 -1
@@ -1,6 +0,0 @@
1
- "use strict";const i=require("./three-viewport-gizmo-BV37JzRa.cjs"),H=/^[og]\s*(.+)?/,N=/^mtllib /,W=/^usemtl /,q=/^usemap /,G=/\s+/,T=new i.Vector3,z=new i.Vector3,D=new i.Vector3,E=new i.Vector3,C=new i.Vector3,I=new i.Color;function J(){const B={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(t,s){if(this.object&&this.object.fromDeclaration===!1){this.object.name=t,this.object.fromDeclaration=s!==!1;return}const o=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:t||"",fromDeclaration:s!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,r){const u=this._finalize(!1);u&&(u.inherited||u.groupCount<=0)&&this.materials.splice(u.index,1);const h={index:this.materials.length,name:e||"",mtllib:Array.isArray(r)&&r.length>0?r[r.length-1]:"",smooth:u!==void 0?u.smooth:this.smooth,groupStart:u!==void 0?u.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(c){const n={index:typeof c=="number"?c:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return n.clone=this.clone.bind(n),n}};return this.materials.push(h),h},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const r=this.currentMaterial();if(r&&r.groupEnd===-1&&(r.groupEnd=this.geometry.vertices.length/3,r.groupCount=r.groupEnd-r.groupStart,r.inherited=!1),e&&this.materials.length>1)for(let u=this.materials.length-1;u>=0;u--)this.materials[u].groupCount<=0&&this.materials.splice(u,1);return e&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),r}},o&&o.name&&typeof o.clone=="function"){const e=o.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(t,s){const o=parseInt(t,10);return(o>=0?o-1:o+s/3)*3},parseNormalIndex:function(t,s){const o=parseInt(t,10);return(o>=0?o-1:o+s/3)*3},parseUVIndex:function(t,s){const o=parseInt(t,10);return(o>=0?o-1:o+s/2)*2},addVertex:function(t,s,o){const e=this.vertices,r=this.object.geometry.vertices;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[o+0],e[o+1],e[o+2])},addVertexPoint:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addVertexLine:function(t){const s=this.vertices;this.object.geometry.vertices.push(s[t+0],s[t+1],s[t+2])},addNormal:function(t,s,o){const e=this.normals,r=this.object.geometry.normals;r.push(e[t+0],e[t+1],e[t+2]),r.push(e[s+0],e[s+1],e[s+2]),r.push(e[o+0],e[o+1],e[o+2])},addFaceNormal:function(t,s,o){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,o),C.subVectors(D,z),E.subVectors(T,z),C.cross(E),C.normalize(),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z),r.push(C.x,C.y,C.z)},addColor:function(t,s,o){const e=this.colors,r=this.object.geometry.colors;e[t]!==void 0&&r.push(e[t+0],e[t+1],e[t+2]),e[s]!==void 0&&r.push(e[s+0],e[s+1],e[s+2]),e[o]!==void 0&&r.push(e[o+0],e[o+1],e[o+2])},addUV:function(t,s,o){const e=this.uvs,r=this.object.geometry.uvs;r.push(e[t+0],e[t+1]),r.push(e[s+0],e[s+1]),r.push(e[o+0],e[o+1])},addDefaultUV:function(){const t=this.object.geometry.uvs;t.push(0,0),t.push(0,0),t.push(0,0)},addUVLine:function(t){const s=this.uvs;this.object.geometry.uvs.push(s[t+0],s[t+1])},addFace:function(t,s,o,e,r,u,h,c,n){const a=this.vertices.length;let l=this.parseVertexIndex(t,a),f=this.parseVertexIndex(s,a),m=this.parseVertexIndex(o,a);if(this.addVertex(l,f,m),this.addColor(l,f,m),h!==void 0&&h!==""){const g=this.normals.length;l=this.parseNormalIndex(h,g),f=this.parseNormalIndex(c,g),m=this.parseNormalIndex(n,g),this.addNormal(l,f,m)}else this.addFaceNormal(l,f,m);if(e!==void 0&&e!==""){const g=this.uvs.length;l=this.parseUVIndex(e,g),f=this.parseUVIndex(r,g),m=this.parseUVIndex(u,g),this.addUV(l,f,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(t){this.object.geometry.type="Points";const s=this.vertices.length;for(let o=0,e=t.length;o<e;o++){const r=this.parseVertexIndex(t[o],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const o=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],o));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class Z extends i.Loader{constructor(t){super(t),this.materials=null}load(t,s,o,e){const r=this,u=new i.FileLoader(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},o,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new J;t.indexOf(`\r
2
- `)!==-1&&(t=t.replace(/\r\n/g,`
3
- `)),t.indexOf(`\\
4
- `)!==-1&&(t=t.replace(/\\\n/g,""));const o=t.split(`
5
- `);let e=[];for(let h=0,c=o.length;h<c;h++){const n=o[h].trimStart();if(n.length===0)continue;const a=n.charAt(0);if(a!=="#")if(a==="v"){const l=n.split(G);switch(l[0]){case"v":s.vertices.push(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3])),l.length>=7?(I.setRGB(parseFloat(l[4]),parseFloat(l[5]),parseFloat(l[6]),i.SRGBColorSpace),s.colors.push(I.r,I.g,I.b)):s.colors.push(void 0,void 0,void 0);break;case"vn":s.normals.push(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]));break;case"vt":s.uvs.push(parseFloat(l[1]),parseFloat(l[2]));break}}else if(a==="f"){const f=n.slice(1).trim().split(G),m=[];for(let p=0,b=f.length;p<b;p++){const x=f[p];if(x.length>0){const w=x.split("/");m.push(w)}}const g=m[0];for(let p=1,b=m.length-1;p<b;p++){const x=m[p],w=m[p+1];s.addFace(g[0],x[0],w[0],g[1],x[1],w[1],g[2],x[2],w[2])}}else if(a==="l"){const l=n.substring(1).trim().split(" ");let f=[];const m=[];if(n.indexOf("/")===-1)f=l;else for(let g=0,p=l.length;g<p;g++){const b=l[g].split("/");b[0]!==""&&f.push(b[0]),b[1]!==""&&m.push(b[1])}s.addLineGeometry(f,m)}else if(a==="p"){const f=n.slice(1).trim().split(" ");s.addPointGeometry(f)}else if((e=H.exec(n))!==null){const l=(" "+e[0].slice(1).trim()).slice(1);s.startObject(l)}else if(W.test(n))s.object.startMaterial(n.substring(7).trim(),s.materialLibraries);else if(N.test(n))s.materialLibraries.push(n.substring(7).trim());else if(q.test(n))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(a==="s"){if(e=n.split(" "),e.length>1){const f=e[1].trim().toLowerCase();s.object.smooth=f!=="0"&&f!=="off"}else s.object.smooth=!0;const l=s.object.currentMaterial();l&&(l.smooth=s.object.smooth)}else{if(n==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+n+'"')}}s.finalize();const r=new i.Group;if(r.materialLibraries=[].concat(s.materialLibraries),!(s.objects.length===1&&s.objects[0].geometry.vertices.length===0)===!0)for(let h=0,c=s.objects.length;h<c;h++){const n=s.objects[h],a=n.geometry,l=n.materials,f=a.type==="Line",m=a.type==="Points";let g=!1;if(a.vertices.length===0)continue;const p=new i.BufferGeometry;p.setAttribute("position",new i.Float32BufferAttribute(a.vertices,3)),a.normals.length>0&&p.setAttribute("normal",new i.Float32BufferAttribute(a.normals,3)),a.colors.length>0&&(g=!0,p.setAttribute("color",new i.Float32BufferAttribute(a.colors,3))),a.hasUVIndices===!0&&p.setAttribute("uv",new i.Float32BufferAttribute(a.uvs,2));const b=[];for(let w=0,j=l.length;w<j;w++){const F=l[w],M=F.name+"_"+F.smooth+"_"+g;let d=s.materials[M];if(this.materials!==null){if(d=this.materials.create(F.name),f&&d&&!(d instanceof i.LineBasicMaterial)){const y=new i.LineBasicMaterial;i.Material.prototype.copy.call(y,d),y.color.copy(d.color),d=y}else if(m&&d&&!(d instanceof i.PointsMaterial)){const y=new i.PointsMaterial({size:10,sizeAttenuation:!1});i.Material.prototype.copy.call(y,d),y.color.copy(d.color),y.map=d.map,d=y}}d===void 0&&(f?d=new i.LineBasicMaterial:m?d=new i.PointsMaterial({size:1,sizeAttenuation:!1}):d=new i.MeshPhongMaterial,d.name=F.name,d.flatShading=!F.smooth,d.vertexColors=g,s.materials[M]=d),b.push(d)}let x;if(b.length>1){for(let w=0,j=l.length;w<j;w++){const F=l[w];p.addGroup(F.groupStart,F.groupCount,w)}f?x=new i.LineSegments(p,b):m?x=new i.Points(p,b):x=new i.Mesh(p,b)}else f?x=new i.LineSegments(p,b[0]):m?x=new i.Points(p,b[0]):x=new i.Mesh(p,b[0]);x.name=n.name,r.add(x)}else if(s.vertices.length>0){const h=new i.PointsMaterial({size:1,sizeAttenuation:!1}),c=new i.BufferGeometry;c.setAttribute("position",new i.Float32BufferAttribute(s.vertices,3)),s.colors.length>0&&s.colors[0]!==void 0&&(c.setAttribute("color",new i.Float32BufferAttribute(s.colors,3)),h.vertexColors=!0);const n=new i.Points(c,h);r.add(n)}return r}}class X extends i.Loader{constructor(t){super(t)}load(t,s,o,e){const r=this,u=this.path===""?i.LoaderUtils.extractUrlBase(t):this.path,h=new i.FileLoader(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(t,function(c){try{s(r.parse(c,u))}catch(n){e?e(n):console.error(n),r.manager.itemError(t)}},o,e)}setMaterialOptions(t){return this.materialOptions=t,this}parse(t,s){const o=t.split(`
6
- `);let e={};const r=/\s+/,u={};for(let c=0;c<o.length;c++){let n=o[c];if(n=n.trim(),n.length===0||n.charAt(0)==="#")continue;const a=n.indexOf(" ");let l=a>=0?n.substring(0,a):n;l=l.toLowerCase();let f=a>=0?n.substring(a+1):"";if(f=f.trim(),l==="newmtl")e={name:f},u[f]=e;else if(l==="ka"||l==="kd"||l==="ks"||l==="ke"){const m=f.split(r,3);e[l]=[parseFloat(m[0]),parseFloat(m[1]),parseFloat(m[2])]}else e[l]=f}const h=new Y(this.resourcePath||s,this.materialOptions);return h.setCrossOrigin(this.crossOrigin),h.setManager(this.manager),h.setMaterials(u),h}}class Y{constructor(t="",s={}){this.baseUrl=t,this.options=s,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:i.FrontSide,this.wrap=this.options.wrap!==void 0?this.options.wrap:i.RepeatWrapping}setCrossOrigin(t){return this.crossOrigin=t,this}setManager(t){this.manager=t}setMaterials(t){this.materialsInfo=this.convert(t),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(t){if(!this.options)return t;const s={};for(const o in t){const e=t[o],r={};s[o]=r;for(const u in e){let h=!0,c=e[u];const n=u.toLowerCase();switch(n){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(c=[c[0]/255,c[1]/255,c[2]/255]),this.options&&this.options.ignoreZeroRGBs&&c[0]===0&&c[1]===0&&c[2]===0&&(h=!1);break}h&&(r[n]=c)}}return s}preload(){for(const t in this.materialsInfo)this.create(t)}getIndex(t){return this.nameLookup[t]}getAsArray(){let t=0;for(const s in this.materialsInfo)this.materialsArray[t]=this.create(s),this.nameLookup[s]=t,t++;return this.materialsArray}create(t){return this.materials[t]===void 0&&this.createMaterial_(t),this.materials[t]}createMaterial_(t){const s=this,o=this.materialsInfo[t],e={name:t,side:this.side};function r(h,c){return typeof c!="string"||c===""?"":/^https?:\/\//i.test(c)?c:h+c}function u(h,c){if(e[h])return;const n=s.getTextureParams(c,e),a=s.loadTexture(r(s.baseUrl,n.url));a.repeat.copy(n.scale),a.offset.copy(n.offset),a.wrapS=s.wrap,a.wrapT=s.wrap,(h==="map"||h==="emissiveMap")&&(a.colorSpace=i.SRGBColorSpace),e[h]=a}for(const h in o){const c=o[h];let n;if(c!=="")switch(h.toLowerCase()){case"kd":e.color=i.ColorManagement.colorSpaceToWorking(new i.Color().fromArray(c),i.SRGBColorSpace);break;case"ks":e.specular=i.ColorManagement.colorSpaceToWorking(new i.Color().fromArray(c),i.SRGBColorSpace);break;case"ke":e.emissive=i.ColorManagement.colorSpaceToWorking(new i.Color().fromArray(c),i.SRGBColorSpace);break;case"map_kd":u("map",c);break;case"map_ks":u("specularMap",c);break;case"map_ke":u("emissiveMap",c);break;case"norm":u("normalMap",c);break;case"map_bump":case"bump":u("bumpMap",c);break;case"disp":u("displacementMap",c);break;case"map_d":u("alphaMap",c),e.transparent=!0;break;case"ns":e.shininess=parseFloat(c);break;case"d":n=parseFloat(c),n<1&&(e.opacity=n,e.transparent=!0);break;case"tr":n=parseFloat(c),this.options&&this.options.invertTrProperty&&(n=1-n),n>0&&(e.opacity=1-n,e.transparent=!0);break}}return this.materials[t]=new i.MeshPhongMaterial(e),this.materials[t]}getTextureParams(t,s){const o={scale:new i.Vector2(1,1),offset:new i.Vector2(0,0)},e=t.split(/\s+/);let r;return r=e.indexOf("-bm"),r>=0&&(s.bumpScale=parseFloat(e[r+1]),e.splice(r,2)),r=e.indexOf("-mm"),r>=0&&(s.displacementBias=parseFloat(e[r+1]),s.displacementScale=parseFloat(e[r+2]),e.splice(r,3)),r=e.indexOf("-s"),r>=0&&(o.scale.set(parseFloat(e[r+1]),parseFloat(e[r+2])),e.splice(r,4)),r=e.indexOf("-o"),r>=0&&(o.offset.set(parseFloat(e[r+1]),parseFloat(e[r+2])),e.splice(r,4)),o.url=e.join(" ").trim(),o}loadTexture(t,s,o,e,r){const u=this.manager!==void 0?this.manager:i.DefaultLoadingManager;let h=u.getHandler(t);h===null&&(h=new i.TextureLoader(u)),h.setCrossOrigin&&h.setCrossOrigin(this.crossOrigin);const c=h.load(t,o,e,r);return s!==void 0&&(c.mapping=s),c}}class K extends i.Loader{constructor(t){super(t)}load(t,s,o,e){const r=this,u=new i.FileLoader(this.manager);u.setPath(this.path),u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){try{s(r.parse(h))}catch(c){e?e(c):console.error(c),r.manager.itemError(t)}},o,e)}parse(t){function s(n){const a=new DataView(n),l=32/8*3+32/8*3*3+16/8,f=a.getUint32(80,!0);if(80+32/8+f*l===a.byteLength)return!0;const g=[115,111,108,105,100];for(let p=0;p<5;p++)if(o(g,a,p))return!1;return!0}function o(n,a,l){for(let f=0,m=n.length;f<m;f++)if(n[f]!==a.getUint8(l+f))return!1;return!0}function e(n){const a=new DataView(n),l=a.getUint32(80,!0);let f,m,g,p=!1,b,x,w,j,F;for(let v=0;v<70;v++)a.getUint32(v,!1)==1129270351&&a.getUint8(v+4)==82&&a.getUint8(v+5)==61&&(p=!0,b=new Float32Array(l*3*3),x=a.getUint8(v+6)/255,w=a.getUint8(v+7)/255,j=a.getUint8(v+8)/255,F=a.getUint8(v+9)/255);const M=84,d=12*4+2,y=new i.BufferGeometry,V=new Float32Array(l*3*3),_=new Float32Array(l*3*3),S=new i.Color;for(let v=0;v<l;v++){const k=M+v*d,O=a.getFloat32(k,!0),U=a.getFloat32(k+4,!0),P=a.getFloat32(k+8,!0);if(p){const L=a.getUint16(k+48,!0);(L&32768)===0?(f=(L&31)/31,m=(L>>5&31)/31,g=(L>>10&31)/31):(f=x,m=w,g=j)}for(let L=1;L<=3;L++){const R=k+L*12,A=v*3*3+(L-1)*3;V[A]=a.getFloat32(R,!0),V[A+1]=a.getFloat32(R+4,!0),V[A+2]=a.getFloat32(R+8,!0),_[A]=O,_[A+1]=U,_[A+2]=P,p&&(S.setRGB(f,m,g,i.SRGBColorSpace),b[A]=S.r,b[A+1]=S.g,b[A+2]=S.b)}}return y.setAttribute("position",new i.BufferAttribute(V,3)),y.setAttribute("normal",new i.BufferAttribute(_,3)),p&&(y.setAttribute("color",new i.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new i.BufferGeometry,l=/solid([\s\S]*?)endsolid/g,f=/facet([\s\S]*?)endfacet/g,m=/solid\s(.+)/;let g=0;const p=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,b=new RegExp("vertex"+p+p+p,"g"),x=new RegExp("normal"+p+p+p,"g"),w=[],j=[],F=[],M=new i.Vector3;let d,y=0,V=0,_=0;for(;(d=l.exec(n))!==null;){V=_;const S=d[0],v=(d=m.exec(S))!==null?d[1]:"";for(F.push(v);(d=f.exec(S))!==null;){let U=0,P=0;const L=d[0];for(;(d=x.exec(L))!==null;)M.x=parseFloat(d[1]),M.y=parseFloat(d[2]),M.z=parseFloat(d[3]),P++;for(;(d=b.exec(L))!==null;)w.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),j.push(M.x,M.y,M.z),U++,_++;P!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+g),U!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+g),g++}const k=V,O=_-V;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new i.Float32BufferAttribute(w,3)),a.setAttribute("normal",new i.Float32BufferAttribute(j,3)),a}function u(n){return typeof n!="string"?new TextDecoder().decode(n):n}function h(n){if(typeof n=="string"){const a=new Uint8Array(n.length);for(let l=0;l<n.length;l++)a[l]=n.charCodeAt(l)&255;return a.buffer||a}else return n}const c=h(t);return s(c)?e(c):r(u(t))}}exports.MTLLoader=X;exports.OBJLoader=Z;exports.STLLoader=K;
@@ -1 +0,0 @@
1
- "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-B2vK-1an.cjs"),I=require("./index.vue_vue_type_style_index_1_lang-CwJCb_rE.cjs"),U=require("./threeViewerHost-C9qoD_Tp.cjs"),T=require("./index-d6tSWKtY.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await U.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=I.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=I.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let $=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/管件解析`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let $=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;