ss-component-new 1.3.196 → 1.3.197

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 (96) hide show
  1. package/dist/{MTLLoader-CsYXRfNb.cjs → MTLLoader-D-XnnbNI.cjs} +1 -1
  2. package/dist/{MTLLoader-BHmU038H.js → MTLLoader-efzkcTia.js} +91 -91
  3. package/dist/{OrbitControls-DfluVmF7.cjs → OrbitControls-BD-zExQL.cjs} +1 -1
  4. package/dist/{OrbitControls-Dm3gu5RS.js → OrbitControls-aKRxayxU.js} +4 -4
  5. package/dist/{URDFLoader-CQiLmIoj.cjs → URDFLoader-CfDe7gl1.cjs} +1 -1
  6. package/dist/{URDFLoader-DH1PATWa.js → URDFLoader-NSfcHIwo.js} +68 -68
  7. package/dist/{animationData-ney06MGw.cjs → animationData-CEHj8xu5.cjs} +1 -1
  8. package/dist/{animationData-C5UwV59P.js → animationData-F2ug3_26.js} +8 -8
  9. package/dist/{array-D0dYv6Pt.cjs → array-Dfodt941.cjs} +1 -1
  10. package/dist/{array-WwpS3zzM.js → array-TLwZXVSB.js} +4 -4
  11. package/dist/{iconfont-D3TpAb6N.js → iconfont-Cj067DWS.js} +2 -2
  12. package/dist/{iconfont-7eb0J4CP.cjs → iconfont-mrjQGbVx.cjs} +1 -1
  13. package/dist/{index-DsKFBzwl.js → index-2QEu_HyQ.js} +1 -1
  14. package/dist/index-3oaRxkSV.js +21693 -0
  15. package/dist/{index-Cpjhw1wq.js → index-6159DYws.js} +1 -1
  16. package/dist/{index-QtA9qloQ.cjs → index-B-ix9Bme.cjs} +1 -1
  17. package/dist/{index-BmIKKSMH.js → index-BHBemrIo.js} +18 -18
  18. package/dist/{index-CQqrmZKf.js → index-BOq5Ycnk.js} +2 -2
  19. package/dist/{index-KxHqtYq1.cjs → index-BQaDuUL8.cjs} +1 -1
  20. package/dist/{index-BURtlUk_.js → index-BTxMQ6ql.js} +2 -2
  21. package/dist/{index-Zwhh-QOO.js → index-BV7inJ7d.js} +2 -2
  22. package/dist/{index-7KM5uP7P.js → index-BV_CwnrT.js} +7 -7
  23. package/dist/{index-DNXvpl2R.js → index-BXz-GgA8.js} +16 -16
  24. package/dist/{index-sW9DJpyE.cjs → index-BYmHOllc.cjs} +1 -1
  25. package/dist/{index-MvYFuuhY.cjs → index-BqFlsoeH.cjs} +1 -1
  26. package/dist/{index-Cf0GQDYi.cjs → index-ByzU3XDU.cjs} +1 -1
  27. package/dist/{index-a8_eBCvT.cjs → index-Bz2gyffn.cjs} +1 -1
  28. package/dist/{index-Ccsf9HWo.js → index-C-g2L3s9.js} +3 -3
  29. package/dist/{index-DrnHnuxw.js → index-C2MQxrww.js} +4 -4
  30. package/dist/{index-qUmn9Qf8.cjs → index-C6cOca3U.cjs} +1 -1
  31. package/dist/{index-Dm_n5Tag.cjs → index-CHA8Jkb_.cjs} +1 -1
  32. package/dist/{index-BVglogVt.cjs → index-CMfQjift.cjs} +1 -1
  33. package/dist/{index-C7bJJh2k.cjs → index-COY6wHwh.cjs} +1 -1
  34. package/dist/{index-DprCgbrl.js → index-Ca1iLYNQ.js} +1 -1
  35. package/dist/{index-D2clK2UT.js → index-Cu8oPHKa.js} +5 -5
  36. package/dist/{index-DcqWejmU.cjs → index-DH2g3gCu.cjs} +1 -1
  37. package/dist/{index-Ctr6oS7z.js → index-DKKoy0ht.js} +1 -1
  38. package/dist/{index-CVCJuzlD.cjs → index-DLwT0I9I.cjs} +1 -1
  39. package/dist/{index-CRujATwa.js → index-DQDDvkj_.js} +3 -3
  40. package/dist/{index-DaDiTLkf.cjs → index-DRsRnUhT.cjs} +1 -1
  41. package/dist/{index-CQr_xq77.js → index-DVTBIO4P.js} +1 -1
  42. package/dist/{index-BHbJR89x.js → index-DYzuuDMr.js} +4 -4
  43. package/dist/{index-BSEWSVE6.js → index-DZ6bmJu8.js} +3 -3
  44. package/dist/{index-BiSBPii3.js → index-DfTLoJYR.js} +6 -6
  45. package/dist/{index-bxfksVi5.cjs → index-DiqFDq-a.cjs} +1 -1
  46. package/dist/{index-Dc6Q0f3F.cjs → index-DkcF8gSW.cjs} +6 -6
  47. package/dist/{index-DVNgTio_.js → index-Dl8yjx5i.js} +5 -5
  48. package/dist/index-DrZ1UFml.cjs +25 -0
  49. package/dist/{index-DVM3K2OV.cjs → index-DrZwL26P.cjs} +1 -1
  50. package/dist/{index-_scS4rXU.cjs → index-DrzOwCcL.cjs} +1 -1
  51. package/dist/{index-CGSYEGsN.cjs → index-DvoasFrH.cjs} +1 -1
  52. package/dist/{index-CfXyMoQw.js → index-HoXm451T.js} +114 -121
  53. package/dist/{index-DmEQOxMV.cjs → index-TTzf030H.cjs} +1 -1
  54. package/dist/{index-DKs_UVkM.cjs → index-UYqp5Zll.cjs} +1 -1
  55. package/dist/{index-CmA_S6TZ.cjs → index-UoEdSfLj.cjs} +1 -1
  56. package/dist/{index-c5EqJS0x.js → index-VYtaKutA.js} +2 -2
  57. package/dist/{index-CU1oBG4x.js → index-Wwd-TN0p.js} +1 -1
  58. package/dist/{index-Bs3Q4nYD.cjs → index-XywrnBdG.cjs} +1 -1
  59. package/dist/{index-BrvLpPc7.js → index-_AQ7eyE7.js} +3 -3
  60. package/dist/{index-aglkxQGp.cjs → index-bvLxItIZ.cjs} +1 -1
  61. package/dist/{index-D2V1x7Na.js → index-coptoyDc.js} +4 -4
  62. package/dist/{index-CkzZyzxw.js → index-fyD1An-H.js} +4 -4
  63. package/dist/{index-C01vi7xi.cjs → index-lR6gfp0i.cjs} +1 -1
  64. package/dist/{index-DRoDMWqP.cjs → index-u5iv9Oaz.cjs} +1 -1
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CfRCp-PQ.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D0U-GTQ4.cjs} +372 -372
  66. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BPwTdKD9.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-z1WxcGmx.js} +20498 -20516
  67. package/dist/{isString-DhPkQDQg.cjs → isString-8RLKYbt1.cjs} +1 -1
  68. package/dist/{isString-XTom8ufx.js → isString-BUFvmmHx.js} +1 -1
  69. package/dist/{main-D7WOadsX.cjs → main-B6BtBOnH.cjs} +1 -1
  70. package/dist/{main-BUBkFNQU.js → main-wh_ij5hj.js} +4 -4
  71. package/dist/{menuIndex-I76Siayc.cjs → menuIndex-BmuLDbc_.cjs} +1 -1
  72. package/dist/{menuIndex-tVZCQy59.js → menuIndex-rDu4_tzW.js} +1 -1
  73. package/dist/ss-component.cjs +1 -1
  74. package/dist/ss-component.css +1 -1
  75. package/dist/ss-component.js +11 -11
  76. package/dist/ss-component2.cjs +1 -1
  77. package/dist/ss-component2.js +12 -12
  78. package/dist/{threeModel-DkKWfVwh.js → threeModel-BqZDHs9x.js} +5 -5
  79. package/dist/{threeModel-SLRD4WFx.cjs → threeModel-MnY-R7hg.cjs} +1 -1
  80. package/dist/{threePreview-Dg98xhJ7.js → threePreview-0Qn-hbnC.js} +5 -5
  81. package/dist/{threePreview-CLAakppk.cjs → threePreview-B_Rjjv2L.cjs} +1 -1
  82. package/dist/{threeSceneView-JC4LvZ81.js → threeSceneView-D2MSUuSI.js} +11 -11
  83. package/dist/{threeSceneView-DPVSHXkM.cjs → threeSceneView-DicrNfrX.cjs} +1 -1
  84. package/dist/{threeSceneViewForCPMPIP-Cl5fUfcc.js → threeSceneViewForCPMPIP-5JmoGfIu.js} +9 -9
  85. package/dist/{threeSceneViewForCPMPIP-Ct5OxMjt.cjs → threeSceneViewForCPMPIP-BLpdpX74.cjs} +1 -1
  86. package/dist/{threeTrackPathView-DXXPy3_l.js → threeTrackPathView-BhHctGcC.js} +20 -20
  87. package/dist/{threeTrackPathView-0O_maWXY.cjs → threeTrackPathView-CgfLmSQM.cjs} +1 -1
  88. package/dist/{threeViewerHost-BiqEcnzl.js → threeViewerHost-BegLbbM6.js} +3 -3
  89. package/dist/{threeViewerHost-CvTLvUWS.cjs → threeViewerHost-D0T3gDk2.cjs} +1 -1
  90. package/dist/{urdfTree-Bo87_v6q.cjs → urdfTree-CZhEAUOA.cjs} +1 -1
  91. package/dist/{urdfTree-Bvli7eaL.js → urdfTree-d-eFPae5.js} +1 -1
  92. package/dist/{workpieceTreePanel-Cv4GPCR2.js → workpieceTreePanel-BK_0YreS.js} +37 -37
  93. package/dist/{workpieceTreePanel-r_Z4BMt0.cjs → workpieceTreePanel-D_PwSfcT.cjs} +1 -1
  94. package/package.json +1 -1
  95. package/dist/index-D3RZMHNO.cjs +0 -25
  96. package/dist/index-pHH2PlUC.js +0 -21435
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CfRCp-PQ.cjs");class H extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=new o.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)}},i,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(i(g,a,p))return!1;return!0}function i(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 o.BufferGeometry,A=new Float32Array(l*3*3),V=new Float32Array(l*3*3),S=new o.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,_=v*3*3+(L-1)*3;A[_]=a.getFloat32(R,!0),A[_+1]=a.getFloat32(R+4,!0),A[_+2]=a.getFloat32(R+8,!0),V[_]=O,V[_+1]=U,V[_+2]=P,p&&(S.setRGB(f,m,g,o.SRGBColorSpace),b[_]=S.r,b[_+1]=S.g,b[_+2]=S.b)}}return y.setAttribute("position",new o.BufferAttribute(A,3)),y.setAttribute("normal",new o.BufferAttribute(V,3)),p&&(y.setAttribute("color",new o.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new o.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 o.Vector3;let d,y=0,A=0,V=0;for(;(d=l.exec(n))!==null;){A=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++,V++;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=A,O=V-A;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new o.Float32BufferAttribute(w,3)),a.setAttribute("normal",new o.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))}}const N=/^[og]\s*(.+)?/,W=/^mtllib /,q=/^usemtl /,J=/^usemap /,G=/\s+/,T=new o.Vector3,z=new o.Vector3,D=new o.Vector3,E=new o.Vector3,C=new o.Vector3,I=new o.Color;function Z(){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 i=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}},i&&i.name&&typeof i.clone=="function"){const e=i.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 i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseNormalIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseUVIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/2)*2},addVertex:function(t,s,i){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[i+0],e[i+1],e[i+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,i){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[i+0],e[i+1],e[i+2])},addFaceNormal:function(t,s,i){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,i),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,i){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[i]!==void 0&&r.push(e[i+0],e[i+1],e[i+2])},addUV:function(t,s,i){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[i+0],e[i+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,i,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(i,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 i=0,e=t.length;i<e;i++){const r=this.parseVertexIndex(t[i],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const i=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],i));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class X extends o.Loader{constructor(t){super(t),this.materials=null}load(t,s,i,e){const r=this,u=new o.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)}},i,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new Z;t.indexOf(`\r
1
+ "use strict";const o=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D0U-GTQ4.cjs");class H extends o.Loader{constructor(t){super(t)}load(t,s,i,e){const r=this,u=new o.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)}},i,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(i(g,a,p))return!1;return!0}function i(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 o.BufferGeometry,A=new Float32Array(l*3*3),V=new Float32Array(l*3*3),S=new o.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,_=v*3*3+(L-1)*3;A[_]=a.getFloat32(R,!0),A[_+1]=a.getFloat32(R+4,!0),A[_+2]=a.getFloat32(R+8,!0),V[_]=O,V[_+1]=U,V[_+2]=P,p&&(S.setRGB(f,m,g,o.SRGBColorSpace),b[_]=S.r,b[_+1]=S.g,b[_+2]=S.b)}}return y.setAttribute("position",new o.BufferAttribute(A,3)),y.setAttribute("normal",new o.BufferAttribute(V,3)),p&&(y.setAttribute("color",new o.BufferAttribute(b,3)),y.hasColors=!0,y.alpha=F),y}function r(n){const a=new o.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 o.Vector3;let d,y=0,A=0,V=0;for(;(d=l.exec(n))!==null;){A=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++,V++;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=A,O=V-A;a.userData.groupNames=F,a.addGroup(k,O,y),y++}return a.setAttribute("position",new o.Float32BufferAttribute(w,3)),a.setAttribute("normal",new o.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))}}const N=/^[og]\s*(.+)?/,W=/^mtllib /,q=/^usemtl /,J=/^usemap /,G=/\s+/,T=new o.Vector3,z=new o.Vector3,D=new o.Vector3,E=new o.Vector3,C=new o.Vector3,I=new o.Color;function Z(){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 i=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}},i&&i.name&&typeof i.clone=="function"){const e=i.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 i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseNormalIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/3)*3},parseUVIndex:function(t,s){const i=parseInt(t,10);return(i>=0?i-1:i+s/2)*2},addVertex:function(t,s,i){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[i+0],e[i+1],e[i+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,i){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[i+0],e[i+1],e[i+2])},addFaceNormal:function(t,s,i){const e=this.vertices,r=this.object.geometry.normals;T.fromArray(e,t),z.fromArray(e,s),D.fromArray(e,i),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,i){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[i]!==void 0&&r.push(e[i+0],e[i+1],e[i+2])},addUV:function(t,s,i){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[i+0],e[i+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,i,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(i,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 i=0,e=t.length;i<e;i++){const r=this.parseVertexIndex(t[i],s);this.addVertexPoint(r),this.addColor(r)}},addLineGeometry:function(t,s){this.object.geometry.type="Line";const i=this.vertices.length,e=this.uvs.length;for(let r=0,u=t.length;r<u;r++)this.addVertexLine(this.parseVertexIndex(t[r],i));for(let r=0,u=s.length;r<u;r++)this.addUVLine(this.parseUVIndex(s[r],e))}};return B.startObject("",!1),B}class X extends o.Loader{constructor(t){super(t),this.materials=null}load(t,s,i,e){const r=this,u=new o.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)}},i,e)}setMaterials(t){return this.materials=t,this}parse(t){const s=new Z;t.indexOf(`\r
2
2
  `)!==-1&&(t=t.replace(/\r\n/g,`
3
3
  `)),t.indexOf(`\\
4
4
  `)!==-1&&(t=t.replace(/\\\n/g,""));const i=t.split(`
@@ -1,4 +1,4 @@
1
- import { ab as Z, ac as K, O as D, C as P, j as S, ai as H, V as O, ad as A, K as ie, aj as N, bi as X, af as B, t as ne, bm as Y, ag as W, p as $, aZ as ae, al as oe, bf as le, bz as q, a$ as Q, bL as ce, b6 as he } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BPwTdKD9.js";
1
+ import { ab as Z, ac as K, O as D, C as P, j as S, ai as H, V as O, ad as V, K as ie, aj as N, bj as X, af as B, t as ne, bn as Y, ag as W, p as Q, a_ as oe, al as ae, bg as le, bA as q, b0 as $, bM as ce, b7 as he } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-z1WxcGmx.js";
2
2
  class xe extends Z {
3
3
  /**
4
4
  * Constructs a new STL loader.
@@ -35,69 +35,69 @@ class xe extends Z {
35
35
  */
36
36
  parse(t) {
37
37
  function s(n) {
38
- const a = new DataView(n), o = 32 / 8 * 3 + 32 / 8 * 3 * 3 + 16 / 8, u = a.getUint32(80, !0);
39
- if (80 + 32 / 8 + u * o === a.byteLength)
38
+ const o = new DataView(n), a = 32 / 8 * 3 + 32 / 8 * 3 * 3 + 16 / 8, u = o.getUint32(80, !0);
39
+ if (80 + 32 / 8 + u * a === o.byteLength)
40
40
  return !0;
41
41
  const m = [115, 111, 108, 105, 100];
42
42
  for (let p = 0; p < 5; p++)
43
- if (i(m, a, p)) return !1;
43
+ if (i(m, o, p)) return !1;
44
44
  return !0;
45
45
  }
46
- function i(n, a, o) {
46
+ function i(n, o, a) {
47
47
  for (let u = 0, d = n.length; u < d; u++)
48
- if (n[u] !== a.getUint8(o + u)) return !1;
48
+ if (n[u] !== o.getUint8(a + u)) return !1;
49
49
  return !0;
50
50
  }
51
51
  function e(n) {
52
- const a = new DataView(n), o = a.getUint32(80, !0);
52
+ const o = new DataView(n), a = o.getUint32(80, !0);
53
53
  let u, d, m, p = !1, g, b, x, C, v;
54
54
  for (let y = 0; y < 70; y++)
55
- a.getUint32(y, !1) == 1129270351 && a.getUint8(y + 4) == 82 && a.getUint8(y + 5) == 61 && (p = !0, g = new Float32Array(o * 3 * 3), b = a.getUint8(y + 6) / 255, x = a.getUint8(y + 7) / 255, C = a.getUint8(y + 8) / 255, v = a.getUint8(y + 9) / 255);
56
- const j = 84, f = 12 * 4 + 2, w = new D(), V = new Float32Array(o * 3 * 3), _ = new Float32Array(o * 3 * 3), k = new P();
57
- for (let y = 0; y < o; y++) {
58
- const U = j + y * f, E = a.getFloat32(U, !0), z = a.getFloat32(U + 4, !0), T = a.getFloat32(U + 8, !0);
55
+ o.getUint32(y, !1) == 1129270351 && o.getUint8(y + 4) == 82 && o.getUint8(y + 5) == 61 && (p = !0, g = new Float32Array(a * 3 * 3), b = o.getUint8(y + 6) / 255, x = o.getUint8(y + 7) / 255, C = o.getUint8(y + 8) / 255, v = o.getUint8(y + 9) / 255);
56
+ const L = 84, f = 12 * 4 + 2, w = new D(), _ = new Float32Array(a * 3 * 3), A = new Float32Array(a * 3 * 3), k = new P();
57
+ for (let y = 0; y < a; y++) {
58
+ const U = L + y * f, E = o.getFloat32(U, !0), z = o.getFloat32(U + 4, !0), T = o.getFloat32(U + 8, !0);
59
59
  if (p) {
60
- const F = a.getUint16(U + 48, !0);
60
+ const F = o.getUint16(U + 48, !0);
61
61
  (F & 32768) === 0 ? (u = (F & 31) / 31, d = (F >> 5 & 31) / 31, m = (F >> 10 & 31) / 31) : (u = b, d = x, m = C);
62
62
  }
63
63
  for (let F = 1; F <= 3; F++) {
64
64
  const G = U + F * 12, M = y * 3 * 3 + (F - 1) * 3;
65
- V[M] = a.getFloat32(G, !0), V[M + 1] = a.getFloat32(G + 4, !0), V[M + 2] = a.getFloat32(G + 8, !0), _[M] = E, _[M + 1] = z, _[M + 2] = T, p && (k.setRGB(u, d, m, S), g[M] = k.r, g[M + 1] = k.g, g[M + 2] = k.b);
65
+ _[M] = o.getFloat32(G, !0), _[M + 1] = o.getFloat32(G + 4, !0), _[M + 2] = o.getFloat32(G + 8, !0), A[M] = E, A[M + 1] = z, A[M + 2] = T, p && (k.setRGB(u, d, m, S), g[M] = k.r, g[M + 1] = k.g, g[M + 2] = k.b);
66
66
  }
67
67
  }
68
- return w.setAttribute("position", new H(V, 3)), w.setAttribute("normal", new H(_, 3)), p && (w.setAttribute("color", new H(g, 3)), w.hasColors = !0, w.alpha = v), w;
68
+ return w.setAttribute("position", new H(_, 3)), w.setAttribute("normal", new H(A, 3)), p && (w.setAttribute("color", new H(g, 3)), w.hasColors = !0, w.alpha = v), w;
69
69
  }
70
70
  function r(n) {
71
- const a = new D(), o = /solid([\s\S]*?)endsolid/g, u = /facet([\s\S]*?)endfacet/g, d = /solid\s(.+)/;
71
+ const o = new D(), a = /solid([\s\S]*?)endsolid/g, u = /facet([\s\S]*?)endfacet/g, d = /solid\s(.+)/;
72
72
  let m = 0;
73
- const p = /[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source, g = new RegExp("vertex" + p + p + p, "g"), b = new RegExp("normal" + p + p + p, "g"), x = [], C = [], v = [], j = new O();
74
- let f, w = 0, V = 0, _ = 0;
75
- for (; (f = o.exec(n)) !== null; ) {
76
- V = _;
73
+ const p = /[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source, g = new RegExp("vertex" + p + p + p, "g"), b = new RegExp("normal" + p + p + p, "g"), x = [], C = [], v = [], L = new O();
74
+ let f, w = 0, _ = 0, A = 0;
75
+ for (; (f = a.exec(n)) !== null; ) {
76
+ _ = A;
77
77
  const k = f[0], y = (f = d.exec(k)) !== null ? f[1] : "";
78
78
  for (v.push(y); (f = u.exec(k)) !== null; ) {
79
79
  let z = 0, T = 0;
80
80
  const F = f[0];
81
81
  for (; (f = b.exec(F)) !== null; )
82
- j.x = parseFloat(f[1]), j.y = parseFloat(f[2]), j.z = parseFloat(f[3]), T++;
82
+ L.x = parseFloat(f[1]), L.y = parseFloat(f[2]), L.z = parseFloat(f[3]), T++;
83
83
  for (; (f = g.exec(F)) !== null; )
84
- x.push(parseFloat(f[1]), parseFloat(f[2]), parseFloat(f[3])), C.push(j.x, j.y, j.z), z++, _++;
84
+ x.push(parseFloat(f[1]), parseFloat(f[2]), parseFloat(f[3])), C.push(L.x, L.y, L.z), z++, A++;
85
85
  T !== 1 && console.error("THREE.STLLoader: Something isn't right with the normal of face number " + m), z !== 3 && console.error("THREE.STLLoader: Something isn't right with the vertices of face number " + m), m++;
86
86
  }
87
- const U = V, E = _ - V;
88
- a.userData.groupNames = v, a.addGroup(U, E, w), w++;
87
+ const U = _, E = A - _;
88
+ o.userData.groupNames = v, o.addGroup(U, E, w), w++;
89
89
  }
90
- return a.setAttribute("position", new A(x, 3)), a.setAttribute("normal", new A(C, 3)), a;
90
+ return o.setAttribute("position", new V(x, 3)), o.setAttribute("normal", new V(C, 3)), o;
91
91
  }
92
92
  function c(n) {
93
93
  return typeof n != "string" ? new TextDecoder().decode(n) : n;
94
94
  }
95
95
  function h(n) {
96
96
  if (typeof n == "string") {
97
- const a = new Uint8Array(n.length);
98
- for (let o = 0; o < n.length; o++)
99
- a[o] = n.charCodeAt(o) & 255;
100
- return a.buffer || a;
97
+ const o = new Uint8Array(n.length);
98
+ for (let a = 0; a < n.length; a++)
99
+ o[a] = n.charCodeAt(a) & 255;
100
+ return o.buffer || o;
101
101
  } else
102
102
  return n;
103
103
  }
@@ -105,7 +105,7 @@ class xe extends Z {
105
105
  return s(l) ? e(l) : r(c(t));
106
106
  }
107
107
  }
108
- const ue = /^[og]\s*(.+)?/, pe = /^mtllib /, fe = /^usemtl /, de = /^usemap /, ee = /\s+/, te = new O(), J = new O(), se = new O(), re = new O(), L = new O(), R = new P();
108
+ const ue = /^[og]\s*(.+)?/, pe = /^mtllib /, fe = /^usemtl /, de = /^usemap /, ee = /\s+/, te = new O(), J = new O(), se = new O(), re = new O(), j = new O(), R = new P();
109
109
  function me() {
110
110
  const I = {
111
111
  objects: [],
@@ -215,7 +215,7 @@ function me() {
215
215
  },
216
216
  addFaceNormal: function(t, s, i) {
217
217
  const e = this.vertices, r = this.object.geometry.normals;
218
- te.fromArray(e, t), J.fromArray(e, s), se.fromArray(e, i), L.subVectors(se, J), re.subVectors(te, J), L.cross(re), L.normalize(), r.push(L.x, L.y, L.z), r.push(L.x, L.y, L.z), r.push(L.x, L.y, L.z);
218
+ te.fromArray(e, t), J.fromArray(e, s), se.fromArray(e, i), j.subVectors(se, J), re.subVectors(te, J), j.cross(re), j.normalize(), r.push(j.x, j.y, j.z), r.push(j.x, j.y, j.z), r.push(j.x, j.y, j.z);
219
219
  },
220
220
  addColor: function(t, s, i) {
221
221
  const e = this.colors, r = this.object.geometry.colors;
@@ -234,16 +234,16 @@ function me() {
234
234
  this.object.geometry.uvs.push(s[t + 0], s[t + 1]);
235
235
  },
236
236
  addFace: function(t, s, i, e, r, c, h, l, n) {
237
- const a = this.vertices.length;
238
- let o = this.parseVertexIndex(t, a), u = this.parseVertexIndex(s, a), d = this.parseVertexIndex(i, a);
239
- if (this.addVertex(o, u, d), this.addColor(o, u, d), h !== void 0 && h !== "") {
237
+ const o = this.vertices.length;
238
+ let a = this.parseVertexIndex(t, o), u = this.parseVertexIndex(s, o), d = this.parseVertexIndex(i, o);
239
+ if (this.addVertex(a, u, d), this.addColor(a, u, d), h !== void 0 && h !== "") {
240
240
  const m = this.normals.length;
241
- o = this.parseNormalIndex(h, m), u = this.parseNormalIndex(l, m), d = this.parseNormalIndex(n, m), this.addNormal(o, u, d);
241
+ a = this.parseNormalIndex(h, m), u = this.parseNormalIndex(l, m), d = this.parseNormalIndex(n, m), this.addNormal(a, u, d);
242
242
  } else
243
- this.addFaceNormal(o, u, d);
243
+ this.addFaceNormal(a, u, d);
244
244
  if (e !== void 0 && e !== "") {
245
245
  const m = this.uvs.length;
246
- o = this.parseUVIndex(e, m), u = this.parseUVIndex(r, m), d = this.parseUVIndex(c, m), this.addUV(o, u, d), this.object.geometry.hasUVIndices = !0;
246
+ a = this.parseUVIndex(e, m), u = this.parseUVIndex(r, m), d = this.parseUVIndex(c, m), this.addUV(a, u, d), this.object.geometry.hasUVIndices = !0;
247
247
  } else
248
248
  this.addDefaultUV();
249
249
  },
@@ -321,38 +321,38 @@ class we extends Z {
321
321
  for (let h = 0, l = i.length; h < l; h++) {
322
322
  const n = i[h].trimStart();
323
323
  if (n.length === 0) continue;
324
- const a = n.charAt(0);
325
- if (a !== "#")
326
- if (a === "v") {
327
- const o = n.split(ee);
328
- switch (o[0]) {
324
+ const o = n.charAt(0);
325
+ if (o !== "#")
326
+ if (o === "v") {
327
+ const a = n.split(ee);
328
+ switch (a[0]) {
329
329
  case "v":
330
330
  s.vertices.push(
331
- parseFloat(o[1]),
332
- parseFloat(o[2]),
333
- parseFloat(o[3])
334
- ), o.length >= 7 ? (R.setRGB(
335
- parseFloat(o[4]),
336
- parseFloat(o[5]),
337
- parseFloat(o[6]),
331
+ parseFloat(a[1]),
332
+ parseFloat(a[2]),
333
+ parseFloat(a[3])
334
+ ), a.length >= 7 ? (R.setRGB(
335
+ parseFloat(a[4]),
336
+ parseFloat(a[5]),
337
+ parseFloat(a[6]),
338
338
  S
339
339
  ), s.colors.push(R.r, R.g, R.b)) : s.colors.push(void 0, void 0, void 0);
340
340
  break;
341
341
  case "vn":
342
342
  s.normals.push(
343
- parseFloat(o[1]),
344
- parseFloat(o[2]),
345
- parseFloat(o[3])
343
+ parseFloat(a[1]),
344
+ parseFloat(a[2]),
345
+ parseFloat(a[3])
346
346
  );
347
347
  break;
348
348
  case "vt":
349
349
  s.uvs.push(
350
- parseFloat(o[1]),
351
- parseFloat(o[2])
350
+ parseFloat(a[1]),
351
+ parseFloat(a[2])
352
352
  );
353
353
  break;
354
354
  }
355
- } else if (a === "f") {
355
+ } else if (o === "f") {
356
356
  const u = n.slice(1).trim().split(ee), d = [];
357
357
  for (let p = 0, g = u.length; p < g; p++) {
358
358
  const b = u[p];
@@ -376,38 +376,38 @@ class we extends Z {
376
376
  x[2]
377
377
  );
378
378
  }
379
- } else if (a === "l") {
380
- const o = n.substring(1).trim().split(" ");
379
+ } else if (o === "l") {
380
+ const a = n.substring(1).trim().split(" ");
381
381
  let u = [];
382
382
  const d = [];
383
383
  if (n.indexOf("/") === -1)
384
- u = o;
384
+ u = a;
385
385
  else
386
- for (let m = 0, p = o.length; m < p; m++) {
387
- const g = o[m].split("/");
386
+ for (let m = 0, p = a.length; m < p; m++) {
387
+ const g = a[m].split("/");
388
388
  g[0] !== "" && u.push(g[0]), g[1] !== "" && d.push(g[1]);
389
389
  }
390
390
  s.addLineGeometry(u, d);
391
- } else if (a === "p") {
391
+ } else if (o === "p") {
392
392
  const u = n.slice(1).trim().split(" ");
393
393
  s.addPointGeometry(u);
394
394
  } else if ((e = ue.exec(n)) !== null) {
395
- const o = (" " + e[0].slice(1).trim()).slice(1);
396
- s.startObject(o);
395
+ const a = (" " + e[0].slice(1).trim()).slice(1);
396
+ s.startObject(a);
397
397
  } else if (fe.test(n))
398
398
  s.object.startMaterial(n.substring(7).trim(), s.materialLibraries);
399
399
  else if (pe.test(n))
400
400
  s.materialLibraries.push(n.substring(7).trim());
401
401
  else if (de.test(n))
402
402
  console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
403
- else if (a === "s") {
403
+ else if (o === "s") {
404
404
  if (e = n.split(" "), e.length > 1) {
405
405
  const u = e[1].trim().toLowerCase();
406
406
  s.object.smooth = u !== "0" && u !== "off";
407
407
  } else
408
408
  s.object.smooth = !0;
409
- const o = s.object.currentMaterial();
410
- o && (o.smooth = s.object.smooth);
409
+ const a = s.object.currentMaterial();
410
+ a && (a.smooth = s.object.smooth);
411
411
  } else {
412
412
  if (n === "\0") continue;
413
413
  console.warn('THREE.OBJLoader: Unexpected line: "' + n + '"');
@@ -417,15 +417,15 @@ class we extends Z {
417
417
  const r = new ie();
418
418
  if (r.materialLibraries = [].concat(s.materialLibraries), !(s.objects.length === 1 && s.objects[0].geometry.vertices.length === 0) === !0)
419
419
  for (let h = 0, l = s.objects.length; h < l; h++) {
420
- const n = s.objects[h], a = n.geometry, o = n.materials, u = a.type === "Line", d = a.type === "Points";
420
+ const n = s.objects[h], o = n.geometry, a = n.materials, u = o.type === "Line", d = o.type === "Points";
421
421
  let m = !1;
422
- if (a.vertices.length === 0) continue;
422
+ if (o.vertices.length === 0) continue;
423
423
  const p = new D();
424
- p.setAttribute("position", new A(a.vertices, 3)), a.normals.length > 0 && p.setAttribute("normal", new A(a.normals, 3)), a.colors.length > 0 && (m = !0, p.setAttribute("color", new A(a.colors, 3))), a.hasUVIndices === !0 && p.setAttribute("uv", new A(a.uvs, 2));
424
+ p.setAttribute("position", new V(o.vertices, 3)), o.normals.length > 0 && p.setAttribute("normal", new V(o.normals, 3)), o.colors.length > 0 && (m = !0, p.setAttribute("color", new V(o.colors, 3))), o.hasUVIndices === !0 && p.setAttribute("uv", new V(o.uvs, 2));
425
425
  const g = [];
426
- for (let x = 0, C = o.length; x < C; x++) {
427
- const v = o[x], j = v.name + "_" + v.smooth + "_" + m;
428
- let f = s.materials[j];
426
+ for (let x = 0, C = a.length; x < C; x++) {
427
+ const v = a[x], L = v.name + "_" + v.smooth + "_" + m;
428
+ let f = s.materials[L];
429
429
  if (this.materials !== null) {
430
430
  if (f = this.materials.create(v.name), u && f && !(f instanceof N)) {
431
431
  const w = new N();
@@ -435,22 +435,22 @@ class we extends Z {
435
435
  X.prototype.copy.call(w, f), w.color.copy(f.color), w.map = f.map, f = w;
436
436
  }
437
437
  }
438
- f === void 0 && (u ? f = new N() : d ? f = new B({ size: 1, sizeAttenuation: !1 }) : f = new ne(), f.name = v.name, f.flatShading = !v.smooth, f.vertexColors = m, s.materials[j] = f), g.push(f);
438
+ f === void 0 && (u ? f = new N() : d ? f = new B({ size: 1, sizeAttenuation: !1 }) : f = new ne(), f.name = v.name, f.flatShading = !v.smooth, f.vertexColors = m, s.materials[L] = f), g.push(f);
439
439
  }
440
440
  let b;
441
441
  if (g.length > 1) {
442
- for (let x = 0, C = o.length; x < C; x++) {
443
- const v = o[x];
442
+ for (let x = 0, C = a.length; x < C; x++) {
443
+ const v = a[x];
444
444
  p.addGroup(v.groupStart, v.groupCount, x);
445
445
  }
446
- u ? b = new Y(p, g) : d ? b = new W(p, g) : b = new $(p, g);
446
+ u ? b = new Y(p, g) : d ? b = new W(p, g) : b = new Q(p, g);
447
447
  } else
448
- u ? b = new Y(p, g[0]) : d ? b = new W(p, g[0]) : b = new $(p, g[0]);
448
+ u ? b = new Y(p, g[0]) : d ? b = new W(p, g[0]) : b = new Q(p, g[0]);
449
449
  b.name = n.name, r.add(b);
450
450
  }
451
451
  else if (s.vertices.length > 0) {
452
452
  const h = new B({ size: 1, sizeAttenuation: !1 }), l = new D();
453
- l.setAttribute("position", new A(s.vertices, 3)), s.colors.length > 0 && s.colors[0] !== void 0 && (l.setAttribute("color", new A(s.colors, 3)), h.vertexColors = !0);
453
+ l.setAttribute("position", new V(s.vertices, 3)), s.colors.length > 0 && s.colors[0] !== void 0 && (l.setAttribute("color", new V(s.colors, 3)), h.vertexColors = !0);
454
454
  const n = new W(l, h);
455
455
  r.add(n);
456
456
  }
@@ -471,7 +471,7 @@ class ye extends Z {
471
471
  * @param {onErrorCallback} onError - Executed when errors occur.
472
472
  */
473
473
  load(t, s, i, e) {
474
- const r = this, c = this.path === "" ? ae.extractUrlBase(t) : this.path, h = new K(this.manager);
474
+ const r = this, c = this.path === "" ? oe.extractUrlBase(t) : this.path, h = new K(this.manager);
475
475
  h.setPath(this.path), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(t, function(l) {
476
476
  try {
477
477
  s(r.parse(l, c));
@@ -505,17 +505,17 @@ class ye extends Z {
505
505
  let n = i[l];
506
506
  if (n = n.trim(), n.length === 0 || n.charAt(0) === "#")
507
507
  continue;
508
- const a = n.indexOf(" ");
509
- let o = a >= 0 ? n.substring(0, a) : n;
510
- o = o.toLowerCase();
511
- let u = a >= 0 ? n.substring(a + 1) : "";
512
- if (u = u.trim(), o === "newmtl")
508
+ const o = n.indexOf(" ");
509
+ let a = o >= 0 ? n.substring(0, o) : n;
510
+ a = a.toLowerCase();
511
+ let u = o >= 0 ? n.substring(o + 1) : "";
512
+ if (u = u.trim(), a === "newmtl")
513
513
  e = { name: u }, c[u] = e;
514
- else if (o === "ka" || o === "kd" || o === "ks" || o === "ke") {
514
+ else if (a === "ka" || a === "kd" || a === "ks" || a === "ke") {
515
515
  const d = u.split(r, 3);
516
- e[o] = [parseFloat(d[0]), parseFloat(d[1]), parseFloat(d[2])];
516
+ e[a] = [parseFloat(d[0]), parseFloat(d[1]), parseFloat(d[2])];
517
517
  } else
518
- e[o] = u;
518
+ e[a] = u;
519
519
  }
520
520
  const h = new ge(this.resourcePath || s, this.materialOptions);
521
521
  return h.setCrossOrigin(this.crossOrigin), h.setManager(this.manager), h.setMaterials(c), h;
@@ -523,7 +523,7 @@ class ye extends Z {
523
523
  }
524
524
  class ge {
525
525
  constructor(t = "", s = {}) {
526
- 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 : oe, this.wrap = this.options.wrap !== void 0 ? this.options.wrap : le;
526
+ 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 : ae, this.wrap = this.options.wrap !== void 0 ? this.options.wrap : le;
527
527
  }
528
528
  setCrossOrigin(t) {
529
529
  return this.crossOrigin = t, this;
@@ -581,8 +581,8 @@ class ge {
581
581
  }
582
582
  function c(h, l) {
583
583
  if (e[h]) return;
584
- const n = s.getTextureParams(l, e), a = s.loadTexture(r(s.baseUrl, n.url));
585
- a.repeat.copy(n.scale), a.offset.copy(n.offset), a.wrapS = s.wrap, a.wrapT = s.wrap, (h === "map" || h === "emissiveMap") && (a.colorSpace = S), e[h] = a;
584
+ const n = s.getTextureParams(l, e), o = s.loadTexture(r(s.baseUrl, n.url));
585
+ o.repeat.copy(n.scale), o.offset.copy(n.offset), o.wrapS = s.wrap, o.wrapT = s.wrap, (h === "map" || h === "emissiveMap") && (o.colorSpace = S), e[h] = o;
586
586
  }
587
587
  for (const h in i) {
588
588
  const l = i[h];
@@ -636,8 +636,8 @@ class ge {
636
636
  }
637
637
  getTextureParams(t, s) {
638
638
  const i = {
639
- scale: new Q(1, 1),
640
- offset: new Q(0, 0)
639
+ scale: new $(1, 1),
640
+ offset: new $(0, 0)
641
641
  }, e = t.split(/\s+/);
642
642
  let r;
643
643
  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 && (i.scale.set(parseFloat(e[r + 1]), parseFloat(e[r + 2])), e.splice(r, 4)), r = e.indexOf("-o"), r >= 0 && (i.offset.set(parseFloat(e[r + 1]), parseFloat(e[r + 2])), e.splice(r, 4)), i.url = e.join(" ").trim(), i;
@@ -1 +1 @@
1
- "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CfRCp-PQ.cjs"),y={type:"change"},m={type:"start"},g={type:"end"},_=new s.Ray,b=new s.Plane,E=Math.cos(70*s.MathUtils.DEG2RAD),h=new s.Vector3,l=2*Math.PI,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u=1e-6;class P extends s.Controls{constructor(t,e=null){super(t,e),this.state=a.NONE,this.target=new s.Vector3,this.cursor=new s.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new s.Vector3,this._lastQuaternion=new s.Quaternion,this._lastTargetPosition=new s.Vector3,this._quat=new s.Quaternion().setFromUnitVectors(t.up,new s.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new s.Spherical,this._sphericalDelta=new s.Spherical,this._scale=1,this._panOffset=new s.Vector3,this._rotateStart=new s.Vector2,this._rotateEnd=new s.Vector2,this._rotateDelta=new s.Vector2,this._panStart=new s.Vector2,this._panEnd=new s.Vector2,this._panDelta=new s.Vector2,this._dollyStart=new s.Vector2,this._dollyEnd=new s.Vector2,this._dollyDelta=new s.Vector2,this._dollyDirection=new s.Vector3,this._mouse=new s.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=D.bind(this),this._onPointerDown=T.bind(this),this._onPointerUp=M.bind(this),this._onContextMenu=L.bind(this),this._onMouseWheel=w.bind(this),this._onKeyDown=R.bind(this),this._onTouchStart=j.bind(this),this._onTouchMove=A.bind(this),this._onMouseDown=S.bind(this),this._onMouseMove=O.bind(this),this._interceptControlDown=C.bind(this),this._interceptControlUp=x.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(y),this.update(),this.state=a.NONE}update(t=null){const e=this.object.position;h.copy(e).sub(this.target),h.applyQuaternion(this._quat),this._spherical.setFromVector3(h),this.autoRotate&&this.state===a.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let o=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(o)&&isFinite(n)&&(o<-Math.PI?o+=l:o>Math.PI&&(o-=l),n<-Math.PI?n+=l:n>Math.PI&&(n-=l),o<=n?this._spherical.theta=Math.max(o,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+n)/2?Math.max(o,this._spherical.theta):Math.min(n,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const c=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=c!=this._spherical.radius}if(h.setFromSpherical(this._spherical),h.applyQuaternion(this._quatInverse),e.copy(this.target).add(h),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let c=null;if(this.object.isPerspectiveCamera){const p=h.length();c=this._clampDistance(p*this._scale);const d=p-c;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),r=!!d}else if(this.object.isOrthographicCamera){const p=new s.Vector3(this._mouse.x,this._mouse.y,0);p.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=d!==this.object.zoom;const f=new s.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(p),this.object.updateMatrixWorld(),c=h.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;c!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(c).add(this.object.position):(_.origin.copy(this.object.position),_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(_.direction))<E?this.object.lookAt(this.target):(b.setFromNormalAndCoplanarPoint(this.object.up,this.target),_.intersectPlane(b,this.target))))}else if(this.object.isOrthographicCamera){const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),c!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>u||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u||this._lastTargetPosition.distanceToSquared(this.target)>u?(this.dispatchEvent(y),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?l/60*this.autoRotateSpeed*t:l/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){h.setFromMatrixColumn(e,0),h.multiplyScalar(-t),this._panOffset.add(h)}_panUp(t,e){this.screenSpacePanning===!0?h.setFromMatrixColumn(e,1):(h.setFromMatrixColumn(e,0),h.crossVectors(this.object.up,h)),h.multiplyScalar(t),this._panOffset.add(h)}_pan(t,e){const o=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;h.copy(n).sub(this.target);let r=h.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/o.clientHeight,this.object.matrix),this._panUp(2*e*r/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),n=t-o.left,r=e-o.top,c=o.width,p=o.height;this._mouse.x=n/c*2-1,this._mouse.y=-(r/p)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._rotateStart.set(o,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panStart.set(o,n)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),r=.5*(t.pageY+o.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panEnd.set(o,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const c=(t.pageX+e.x)*.5,p=(t.pageY+e.y)*.5;this._updateZoomParameters(c,p)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new s.Vector2,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,o={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function T(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function D(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function M(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(g),this.state=a.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function S(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function O(i){switch(this.state){case a.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case a.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case a.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function w(i){this.enabled===!1||this.enableZoom===!1||this.state!==a.NONE||(i.preventDefault(),this.dispatchEvent(m),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(g))}function R(i){this.enabled!==!1&&this._handleKeyDown(i)}function j(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function A(i){switch(this._trackPointer(i),this.state){case a.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case a.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case a.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=a.NONE}}function L(i){this.enabled!==!1&&i.preventDefault()}function C(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function x(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}exports.OrbitControls=P;
1
+ "use strict";const s=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-D0U-GTQ4.cjs"),y={type:"change"},m={type:"start"},g={type:"end"},_=new s.Ray,b=new s.Plane,E=Math.cos(70*s.MathUtils.DEG2RAD),h=new s.Vector3,l=2*Math.PI,a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},u=1e-6;class P extends s.Controls{constructor(t,e=null){super(t,e),this.state=a.NONE,this.target=new s.Vector3,this.cursor=new s.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new s.Vector3,this._lastQuaternion=new s.Quaternion,this._lastTargetPosition=new s.Vector3,this._quat=new s.Quaternion().setFromUnitVectors(t.up,new s.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new s.Spherical,this._sphericalDelta=new s.Spherical,this._scale=1,this._panOffset=new s.Vector3,this._rotateStart=new s.Vector2,this._rotateEnd=new s.Vector2,this._rotateDelta=new s.Vector2,this._panStart=new s.Vector2,this._panEnd=new s.Vector2,this._panDelta=new s.Vector2,this._dollyStart=new s.Vector2,this._dollyEnd=new s.Vector2,this._dollyDelta=new s.Vector2,this._dollyDirection=new s.Vector3,this._mouse=new s.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=D.bind(this),this._onPointerDown=T.bind(this),this._onPointerUp=M.bind(this),this._onContextMenu=L.bind(this),this._onMouseWheel=w.bind(this),this._onKeyDown=R.bind(this),this._onTouchStart=j.bind(this),this._onTouchMove=A.bind(this),this._onMouseDown=S.bind(this),this._onMouseMove=O.bind(this),this._interceptControlDown=C.bind(this),this._interceptControlUp=x.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(y),this.update(),this.state=a.NONE}update(t=null){const e=this.object.position;h.copy(e).sub(this.target),h.applyQuaternion(this._quat),this._spherical.setFromVector3(h),this.autoRotate&&this.state===a.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let o=this.minAzimuthAngle,n=this.maxAzimuthAngle;isFinite(o)&&isFinite(n)&&(o<-Math.PI?o+=l:o>Math.PI&&(o-=l),n<-Math.PI?n+=l:n>Math.PI&&(n-=l),o<=n?this._spherical.theta=Math.max(o,Math.min(n,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(o+n)/2?Math.max(o,this._spherical.theta):Math.min(n,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const c=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=c!=this._spherical.radius}if(h.setFromSpherical(this._spherical),h.applyQuaternion(this._quatInverse),e.copy(this.target).add(h),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let c=null;if(this.object.isPerspectiveCamera){const p=h.length();c=this._clampDistance(p*this._scale);const d=p-c;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),r=!!d}else if(this.object.isOrthographicCamera){const p=new s.Vector3(this._mouse.x,this._mouse.y,0);p.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=d!==this.object.zoom;const f=new s.Vector3(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(p),this.object.updateMatrixWorld(),c=h.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;c!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(c).add(this.object.position):(_.origin.copy(this.object.position),_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(_.direction))<E?this.object.lookAt(this.target):(b.setFromNormalAndCoplanarPoint(this.object.up,this.target),_.intersectPlane(b,this.target))))}else if(this.object.isOrthographicCamera){const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),c!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>u||8*(1-this._lastQuaternion.dot(this.object.quaternion))>u||this._lastTargetPosition.distanceToSquared(this.target)>u?(this.dispatchEvent(y),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?l/60*this.autoRotateSpeed*t:l/60/60*this.autoRotateSpeed}_getZoomScale(t){const e=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*e)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,e){h.setFromMatrixColumn(e,0),h.multiplyScalar(-t),this._panOffset.add(h)}_panUp(t,e){this.screenSpacePanning===!0?h.setFromMatrixColumn(e,1):(h.setFromMatrixColumn(e,0),h.crossVectors(this.object.up,h)),h.multiplyScalar(t),this._panOffset.add(h)}_pan(t,e){const o=this.domElement;if(this.object.isPerspectiveCamera){const n=this.object.position;h.copy(n).sub(this.target);let r=h.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*r/o.clientHeight,this.object.matrix),this._panUp(2*e*r/o.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/o.clientWidth,this.object.matrix),this._panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/o.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,e){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const o=this.domElement.getBoundingClientRect(),n=t-o.left,r=e-o.top,c=o.width,p=o.height;this._mouse.x=n/c*2-1,this._mouse.y=-(r/p)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let e=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),e=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),e=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),e=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-l*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),e=!0;break}e&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._rotateStart.set(o,n)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panStart.set(o,n)}}_handleTouchStartDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),r=.5*(t.pageY+o.y);this._rotateEnd.set(n,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const e=this.domElement;this._rotateLeft(l*this._rotateDelta.x/e.clientHeight),this._rotateUp(l*this._rotateDelta.y/e.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const e=this._getSecondPointerPosition(t),o=.5*(t.pageX+e.x),n=.5*(t.pageY+e.y);this._panEnd.set(o,n)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const e=this._getSecondPointerPosition(t),o=t.pageX-e.x,n=t.pageY-e.y,r=Math.sqrt(o*o+n*n);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const c=(t.pageX+e.x)*.5,p=(t.pageY+e.y)*.5;this._updateZoomParameters(c,p)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId){this._pointers.splice(e,1);return}}_isTrackingPointer(t){for(let e=0;e<this._pointers.length;e++)if(this._pointers[e]==t.pointerId)return!0;return!1}_trackPointer(t){let e=this._pointerPositions[t.pointerId];e===void 0&&(e=new s.Vector2,this._pointerPositions[t.pointerId]=e),e.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const e=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[e]}_customWheelEvent(t){const e=t.deltaMode,o={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(e){case 1:o.deltaY*=16;break;case 2:o.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(o.deltaY*=10),o}}function T(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function D(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function M(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(g),this.state=a.NONE;break;case 1:const t=this._pointers[0],e=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:e.x,pageY:e.y});break}}function S(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=a.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function O(i){switch(this.state){case a.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case a.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case a.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function w(i){this.enabled===!1||this.enableZoom===!1||this.state!==a.NONE||(i.preventDefault(),this.dispatchEvent(m),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(g))}function R(i){this.enabled!==!1&&this._handleKeyDown(i)}function j(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(m)}function A(i){switch(this._trackPointer(i),this.state){case a.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case a.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case a.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=a.NONE}}function L(i){this.enabled!==!1&&i.preventDefault()}function C(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function x(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}exports.OrbitControls=P;
@@ -1,4 +1,4 @@
1
- import { bV as S, V as p, M as u, bW as _, b3 as E, bX as P, a$ as c, bY as w, x as O, z as R } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BPwTdKD9.js";
1
+ import { bW as S, V as p, M as u, bX as _, b4 as E, bY as P, b0 as c, bZ as w, x as O, z as R } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-z1WxcGmx.js";
2
2
  const D = { type: "change" }, b = { type: "start" }, M = { type: "end" }, f = new w(), T = new O(), j = Math.cos(70 * R.DEG2RAD), n = new p(), r = 2 * Math.PI, o = {
3
3
  NONE: -1,
4
4
  ROTATE: 0,
@@ -17,7 +17,7 @@ class X extends S {
17
17
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
18
18
  */
19
19
  constructor(t, e = null) {
20
- super(t, e), this.state = o.NONE, this.target = new p(), this.cursor = new p(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: u.ROTATE, MIDDLE: u.DOLLY, RIGHT: u.PAN }, this.touches = { ONE: _.ROTATE, TWO: _.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new p(), this._lastQuaternion = new E(), this._lastTargetPosition = new p(), this._quat = new E().setFromUnitVectors(t.up, new p(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new P(), this._sphericalDelta = new P(), this._scale = 1, this._panOffset = new p(), this._rotateStart = new c(), this._rotateEnd = new c(), this._rotateDelta = new c(), this._panStart = new c(), this._panEnd = new c(), this._panDelta = new c(), this._dollyStart = new c(), this._dollyEnd = new c(), this._dollyDelta = new c(), this._dollyDirection = new p(), this._mouse = new c(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = L.bind(this), this._onPointerDown = A.bind(this), this._onPointerUp = x.bind(this), this._onContextMenu = z.bind(this), this._onMouseWheel = N.bind(this), this._onKeyDown = Y.bind(this), this._onTouchStart = I.bind(this), this._onTouchMove = U.bind(this), this._onMouseDown = k.bind(this), this._onMouseMove = C.bind(this), this._interceptControlDown = Z.bind(this), this._interceptControlUp = K.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
20
+ super(t, e), this.state = o.NONE, this.target = new p(), this.cursor = new p(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: u.ROTATE, MIDDLE: u.DOLLY, RIGHT: u.PAN }, this.touches = { ONE: _.ROTATE, TWO: _.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new p(), this._lastQuaternion = new E(), this._lastTargetPosition = new p(), this._quat = new E().setFromUnitVectors(t.up, new p(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new P(), this._sphericalDelta = new P(), this._scale = 1, this._panOffset = new p(), this._rotateStart = new c(), this._rotateEnd = new c(), this._rotateDelta = new c(), this._panStart = new c(), this._panEnd = new c(), this._panDelta = new c(), this._dollyStart = new c(), this._dollyEnd = new c(), this._dollyDelta = new c(), this._dollyDirection = new p(), this._mouse = new c(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = L.bind(this), this._onPointerDown = A.bind(this), this._onPointerUp = x.bind(this), this._onContextMenu = Z.bind(this), this._onMouseWheel = N.bind(this), this._onKeyDown = Y.bind(this), this._onTouchStart = I.bind(this), this._onTouchMove = U.bind(this), this._onMouseDown = k.bind(this), this._onMouseMove = C.bind(this), this._interceptControlDown = z.bind(this), this._interceptControlUp = K.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
21
21
  }
22
22
  connect(t) {
23
23
  super.connect(t), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -444,10 +444,10 @@ function U(i) {
444
444
  this.state = o.NONE;
445
445
  }
446
446
  }
447
- function z(i) {
447
+ function Z(i) {
448
448
  this.enabled !== !1 && i.preventDefault();
449
449
  }
450
- function Z(i) {
450
+ function z(i) {
451
451
  i.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
452
452
  }
453
453
  function K(i) {