ss-component-new 1.2.11 → 1.2.13

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 (99) hide show
  1. package/dist/OrbitControls-BoyGapft.js +419 -0
  2. package/dist/OrbitControls-D1lM0xvz.cjs +1 -0
  3. package/dist/STLLoader-BBRISxpD.js +609 -0
  4. package/dist/STLLoader-KxFIlfhN.cjs +6 -0
  5. package/dist/{animationData-CyP8-u7i.cjs → animationData-82Fw-zug.cjs} +1 -1
  6. package/dist/{animationData-C_gV7XAN.js → animationData-CVzu3q7-.js} +2 -2
  7. package/dist/{iconfont-pt17sMx3.js → iconfont-B9HCA4uh.js} +2 -2
  8. package/dist/{iconfont-t5epssvu.cjs → iconfont-CsuwJCas.cjs} +1 -1
  9. package/dist/{index-Dwr4RHei.cjs → index-6tUa2D9P.cjs} +1 -1
  10. package/dist/{index-DJMHw-xb.js → index-6zoxugAS.js} +7 -7
  11. package/dist/{index-C40ofXP7.cjs → index-B6h8Kdsz.cjs} +1 -1
  12. package/dist/{index-BQ4Rjf8F.js → index-B6t23GGZ.js} +3 -3
  13. package/dist/{index-7eyGTvr0.cjs → index-BZJCScX4.cjs} +1 -1
  14. package/dist/{index-DQZ_oAyj.js → index-Bafw9B9F.js} +3 -3
  15. package/dist/{index-ESNVepXU.js → index-BlNTaxba.js} +3 -3
  16. package/dist/{index-CAewC69j.cjs → index-C85eyyuX.cjs} +1 -1
  17. package/dist/{index-BMYtLkw8.js → index-CA_ygidl.js} +3 -3
  18. package/dist/{index-CVDv-Zz-.js → index-CCA-lJNu.js} +14 -14
  19. package/dist/{index-CApZYDIm.cjs → index-CEi2ZplO.cjs} +1 -1
  20. package/dist/{index-H_3u1NA_.js → index-CG28BBGh.js} +1 -1
  21. package/dist/{index-DGBDGLOK.cjs → index-CTOqmp6o.cjs} +1 -1
  22. package/dist/{index-CoVAbxHN.js → index-CU2AYT-o.js} +1 -1
  23. package/dist/{index-BAOnUk_J.cjs → index-CXT_ri7C.cjs} +1 -1
  24. package/dist/{index-CN29uy_G.js → index-CZrlCt19.js} +6 -6
  25. package/dist/{index-DTkAIcvV.js → index-Cas62aFl.js} +1 -1
  26. package/dist/{index-CTRmgnKQ.js → index-ChlZgZzn.js} +5 -5
  27. package/dist/{index-DHQH1rlQ.js → index-Cne-8ofR.js} +1 -1
  28. package/dist/{index-B7g38Yte.js → index-Cq2pDYGK.js} +1 -1
  29. package/dist/{index-i50hp6po.cjs → index-CrD_T8_i.cjs} +1 -1
  30. package/dist/{index-DnU2slQv.cjs → index-CrH5xDEc.cjs} +1 -1
  31. package/dist/{index-DfKkN76b.js → index-CsOVkfJs.js} +150 -150
  32. package/dist/{index-D5ShC3zu.cjs → index-CuPtpGC-.cjs} +1 -1
  33. package/dist/{index-2nEz-J89.js → index-D2puM6vk.js} +2 -2
  34. package/dist/{index-DDhAMgrO.js → index-D6_JNPhy.js} +1 -1
  35. package/dist/{index-ecVCII_e.js → index-D7tU_Vmu.js} +1 -1
  36. package/dist/{index-D9l1Z4TO.cjs → index-D8NHvYsq.cjs} +1 -1
  37. package/dist/{index-CkA2IZJB.js → index-D9MBiU6x.js} +1 -1
  38. package/dist/{index-QkDZ18PI.cjs → index-DR5VU4-m.cjs} +1 -1
  39. package/dist/{index-B9OZcnHm.cjs → index-DvYKkz_M.cjs} +1 -1
  40. package/dist/{index-B_ZGJtId.js → index-Dvaz3uPH.js} +1 -1
  41. package/dist/{index-BJBNtx2b.cjs → index-Dy5yN3zf.cjs} +1 -1
  42. package/dist/{index-CKLBlQoK.js → index-DzopeJWR.js} +3 -3
  43. package/dist/{index-C5gPrwPs.cjs → index-Ez9VvZ1_.cjs} +1 -1
  44. package/dist/{index-CVadHkfS.cjs → index-JyPuO9N5.cjs} +1 -1
  45. package/dist/{index-BUUEqGRN.cjs → index-NU04ABjS.cjs} +1 -1
  46. package/dist/{index-BDaeo6qO.js → index-YWDxEpkt.js} +1 -1
  47. package/dist/{index-B_mFQujY.cjs → index-Yc43ZpIg.cjs} +1 -1
  48. package/dist/{index-DP7rcz4I.cjs → index-d5IX5LQw.cjs} +1 -1
  49. package/dist/{index-DsQ-qtQ9.cjs → index-dPS3R0YJ.cjs} +1 -1
  50. package/dist/{index-DkG4A3iE.cjs → index-hKtCBiTZ.cjs} +1 -1
  51. package/dist/{index-Adqs5vHH.cjs → index-iXcYsTKr.cjs} +1 -1
  52. package/dist/{index-D4CVC2Sk.js → index-nmkuI4hH.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BKTlb5a7.cjs} +56 -56
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dkl1cH-C.js} +1713 -1718
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BeE2rxjq.js} +3 -3
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-RjUkBHAd.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-B1G9k32g.js} +6 -6
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CBxXCho0.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_1_lang-CsY5rIO4.js → index.vue_vue_type_style_index_1_lang-Cl6e-PP2.js} +5012 -5100
  60. package/dist/{index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs → index.vue_vue_type_style_index_1_lang-NCxR30Hn.cjs} +45 -46
  61. package/dist/{main-DIbH2rlN.js → main-BZIvGaGC.js} +2 -2
  62. package/dist/{main-CVaemyhm.cjs → main-Bmym9xf7.cjs} +1 -1
  63. package/dist/ss-component.cjs +1 -1
  64. package/dist/ss-component.css +1 -1
  65. package/dist/ss-component.js +9 -9
  66. package/dist/ss-component2.cjs +1 -1
  67. package/dist/ss-component2.js +11 -11
  68. package/dist/three-viewport-gizmo-BlxFLyPm.js +18587 -0
  69. package/dist/three-viewport-gizmo-CwaL5sMV.cjs +4195 -0
  70. package/dist/{threeLatheView-CZdorls1.cjs → threeLatheView-BsuPsR7B.cjs} +1 -1
  71. package/dist/{threeLatheView-Bp0kjo_V.js → threeLatheView-DZZ-1LxL.js} +3 -3
  72. package/dist/{threeModel-C0Jdw2O3.cjs → threeModel-C7W6Z6bA.cjs} +1 -1
  73. package/dist/{threeModel-27sl0tTS.js → threeModel-WY_j9cKP.js} +4 -4
  74. package/dist/threePreview-Cy7NY-gw.cjs +1 -0
  75. package/dist/threePreview-DKlyIJKv.js +1873 -0
  76. package/dist/{threeSceneView-CEpBvJSV.cjs → threeSceneView-BfpO8VDG.cjs} +1 -1
  77. package/dist/{threeSceneView-ZDXqO8ZA.js → threeSceneView-L7mPphX4.js} +23 -23
  78. package/dist/{threeSceneViewForCPMPIP-BPPWM68P.js → threeSceneViewForCPMPIP-K0nm7l_H.js} +26 -26
  79. package/dist/{threeSceneViewForCPMPIP-B0VPmBWd.cjs → threeSceneViewForCPMPIP-zkgB6OW3.cjs} +2 -2
  80. package/dist/{threeViewerHost-CKE2a4PV.js → threeViewerHost-Wcy-3BQ6.js} +2 -2
  81. package/dist/{threeViewerHost-yHvsk7TK.cjs → threeViewerHost-pddFZ8Z9.cjs} +1 -1
  82. package/dist/{urdfTree-BuTtRGdl.js → urdfTree-Dnh2rJyF.js} +2 -2
  83. package/dist/urdfTree-bbDs2Fhg.cjs +1 -0
  84. package/dist/{useRayCaster-BM9XKGKx.js → useRayCaster-O1MYiDpT.js} +12 -12
  85. package/dist/{useRayCaster-1DNcSYPR.cjs → useRayCaster-h-sWQwPj.cjs} +1 -1
  86. package/package.json +1 -1
  87. package/dist/OrbitControls-C0QRmW6_.js +0 -458
  88. package/dist/OrbitControls-Co_9huz0.cjs +0 -1
  89. package/dist/STLLoader-CiUjaQtA.js +0 -657
  90. package/dist/STLLoader-RU7KqloS.cjs +0 -6
  91. package/dist/obj/model.mtl +0 -42
  92. package/dist/obj/model.obj +0 -26110
  93. package/dist/three-viewport-gizmo-BV37JzRa.cjs +0 -4197
  94. package/dist/three-viewport-gizmo-CkQ98n-T.js +0 -26015
  95. package/dist/threePreview-C_mY_TBC.cjs +0 -1
  96. package/dist/threePreview-DFFjm93P.js +0 -1972
  97. package/dist/urdfTree-CCktg0FK.cjs +0 -1
  98. package/public/obj/model.mtl +0 -42
  99. package/public/obj/model.obj +0 -26110
@@ -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,42 +0,0 @@
1
- # CAD Exchanger 3.24.0 (cadexchanger.com)
2
- # Material Count: 5
3
-
4
- newmtl Material_1
5
- Ns 0.000000
6
- Ka 0.200000 0.200000 0.200000
7
- Kd 0.666667 0.666667 0.666667
8
- Ks 0.000000 0.000000 0.000000
9
- Ke 0.000000 0.000000 0.000000
10
- d 1.000000
11
-
12
- newmtl Material_2
13
- Ns 0.000000
14
- Ka 0.200000 0.200000 0.200000
15
- Kd 0.133333 0.133333 0.133333
16
- Ks 0.000000 0.000000 0.000000
17
- Ke 0.000000 0.000000 0.000000
18
- d 1.000000
19
-
20
- newmtl Material_3
21
- Ns 0.000000
22
- Ka 0.200000 0.200000 0.200000
23
- Kd 0.733333 0.733333 0.733333
24
- Ks 0.000000 0.000000 0.000000
25
- Ke 0.000000 0.000000 0.000000
26
- d 1.000000
27
-
28
- newmtl Material_5
29
- Ns 0.000000
30
- Ka 0.200000 0.200000 0.200000
31
- Kd 0.396078 0.941176 0.450980
32
- Ks 0.000000 0.000000 0.000000
33
- Ke 0.000000 0.000000 0.000000
34
- d 1.000000
35
-
36
- newmtl Material_4
37
- Ns 0.000000
38
- Ka 0.200000 0.200000 0.200000
39
- Kd 1.000000 1.000000 0.000000
40
- Ks 0.000000 0.000000 0.000000
41
- Ke 0.000000 0.000000 0.000000
42
- d 1.000000