mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-28 10:02:10 +00:00
2 lines
110 KiB
JavaScript
2 lines
110 KiB
JavaScript
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i():"function"==typeof define&&define.amd?define(i):i()}(0,function(){"use strict";function t(t,i,e){i||alert("No callback specified");var r=t.tileSet,n=t.clip;if(this.loadCallback=i,this.errorCallback=e,t.z>r.dtmMaxZoom){var s=Math.pow(2,t.z-r.dtmMaxZoom);this.x=Math.floor(t.x/s),this.y=Math.floor(t.y/s),this.z=r.dtmMaxZoom;var a=r.divisions,o=a*(t.x%s)/s,h=(a+1)*(a*(t.y%s))/s;n.dtmOffset=h+o,n.dtmWidth=r.divisions+1}else this.x=t.x,this.y=t.y,this.z=t.z,n.dtmOffset=0;this.tileFile=r.directory+"/"+this.z+"/DTM-"+this.x+"-"+this.y+".bin"}function i(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function e(t,i,e,r){this._x=t||0,this._y=i||0,this._z=e||0,this._w=void 0!==r?r:1}function r(t,i,e){this.x=t||0,this.y=i||0,this.z=e||0}function n(t,i){this.center=void 0!==t?t:new r,this.radius=void 0!==i?i:0}function s(t,i){this.min=void 0!==t?t:new r(1/0,1/0,1/0),this.max=void 0!==i?i:new r(-1/0,-1/0,-1/0)}function a(){}function o(t,i,e,r){this.x=t||0,this.y=i||0,this.z=e||0,this.w=void 0!==r?r:1}function h(t,i){this.x=t||0,this.y=i||0}function u(t,i,e){return void 0===i&&void 0===e?this.set(t):this.setRGB(t,i,e)}function c(t,i,e){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.uuid=k.generateUUID(),this.name="",this.array=t,this.itemSize=i,this.count=void 0!==t?t.length/i:0,this.normalized=!0===e,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.onUploadCallback=function(){},this.version=0}function l(t,i){c.call(this,new Uint16Array(t),i)}function d(t,i){c.call(this,new Uint32Array(t),i)}function f(t,i){c.call(this,new Float32Array(t),i)}function m(){this.indices=[],this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function y(t,i,e,r){this._x=t||0,this._y=i||0,this._z=e||0,this._order=r||y.DefaultOrder}function p(){this.mask=1}function x(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}function v(){function t(){o.setFromEuler(a,!1)}function n(){a.setFromQuaternion(o,void 0,!1)}Object.defineProperty(this,"id",{value:U++}),this.uuid=k.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=v.DefaultUp.clone();var s=new r,a=new y,o=new e,h=new r(1,1,1);a.onChange(t),o.onChange(n),Object.defineProperties(this,{position:{enumerable:!0,value:s},rotation:{enumerable:!0,value:a},quaternion:{enumerable:!0,value:o},scale:{enumerable:!0,value:h},modelViewMatrix:{value:new i},normalMatrix:{value:new x}}),this.matrix=new i,this.matrixWorld=new i,this.matrixAutoUpdate=v.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new p,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function g(t){if(0===t.length)return-1/0;for(var i=t[0],e=1,r=t.length;e<r;++e)t[e]>i&&(i=t[e]);return i}function b(t,i,e,n,s,a){this.a=t,this.b=i,this.c=e,this.normal=n&&n.isVector3?n:new r,this.vertexNormals=Array.isArray(n)?n:[],this.color=s&&s.isColor?s:new u,this.vertexColors=Array.isArray(s)?s:[],this.materialIndex=void 0!==a?a:0}function w(){return V++}function M(){Object.defineProperty(this,"id",{value:w()}),this.uuid=k.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function z(){Object.defineProperty(this,"id",{value:w()}),this.uuid=k.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0}}function _(t,i,e,n,a,o,h,u){z.call(this),this.type="TerrainTileGeometry";var c,l,d,m,y,p,x=Math.floor(e)||1,v=Math.floor(n)||1,g=x+1,b=v+1,w=t/x,M=i/v,_=[],A=[],S=[],N=0,k=1/0,E=-1/0,U=0,V=0;void 0===h.terrainWidth&&(h.terrainWidth=x,h.terrainHeight=v),void 0===h.dtmWidth&&(h.dtmWidth=h.terrainWidth+1);var T=g+h.left,O=b+h.top;for(l=h.top;l<O;l++){for(U=0,p=l*h.dtmWidth+h.left+h.dtmOffset,c=h.left;c<T;c++)m=a[p++]/o-u,A.push(U,-V,m),N++,m<k&&(k=m),m>E&&(E=m),S.push(c/h.terrainWidth),S.push(1-l/h.terrainHeight),U+=w;V+=M}for(this.boundingBox=(new s).set(new r(0,0,k),new r(t,-i,E)),l=0;l<v;l++)for(c=0;c<x;c++){var F=c+g*l,R=c+g*(l+1),I=c+1+g*(l+1),q=c+1+g*l;Math.abs(A[3*F+2]-A[3*q+2])<Math.abs(A[3*R+2]-A[3*I+2])?(_.push(F,R,q),_.push(R,I,q)):(_.push(F,R,I),_.push(I,q,F))}this.setIndex(_),this.addAttribute("position",new f(A,3)),this.addAttribute("uv",new f(S,2)),this.computeVertexNormals();var j,H,D=B.terrain,W=D.length-1,G=this.getAttribute("normal"),P=new r,Z=new Float32Array(3*N),X=[];for(d=0,y=D.length;d<y;d++)H=D[d],X.push([H[0]/255,H[1]/255,H[2]/255]);for(d=0;d<N;d++){P.fromArray(G.array,3*d),j=P.dot(C),H=X[Math.floor(2*W*Math.acos(Math.abs(j))/Math.PI)];var Y=3*d;Z[Y]=H[0],Z[Y+1]=H[1],Z[Y+2]=H[2]}this.addAttribute("color",new f(Z,3))}function A(i){new t(T=i.data,S,N).load()}function S(t){var i=T.clip,e=T.offsets,r=T.tileSet,n=T.divisions,s=new Uint16Array(t),a=n-i.left-i.right,o=n-i.top-i.bottom,h=T.resolution,u=h*a,c=h*o;i.terrainHeight=T.divisions,i.terrainWidth=T.divisions;var l=new _(u,c,a,o,s,r.dtmScale,i,e.z),d=h*(T.x*n+i.left)-O-e.x,f=O-h*(T.y*n+i.top)-e.y;l.translate(d,f,0),l.computeBoundingBox();var m=l.boundingBox,y={min:{x:m.min.x,y:m.min.y,z:m.min.z},max:{x:m.max.x,y:m.max.y,z:m.max.z}},p=l.index.array.buffer,x={},v=[],g=l.attributes;for(var b in g){var w=g[b],M=w.array.buffer;x[b]={array:M,itemSize:w.itemSize},v.push(M)}postMessage({status:"ok",index:p,attributes:x,boundingBox:y},v)}function N(){postMessage({status:"nomap"})}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&function(){Object.assign=function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(t),e=1;e<arguments.length;e++){var r=arguments[e];if(void 0!==r&&null!==r)for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(i[n]=r[n])}return i}}(),t.prototype.constructor=t,t.prototype.load=function(){function t(){200===i.status?e.loadCallback(i.response,e.x,e.y):e.errorCallback(i.response,e.x,e.y)}var i,e=this;return(i=new XMLHttpRequest).addEventListener("load",t),i.addEventListener("error",this.errorCallback),i.open("GET",this.tileFile),i.responseType="arraybuffer",i.send(),!0};var k={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),e=new Array(36),r=0;return function(){for(var n=0;n<36;n++)8===n||13===n||18===n||23===n?e[n]="-":14===n?e[n]="4":(r<=2&&(r=33554432+16777216*Math.random()|0),t=15&r,r>>=4,e[n]=i[19===n?3&t|8:t]);return e.join("")}}(),clamp:function(t,i,e){return Math.max(i,Math.min(e,t))},euclideanModulo:function(t,i){return(t%i+i)%i},mapLinear:function(t,i,e,r,n){return r+(t-i)*(n-r)/(e-i)},lerp:function(t,i,e){return(1-e)*t+e*i},smoothstep:function(t,i,e){return t<=i?0:t>=e?1:(t=(t-i)/(e-i))*t*(3-2*t)},smootherstep:function(t,i,e){return t<=i?0:t>=e?1:(t=(t-i)/(e-i))*t*t*(t*(6*t-15)+10)},randInt:function(t,i){return t+Math.floor(Math.random()*(i-t+1))},randFloat:function(t,i){return t+Math.random()*(i-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*k.DEG2RAD},radToDeg:function(t){return t*k.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}};Object.assign(i.prototype,{isMatrix4:!0,set:function(t,i,e,r,n,s,a,o,h,u,c,l,d,f,m,y){var p=this.elements;return p[0]=t,p[4]=i,p[8]=e,p[12]=r,p[1]=n,p[5]=s,p[9]=a,p[13]=o,p[2]=h,p[6]=u,p[10]=c,p[14]=l,p[3]=d,p[7]=f,p[11]=m,p[15]=y,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new i).fromArray(this.elements)},copy:function(t){var i=this.elements,e=t.elements;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],this},copyPosition:function(t){var i=this.elements,e=t.elements;return i[12]=e[12],i[13]=e[13],i[14]=e[14],this},extractBasis:function(t,i,e){return t.setFromMatrixColumn(this,0),i.setFromMatrixColumn(this,1),e.setFromMatrixColumn(this,2),this},makeBasis:function(t,i,e){return this.set(t.x,i.x,e.x,0,t.y,i.y,e.y,0,t.z,i.z,e.z,0,0,0,0,1),this},extractRotation:function(){var t=new r;return function(i){var e=this.elements,r=i.elements,n=1/t.setFromMatrixColumn(i,0).length(),s=1/t.setFromMatrixColumn(i,1).length(),a=1/t.setFromMatrixColumn(i,2).length();return e[0]=r[0]*n,e[1]=r[1]*n,e[2]=r[2]*n,e[4]=r[4]*s,e[5]=r[5]*s,e[6]=r[6]*s,e[8]=r[8]*a,e[9]=r[9]*a,e[10]=r[10]*a,this}}(),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var i=this.elements,e=t.x,r=t.y,n=t.z,s=Math.cos(e),a=Math.sin(e),o=Math.cos(r),h=Math.sin(r),u=Math.cos(n),c=Math.sin(n);if("XYZ"===t.order){var l=s*u,d=s*c,f=a*u,m=a*c;i[0]=o*u,i[4]=-o*c,i[8]=h,i[1]=d+f*h,i[5]=l-m*h,i[9]=-a*o,i[2]=m-l*h,i[6]=f+d*h,i[10]=s*o}else if("YXZ"===t.order){var y=o*u,p=o*c,x=h*u,v=h*c;i[0]=y+v*a,i[4]=x*a-p,i[8]=s*h,i[1]=s*c,i[5]=s*u,i[9]=-a,i[2]=p*a-x,i[6]=v+y*a,i[10]=s*o}else if("ZXY"===t.order){var y=o*u,p=o*c,x=h*u,v=h*c;i[0]=y-v*a,i[4]=-s*c,i[8]=x+p*a,i[1]=p+x*a,i[5]=s*u,i[9]=v-y*a,i[2]=-s*h,i[6]=a,i[10]=s*o}else if("ZYX"===t.order){var l=s*u,d=s*c,f=a*u,m=a*c;i[0]=o*u,i[4]=f*h-d,i[8]=l*h+m,i[1]=o*c,i[5]=m*h+l,i[9]=d*h-f,i[2]=-h,i[6]=a*o,i[10]=s*o}else if("YZX"===t.order){var g=s*o,b=s*h,w=a*o,M=a*h;i[0]=o*u,i[4]=M-g*c,i[8]=w*c+b,i[1]=c,i[5]=s*u,i[9]=-a*u,i[2]=-h*u,i[6]=b*c+w,i[10]=g-M*c}else if("XZY"===t.order){var g=s*o,b=s*h,w=a*o,M=a*h;i[0]=o*u,i[4]=-c,i[8]=h*u,i[1]=g*c+M,i[5]=s*u,i[9]=b*c-w,i[2]=w*c-b,i[6]=a*u,i[10]=M*c+g}return i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this},makeRotationFromQuaternion:function(t){var i=this.elements,e=t._x,r=t._y,n=t._z,s=t._w,a=e+e,o=r+r,h=n+n,u=e*a,c=e*o,l=e*h,d=r*o,f=r*h,m=n*h,y=s*a,p=s*o,x=s*h;return i[0]=1-(d+m),i[4]=c-x,i[8]=l+p,i[1]=c+x,i[5]=1-(u+m),i[9]=f-y,i[2]=l-p,i[6]=f+y,i[10]=1-(u+d),i[3]=0,i[7]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,this},lookAt:function(){var t=new r,i=new r,e=new r;return function(r,n,s){var a=this.elements;return e.subVectors(r,n),0===e.lengthSq()&&(e.z=1),e.normalize(),t.crossVectors(s,e),0===t.lengthSq()&&(1===Math.abs(s.z)?e.x+=1e-4:e.z+=1e-4,e.normalize(),t.crossVectors(s,e)),t.normalize(),i.crossVectors(e,t),a[0]=t.x,a[4]=i.x,a[8]=e.x,a[1]=t.y,a[5]=i.y,a[9]=e.y,a[2]=t.z,a[6]=i.z,a[10]=e.z,this}}(),multiply:function(t,i){return void 0!==i?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,i)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,i){var e=t.elements,r=i.elements,n=this.elements,s=e[0],a=e[4],o=e[8],h=e[12],u=e[1],c=e[5],l=e[9],d=e[13],f=e[2],m=e[6],y=e[10],p=e[14],x=e[3],v=e[7],g=e[11],b=e[15],w=r[0],M=r[4],z=r[8],_=r[12],A=r[1],S=r[5],N=r[9],k=r[13],E=r[2],U=r[6],V=r[10],B=r[14],C=r[3],T=r[7],O=r[11],F=r[15];return n[0]=s*w+a*A+o*E+h*C,n[4]=s*M+a*S+o*U+h*T,n[8]=s*z+a*N+o*V+h*O,n[12]=s*_+a*k+o*B+h*F,n[1]=u*w+c*A+l*E+d*C,n[5]=u*M+c*S+l*U+d*T,n[9]=u*z+c*N+l*V+d*O,n[13]=u*_+c*k+l*B+d*F,n[2]=f*w+m*A+y*E+p*C,n[6]=f*M+m*S+y*U+p*T,n[10]=f*z+m*N+y*V+p*O,n[14]=f*_+m*k+y*B+p*F,n[3]=x*w+v*A+g*E+b*C,n[7]=x*M+v*S+g*U+b*T,n[11]=x*z+v*N+g*V+b*O,n[15]=x*_+v*k+g*B+b*F,this},multiplyScalar:function(t){var i=this.elements;return i[0]*=t,i[4]*=t,i[8]*=t,i[12]*=t,i[1]*=t,i[5]*=t,i[9]*=t,i[13]*=t,i[2]*=t,i[6]*=t,i[10]*=t,i[14]*=t,i[3]*=t,i[7]*=t,i[11]*=t,i[15]*=t,this},applyToBufferAttribute:function(){var t=new r;return function(i){for(var e=0,r=i.count;e<r;e++)t.x=i.getX(e),t.y=i.getY(e),t.z=i.getZ(e),t.applyMatrix4(this),i.setXYZ(e,t.x,t.y,t.z);return i}}(),determinant:function(){var t=this.elements,i=t[0],e=t[4],r=t[8],n=t[12],s=t[1],a=t[5],o=t[9],h=t[13],u=t[2],c=t[6],l=t[10],d=t[14];return t[3]*(+n*o*c-r*h*c-n*a*l+e*h*l+r*a*d-e*o*d)+t[7]*(+i*o*d-i*h*l+n*s*l-r*s*d+r*h*u-n*o*u)+t[11]*(+i*h*c-i*a*d-n*s*c+e*s*d+n*a*u-e*h*u)+t[15]*(-r*a*u-i*o*c+i*a*l+r*s*c-e*s*l+e*o*u)},transpose:function(){var t,i=this.elements;return t=i[1],i[1]=i[4],i[4]=t,t=i[2],i[2]=i[8],i[8]=t,t=i[6],i[6]=i[9],i[9]=t,t=i[3],i[3]=i[12],i[12]=t,t=i[7],i[7]=i[13],i[13]=t,t=i[11],i[11]=i[14],i[14]=t,this},setPosition:function(t){var i=this.elements;return i[12]=t.x,i[13]=t.y,i[14]=t.z,this},getInverse:function(t,i){var e=this.elements,r=t.elements,n=r[0],s=r[1],a=r[2],o=r[3],h=r[4],u=r[5],c=r[6],l=r[7],d=r[8],f=r[9],m=r[10],y=r[11],p=r[12],x=r[13],v=r[14],g=r[15],b=f*v*l-x*m*l+x*c*y-u*v*y-f*c*g+u*m*g,w=p*m*l-d*v*l-p*c*y+h*v*y+d*c*g-h*m*g,M=d*x*l-p*f*l+p*u*y-h*x*y-d*u*g+h*f*g,z=p*f*c-d*x*c-p*u*m+h*x*m+d*u*v-h*f*v,_=n*b+s*w+a*M+o*z;if(0===_){var A="THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0";if(!0===i)throw new Error(A);return console.warn(A),this.identity()}var S=1/_;return e[0]=b*S,e[1]=(x*m*o-f*v*o-x*a*y+s*v*y+f*a*g-s*m*g)*S,e[2]=(u*v*o-x*c*o+x*a*l-s*v*l-u*a*g+s*c*g)*S,e[3]=(f*c*o-u*m*o-f*a*l+s*m*l+u*a*y-s*c*y)*S,e[4]=w*S,e[5]=(d*v*o-p*m*o+p*a*y-n*v*y-d*a*g+n*m*g)*S,e[6]=(p*c*o-h*v*o-p*a*l+n*v*l+h*a*g-n*c*g)*S,e[7]=(h*m*o-d*c*o+d*a*l-n*m*l-h*a*y+n*c*y)*S,e[8]=M*S,e[9]=(p*f*o-d*x*o-p*s*y+n*x*y+d*s*g-n*f*g)*S,e[10]=(h*x*o-p*u*o+p*s*l-n*x*l-h*s*g+n*u*g)*S,e[11]=(d*u*o-h*f*o-d*s*l+n*f*l+h*s*y-n*u*y)*S,e[12]=z*S,e[13]=(d*x*a-p*f*a+p*s*m-n*x*m-d*s*v+n*f*v)*S,e[14]=(p*u*a-h*x*a-p*s*c+n*x*c+h*s*v-n*u*v)*S,e[15]=(h*f*a-d*u*a+d*s*c-n*f*c-h*s*m+n*u*m)*S,this},scale:function(t){var i=this.elements,e=t.x,r=t.y,n=t.z;return i[0]*=e,i[4]*=r,i[8]*=n,i[1]*=e,i[5]*=r,i[9]*=n,i[2]*=e,i[6]*=r,i[10]*=n,i[3]*=e,i[7]*=r,i[11]*=n,this},getMaxScaleOnAxis:function(){var t=this.elements,i=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(i,e,r))},makeTranslation:function(t,i,e){return this.set(1,0,0,t,0,1,0,i,0,0,1,e,0,0,0,1),this},makeRotationX:function(t){var i=Math.cos(t),e=Math.sin(t);return this.set(1,0,0,0,0,i,-e,0,0,e,i,0,0,0,0,1),this},makeRotationY:function(t){var i=Math.cos(t),e=Math.sin(t);return this.set(i,0,e,0,0,1,0,0,-e,0,i,0,0,0,0,1),this},makeRotationZ:function(t){var i=Math.cos(t),e=Math.sin(t);return this.set(i,-e,0,0,e,i,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,i){var e=Math.cos(i),r=Math.sin(i),n=1-e,s=t.x,a=t.y,o=t.z,h=n*s,u=n*a;return this.set(h*s+e,h*a-r*o,h*o+r*a,0,h*a+r*o,u*a+e,u*o-r*s,0,h*o-r*a,u*o+r*s,n*o*o+e,0,0,0,0,1),this},makeScale:function(t,i,e){return this.set(t,0,0,0,0,i,0,0,0,0,e,0,0,0,0,1),this},makeShear:function(t,i,e){return this.set(1,i,e,0,t,1,e,0,t,i,1,0,0,0,0,1),this},compose:function(t,i,e){return this.makeRotationFromQuaternion(i),this.scale(e),this.setPosition(t),this},decompose:function(){var t=new r,e=new i;return function(i,r,n){var s=this.elements,a=t.set(s[0],s[1],s[2]).length(),o=t.set(s[4],s[5],s[6]).length(),h=t.set(s[8],s[9],s[10]).length();this.determinant()<0&&(a=-a),i.x=s[12],i.y=s[13],i.z=s[14],e.copy(this);var u=1/a,c=1/o,l=1/h;return e.elements[0]*=u,e.elements[1]*=u,e.elements[2]*=u,e.elements[4]*=c,e.elements[5]*=c,e.elements[6]*=c,e.elements[8]*=l,e.elements[9]*=l,e.elements[10]*=l,r.setFromRotationMatrix(e),n.x=a,n.y=o,n.z=h,this}}(),makePerspective:function(t,i,e,r,n,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var a=this.elements,o=2*n/(i-t),h=2*n/(e-r),u=(i+t)/(i-t),c=(e+r)/(e-r),l=-(s+n)/(s-n),d=-2*s*n/(s-n);return a[0]=o,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=h,a[9]=c,a[13]=0,a[2]=0,a[6]=0,a[10]=l,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this},makeOrthographic:function(t,i,e,r,n,s){var a=this.elements,o=1/(i-t),h=1/(e-r),u=1/(s-n),c=(i+t)*o,l=(e+r)*h,d=(s+n)*u;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-c,a[1]=0,a[5]=2*h,a[9]=0,a[13]=-l,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},equals:function(t){for(var i=this.elements,e=t.elements,r=0;r<16;r++)if(i[r]!==e[r])return!1;return!0},fromArray:function(t,i){void 0===i&&(i=0);for(var e=0;e<16;e++)this.elements[e]=t[e+i];return this},toArray:function(t,i){void 0===t&&(t=[]),void 0===i&&(i=0);var e=this.elements;return t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],t[i+6]=e[6],t[i+7]=e[7],t[i+8]=e[8],t[i+9]=e[9],t[i+10]=e[10],t[i+11]=e[11],t[i+12]=e[12],t[i+13]=e[13],t[i+14]=e[14],t[i+15]=e[15],t}}),Object.assign(e,{slerp:function(t,i,e,r){return e.copy(t).slerp(i,r)},slerpFlat:function(t,i,e,r,n,s,a){var o=e[r+0],h=e[r+1],u=e[r+2],c=e[r+3],l=n[s+0],d=n[s+1],f=n[s+2],m=n[s+3];if(c!==m||o!==l||h!==d||u!==f){var y=1-a,p=o*l+h*d+u*f+c*m,x=p>=0?1:-1,v=1-p*p;if(v>Number.EPSILON){var g=Math.sqrt(v),b=Math.atan2(g,p*x);y=Math.sin(y*b)/g,a=Math.sin(a*b)/g}var w=a*x;if(o=o*y+l*w,h=h*y+d*w,u=u*y+f*w,c=c*y+m*w,y===1-a){var M=1/Math.sqrt(o*o+h*h+u*u+c*c);o*=M,h*=M,u*=M,c*=M}}t[i]=o,t[i+1]=h,t[i+2]=u,t[i+3]=c}}),Object.defineProperties(e.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(e.prototype,{set:function(t,i,e,r){return this._x=t,this._y=i,this._z=e,this._w=r,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,i){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var e=t._x,r=t._y,n=t._z,s=t.order,a=Math.cos,o=Math.sin,h=a(e/2),u=a(r/2),c=a(n/2),l=o(e/2),d=o(r/2),f=o(n/2);return"XYZ"===s?(this._x=l*u*c+h*d*f,this._y=h*d*c-l*u*f,this._z=h*u*f+l*d*c,this._w=h*u*c-l*d*f):"YXZ"===s?(this._x=l*u*c+h*d*f,this._y=h*d*c-l*u*f,this._z=h*u*f-l*d*c,this._w=h*u*c+l*d*f):"ZXY"===s?(this._x=l*u*c-h*d*f,this._y=h*d*c+l*u*f,this._z=h*u*f+l*d*c,this._w=h*u*c-l*d*f):"ZYX"===s?(this._x=l*u*c-h*d*f,this._y=h*d*c+l*u*f,this._z=h*u*f-l*d*c,this._w=h*u*c+l*d*f):"YZX"===s?(this._x=l*u*c+h*d*f,this._y=h*d*c+l*u*f,this._z=h*u*f-l*d*c,this._w=h*u*c-l*d*f):"XZY"===s&&(this._x=l*u*c-h*d*f,this._y=h*d*c-l*u*f,this._z=h*u*f+l*d*c,this._w=h*u*c+l*d*f),!1!==i&&this.onChangeCallback(),this},setFromAxisAngle:function(t,i){var e=i/2,r=Math.sin(e);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(e),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var i,e=t.elements,r=e[0],n=e[4],s=e[8],a=e[1],o=e[5],h=e[9],u=e[2],c=e[6],l=e[10],d=r+o+l;return d>0?(i=.5/Math.sqrt(d+1),this._w=.25/i,this._x=(c-h)*i,this._y=(s-u)*i,this._z=(a-n)*i):r>o&&r>l?(i=2*Math.sqrt(1+r-o-l),this._w=(c-h)/i,this._x=.25*i,this._y=(n+a)/i,this._z=(s+u)/i):o>l?(i=2*Math.sqrt(1+o-r-l),this._w=(s-u)/i,this._x=(n+a)/i,this._y=.25*i,this._z=(h+c)/i):(i=2*Math.sqrt(1+l-r-o),this._w=(a-n)/i,this._x=(s+u)/i,this._y=(h+c)/i,this._z=.25*i),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,i=new r;return function(e,n){return void 0===i&&(i=new r),t=e.dot(n)+1,t<1e-6?(t=0,Math.abs(e.x)>Math.abs(e.z)?i.set(-e.y,e.x,0):i.set(0,-e.z,e.y)):i.crossVectors(e,n),this._x=i.x,this._y=i.y,this._z=i.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate().normalize()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,i){return void 0!==i?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,i)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,i){var e=t._x,r=t._y,n=t._z,s=t._w,a=i._x,o=i._y,h=i._z,u=i._w;return this._x=e*u+s*a+r*h-n*o,this._y=r*u+s*o+n*a-e*h,this._z=n*u+s*h+e*o-r*a,this._w=s*u-e*a-r*o-n*h,this.onChangeCallback(),this},slerp:function(t,i){if(0===i)return this;if(1===i)return this.copy(t);var e=this._x,r=this._y,n=this._z,s=this._w,a=s*t._w+e*t._x+r*t._y+n*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=e,this._y=r,this._z=n,this;var o=Math.sqrt(1-a*a);if(Math.abs(o)<.001)return this._w=.5*(s+this._w),this._x=.5*(e+this._x),this._y=.5*(r+this._y),this._z=.5*(n+this._z),this;var h=Math.atan2(o,a),u=Math.sin((1-i)*h)/o,c=Math.sin(i*h)/o;return this._w=s*u+this._w*c,this._x=e*u+this._x*c,this._y=r*u+this._y*c,this._z=n*u+this._z*c,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,i){return void 0===i&&(i=0),this._x=t[i],this._y=t[i+1],this._z=t[i+2],this._w=t[i+3],this.onChangeCallback(),this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(r.prototype,{isVector3:!0,set:function(t,i,e){return this.x=t,this.y=i,this.z=e,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this},addScaledVector:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this},sub:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this},multiply:function(t,i){return void 0!==i?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,i)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,i){return this.x=t.x*i.x,this.y=t.y*i.y,this.z=t.z*i.z,this},applyEuler:function(){var t=new e;return function(i){return i&&i.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(t.setFromEuler(i))}}(),applyAxisAngle:function(){var t=new e;return function(i,e){return this.applyQuaternion(t.setFromAxisAngle(i,e))}}(),applyMatrix3:function(t){var i=this.x,e=this.y,r=this.z,n=t.elements;return this.x=n[0]*i+n[3]*e+n[6]*r,this.y=n[1]*i+n[4]*e+n[7]*r,this.z=n[2]*i+n[5]*e+n[8]*r,this},applyMatrix4:function(t){var i=this.x,e=this.y,r=this.z,n=t.elements,s=1/(n[3]*i+n[7]*e+n[11]*r+n[15]);return this.x=(n[0]*i+n[4]*e+n[8]*r+n[12])*s,this.y=(n[1]*i+n[5]*e+n[9]*r+n[13])*s,this.z=(n[2]*i+n[6]*e+n[10]*r+n[14])*s,this},applyQuaternion:function(t){var i=this.x,e=this.y,r=this.z,n=t.x,s=t.y,a=t.z,o=t.w,h=o*i+s*r-a*e,u=o*e+a*i-n*r,c=o*r+n*e-s*i,l=-n*i-s*e-a*r;return this.x=h*o+l*-n+u*-a-c*-s,this.y=u*o+l*-s+c*-n-h*-a,this.z=c*o+l*-a+h*-s-u*-n,this},project:function(){var t=new i;return function(i){return t.multiplyMatrices(i.projectionMatrix,t.getInverse(i.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new i;return function(i){return t.multiplyMatrices(i.matrixWorld,t.getInverse(i.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var i=this.x,e=this.y,r=this.z,n=t.elements;return this.x=n[0]*i+n[4]*e+n[8]*r,this.y=n[1]*i+n[5]*e+n[9]*r,this.z=n[2]*i+n[6]*e+n[10]*r,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this},clampScalar:function(){var t=new r,i=new r;return function(e,r){return t.set(e,e,e),i.set(r,r,r),this.clamp(t,i)}}(),clampLength:function(t,i){var e=this.length();return this.divideScalar(e||1).multiplyScalar(Math.max(t,Math.min(i,e)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this},lerpVectors:function(t,i,e){return this.subVectors(i,t).multiplyScalar(e).add(t)},cross:function(t,i){if(void 0!==i)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,i);var e=this.x,r=this.y,n=this.z;return this.x=r*t.z-n*t.y,this.y=n*t.x-e*t.z,this.z=e*t.y-r*t.x,this},crossVectors:function(t,i){var e=t.x,r=t.y,n=t.z,s=i.x,a=i.y,o=i.z;return this.x=r*o-n*a,this.y=n*s-e*o,this.z=e*a-r*s,this},projectOnVector:function(t){var i=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(i)},projectOnPlane:function(){var t=new r;return function(i){return t.copy(this).projectOnVector(i),this.sub(t)}}(),reflect:function(){var t=new r;return function(i){return this.sub(t.copy(i).multiplyScalar(2*this.dot(i)))}}(),angleTo:function(t){var i=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(k.clamp(i,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var i=this.x-t.x,e=this.y-t.y,r=this.z-t.z;return i*i+e*e+r*r},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var i=Math.sin(t.phi)*t.radius;return this.x=i*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=i*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var i=t.elements;return this.x=i[12],this.y=i[13],this.z=i[14],this},setFromMatrixScale:function(t){var i=this.setFromMatrixColumn(t,0).length(),e=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=i,this.y=e,this.z=r,this},setFromMatrixColumn:function(t,i){return this.fromArray(t.elements,4*i)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,i){return void 0===i&&(i=0),this.x=t[i],this.y=t[i+1],this.z=t[i+2],this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t},fromBufferAttribute:function(t,i,e){return void 0!==e&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this}}),Object.assign(n.prototype,{set:function(t,i){return this.center.copy(t),this.radius=i,this},setFromPoints:function(){var t=new s;return function(i,e){var r=this.center;void 0!==e?r.copy(e):t.setFromPoints(i).getCenter(r);for(var n=0,s=0,a=i.length;s<a;s++)n=Math.max(n,r.distanceToSquared(i[s]));return this.radius=Math.sqrt(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var i=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=i*i},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(this.center.dot(t.normal)-t.constant)<=this.radius},clampPoint:function(t,i){var e=this.center.distanceToSquared(t),n=i||new r;return n.copy(t),e>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n},getBoundingBox:function(t){var i=t||new s;return i.set(this.center,this.center),i.expandByScalar(this.radius),i},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(s.prototype,{isBox3:!0,set:function(t,i){return this.min.copy(t),this.max.copy(i),this},setFromArray:function(t){for(var i=1/0,e=1/0,r=1/0,n=-1/0,s=-1/0,a=-1/0,o=0,h=t.length;o<h;o+=3){var u=t[o],c=t[o+1],l=t[o+2];u<i&&(i=u),c<e&&(e=c),l<r&&(r=l),u>n&&(n=u),c>s&&(s=c),l>a&&(a=l)}return this.min.set(i,e,r),this.max.set(n,s,a),this},setFromBufferAttribute:function(t){for(var i=1/0,e=1/0,r=1/0,n=-1/0,s=-1/0,a=-1/0,o=0,h=t.count;o<h;o++){var u=t.getX(o),c=t.getY(o),l=t.getZ(o);u<i&&(i=u),c<e&&(e=c),l<r&&(r=l),u>n&&(n=u),c>s&&(s=c),l>a&&(a=l)}return this.min.set(i,e,r),this.max.set(n,s,a),this},setFromPoints:function(t){this.makeEmpty();for(var i=0,e=t.length;i<e;i++)this.expandByPoint(t[i]);return this},setFromCenterAndSize:function(){var t=new r;return function(i,e){var r=t.copy(e).multiplyScalar(.5);return this.min.copy(i).sub(r),this.max.copy(i).add(r),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){var i=t||new r;return this.isEmpty()?i.set(0,0,0):i.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){var i=t||new r;return this.isEmpty()?i.set(0,0,0):i.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t=new r;return function(i){var e=this;return i.updateMatrixWorld(!0),i.traverse(function(i){var r,n,s=i.geometry;if(void 0!==s)if(s.isGeometry){var a=s.vertices;for(r=0,n=a.length;r<n;r++)t.copy(a[r]),t.applyMatrix4(i.matrixWorld),e.expandByPoint(t)}else if(s.isBufferGeometry){var o=s.attributes.position;if(void 0!==o)for(r=0,n=o.count;r<n;r++)t.fromBufferAttribute(o,r).applyMatrix4(i.matrixWorld),e.expandByPoint(t)}}),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,i){return(i||new r).set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:function(){var t=new r;return function(i){return this.clampPoint(i.center,t),t.distanceToSquared(i.center)<=i.radius*i.radius}}(),intersectsPlane:function(t){var i,e;return t.normal.x>0?(i=t.normal.x*this.min.x,e=t.normal.x*this.max.x):(i=t.normal.x*this.max.x,e=t.normal.x*this.min.x),t.normal.y>0?(i+=t.normal.y*this.min.y,e+=t.normal.y*this.max.y):(i+=t.normal.y*this.max.y,e+=t.normal.y*this.min.y),t.normal.z>0?(i+=t.normal.z*this.min.z,e+=t.normal.z*this.max.z):(i+=t.normal.z*this.max.z,e+=t.normal.z*this.min.z),i<=t.constant&&e>=t.constant},clampPoint:function(t,i){return(i||new r).copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new r;return function(i){return t.copy(i).clamp(this.min,this.max).sub(i).length()}}(),getBoundingSphere:function(){var t=new r;return function(i){var e=i||new n;return this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new r,new r,new r,new r,new r,new r,new r,new r];return function(i){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(i),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(i),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(i),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(i),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(i),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(i),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(i),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(i),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(a.prototype,{addEventListener:function(t,i){void 0===this._listeners&&(this._listeners={});var e=this._listeners;void 0===e[t]&&(e[t]=[]),-1===e[t].indexOf(i)&&e[t].push(i)},hasEventListener:function(t,i){if(void 0===this._listeners)return!1;var e=this._listeners;return void 0!==e[t]&&-1!==e[t].indexOf(i)},removeEventListener:function(t,i){if(void 0!==this._listeners){var e=this._listeners[t];if(void 0!==e){var r=e.indexOf(i);-1!==r&&e.splice(r,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var i=this._listeners[t.type];if(void 0!==i){t.target=this;for(var e=i.slice(0),r=0,n=e.length;r<n;r++)e[r].call(this,t)}}}}),Object.assign(o.prototype,{isVector4:!0,set:function(t,i,e,r){return this.x=t,this.y=i,this.z=e,this.w=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;case 2:this.z=i;break;case 3:this.w=i;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,i){return void 0!==i?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this.z=t.z+i.z,this.w=t.w+i.w,this},addScaledVector:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this.z+=t.z*i,this.w+=t.w*i,this},sub:function(t,i){return void 0!==i?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this.z=t.z-i.z,this.w=t.w-i.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var i=this.x,e=this.y,r=this.z,n=this.w,s=t.elements;return this.x=s[0]*i+s[4]*e+s[8]*r+s[12]*n,this.y=s[1]*i+s[5]*e+s[9]*r+s[13]*n,this.z=s[2]*i+s[6]*e+s[10]*r+s[14]*n,this.w=s[3]*i+s[7]*e+s[11]*r+s[15]*n,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var i=Math.sqrt(1-t.w*t.w);return i<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/i,this.y=t.y/i,this.z=t.z/i),this},setAxisAngleFromRotationMatrix:function(t){var i,e,r,n,s=t.elements,a=s[0],o=s[4],h=s[8],u=s[1],c=s[5],l=s[9],d=s[2],f=s[6],m=s[10];if(Math.abs(o-u)<.01&&Math.abs(h-d)<.01&&Math.abs(l-f)<.01){if(Math.abs(o+u)<.1&&Math.abs(h+d)<.1&&Math.abs(l+f)<.1&&Math.abs(a+c+m-3)<.1)return this.set(1,0,0,0),this;i=Math.PI;var y=(a+1)/2,p=(c+1)/2,x=(m+1)/2,v=(o+u)/4,g=(h+d)/4,b=(l+f)/4;return y>p&&y>x?y<.01?(e=0,r=.707106781,n=.707106781):(r=v/(e=Math.sqrt(y)),n=g/e):p>x?p<.01?(e=.707106781,r=0,n=.707106781):(e=v/(r=Math.sqrt(p)),n=b/r):x<.01?(e=.707106781,r=.707106781,n=0):(e=g/(n=Math.sqrt(x)),r=b/n),this.set(e,r,n,i),this}var w=Math.sqrt((f-l)*(f-l)+(h-d)*(h-d)+(u-o)*(u-o));return Math.abs(w)<.001&&(w=1),this.x=(f-l)/w,this.y=(h-d)/w,this.z=(u-o)/w,this.w=Math.acos((a+c+m-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this.z=Math.max(t.z,Math.min(i.z,this.z)),this.w=Math.max(t.w,Math.min(i.w,this.w)),this},clampScalar:function(){var t,i;return function(e,r){return void 0===t&&(t=new o,i=new o),t.set(e,e,e,e),i.set(r,r,r,r),this.clamp(t,i)}}(),clampLength:function(t,i){var e=this.length();return this.divideScalar(e||1).multiplyScalar(Math.max(t,Math.min(i,e)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this.z+=(t.z-this.z)*i,this.w+=(t.w-this.w)*i,this},lerpVectors:function(t,i,e){return this.subVectors(i,t).multiplyScalar(e).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,i){return void 0===i&&(i=0),this.x=t[i],this.y=t[i+1],this.z=t[i+2],this.w=t[i+3],this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this.x,t[i+1]=this.y,t[i+2]=this.z,t[i+3]=this.w,t},fromBufferAttribute:function(t,i,e){return void 0!==e&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this.z=t.getZ(i),this.w=t.getW(i),this}}),Object.defineProperties(h.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(h.prototype,{isVector2:!0,set:function(t,i){return this.x=t,this.y=i,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,i){switch(t){case 0:this.x=i;break;case 1:this.y=i;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,i){return void 0!==i?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,i)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,i){return this.x=t.x+i.x,this.y=t.y+i.y,this},addScaledVector:function(t,i){return this.x+=t.x*i,this.y+=t.y*i,this},sub:function(t,i){return void 0!==i?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,i)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,i){return this.x=t.x-i.x,this.y=t.y-i.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,i){return this.x=Math.max(t.x,Math.min(i.x,this.x)),this.y=Math.max(t.y,Math.min(i.y,this.y)),this},clampScalar:function(){var t=new h,i=new h;return function(e,r){return t.set(e,e),i.set(r,r),this.clamp(t,i)}}(),clampLength:function(t,i){var e=this.length();return this.divideScalar(e||1).multiplyScalar(Math.max(t,Math.min(i,e)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var i=this.x-t.x,e=this.y-t.y;return i*i+e*e},distanceToManhattan:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,i){return this.x+=(t.x-this.x)*i,this.y+=(t.y-this.y)*i,this},lerpVectors:function(t,i,e){return this.subVectors(i,t).multiplyScalar(e).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,i){return void 0===i&&(i=0),this.x=t[i],this.y=t[i+1],this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this.x,t[i+1]=this.y,t},fromBufferAttribute:function(t,i,e){return void 0!==e&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(i),this.y=t.getY(i),this},rotateAround:function(t,i){var e=Math.cos(i),r=Math.sin(i),n=this.x-t.x,s=this.y-t.y;return this.x=n*e-s*r+t.x,this.y=n*r+s*e+t.y,this}});var E={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(u.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,i,e){return this.r=t,this.g=i,this.b=e,this},setHSL:function(){function t(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+6*(i-t)*(2/3-e):t}return function(i,e,r){if(i=k.euclideanModulo(i,1),e=k.clamp(e,0,1),r=k.clamp(r,0,1),0===e)this.r=this.g=this.b=r;else{var n=r<=.5?r*(1+e):r+e-r*e,s=2*r-n;this.r=t(s,n,i+1/3),this.g=t(s,n,i),this.b=t(s,n,i-1/3)}return this}}(),setStyle:function(t){function i(i){void 0!==i&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var e;if(e=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var r,n=e[1],s=e[2];switch(n){case"rgb":case"rgba":if(r=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(r[1],10))/255,this.g=Math.min(255,parseInt(r[2],10))/255,this.b=Math.min(255,parseInt(r[3],10))/255,i(r[5]),this;if(r=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(r[1],10))/100,this.g=Math.min(100,parseInt(r[2],10))/100,this.b=Math.min(100,parseInt(r[3],10))/100,i(r[5]),this;break;case"hsl":case"hsla":if(r=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(s)){var a=parseFloat(r[1])/360,o=parseInt(r[2],10)/100,h=parseInt(r[3],10)/100;return i(r[5]),this.setHSL(a,o,h)}}}else if(e=/^\#([A-Fa-f0-9]+)$/.exec(t)){var u=(c=e[1]).length;if(3===u)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}if(t&&t.length>0){var c=E[t];void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,i){return void 0===i&&(i=2),this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},copyLinearToGamma:function(t,i){void 0===i&&(i=2);var e=i>0?1/i:1;return this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(){var t=this.r,i=this.g,e=this.b;return this.r=t*t,this.g=i*i,this.b=e*e,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){var i,e,r=t||{h:0,s:0,l:0},n=this.r,s=this.g,a=this.b,o=Math.max(n,s,a),h=Math.min(n,s,a),u=(h+o)/2;if(h===o)i=0,e=0;else{var c=o-h;switch(e=u<=.5?c/(o+h):c/(2-o-h),o){case n:i=(s-a)/c+(s<a?6:0);break;case s:i=(a-n)/c+2;break;case a:i=(n-s)/c+4}i/=6}return r.h=i,r.s=e,r.l=u,r},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(t,i,e){var r=this.getHSL();return r.h+=t,r.s+=i,r.l+=e,this.setHSL(r.h,r.s,r.l),this},add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,i){return this.r=t.r+i.r,this.g=t.g+i.g,this.b=t.b+i.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,i){return this.r+=(t.r-this.r)*i,this.g+=(t.g-this.g)*i,this.b+=(t.b-this.b)*i,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,i){return void 0===i&&(i=0),this.r=t[i],this.g=t[i+1],this.b=t[i+2],this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this.r,t[i+1]=this.g,t[i+2]=this.b,t},toJSON:function(){return this.getHex()}}),Object.defineProperty(c.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(c.prototype,{isBufferAttribute:!0,setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==t?t.length/this.itemSize:0,this.array=t},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,i,e){t*=this.itemSize,e*=i.itemSize;for(var r=0,n=this.itemSize;r<n;r++)this.array[t+r]=i.array[e+r];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var i=this.array,e=0,r=0,n=t.length;r<n;r++){var s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),s=new u),i[e++]=s.r,i[e++]=s.g,i[e++]=s.b}return this},copyIndicesArray:function(t){for(var i=this.array,e=0,r=0,n=t.length;r<n;r++){var s=t[r];i[e++]=s.a,i[e++]=s.b,i[e++]=s.c}return this},copyVector2sArray:function(t){for(var i=this.array,e=0,r=0,n=t.length;r<n;r++){var s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),s=new h),i[e++]=s.x,i[e++]=s.y}return this},copyVector3sArray:function(t){for(var i=this.array,e=0,n=0,s=t.length;n<s;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new r),i[e++]=a.x,i[e++]=a.y,i[e++]=a.z}return this},copyVector4sArray:function(t){for(var i=this.array,e=0,r=0,n=t.length;r<n;r++){var s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),s=new o),i[e++]=s.x,i[e++]=s.y,i[e++]=s.z,i[e++]=s.w}return this},set:function(t,i){return void 0===i&&(i=0),this.array.set(t,i),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,i){return this.array[t*this.itemSize]=i,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,i){return this.array[t*this.itemSize+1]=i,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,i){return this.array[t*this.itemSize+2]=i,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,i){return this.array[t*this.itemSize+3]=i,this},setXY:function(t,i,e){return t*=this.itemSize,this.array[t+0]=i,this.array[t+1]=e,this},setXYZ:function(t,i,e,r){return t*=this.itemSize,this.array[t+0]=i,this.array[t+1]=e,this.array[t+2]=r,this},setXYZW:function(t,i,e,r,n){return t*=this.itemSize,this.array[t+0]=i,this.array[t+1]=e,this.array[t+2]=r,this.array[t+3]=n,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),l.prototype=Object.create(c.prototype),l.prototype.constructor=l,d.prototype=Object.create(c.prototype),d.prototype.constructor=d,f.prototype=Object.create(c.prototype),f.prototype.constructor=f,Object.assign(m.prototype,{computeGroups:function(t){for(var i,e=[],r=void 0,n=t.faces,s=0;s<n.length;s++){var a=n[s];a.materialIndex!==r&&(r=a.materialIndex,void 0!==i&&(i.count=3*s-i.start,e.push(i)),i={start:3*s,materialIndex:r})}void 0!==i&&(i.count=3*s-i.start,e.push(i)),this.groups=e},fromGeometry:function(t){var i,e=t.faces,r=t.vertices,n=t.faceVertexUvs,s=n[0]&&n[0].length>0,a=n[1]&&n[1].length>0,o=t.morphTargets,u=o.length;if(u>0){i=[];for(x=0;x<u;x++)i[x]=[];this.morphTargets.position=i}var c,l=t.morphNormals,d=l.length;if(d>0){c=[];for(x=0;x<d;x++)c[x]=[];this.morphTargets.normal=c}for(var f=t.skinIndices,m=t.skinWeights,y=f.length===r.length,p=m.length===r.length,x=0;x<e.length;x++){var v=e[x];this.vertices.push(r[v.a],r[v.b],r[v.c]);var g=v.vertexNormals;if(3===g.length)this.normals.push(g[0],g[1],g[2]);else{var b=v.normal;this.normals.push(b,b,b)}var w=v.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var M=v.color;this.colors.push(M,M,M)}if(!0===s&&(void 0!==(z=n[0][x])?this.uvs.push(z[0],z[1],z[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",x),this.uvs.push(new h,new h,new h))),!0===a){var z=n[1][x];void 0!==z?this.uvs2.push(z[0],z[1],z[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",x),this.uvs2.push(new h,new h,new h))}for(A=0;A<u;A++){var _=o[A].vertices;i[A].push(_[v.a],_[v.b],_[v.c])}for(var A=0;A<d;A++){var S=l[A].vertexNormals[x];c[A].push(S.a,S.b,S.c)}y&&this.skinIndices.push(f[v.a],f[v.b],f[v.c]),p&&this.skinWeights.push(m[v.a],m[v.b],m[v.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}}),y.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],y.DefaultOrder="XYZ",Object.defineProperties(y.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(y.prototype,{isEuler:!0,set:function(t,i,e,r){return this._x=t,this._y=i,this._z=e,this._order=r||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,i,e){var r=k.clamp,n=t.elements,s=n[0],a=n[4],o=n[8],h=n[1],u=n[5],c=n[9],l=n[2],d=n[6],f=n[10];return i=i||this._order,"XYZ"===i?(this._y=Math.asin(r(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(-c,f),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(d,u),this._z=0)):"YXZ"===i?(this._x=Math.asin(-r(c,-1,1)),Math.abs(c)<.99999?(this._y=Math.atan2(o,f),this._z=Math.atan2(h,u)):(this._y=Math.atan2(-l,s),this._z=0)):"ZXY"===i?(this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.99999?(this._y=Math.atan2(-l,f),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(h,s))):"ZYX"===i?(this._y=Math.asin(-r(l,-1,1)),Math.abs(l)<.99999?(this._x=Math.atan2(d,f),this._z=Math.atan2(h,s)):(this._x=0,this._z=Math.atan2(-a,u))):"YZX"===i?(this._z=Math.asin(r(h,-1,1)),Math.abs(h)<.99999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-l,s)):(this._x=0,this._y=Math.atan2(o,f))):"XZY"===i?(this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(this._x=Math.atan2(d,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-c,f),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+i),this._order=i,!1!==e&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new i;return function(i,e,r){return t.makeRotationFromQuaternion(i),this.setFromRotationMatrix(t,e,r)}}(),setFromVector3:function(t,i){return this.set(t.x,t.y,t.z,i||this._order)},reorder:function(){var t=new e;return function(i){return t.setFromEuler(this),this.setFromQuaternion(t,i)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,i){return void 0===t&&(t=[]),void 0===i&&(i=0),t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new r(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(p.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}}),Object.assign(x.prototype,{isMatrix3:!0,set:function(t,i,e,r,n,s,a,o,h){var u=this.elements;return u[0]=t,u[1]=r,u[2]=a,u[3]=i,u[4]=n,u[5]=o,u[6]=e,u[7]=s,u[8]=h,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var i=this.elements,e=t.elements;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],this},setFromMatrix4:function(t){var i=t.elements;return this.set(i[0],i[4],i[8],i[1],i[5],i[9],i[2],i[6],i[10]),this},applyToBufferAttribute:function(){var t=new r;return function(i){for(var e=0,r=i.count;e<r;e++)t.x=i.getX(e),t.y=i.getY(e),t.z=i.getZ(e),t.applyMatrix3(this),i.setXYZ(e,t.x,t.y,t.z);return i}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,i){var e=t.elements,r=i.elements,n=this.elements,s=e[0],a=e[3],o=e[6],h=e[1],u=e[4],c=e[7],l=e[2],d=e[5],f=e[8],m=r[0],y=r[3],p=r[6],x=r[1],v=r[4],g=r[7],b=r[2],w=r[5],M=r[8];return n[0]=s*m+a*x+o*b,n[3]=s*y+a*v+o*w,n[6]=s*p+a*g+o*M,n[1]=h*m+u*x+c*b,n[4]=h*y+u*v+c*w,n[7]=h*p+u*g+c*M,n[2]=l*m+d*x+f*b,n[5]=l*y+d*v+f*w,n[8]=l*p+d*g+f*M,this},multiplyScalar:function(t){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=t,i[4]*=t,i[7]*=t,i[2]*=t,i[5]*=t,i[8]*=t,this},determinant:function(){var t=this.elements,i=t[0],e=t[1],r=t[2],n=t[3],s=t[4],a=t[5],o=t[6],h=t[7],u=t[8];return i*s*u-i*a*h-e*n*u+e*a*o+r*n*h-r*s*o},getInverse:function(t,i){t&&t.isMatrix4&&console.error("THREE.Matrix3.getInverse no longer takes a Matrix4 argument.");var e=t.elements,r=this.elements,n=e[0],s=e[1],a=e[2],o=e[3],h=e[4],u=e[5],c=e[6],l=e[7],d=e[8],f=d*h-u*l,m=u*c-d*o,y=l*o-h*c,p=n*f+s*m+a*y;if(0===p){var x="THREE.Matrix3.getInverse(): can't invert matrix, determinant is 0";if(!0===i)throw new Error(x);return console.warn(x),this.identity()}var v=1/p;return r[0]=f*v,r[1]=(a*l-d*s)*v,r[2]=(u*s-a*h)*v,r[3]=m*v,r[4]=(d*n-a*c)*v,r[5]=(a*o-u*n)*v,r[6]=y*v,r[7]=(s*c-l*n)*v,r[8]=(h*n-s*o)*v,this},transpose:function(){var t,i=this.elements;return t=i[1],i[1]=i[3],i[3]=t,t=i[2],i[2]=i[6],i[6]=t,t=i[5],i[5]=i[7],i[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var i=this.elements;return t[0]=i[0],t[1]=i[3],t[2]=i[6],t[3]=i[1],t[4]=i[4],t[5]=i[7],t[6]=i[2],t[7]=i[5],t[8]=i[8],this},equals:function(t){for(var i=this.elements,e=t.elements,r=0;r<9;r++)if(i[r]!==e[r])return!1;return!0},fromArray:function(t,i){void 0===i&&(i=0);for(var e=0;e<9;e++)this.elements[e]=t[e+i];return this},toArray:function(t,i){void 0===t&&(t=[]),void 0===i&&(i=0);var e=this.elements;return t[i]=e[0],t[i+1]=e[1],t[i+2]=e[2],t[i+3]=e[3],t[i+4]=e[4],t[i+5]=e[5],t[i+6]=e[6],t[i+7]=e[7],t[i+8]=e[8],t}});var U=0;v.DefaultUp=new r(0,1,0),v.DefaultMatrixAutoUpdate=!0,Object.assign(v.prototype,a.prototype,{isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,i){this.quaternion.setFromAxisAngle(t,i)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new e;return function(i,e){return t.setFromAxisAngle(i,e),this.quaternion.multiply(t),this}}(),rotateX:function(){var t=new r(1,0,0);return function(i){return this.rotateOnAxis(t,i)}}(),rotateY:function(){var t=new r(0,1,0);return function(i){return this.rotateOnAxis(t,i)}}(),rotateZ:function(){var t=new r(0,0,1);return function(i){return this.rotateOnAxis(t,i)}}(),translateOnAxis:function(){var t=new r;return function(i,e){return t.copy(i).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(e)),this}}(),translateX:function(){var t=new r(1,0,0);return function(i){return this.translateOnAxis(t,i)}}(),translateY:function(){var t=new r(0,1,0);return function(i){return this.translateOnAxis(t,i)}}(),translateZ:function(){var t=new r(0,0,1);return function(i){return this.translateOnAxis(t,i)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new i;return function(i){return i.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new i;return function(i){this.isCamera?t.lookAt(this.position,i,this.up):t.lookAt(i,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}var e=this.children.indexOf(t);return-1!==e&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,i){if(this[t]===i)return this;for(var e=0,r=this.children.length;e<r;e++){var n=this.children[e].getObjectByProperty(t,i);if(void 0!==n)return n}},getWorldPosition:function(t){var i=t||new r;return this.updateMatrixWorld(!0),i.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new r,i=new r;return function(r){var n=r||new e;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,n,i),n}}(),getWorldRotation:function(){var t=new e;return function(i){var e=i||new y;return this.getWorldQuaternion(t),e.setFromQuaternion(t,this.rotation.order,!1)}}(),getWorldScale:function(){var t=new r,i=new e;return function(e){var n=e||new r;return this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,n),n}}(),getWorldDirection:function(){var t=new e;return function(i){var e=i||new r;return this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var i=this.children,e=0,r=i.length;e<r;e++)i[e].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var i=this.children,e=0,r=i.length;e<r;e++)i[e].traverseVisible(t)}},traverseAncestors:function(t){var i=this.parent;null!==i&&(t(i),i.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var i=this.children,e=0,r=i.length;e<r;e++)i[e].updateMatrixWorld(t)},toJSON:function(t){function i(i,e){return void 0===i[e.uuid]&&(i[e.uuid]=e.toJSON(t)),e.uuid}function e(t){var i=[];for(var e in t){var r=t[e];delete r.metadata,i.push(r)}return i}var r=void 0===t||""===t,n={};r&&(t={geometries:{},materials:{},textures:{},images:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var s={};if(s.uuid=this.uuid,s.type=this.type,""!==this.name&&(s.name=this.name),"{}"!==JSON.stringify(this.userData)&&(s.userData=this.userData),!0===this.castShadow&&(s.castShadow=!0),!0===this.receiveShadow&&(s.receiveShadow=!0),!1===this.visible&&(s.visible=!1),s.matrix=this.matrix.toArray(),void 0!==this.geometry&&(s.geometry=i(t.geometries,this.geometry)),void 0!==this.material)if(Array.isArray(this.material)){for(var a=[],o=0,h=this.material.length;o<h;o++)a.push(i(t.materials,this.material[o]));s.material=a}else s.material=i(t.materials,this.material);if(this.children.length>0){s.children=[];for(o=0;o<this.children.length;o++)s.children.push(this.children[o].toJSON(t).object)}if(r){var u=e(t.geometries),c=e(t.materials),l=e(t.textures),d=e(t.images);u.length>0&&(n.geometries=u),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),d.length>0&&(n.images=d)}return n.object=s,n},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,i){if(void 0===i&&(i=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===i)for(var e=0;e<t.children.length;e++){var r=t.children[e];this.add(r.clone())}return this}}),Object.assign(b.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var i=0,e=t.vertexNormals.length;i<e;i++)this.vertexNormals[i]=t.vertexNormals[i].clone();for(var i=0,e=t.vertexColors.length;i<e;i++)this.vertexColors[i]=t.vertexColors[i].clone();return this}});var V=0;Object.assign(M.prototype,a.prototype,{isGeometry:!0,applyMatrix:function(t){for(var i=(new x).getNormalMatrix(t),e=0,r=this.vertices.length;e<r;e++)this.vertices[e].applyMatrix4(t);for(var e=0,r=this.faces.length;e<r;e++){var n=this.faces[e];n.normal.applyMatrix3(i).normalize();for(var s=0,a=n.vertexNormals.length;s<a;s++)n.vertexNormals[s].applyMatrix3(i).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new i;return function(i){return t.makeRotationX(i),this.applyMatrix(t),this}}(),rotateY:function(){var t=new i;return function(i){return t.makeRotationY(i),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new i;return function(i){return t.makeRotationZ(i),this.applyMatrix(t),this}}(),translate:function(){var t=new i;return function(i,e,r){return t.makeTranslation(i,e,r),this.applyMatrix(t),this}}(),scale:function(){var t=new i;return function(i,e,r){return t.makeScale(i,e,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new v;return function(i){t.lookAt(i),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function i(t,i,r,n){var s=new b(t,i,r,void 0!==o?[f[t].clone(),f[i].clone(),f[r].clone()]:[],void 0!==c?[e.colors[t].clone(),e.colors[i].clone(),e.colors[r].clone()]:[],n);e.faces.push(s),void 0!==l&&e.faceVertexUvs[0].push([m[t].clone(),m[i].clone(),m[r].clone()]),void 0!==d&&e.faceVertexUvs[1].push([y[t].clone(),y[i].clone(),y[r].clone()])}var e=this,n=null!==t.index?t.index.array:void 0,s=t.attributes,a=s.position.array,o=void 0!==s.normal?s.normal.array:void 0,c=void 0!==s.color?s.color.array:void 0,l=void 0!==s.uv?s.uv.array:void 0,d=void 0!==s.uv2?s.uv2.array:void 0;void 0!==d&&(this.faceVertexUvs[1]=[]);for(var f=[],m=[],y=[],p=0,x=0;p<a.length;p+=3,x+=2)e.vertices.push(new r(a[p],a[p+1],a[p+2])),void 0!==o&&f.push(new r(o[p],o[p+1],o[p+2])),void 0!==c&&e.colors.push(new u(c[p],c[p+1],c[p+2])),void 0!==l&&m.push(new h(l[x],l[x+1])),void 0!==d&&y.push(new h(d[x],d[x+1]));var v=t.groups;if(v.length>0)for(p=0;p<v.length;p++)for(var g=v[p],w=g.start,x=w,M=w+g.count;x<M;x+=3)void 0!==n?i(n[x],n[x+1],n[x+2],g.materialIndex):i(x,x+1,x+2,g.materialIndex);else if(void 0!==n)for(p=0;p<n.length;p+=3)i(n[p],n[p+1],n[p+2]);else for(p=0;p<a.length/3;p+=3)i(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,r=0===e?1:1/e,n=new i;return n.set(r,0,0,-r*t.x,0,r,0,-r*t.y,0,0,r,-r*t.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var t=new r,i=new r,e=0,n=this.faces.length;e<n;e++){var s=this.faces[e],a=this.vertices[s.a],o=this.vertices[s.b],h=this.vertices[s.c];t.subVectors(h,o),i.subVectors(a,o),t.cross(i),t.normalize(),s.normal.copy(t)}},computeVertexNormals:function(t){void 0===t&&(t=!0);var i,e,n,s,a,o;for(o=new Array(this.vertices.length),i=0,e=this.vertices.length;i<e;i++)o[i]=new r;if(t){var h,u,c,l=new r,d=new r;for(n=0,s=this.faces.length;n<s;n++)a=this.faces[n],h=this.vertices[a.a],u=this.vertices[a.b],c=this.vertices[a.c],l.subVectors(c,u),d.subVectors(h,u),l.cross(d),o[a.a].add(l),o[a.b].add(l),o[a.c].add(l)}else for(this.computeFaceNormals(),n=0,s=this.faces.length;n<s;n++)o[(a=this.faces[n]).a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(i=0,e=this.vertices.length;i<e;i++)o[i].normalize();for(n=0,s=this.faces.length;n<s;n++){var f=(a=this.faces[n]).vertexNormals;3===f.length?(f[0].copy(o[a.a]),f[1].copy(o[a.b]),f[2].copy(o[a.c])):(f[0]=o[a.a].clone(),f[1]=o[a.b].clone(),f[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,i,e;for(this.computeFaceNormals(),t=0,i=this.faces.length;t<i;t++){var r=(e=this.faces[t]).vertexNormals;3===r.length?(r[0].copy(e.normal),r[1].copy(e.normal),r[2].copy(e.normal)):(r[0]=e.normal.clone(),r[1]=e.normal.clone(),r[2]=e.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,i,e,n,s;for(e=0,n=this.faces.length;e<n;e++)for((s=this.faces[e]).__originalFaceNormal?s.__originalFaceNormal.copy(s.normal):s.__originalFaceNormal=s.normal.clone(),s.__originalVertexNormals||(s.__originalVertexNormals=[]),t=0,i=s.vertexNormals.length;t<i;t++)s.__originalVertexNormals[t]?s.__originalVertexNormals[t].copy(s.vertexNormals[t]):s.__originalVertexNormals[t]=s.vertexNormals[t].clone();var a=new M;for(a.faces=this.faces,t=0,i=this.morphTargets.length;t<i;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var o=this.morphNormals[t].faceNormals,h=this.morphNormals[t].vertexNormals;for(e=0,n=this.faces.length;e<n;e++)c=new r,l={a:new r,b:new r,c:new r},o.push(c),h.push(l)}var u=this.morphNormals[t];a.vertices=this.morphTargets[t].vertices,a.computeFaceNormals(),a.computeVertexNormals();var c,l;for(e=0,n=this.faces.length;e<n;e++)s=this.faces[e],c=u.faceNormals[e],l=u.vertexNormals[e],c.copy(s.normal),l.a.copy(s.vertexNormals[0]),l.b.copy(s.vertexNormals[1]),l.c.copy(s.vertexNormals[2])}for(e=0,n=this.faces.length;e<n;e++)(s=this.faces[e]).normal=s.__originalFaceNormal,s.vertexNormals=s.__originalVertexNormals},computeLineDistances:function(){for(var t=0,i=this.vertices,e=0,r=i.length;e<r;e++)e>0&&(t+=i[e].distanceTo(i[e-1])),this.lineDistances[e]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new s),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new n),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,i,e){if(!t||!t.isGeometry)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var r,n=this.vertices.length,s=this.vertices,a=t.vertices,o=this.faces,h=t.faces,u=this.faceVertexUvs[0],c=t.faceVertexUvs[0],l=this.colors,d=t.colors;void 0===e&&(e=0),void 0!==i&&(r=(new x).getNormalMatrix(i));for(var f=0,m=a.length;f<m;f++){var y=a[f].clone();void 0!==i&&y.applyMatrix4(i),s.push(y)}for(var f=0,m=d.length;f<m;f++)l.push(d[f].clone());for(f=0,m=h.length;f<m;f++){var p,v,g,w=h[f],M=w.vertexNormals,z=w.vertexColors;(p=new b(w.a+n,w.b+n,w.c+n)).normal.copy(w.normal),void 0!==r&&p.normal.applyMatrix3(r).normalize();for(var _=0,A=M.length;_<A;_++)v=M[_].clone(),void 0!==r&&v.applyMatrix3(r).normalize(),p.vertexNormals.push(v);p.color.copy(w.color);for(var _=0,A=z.length;_<A;_++)g=z[_],p.vertexColors.push(g.clone());p.materialIndex=w.materialIndex+e,o.push(p)}for(f=0,m=c.length;f<m;f++){var S=c[f],N=[];if(void 0!==S){for(var _=0,A=S.length;_<A;_++)N.push(S[_].clone());u.push(N)}}},mergeMesh:function(t){if(!t||!t.isMesh)return void console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t);t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)},mergeVertices:function(){var t,i,e,r,n,s,a,o,h={},u=[],c=[],l=Math.pow(10,4);for(e=0,r=this.vertices.length;e<r;e++)t=this.vertices[e],void 0===h[i=Math.round(t.x*l)+"_"+Math.round(t.y*l)+"_"+Math.round(t.z*l)]?(h[i]=e,u.push(this.vertices[e]),c[e]=u.length-1):c[e]=c[h[i]];var d=[];for(e=0,r=this.faces.length;e<r;e++){(n=this.faces[e]).a=c[n.a],n.b=c[n.b],n.c=c[n.c],s=[n.a,n.b,n.c];for(var f=0;f<3;f++)if(s[f]===s[(f+1)%3]){d.push(e);break}}for(e=d.length-1;e>=0;e--){var m=d[e];for(this.faces.splice(m,1),a=0,o=this.faceVertexUvs.length;a<o;a++)this.faceVertexUvs[a].splice(m,1)}var y=this.vertices.length-u.length;return this.vertices=u,y},sortFacesByMaterialIndex:function(){function t(t,i){return t.materialIndex-i.materialIndex}for(var i=this.faces,e=i.length,r=0;r<e;r++)i[r]._id=r;i.sort(t);var n,s,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];a&&a.length===e&&(n=[]),o&&o.length===e&&(s=[]);for(r=0;r<e;r++){var h=i[r]._id;n&&n.push(a[h]),s&&s.push(o[h])}n&&(this.faceVertexUvs[0]=n),s&&(this.faceVertexUvs[1]=s)},toJSON:function(){function t(t,i,e){return e?t|1<<i:t&~(1<<i)}function i(t){var i=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==d[i]?d[i]:(d[i]=l.length/3,l.push(t.x,t.y,t.z),d[i])}function e(t){var i=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==m[i]?m[i]:(m[i]=f.length,f.push(t.getHex()),m[i])}function r(t){var i=t.x.toString()+t.y.toString();return void 0!==p[i]?p[i]:(p[i]=y.length/2,y.push(t.x,t.y),p[i])}var n={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),void 0!==this.parameters){var s=this.parameters;for(var a in s)void 0!==s[a]&&(n[a]=s[a]);return n}for(var o=[],h=0;h<this.vertices.length;h++){var u=this.vertices[h];o.push(u.x,u.y,u.z)}for(var c=[],l=[],d={},f=[],m={},y=[],p={},h=0;h<this.faces.length;h++){var x=this.faces[h],v=void 0!==this.faceVertexUvs[0][h],g=x.normal.length()>0,b=x.vertexNormals.length>0,w=1!==x.color.r||1!==x.color.g||1!==x.color.b,M=x.vertexColors.length>0,z=0;if(z=t(z,0,0),z=t(z,1,!0),z=t(z,2,!1),z=t(z,3,v),z=t(z,4,g),z=t(z,5,b),z=t(z,6,w),z=t(z,7,M),c.push(z),c.push(x.a,x.b,x.c),c.push(x.materialIndex),v){var _=this.faceVertexUvs[0][h];c.push(r(_[0]),r(_[1]),r(_[2]))}if(g&&c.push(i(x.normal)),b){var A=x.vertexNormals;c.push(i(A[0]),i(A[1]),i(A[2]))}if(w&&c.push(e(x.color)),M){var S=x.vertexColors;c.push(e(S[0]),e(S[1]),e(S[2]))}}return n.data={},n.data.vertices=o,n.data.normals=l,f.length>0&&(n.data.colors=f),y.length>0&&(n.data.uvs=[y]),n.data.faces=c,n},clone:function(){return(new M).copy(this)},copy:function(t){var i,e,r,n,s,a;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var o=t.vertices;for(i=0,e=o.length;i<e;i++)this.vertices.push(o[i].clone());var h=t.colors;for(i=0,e=h.length;i<e;i++)this.colors.push(h[i].clone());var u=t.faces;for(i=0,e=u.length;i<e;i++)this.faces.push(u[i].clone());for(i=0,e=t.faceVertexUvs.length;i<e;i++){var c=t.faceVertexUvs[i];for(void 0===this.faceVertexUvs[i]&&(this.faceVertexUvs[i]=[]),r=0,n=c.length;r<n;r++){var l=c[r],d=[];for(s=0,a=l.length;s<a;s++){var f=l[s];d.push(f.clone())}this.faceVertexUvs[i].push(d)}}var m=t.morphTargets;for(i=0,e=m.length;i<e;i++){var y={};if(y.name=m[i].name,void 0!==m[i].vertices)for(y.vertices=[],r=0,n=m[i].vertices.length;r<n;r++)y.vertices.push(m[i].vertices[r].clone());if(void 0!==m[i].normals)for(y.normals=[],r=0,n=m[i].normals.length;r<n;r++)y.normals.push(m[i].normals[r].clone());this.morphTargets.push(y)}var p=t.morphNormals;for(i=0,e=p.length;i<e;i++){var x={};if(void 0!==p[i].vertexNormals)for(x.vertexNormals=[],r=0,n=p[i].vertexNormals.length;r<n;r++){var v=p[i].vertexNormals[r],g={};g.a=v.a.clone(),g.b=v.b.clone(),g.c=v.c.clone(),x.vertexNormals.push(g)}if(void 0!==p[i].faceNormals)for(x.faceNormals=[],r=0,n=p[i].faceNormals.length;r<n;r++)x.faceNormals.push(p[i].faceNormals[r].clone());this.morphNormals.push(x)}var b=t.skinWeights;for(i=0,e=b.length;i<e;i++)this.skinWeights.push(b[i].clone());var w=t.skinIndices;for(i=0,e=w.length;i<e;i++)this.skinIndices.push(w[i].clone());var M=t.lineDistances;for(i=0,e=M.length;i<e;i++)this.lineDistances.push(M[i]);var z=t.boundingBox;null!==z&&(this.boundingBox=z.clone());var _=t.boundingSphere;return null!==_&&(this.boundingSphere=_.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),z.MaxIndex=65535,Object.assign(z.prototype,a.prototype,{isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(g(t)>65535?d:l)(t,1):this.index=t},addAttribute:function(t,i){return i&&i.isBufferAttribute||i&&i.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),void this.setIndex(i)):(this.attributes[t]=i,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),void this.addAttribute(t,new c(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,i,e){this.groups.push({start:t,count:i,materialIndex:void 0!==e?e:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,i){this.drawRange.start=t,this.drawRange.count=i},applyMatrix:function(t){var i=this.attributes.position;void 0!==i&&(t.applyToBufferAttribute(i),i.needsUpdate=!0);var e=this.attributes.normal;return void 0!==e&&((new x).getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new i;return function(i){return t.makeRotationX(i),this.applyMatrix(t),this}}(),rotateY:function(){var t=new i;return function(i){return t.makeRotationY(i),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new i;return function(i){return t.makeRotationZ(i),this.applyMatrix(t),this}}(),translate:function(){var t=new i;return function(i,e,r){return t.makeTranslation(i,e,r),this.applyMatrix(t),this}}(),scale:function(){var t=new i;return function(i,e,r){return t.makeScale(i,e,r),this.applyMatrix(t),this}}(),lookAt:function(){var t=new v;return function(i){t.lookAt(i),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){this.computeBoundingBox();var t=this.boundingBox.getCenter().negate();return this.translate(t.x,t.y,t.z),t},setFromObject:function(t){var i=t.geometry;if(t.isPoints||t.isLine){var e=new f(3*i.vertices.length,3),r=new f(3*i.colors.length,3);if(this.addAttribute("position",e.copyVector3sArray(i.vertices)),this.addAttribute("color",r.copyColorsArray(i.colors)),i.lineDistances&&i.lineDistances.length===i.vertices.length){var n=new f(i.lineDistances.length,1);this.addAttribute("lineDistance",n.copyArray(i.lineDistances))}null!==i.boundingSphere&&(this.boundingSphere=i.boundingSphere.clone()),null!==i.boundingBox&&(this.boundingBox=i.boundingBox.clone())}else t.isMesh&&i&&i.isGeometry&&this.fromGeometry(i);return this},updateFromObject:function(t){var i=t.geometry;if(t.isMesh){var e=i.__directGeometry;if(!0===i.elementsNeedUpdate&&(e=void 0,i.elementsNeedUpdate=!1),void 0===e)return this.fromGeometry(i);e.verticesNeedUpdate=i.verticesNeedUpdate,e.normalsNeedUpdate=i.normalsNeedUpdate,e.colorsNeedUpdate=i.colorsNeedUpdate,e.uvsNeedUpdate=i.uvsNeedUpdate,e.groupsNeedUpdate=i.groupsNeedUpdate,i.verticesNeedUpdate=!1,i.normalsNeedUpdate=!1,i.colorsNeedUpdate=!1,i.uvsNeedUpdate=!1,i.groupsNeedUpdate=!1,i=e}var r;return!0===i.verticesNeedUpdate&&(void 0!==(r=this.attributes.position)&&(r.copyVector3sArray(i.vertices),r.needsUpdate=!0),i.verticesNeedUpdate=!1),!0===i.normalsNeedUpdate&&(void 0!==(r=this.attributes.normal)&&(r.copyVector3sArray(i.normals),r.needsUpdate=!0),i.normalsNeedUpdate=!1),!0===i.colorsNeedUpdate&&(void 0!==(r=this.attributes.color)&&(r.copyColorsArray(i.colors),r.needsUpdate=!0),i.colorsNeedUpdate=!1),i.uvsNeedUpdate&&(void 0!==(r=this.attributes.uv)&&(r.copyVector2sArray(i.uvs),r.needsUpdate=!0),i.uvsNeedUpdate=!1),i.lineDistancesNeedUpdate&&(void 0!==(r=this.attributes.lineDistance)&&(r.copyArray(i.lineDistances),r.needsUpdate=!0),i.lineDistancesNeedUpdate=!1),i.groupsNeedUpdate&&(i.computeGroups(t.geometry),this.groups=i.groups,i.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new m).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var i=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new c(i,3).copyVector3sArray(t.vertices)),t.normals.length>0){var e=new Float32Array(3*t.normals.length);this.addAttribute("normal",new c(e,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var r=new Float32Array(3*t.colors.length);this.addAttribute("color",new c(r,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var n=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new c(n,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var s=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new c(s,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var a=new(g(t.indices)>65535?Uint32Array:Uint16Array)(3*t.indices.length);this.setIndex(new c(a,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var o in t.morphTargets){for(var h=[],u=t.morphTargets[o],l=0,d=u.length;l<d;l++){var m=u[l],y=new f(3*m.length,3);h.push(y.copyVector3sArray(m))}this.morphAttributes[o]=h}if(t.skinIndices.length>0){var p=new f(4*t.skinIndices.length,4);this.addAttribute("skinIndex",p.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var x=new f(4*t.skinWeights.length,4);this.addAttribute("skinWeight",x.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new s);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new s,i=new r;return function(){null===this.boundingSphere&&(this.boundingSphere=new n);var e=this.attributes.position;if(e){var r=this.boundingSphere.center;t.setFromBufferAttribute(e),t.getCenter(r);for(var s=0,a=0,o=e.count;a<o;a++)i.x=e.getX(a),i.y=e.getY(a),i.z=e.getZ(a),s=Math.max(s,r.distanceToSquared(i));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,i=this.attributes,e=this.groups;if(i.position){var n=i.position.array;if(void 0===i.normal)this.addAttribute("normal",new c(new Float32Array(n.length),3));else for(var s=i.normal.array,a=0,o=s.length;a<o;a++)s[a]=0;var h,u,l,d=i.normal.array,f=new r,m=new r,y=new r,p=new r,x=new r;if(t){var v=t.array;0===e.length&&this.addGroup(0,v.length);for(var g=0,b=e.length;g<b;++g)for(var w=e[g],M=w.start,a=M,o=M+w.count;a<o;a+=3)h=3*v[a+0],u=3*v[a+1],l=3*v[a+2],f.fromArray(n,h),m.fromArray(n,u),y.fromArray(n,l),p.subVectors(y,m),x.subVectors(f,m),p.cross(x),d[h]+=p.x,d[h+1]+=p.y,d[h+2]+=p.z,d[u]+=p.x,d[u+1]+=p.y,d[u+2]+=p.z,d[l]+=p.x,d[l+1]+=p.y,d[l+2]+=p.z}else for(var a=0,o=n.length;a<o;a+=9)f.fromArray(n,a),m.fromArray(n,a+3),y.fromArray(n,a+6),p.subVectors(y,m),x.subVectors(f,m),p.cross(x),d[a]=p.x,d[a+1]=p.y,d[a+2]=p.z,d[a+3]=p.x,d[a+4]=p.y,d[a+5]=p.z,d[a+6]=p.x,d[a+7]=p.y,d[a+8]=p.z;this.normalizeNormals(),i.normal.needsUpdate=!0}},merge:function(t,i){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===i&&(i=0);var e=this.attributes;for(var r in e)if(void 0!==t.attributes[r])for(var n=e[r].array,s=t.attributes[r],a=s.array,o=0,h=s.itemSize*i;o<a.length;o++,h++)n[h]=a[o];return this},normalizeNormals:function(){for(var t,i,e,r,n=this.attributes.normal,s=0,a=n.count;s<a;s++)t=n.getX(s),i=n.getY(s),e=n.getZ(s),r=1/Math.sqrt(t*t+i*i+e*e),n.setXYZ(s,t*r,i*r,e*r)},toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new z,i=this.index.array,e=this.attributes;for(var r in e){for(var n=e[r],s=n.array,a=n.itemSize,o=new s.constructor(i.length*a),h=0,u=0,l=0,d=i.length;l<d;l++){h=i[l]*a;for(var f=0;f<a;f++)o[u++]=s[h++]}t.addAttribute(r,new c(o,a))}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var i=this.parameters;for(var e in i)void 0!==i[e]&&(t[e]=i[e]);return t}t.data={attributes:{}};var r=this.index;if(null!==r){a=Array.prototype.slice.call(r.array);t.data.index={type:r.array.constructor.name,array:a}}var n=this.attributes;for(var e in n){var s=n[e],a=Array.prototype.slice.call(s.array);t.data.attributes[e]={itemSize:s.itemSize,type:s.array.constructor.name,array:a,normalized:s.normalized}}var o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));var h=this.boundingSphere;return null!==h&&(t.data.boundingSphere={center:h.center.toArray(),radius:h.radius}),t},clone:function(){return(new z).copy(this)},copy:function(t){var i,e,r;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var n=t.index;null!==n&&this.setIndex(n.clone());var s=t.attributes;for(i in s){var a=s[i];this.addAttribute(i,a.clone())}var o=t.morphAttributes;for(i in o){var h=[],u=o[i];for(e=0,r=u.length;e<r;e++)h.push(u[e].clone());this.morphAttributes[i]=h}var c=t.groups;for(e=0,r=c.length;e<r;e++){var l=c[e];this.addGroup(l.start,l.count,l.materialIndex)}var d=t.boundingBox;null!==d&&(this.boundingBox=d.clone());var f=t.boundingSphere;return null!==f&&(this.boundingSphere=f.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var B={inclination:[[255,255,0],[253,254,2],[251,253,4],[249,252,5],[247,251,7],[245,250,9],[243,249,11],[241,249,13],[239,248,14],[237,247,16],[235,246,18],[233,245,20],[231,244,22],[229,243,23],[227,242,25],[225,241,27],[223,240,29],[221,239,31],[219,238,32],[217,237,34],[215,237,36],[213,236,38],[211,235,40],[209,234,41],[207,233,43],[205,232,45],[203,231,47],[201,230,49],[199,229,50],[197,228,52],[195,227,54],[193,226,56],[191,226,58],[189,225,60],[187,224,61],[185,223,63],[183,222,65],[181,221,67],[179,220,69],[177,219,70],[175,218,72],[173,217,74],[171,216,76],[169,215,78],[167,214,79],[165,214,81],[163,213,83],[161,212,85],[159,211,87],[157,210,88],[155,209,90],[153,208,92],[151,207,94],[149,206,96],[147,205,97],[145,204,99],[143,203,101],[141,202,103],[139,202,105],[137,201,106],[135,200,108],[133,199,110],[131,198,112],[129,197,114],[126,196,115],[124,195,117],[122,194,119],[120,193,121],[118,192,123],[116,191,124],[114,191,126],[112,190,128],[110,189,130],[108,188,132],[106,187,133],[104,186,135],[102,185,137],[100,184,139],[98,183,141],[96,182,142],[94,181,144],[92,180,146],[90,179,148],[88,179,150],[86,178,151],[84,177,153],[82,176,155],[80,175,157],[78,174,159],[76,173,160],[74,172,162],[72,171,164],[70,170,166],[68,169,168],[66,168,169],[64,167,171],[62,167,173],[60,166,175],[58,165,177],[56,164,179],[54,163,180],[52,162,182],[50,161,184],[48,160,186],[46,159,188],[44,158,189],[42,157,191],[40,156,193],[38,156,195],[36,155,197],[34,154,198],[32,153,200],[30,152,202],[28,151,204],[26,150,206],[24,149,207],[22,148,209],[20,147,211],[18,146,213],[16,145,215],[14,144,216],[12,144,218],[10,143,220],[8,142,222],[6,141,224],[4,140,225],[2,139,227],[0,138,229]],terrain:[[50,205,50],[52,205,52],[53,206,53],[55,206,55],[56,207,56],[58,207,58],[60,207,60],[61,208,61],[63,208,63],[65,209,65],[66,209,66],[68,209,68],[69,210,69],[71,210,71],[73,211,73],[74,211,74],[76,211,76],[77,212,77],[79,212,79],[81,212,81],[82,213,82],[84,213,84],[86,214,86],[87,214,87],[89,214,89],[90,215,90],[92,215,92],[94,216,94],[95,216,95],[97,216,97],[98,217,98],[100,217,100],[102,218,102],[103,218,103],[105,218,105],[106,219,106],[108,219,108],[110,220,110],[111,220,111],[113,220,113],[115,221,115],[116,221,116],[118,222,118],[119,222,119],[121,222,121],[123,223,123],[124,223,124],[126,224,126],[127,224,127],[129,224,129],[131,225,131],[132,225,132],[134,225,134],[136,226,136],[137,226,137],[139,227,139],[140,227,140],[142,227,142],[144,228,144],[145,228,145],[147,229,147],[148,229,148],[150,229,150],[152,230,152],[153,230,153],[155,231,155],[157,231,157],[158,231,158],[160,232,160],[161,232,161],[163,233,163],[165,233,165],[166,233,166],[168,234,168],[169,234,169],[171,235,171],[173,235,173],[174,235,174],[176,236,176],[178,236,178],[179,236,179],[181,237,181],[182,237,182],[184,238,184],[186,238,186],[187,238,187],[189,239,189],[190,239,190],[192,240,192],[194,240,194],[195,240,195],[197,241,197],[199,241,199],[200,242,200],[202,242,202],[203,242,203],[205,243,205],[207,243,207],[208,244,208],[210,244,210],[211,244,211],[213,245,213],[215,245,215],[216,246,216],[218,246,218],[219,246,219],[221,247,221],[223,247,223],[224,248,224],[226,248,226],[228,248,228],[229,249,229],[231,249,231],[232,249,232],[234,250,234],[236,250,236],[237,251,237],[239,251,239],[240,251,240],[242,252,242],[244,252,244],[245,253,245],[247,253,247],[249,253,249],[250,254,250],[252,254,252],[253,255,253],[255,255,255]],gradient:[[235,99,111],[235,99,112],[234,99,113],[234,100,114],[233,100,114],[233,100,115],[232,100,116],[232,101,117],[231,101,118],[231,101,119],[230,101,119],[230,101,120],[230,102,121],[229,102,122],[229,102,123],[228,102,124],[228,103,124],[227,103,125],[227,103,126],[226,103,127],[226,103,128],[226,104,129],[225,104,129],[225,104,130],[224,104,131],[224,104,132],[223,105,133],[223,105,134],[222,105,134],[222,105,135],[221,106,136],[221,106,137],[221,106,138],[220,106,139],[220,106,139],[219,107,140],[219,107,141],[218,107,142],[218,107,143],[217,108,144],[217,108,144],[216,108,145],[216,108,146],[216,108,147],[215,109,148],[215,109,149],[214,109,149],[214,109,150],[213,110,151],[213,110,152],[212,110,153],[212,110,154],[211,110,154],[211,111,155],[211,111,156],[210,111,157],[210,111,158],[209,111,159],[209,112,159],[208,112,160],[208,112,161],[207,112,162],[207,113,163],[207,113,164],[206,113,164],[206,113,165],[205,113,166],[205,114,167],[204,114,168],[204,114,169],[203,114,169],[203,115,170],[202,115,171],[202,115,172],[201,115,172],[200,116,173],[199,116,173],[198,116,173],[197,117,174],[196,117,174],[194,118,174],[193,118,175],[192,118,175],[191,119,176],[190,119,176],[189,119,176],[188,120,177],[187,120,177],[186,121,177],[185,121,178],[184,121,178],[183,122,178],[181,122,179],[180,122,179],[179,123,179],[178,123,180],[177,124,180],[176,124,181],[175,124,181],[174,125,181],[173,125,182],[172,125,182],[171,126,182],[170,126,183],[168,126,183],[167,127,183],[166,127,184],[165,128,184],[164,128,184],[163,128,185],[162,129,185],[161,129,186],[160,129,186],[159,130,186],[158,130,187],[157,131,187],[155,131,187],[154,131,188],[153,132,188],[152,132,188],[151,132,189],[150,133,189],[149,133,189],[148,133,190],[147,134,190],[146,134,191],[145,135,191],[144,135,191],[142,135,192],[141,136,192],[140,136,192],[139,136,193],[138,137,193],[137,137,193],[136,138,194],[135,138,194],[134,138,194],[133,139,195],[132,139,195],[131,139,196],[129,140,196],[128,140,196],[127,141,197],[126,141,197],[125,141,197],[124,142,198],[123,142,198],[122,142,198],[120,142,197],[119,143,197],[117,143,197],[116,143,197],[114,143,196],[113,144,196],[111,144,196],[110,144,195],[108,144,195],[107,144,195],[105,145,195],[104,145,194],[102,145,194],[101,145,194],[100,146,193],[98,146,193],[97,146,193],[95,146,193],[94,146,192],[92,147,192],[91,147,192],[89,147,191],[88,147,191],[86,147,191],[85,148,191],[83,148,190],[82,148,190],[80,148,190],[79,149,189],[78,149,189],[76,149,189],[75,149,189],[73,149,188],[72,150,188],[70,150,188],[69,150,187],[67,150,187],[66,151,187],[64,151,186],[63,151,186],[61,151,186],[60,151,186],[59,152,185],[57,152,185],[56,152,185],[54,152,184],[53,153,184],[51,153,184],[50,153,184],[48,153,183],[47,153,183],[45,154,183],[44,154,182],[42,154,182],[41,154,182],[39,154,182],[38,155,181],[37,155,181],[35,155,181],[34,155,180],[32,156,180],[31,156,180],[29,156,180],[28,156,179],[26,156,179],[25,157,179],[23,157,178],[22,157,178],[20,157,178],[19,158,178],[17,158,177],[16,158,177],[16,158,176],[17,158,176],[17,158,175],[18,158,174],[18,158,174],[19,158,173],[19,158,172],[20,158,171],[20,158,171],[21,158,170],[21,158,169],[22,158,169],[22,159,168],[23,159,167],[23,159,167],[23,159,166],[24,159,165],[24,159,164],[25,159,164],[25,159,163],[26,159,162],[26,159,162],[27,159,161],[27,159,160],[28,159,160],[28,159,159],[29,159,158],[29,159,157],[30,159,157],[30,159,156],[30,159,155],[31,159,155],[31,159,154],[32,159,153],[32,159,153],[33,159,152],[33,160,151],[34,160,150],[34,160,150],[35,160,149],[35,160,148],[36,160,148],[36,160,147],[36,160,146],[37,160,146],[37,160,145],[38,160,144],[38,160,143],[39,160,143],[39,160,142],[40,160,141],[40,160,141],[41,160,140],[41,160,139],[42,160,139],[42,160,138],[43,160,137],[43,160,136],[43,160,136],[44,160,135],[44,161,134],[45,161,134],[45,161,133],[46,161,132],[46,161,132],[47,161,131],[47,161,130],[48,161,129],[48,161,129],[49,161,128],[49,161,127],[50,161,127],[50,161,126],[51,161,125],[52,161,125],[53,161,124],[54,161,123],[55,161,123],[56,161,122],[56,160,121],[57,160,121],[58,160,120],[59,160,120],[60,160,119],[61,160,118],[62,160,118],[63,160,117],[64,160,116],[65,160,116],[66,160,115],[67,160,114],[67,159,114],[68,159,113],[69,159,112],[70,159,112],[71,159,111],[72,159,111],[73,159,110],[74,159,109],[75,159,109],[76,159,108],[77,159,107],[78,159,107],[78,158,106],[79,158,105],[80,158,105],[81,158,104],[82,158,103],[83,158,103],[84,158,102],[85,158,102],[86,158,101],[87,158,100],[88,158,100],[89,158,99],[89,157,98],[90,157,98],[91,157,97],[92,157,96],[93,157,96],[94,157,95],[95,157,94],[96,157,94],[97,157,93],[98,157,93],[99,157,92],[100,157,91],[100,156,91],[101,156,90],[102,156,89],[103,156,89],[104,156,88],[105,156,87],[106,156,87],[107,156,86],[108,156,85],[109,156,85],[110,156,84],[111,156,84],[111,155,83],[112,155,82],[113,155,82],[114,155,81],[115,155,80],[116,155,80],[117,155,79],[118,155,79],[118,155,79],[119,154,78],[120,154,78],[121,154,78],[121,154,78],[122,154,78],[123,153,77],[123,153,77],[124,153,77],[125,153,77],[126,153,77],[126,152,77],[127,152,76],[128,152,76],[128,152,76],[129,152,76],[130,151,76],[131,151,75],[131,151,75],[132,151,75],[133,150,75],[133,150,75],[134,150,74],[135,150,74],[136,150,74],[136,149,74],[137,149,74],[138,149,73],[138,149,73],[139,149,73],[140,148,73],[141,148,73],[141,148,72],[142,148,72],[143,148,72],[143,147,72],[144,147,72],[145,147,72],[145,147,71],[146,147,71],[147,146,71],[148,146,71],[148,146,71],[149,146,70],[150,146,70],[150,145,70],[151,145,70],[152,145,70],[153,145,69],[153,145,69],[154,144,69],[155,144,69],[155,144,69],[156,144,68],[157,143,68],[158,143,68],[158,143,68],[159,143,68],[160,143,67],[160,142,67],[161,142,67],[162,142,67],[163,142,67],[163,142,67],[164,141,66],[165,141,66],[165,141,66],[166,141,66],[167,141,66],[168,140,65],[168,140,65],[169,140,65],[169,140,65],[170,140,66],[170,139,66],[171,139,66],[171,139,67],[172,139,67],[172,139,67],[172,138,68],[173,138,68],[173,138,68],[174,138,69],[174,138,69],[175,137,69],[175,137,70],[175,137,70],[176,137,70],[176,137,71],[177,136,71],[177,136,71],[177,136,72],[178,136,72],[178,135,72],[179,135,73],[179,135,73],[180,135,73],[180,135,74],[180,134,74],[181,134,74],[181,134,75],[182,134,75],[182,134,75],[183,133,76],[183,133,76],[183,133,76],[184,133,77],[184,133,77],[185,132,77],[185,132,77],[186,132,78],[186,132,78],[186,132,78],[187,131,79],[187,131,79],[188,131,79],[188,131,80],[189,131,80],[189,130,80],[189,130,81],[190,130,81],[190,130,81],[191,130,82],[191,129,82],[192,129,82],[192,129,83],[192,129,83],[193,128,83],[193,128,84],[194,128,84],[194,128,84],[194,128,85],[195,127,85],[195,127,85],[196,127,86],[196,127,86],[197,127,86],[197,126,87],[197,126,87],[198,126,87],[198,126,88],[199,126,88],[199,125,88],[200,125,89],[200,125,89]],survey:[[166,206,227],[31,120,180],[178,223,138],[51,160,44],[251,154,153],[227,26,28],[253,191,111],[255,127,0],[202,178,214],[106,61,154],[255,255,153]],depth:[[255,255,204],[255,255,203],[255,255,203],[255,254,202],[255,254,202],[255,254,201],[255,254,200],[255,253,200],[255,253,199],[255,253,199],[255,253,198],[255,252,197],[255,252,197],[255,252,196],[255,252,196],[255,251,195],[255,251,194],[255,251,194],[255,251,193],[255,250,193],[255,250,192],[255,250,191],[255,250,191],[255,249,190],[255,249,190],[255,249,189],[255,249,188],[255,248,188],[255,248,187],[255,248,187],[255,248,186],[255,247,185],[255,247,185],[255,247,184],[255,247,184],[255,246,183],[255,246,182],[255,246,182],[255,246,181],[255,245,180],[255,245,180],[255,245,179],[255,245,179],[255,244,178],[255,244,177],[255,244,177],[255,244,176],[255,243,176],[255,243,175],[255,243,174],[255,243,174],[255,242,173],[255,242,173],[255,242,172],[255,242,171],[255,241,171],[255,241,170],[255,241,170],[255,241,169],[255,240,168],[255,240,168],[255,240,167],[255,240,167],[255,239,166],[255,239,165],[255,239,165],[255,239,164],[255,238,164],[255,238,163],[255,238,162],[255,238,162],[255,237,161],[255,237,161],[255,237,160],[255,237,159],[255,236,159],[255,236,158],[255,236,158],[255,236,157],[255,235,157],[255,235,156],[255,235,155],[255,235,155],[255,234,154],[255,234,154],[255,234,153],[255,233,153],[255,233,152],[255,233,151],[255,233,151],[255,232,150],[255,232,150],[255,232,149],[255,232,148],[255,231,148],[255,231,147],[255,231,147],[255,230,146],[255,230,146],[255,230,145],[255,230,144],[255,229,144],[255,229,143],[255,229,143],[255,229,142],[255,228,142],[255,228,141],[255,228,140],[255,227,140],[255,227,139],[254,227,139],[254,227,138],[254,226,138],[254,226,137],[254,226,136],[254,225,136],[254,225,135],[254,225,135],[254,225,134],[254,224,134],[254,224,133],[254,224,132],[254,224,132],[254,223,131],[254,223,131],[254,223,130],[254,222,130],[254,222,129],[254,222,128],[254,222,128],[254,221,127],[254,221,127],[254,221,126],[254,221,125],[254,220,125],[254,220,124],[254,220,124],[254,219,123],[254,219,123],[254,219,122],[254,219,121],[254,218,121],[254,218,120],[254,218,120],[254,218,119],[254,217,119],[254,217,118],[254,216,117],[254,216,117],[254,215,116],[254,215,116],[254,214,115],[254,214,115],[254,213,114],[254,213,113],[254,212,113],[254,212,112],[254,211,112],[254,211,111],[254,210,111],[254,210,110],[254,209,109],[254,208,109],[254,208,108],[254,207,108],[254,207,107],[254,206,106],[254,206,106],[254,205,105],[254,205,105],[254,204,104],[254,204,104],[254,203,103],[254,203,102],[254,202,102],[254,202,101],[254,201,101],[254,200,100],[254,200,100],[254,199,99],[254,199,98],[254,198,98],[254,198,97],[254,197,97],[254,197,96],[254,196,96],[254,196,95],[254,195,94],[254,195,94],[254,194,93],[254,193,93],[254,193,92],[254,192,92],[254,192,91],[254,191,90],[254,191,90],[254,190,89],[254,190,89],[254,189,88],[254,189,88],[254,188,87],[254,188,86],[254,187,86],[254,187,85],[254,186,85],[254,185,84],[254,185,83],[254,184,83],[254,184,82],[254,183,82],[254,183,81],[254,182,81],[254,182,80],[254,181,79],[254,181,79],[254,180,78],[254,180,78],[254,179,77],[254,179,77],[254,178,76],[254,177,76],[254,177,76],[254,176,75],[254,176,75],[254,175,75],[254,175,75],[254,174,74],[254,174,74],[254,173,74],[254,173,74],[254,172,74],[254,172,73],[254,171,73],[254,171,73],[254,170,73],[254,170,72],[254,169,72],[254,169,72],[254,168,72],[254,168,72],[254,167,71],[254,167,71],[254,166,71],[254,166,71],[254,165,71],[254,165,70],[254,164,70],[254,164,70],[254,163,70],[254,163,69],[254,162,69],[254,162,69],[254,161,69],[254,161,69],[254,160,68],[254,160,68],[253,159,68],[253,159,68],[253,158,67],[253,158,67],[253,157,67],[253,157,67],[253,156,67],[253,156,66],[253,155,66],[253,155,66],[253,154,66],[253,154,65],[253,153,65],[253,153,65],[253,152,65],[253,152,65],[253,151,64],[253,151,64],[253,150,64],[253,150,64],[253,149,64],[253,149,63],[253,148,63],[253,148,63],[253,147,63],[253,147,62],[253,146,62],[253,146,62],[253,145,62],[253,145,62],[253,144,61],[253,144,61],[253,143,61],[253,143,61],[253,142,60],[253,142,60],[253,141,60],[253,140,60],[253,139,60],[253,138,59],[253,138,59],[253,137,59],[253,136,59],[253,135,58],[253,134,58],[253,133,58],[253,132,58],[253,132,57],[253,131,57],[253,130,57],[253,129,57],[253,128,56],[253,127,56],[253,126,56],[253,125,56],[253,125,55],[253,124,55],[253,123,55],[253,122,55],[253,121,54],[253,120,54],[253,119,54],[253,119,54],[253,118,53],[253,117,53],[253,116,53],[253,115,53],[253,114,52],[253,113,52],[253,113,52],[253,112,52],[253,111,51],[253,110,51],[252,109,51],[252,108,51],[252,107,50],[252,106,50],[252,106,50],[252,105,50],[252,104,49],[252,103,49],[252,102,49],[252,101,49],[252,100,48],[252,100,48],[252,99,48],[252,98,48],[252,97,47],[252,96,47],[252,95,47],[252,94,47],[252,94,46],[252,93,46],[252,92,46],[252,91,46],[252,90,45],[252,89,45],[252,88,45],[252,87,45],[252,87,44],[252,86,44],[252,85,44],[252,84,44],[252,83,43],[252,82,43],[252,81,43],[252,81,43],[252,80,42],[252,79,42],[252,78,42],[252,77,42],[251,77,42],[251,76,41],[251,75,41],[250,74,41],[250,74,41],[250,73,41],[249,72,40],[249,72,40],[249,71,40],[248,70,40],[248,69,40],[248,69,40],[247,68,39],[247,67,39],[247,67,39],[246,66,39],[246,65,39],[245,64,38],[245,64,38],[245,63,38],[244,62,38],[244,62,38],[244,61,37],[243,60,37],[243,59,37],[243,59,37],[242,58,37],[242,57,36],[242,57,36],[241,56,36],[241,55,36],[241,54,36],[240,54,35],[240,53,35],[240,52,35],[239,52,35],[239,51,35],[239,50,35],[238,50,34],[238,49,34],[238,48,34],[237,47,34],[237,47,34],[237,46,33],[236,45,33],[236,45,33],[236,44,33],[235,43,33],[235,42,32],[235,42,32],[234,41,32],[234,40,32],[234,40,32],[233,39,31],[233,38,31],[232,37,31],[232,37,31],[232,36,31],[231,35,30],[231,35,30],[231,34,30],[230,33,30],[230,32,30],[230,32,30],[229,31,29],[229,30,29],[229,30,29],[228,29,29],[228,28,29],[228,27,28],[227,27,28],[227,26,28],[226,26,28],[226,25,28],[225,25,28],[224,25,29],[224,24,29],[223,24,29],[222,24,29],[222,23,29],[221,23,29],[220,22,29],[219,22,30],[219,22,30],[218,21,30],[217,21,30],[217,21,30],[216,20,30],[215,20,30],[215,20,30],[214,19,31],[213,19,31],[213,19,31],[212,18,31],[211,18,31],[211,17,31],[210,17,31],[209,17,32],[209,16,32],[208,16,32],[207,16,32],[206,15,32],[206,15,32],[205,15,32],[204,14,33],[204,14,33],[203,14,33],[202,13,33],[202,13,33],[201,12,33],[200,12,33],[200,12,33],[199,11,34],[198,11,34],[198,11,34],[197,10,34],[196,10,34],[195,10,34],[195,9,34],[194,9,35],[193,9,35],[193,8,35],[192,8,35],[191,7,35],[191,7,35],[190,7,35],[189,6,36],[189,6,36],[188,6,36],[187,5,36],[187,5,36],[186,5,36],[185,4,36],[185,4,36],[184,4,37],[183,3,37],[182,3,37],[182,2,37],[181,2,37],[180,2,37],[180,1,37],[179,1,38],[178,1,38],[178,0,38],[177,0,38]],spectrum:[[100,60,60],[100,63,60],[100,66,60],[100,68,60],[100,71,60],[100,73,60],[100,76,60],[100,79,60],[100,81,60],[100,84,60],[100,86,60],[100,89,60],[100,92,60],[100,94,60],[100,97,60],[99,100,60],[97,100,60],[94,100,60],[92,100,60],[89,100,60],[86,100,60],[84,100,60],[81,100,60],[79,100,60],[76,100,60],[73,100,60],[71,100,60],[68,100,60],[65,100,60],[63,100,60],[60,100,60],[60,100,63],[60,100,66],[60,100,68],[60,100,71],[60,100,73],[60,100,76],[60,100,79],[60,100,81],[60,100,84],[60,100,86],[60,100,89],[60,100,92],[60,100,94],[60,100,97],[60,99,100],[60,97,100],[60,94,100],[60,92,100],[60,89,100],[60,86,100],[60,84,100],[60,81,100],[60,79,100],[60,76,100],[60,73,100],[60,71,100],[60,68,100],[60,65,100],[60,63,100],[60,60,100],[63,60,100],[66,60,100],[68,60,100],[71,60,100],[73,60,100],[76,60,100],[79,60,100],[81,60,100],[84,60,100],[87,60,100],[89,60,100],[92,60,100],[94,60,100],[97,60,100],[100,60,99],[100,60,97],[100,60,94],[100,60,92],[100,60,89],[100,60,86],[100,60,84],[100,60,81],[100,60,78],[100,60,76],[100,60,73],[100,60,71],[100,60,68],[100,60,65],[100,60,63],[100,60,60],[100,63,60],[100,66,60],[100,68,60],[100,71,60],[100,73,60],[100,76,60],[100,79,60],[100,81,60],[100,84,60],[100,87,60],[100,89,60],[100,92,60],[100,94,60],[100,97,60],[99,100,60],[97,100,60],[94,100,60],[92,100,60],[89,100,60],[86,100,60],[84,100,60],[81,100,60],[78,100,60],[76,100,60],[73,100,60],[71,100,60],[68,100,60],[65,100,60],[63,100,60],[60,100,60],[60,100,63],[60,100,66],[60,100,68],[60,100,71],[60,100,74],[60,100,76],[60,100,79]]},C=new r(0,0,1);_.prototype=Object.create(z.prototype),_.prototype.constructor=_;var T,O=6378137*Math.PI;onmessage=A});
|