diff --git a/build/three.js b/build/three.js index 169de724f891189226d77d3a1166ce7b4985f123..e653c1929138739b08b1b50a5a7788c63950557b 100644 --- a/build/three.js +++ b/build/three.js @@ -22833,25 +22833,28 @@ raycast: ( function () { - var matrixPosition = new Vector3(); + var intersectPoint = new Vector3(); + var worldPosition = new Vector3(); + var worldScale = new Vector3(); return function raycast( raycaster, intersects ) { - matrixPosition.setFromMatrixPosition( this.matrixWorld ); + worldPosition.setFromMatrixPosition( this.matrixWorld ); + raycaster.ray.closestPointToPoint( worldPosition, intersectPoint ); - var distanceSq = raycaster.ray.distanceSqToPoint( matrixPosition ); - var guessSizeSq = this.scale.x * this.scale.y / 4; + worldScale.setFromMatrixScale( this.matrixWorld ); + var guessSizeSq = worldScale.x * worldScale.y / 4; - if ( distanceSq > guessSizeSq ) { + if ( worldPosition.distanceToSquared( intersectPoint ) > guessSizeSq ) return; - return; + var distance = raycaster.ray.origin.distanceTo( intersectPoint ); - } + if ( distance < raycaster.near || distance > raycaster.far ) return; intersects.push( { - distance: Math.sqrt( distanceSq ), - point: this.position, + distance: distance, + point: intersectPoint.clone(), face: null, object: this @@ -39171,7 +39174,7 @@ start: function () { - this.startTime = ( performance || Date ).now(); + this.startTime = ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732 this.oldTime = this.startTime; this.elapsedTime = 0; @@ -39205,7 +39208,7 @@ if ( this.running ) { - var newTime = ( performance || Date ).now(); + var newTime = ( typeof performance === 'undefined' ? Date : performance ).now(); diff = ( newTime - this.oldTime ) / 1000; this.oldTime = newTime; diff --git a/build/three.min.js b/build/three.min.js index 958201e0a0c5e6fb2453ce43c00087eb540f70c2..7ae2fd7143da4a27f2043484b27b2d49fc6fee77 100644 --- a/build/three.min.js +++ b/build/three.min.js @@ -1,6 +1,6 @@ // threejs.org/license -(function(k,wa){"object"===typeof exports&&"undefined"!==typeof module?wa(exports):"function"===typeof define&&define.amd?define(["exports"],wa):wa(k.THREE=k.THREE||{})})(this,function(k){function wa(){}function C(a,b){this.x=a||0;this.y=b||0}function aa(a,b,c,d,e,f,g,h,m,l){Object.defineProperty(this,"id",{value:$e++});this.uuid=T.generateUUID();this.name="";this.image=void 0!==a?a:aa.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:aa.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT= -void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==m?m:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new C(0,0);this.repeat=new C(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==l?l:3E3;this.version=0;this.onUpdate=null}function fa(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Db(a,b,c){this.uuid=T.generateUUID();this.width= +(function(k,wa){"object"===typeof exports&&"undefined"!==typeof module?wa(exports):"function"===typeof define&&define.amd?define(["exports"],wa):wa(k.THREE=k.THREE||{})})(this,function(k){function wa(){}function D(a,b){this.x=a||0;this.y=b||0}function aa(a,b,c,d,e,f,g,h,m,l){Object.defineProperty(this,"id",{value:$e++});this.uuid=T.generateUUID();this.name="";this.image=void 0!==a?a:aa.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:aa.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT= +void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==m?m:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new D(0,0);this.repeat=new D(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==l?l:3E3;this.version=0;this.onUpdate=null}function fa(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Db(a,b,c){this.uuid=T.generateUUID();this.width= a;this.height=b;this.scissor=new fa(0,0,a,b);this.scissorTest=!1;this.viewport=new fa(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=1006);this.texture=new aa(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Eb(a,b,c){Db.call(this,a,b,c);this.activeMipMapLevel= this.activeCubeFace=0}function la(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function q(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function S(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0=d||0 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n")); v.compileShader(J);v.compileShader(N);v.attachShader(P,J);v.attachShader(P,N);v.linkProgram(P);R=P;w=v.getAttribLocation(R,"position");x=v.getAttribLocation(R,"uv");c=v.getUniformLocation(R,"uvOffset");d=v.getUniformLocation(R,"uvScale");e=v.getUniformLocation(R,"rotation");f=v.getUniformLocation(R,"scale");g=v.getUniformLocation(R,"color");h=v.getUniformLocation(R,"map");m=v.getUniformLocation(R,"opacity");l=v.getUniformLocation(R,"modelViewMatrix");u=v.getUniformLocation(R,"projectionMatrix");p= -v.getUniformLocation(R,"fogType");n=v.getUniformLocation(R,"fogDensity");t=v.getUniformLocation(R,"fogNear");k=v.getUniformLocation(R,"fogFar");r=v.getUniformLocation(R,"fogColor");D=v.getUniformLocation(R,"alphaTest");P=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");P.width=8;P.height=8;J=P.getContext("2d");J.fillStyle="white";J.fillRect(0,0,8,8);Ea=new aa(P);Ea.needsUpdate=!0}v.useProgram(R);F.initAttributes();F.enableAttribute(w);F.enableAttribute(x);F.disableUnusedAttributes(); -F.disable(v.CULL_FACE);F.enable(v.BLEND);v.bindBuffer(v.ARRAY_BUFFER,H);v.vertexAttribPointer(w,2,v.FLOAT,!1,16,0);v.vertexAttribPointer(x,2,v.FLOAT,!1,16,8);v.bindBuffer(v.ELEMENT_ARRAY_BUFFER,z);v.uniformMatrix4fv(u,!1,Ra.projectionMatrix.elements);F.activeTexture(v.TEXTURE0);v.uniform1i(h,0);J=P=0;(N=q.fog)?(v.uniform3f(r,N.color.r,N.color.g,N.color.b),N.isFog?(v.uniform1f(t,N.near),v.uniform1f(k,N.far),v.uniform1i(p,1),J=P=1):N.isFogExp2&&(v.uniform1f(n,N.density),v.uniform1i(p,2),J=P=2)):(v.uniform1i(p, -0),J=P=0);for(var N=0,M=b.length;Nc&&(c=a[b]);return c}function K(){Object.defineProperty(this,"id",{value:Rd++});this.uuid=T.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.boundingSphere=this.boundingBox=null;this.groupsNeedUpdate=this.lineDistancesNeedUpdate=this.colorsNeedUpdate=this.normalsNeedUpdate=this.uvsNeedUpdate=this.verticesNeedUpdate=this.elementsNeedUpdate=!1}function G(){Object.defineProperty(this,"id",{value:Rd++});this.uuid=T.generateUUID();this.name="";this.type="BufferGeometry"; this.index=null;this.attributes={};this.morphAttributes={};this.groups=[];this.boundingSphere=this.boundingBox=null;this.drawRange={start:0,count:Infinity}}function xa(a,b){E.call(this);this.type="Mesh";this.geometry=void 0!==a?a:new G;this.material=void 0!==b?b:new Ia({color:16777215*Math.random()});this.drawMode=0;this.updateMorphTargets()}function Hb(a,b,c,d,e,f){K.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:f};this.fromBufferGeometry(new ib(a, -b,c,d,e,f));this.mergeVertices()}function ib(a,b,c,d,e,f){function g(a,b,c,d,e,f,g,k,H,z,R){var Ea=f/H,U=g/z,C=f/2,da=g/2,E=k/2;g=H+1;var A=z+1,P=f=0,J,N,M=new q;for(N=0;Ne;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]); else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d["delete"](b.texture);d["delete"](b)}q.textures--}function n(b,g){var l=d.get(b);if(0r;r++)k[r]=n||p?p?b.image[r].image:b.image[r]:h(b.image[r],e.maxCubemapSize);var y=m(k[0]),w=f(b.format),C=f(b.type);t(a.TEXTURE_CUBE_MAP, -b,y);for(r=0;6>r;r++)if(n)for(var da,E=k[r].mipmaps,A=0,P=E.length;Ar;r++)k[r]=n||p?p?b.image[r].image:b.image[r]:h(b.image[r],e.maxCubemapSize);var A=m(k[0]),w=f(b.format),D=f(b.type);t(a.TEXTURE_CUBE_MAP, +b,A);for(r=0;6>r;r++)if(n)for(var da,E=k[r].mipmaps,B=0,P=E.length;Bl;l++)e.__webglFramebuffer[l]=a.createFramebuffer()}else e.__webglFramebuffer=a.createFramebuffer();if(g){c.bindTexture(a.TEXTURE_CUBE_MAP,f.__webglTexture);t(a.TEXTURE_CUBE_MAP,b.texture,h);for(l=0;6>l;l++)k(e.__webglFramebuffer[l],b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+l);b.texture.generateMipmaps&&h&&a.generateMipmap(a.TEXTURE_CUBE_MAP); c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),t(a.TEXTURE_2D,b.texture,h),k(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),b.texture.generateMipmaps&&h&&a.generateMipmap(a.TEXTURE_2D),c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");if(b&&b.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported!"); a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=!0);n(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER, @@ -111,14 +111,14 @@ a.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.fram b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture;e.generateMipmaps&&m(b)&&1003!==e.minFilter&&1006!==e.minFilter&&(b=b&&b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,e=d.get(e).__webglTexture,c.bindTexture(b,e),a.generateMipmap(b),c.bindTexture(b,null))}}function Rf(){var a={};return{get:function(b){b=b.uuid;var c=a[b];void 0===c&&(c={},a[b]=c);return c},"delete":function(b){delete a[b.uuid]},clear:function(){a={}}}}function Sf(a,b,c){function d(b, c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER,a.NEAREST);for(b=0;b=ja.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ja.maxTextures); +null,za.geometry,za.material,za,null));a.overrideMaterial?(d=a.overrideMaterial,n(sa,a,b,d),n(B,a,b,d)):(Y.setBlending(0),n(sa,a,b),n(B,a,b));Oa.render(a,b);Qa.render(a,b,X);c&&ua.updateRenderTargetMipmap(c);Y.setDepthTest(!0);Y.setDepthWrite(!0);Y.setColorWrite(!0)}};this.setFaceCulling=function(a,b){Y.setCullFace(a);Y.setFlipSided(0===b)};this.allocTextureUnit=function(){var a=ba;a>=ja.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ja.maxTextures); ba+=1;return a};this.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ua.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);ua.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b, c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&6===b.image.length?ua.setTextureCube(b,c):ua.setTextureCubeDynamic(b,c)}}();this.getCurrentRenderTarget=function(){return W};this.setRenderTarget=function(a){(W=a)&&void 0===Ma.get(a).__webglFramebuffer&&ua.setupRenderTarget(a);var b=a&&a.isWebGLRenderTargetCube,c;a?(c= -Ma.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,V.copy(a.scissor),Ud=a.scissorTest,X.copy(a.viewport)):(c=null,V.copy(ea).multiplyScalar(Sa),Ud=ia,X.copy(ga).multiplyScalar(Sa));K!==c&&(B.bindFramebuffer(B.FRAMEBUFFER,c),K=c);Y.scissor(V);Y.setScissorTest(Ud);Y.viewport(X);b&&(b=Ma.get(a.texture),B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a, -b,c,d,e,f){if(!1===(a&&a.isWebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=Ma.get(a).__webglFramebuffer;if(g){var h=!1;g!==K&&(B.bindFramebuffer(B.FRAMEBUFFER,g),h=!0);try{var l=a.texture,m=l.format,n=l.type;1023!==m&&w(m)!==B.getParameter(B.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===n||w(n)=== -B.getParameter(B.IMPLEMENTATION_COLOR_READ_TYPE)||1015===n&&(ha.get("OES_texture_float")||ha.get("WEBGL_color_buffer_float"))||1016===n&&ha.get("EXT_color_buffer_half_float")?B.checkFramebufferStatus(B.FRAMEBUFFER)===B.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&B.readPixels(b,c,d,e,w(m),w(n),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&& -B.bindFramebuffer(B.FRAMEBUFFER,K)}}}}}function Jb(a,b){this.name="";this.color=new I(a);this.density=void 0!==b?b:2.5E-4}function Kb(a,b,c){this.name="";this.color=new I(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ld(){E.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Wd(a,b,c,d,e){E.call(this);this.lensFlares=[];this.positionScreen=new q;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function lb(a){X.call(this); +Ma.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,V.copy(a.scissor),Ud=a.scissorTest,X.copy(a.viewport)):(c=null,V.copy(ea).multiplyScalar(Sa),Ud=ia,X.copy(ga).multiplyScalar(Sa));K!==c&&(C.bindFramebuffer(C.FRAMEBUFFER,c),K=c);Y.scissor(V);Y.setScissorTest(Ud);Y.viewport(X);b&&(b=Ma.get(a.texture),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a, +b,c,d,e,f){if(!1===(a&&a.isWebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=Ma.get(a).__webglFramebuffer;if(g){var h=!1;g!==K&&(C.bindFramebuffer(C.FRAMEBUFFER,g),h=!0);try{var l=a.texture,m=l.format,n=l.type;1023!==m&&w(m)!==C.getParameter(C.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===n||w(n)=== +C.getParameter(C.IMPLEMENTATION_COLOR_READ_TYPE)||1015===n&&(ha.get("OES_texture_float")||ha.get("WEBGL_color_buffer_float"))||1016===n&&ha.get("EXT_color_buffer_half_float")?C.checkFramebufferStatus(C.FRAMEBUFFER)===C.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&C.readPixels(b,c,d,e,w(m),w(n),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&& +C.bindFramebuffer(C.FRAMEBUFFER,K)}}}}}function Jb(a,b){this.name="";this.color=new I(a);this.density=void 0!==b?b:2.5E-4}function Kb(a,b,c){this.name="";this.color=new I(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function ld(){E.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Wd(a,b,c,d,e){E.call(this);this.lensFlares=[];this.positionScreen=new q;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function lb(a){X.call(this); this.type="SpriteMaterial";this.color=new I(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function Bc(a){E.call(this);this.type="Sprite";this.material=void 0!==a?a:new lb}function Cc(){E.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Dc(a,b){this.identityMatrix=new S;a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length=== b.length)this.boneInverses=b.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length.");this.boneInverses=[];for(var c=0,d=this.bones.length;ce;e++)h[0]=n[u[e]],h[1]=n[u[(e+1)%3]],h.sort(b),l=h.toString(),void 0===m[l]&&(m[l]={index1:h[0],index2:h[1]})}for(l in m)d=m[l],u=a.vertices[d.index1],c.push(u.x,u.y, u.z),u=a.vertices[d.index2],c.push(u.x,u.y,u.z)}else if(a&&a.isBufferGeometry){var k,u=new q;if(null!==a.index){p=a.attributes.position;n=a.index;k=a.groups;0===k.length&&(k=[{start:0,count:n.count,materialIndex:0}]);a=0;for(g=k.length;ae;e++)h[0]=n.getX(d+e),h[1]=n.getX(d+(e+1)%3),h.sort(b),l=h.toString(),void 0===m[l]&&(m[l]={index1:h[0],index2:h[1]});for(l in m)d=m[l],u.fromBufferAttribute(p,d.index1),c.push(u.x,u.y,u.z),u.fromBufferAttribute(p, -d.index2),c.push(u.x,u.y,u.z)}else for(p=a.attributes.position,d=0,f=p.count/3;de;e++)m=3*d+e,u.fromBufferAttribute(p,m),c.push(u.x,u.y,u.z),m=3*d+(e+1)%3,u.fromBufferAttribute(p,m),c.push(u.x,u.y,u.z)}this.addAttribute("position",new A(c,3))}function Gc(a,b,c){K.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Ob(a,b,c));this.mergeVertices()}function Ob(a,b,c){G.call(this);this.type="ParametricBufferGeometry";this.parameters= -{func:a,slices:b,stacks:c};var d=[],e=[],f=[],g,h,m=b+1;for(g=0;g<=c;g++){var l=g/c;for(h=0;h<=b;h++){var u=h/b,p=a(u,l);e.push(p.x,p.y,p.z);f.push(u,l)}}for(g=0;gd&&1===a.x&&(m[b]=a.x-1);0===c.x&&0===c.z&&(m[b]=d/2/Math.PI+.5)}G.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;var h=[],m=[];(function(a){for(var c=new q,d=new q,g=new q,h=0;he&&(.2>b&&(m[a+0]+=1),.2>c&&(m[a+2]+=1),.2>d&&(m[a+4]+=1))})();this.addAttribute("position",new A(h,3));this.addAttribute("normal",new A(h.slice(),3));this.addAttribute("uv",new A(m,2));this.normalizeNormals()}function Ic(a,b){K.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Pb(a,b));this.mergeVertices()}function Pb(a,b){va.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2, +d.index2),c.push(u.x,u.y,u.z)}else for(p=a.attributes.position,d=0,f=p.count/3;de;e++)m=3*d+e,u.fromBufferAttribute(p,m),c.push(u.x,u.y,u.z),m=3*d+(e+1)%3,u.fromBufferAttribute(p,m),c.push(u.x,u.y,u.z)}this.addAttribute("position",new B(c,3))}function Gc(a,b,c){K.call(this);this.type="ParametricGeometry";this.parameters={func:a,slices:b,stacks:c};this.fromBufferGeometry(new Ob(a,b,c));this.mergeVertices()}function Ob(a,b,c){G.call(this);this.type="ParametricBufferGeometry";this.parameters= +{func:a,slices:b,stacks:c};var d=[],e=[],f=[],g,h,m=b+1;for(g=0;g<=c;g++){var l=g/c;for(h=0;h<=b;h++){var u=h/b,p=a(u,l);e.push(p.x,p.y,p.z);f.push(u,l)}}for(g=0;gd&&1===a.x&&(m[b]=a.x-1);0===c.x&&0===c.z&&(m[b]=d/2/Math.PI+.5)}G.call(this);this.type="PolyhedronBufferGeometry";this.parameters={vertices:a,indices:b,radius:c,detail:d};c=c||1;var h=[],m=[];(function(a){for(var c=new q,d=new q,g=new q,h=0;he&&(.2>b&&(m[a+0]+=1),.2>c&&(m[a+2]+=1),.2>d&&(m[a+4]+=1))})();this.addAttribute("position",new B(h,3));this.addAttribute("normal",new B(h.slice(),3));this.addAttribute("uv",new B(m,2));this.normalizeNormals()}function Ic(a,b){K.call(this);this.type="TetrahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Pb(a,b));this.mergeVertices()}function Pb(a,b){va.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2, 1,0,0,3,2,1,3,0,2,3,1],a,b);this.type="TetrahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Jc(a,b){K.call(this);this.type="OctahedronGeometry";this.parameters={radius:a,detail:b};this.fromBufferGeometry(new mb(a,b));this.mergeVertices()}function mb(a,b){va.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],a,b);this.type="OctahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Kc(a,b){K.call(this);this.type="IcosahedronGeometry"; this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Qb(a,b));this.mergeVertices()}function Qb(a,b){var c=(1+Math.sqrt(5))/2;va.call(this,[-1,c,0,1,c,0,-1,-c,0,1,-c,0,0,-1,c,0,1,c,0,-1,-c,0,1,-c,c,0,-1,c,0,1,-c,0,-1,-c,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],a,b);this.type="IcosahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Lc(a,b){K.call(this);this.type="DodecahedronGeometry"; this.parameters={radius:a,detail:b};this.fromBufferGeometry(new Rb(a,b));this.mergeVertices()}function Rb(a,b){var c=(1+Math.sqrt(5))/2,d=1/c;va.call(this,[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-d,-c,0,-d,c,0,d,-c,0,d,c,-d,-c,0,-d,c,0,d,-c,0,d,c,0,-c,0,-d,c,0,-d,-c,0,d,c,0,d],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11, 9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],a,b);this.type="DodecahedronBufferGeometry";this.parameters={radius:a,detail:b}}function Mc(a,b,c,d,e,f){K.call(this);this.type="TubeGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};void 0!==f&&console.warn("THREE.TubeGeometry: taper has been removed.");a=new Sb(a,b,c,d,e);this.tangents=a.tangents;this.normals=a.normals;this.binormals=a.binormals;this.fromBufferGeometry(a);this.mergeVertices()} function Sb(a,b,c,d,e){function f(e){var f=a.getPointAt(e/b),l=g.normals[e];e=g.binormals[e];for(p=0;p<=d;p++){var u=p/d*Math.PI*2,r=Math.sin(u),u=-Math.cos(u);m.x=u*l.x+r*e.x;m.y=u*l.y+r*e.y;m.z=u*l.z+r*e.z;m.normalize();k.push(m.x,m.y,m.z);h.x=f.x+c*m.x;h.y=f.y+c*m.y;h.z=f.z+c*m.z;n.push(h.x,h.y,h.z)}}G.call(this);this.type="TubeBufferGeometry";this.parameters={path:a,tubularSegments:b,radius:c,radialSegments:d,closed:e};b=b||64;c=c||1;d=d||8;e=e||!1;var g=a.computeFrenetFrames(b,e);this.tangents= -g.tangents;this.normals=g.normals;this.binormals=g.binormals;var h=new q,m=new q,l=new C,u,p,n=[],k=[],y=[],r=[];for(u=0;uy;y++)f[0]=t[m[y]],f[1]=t[m[(y+1)%3]],f.sort(c),h=f.toString(),void 0===g[h]?g[h]={index1:f[0],index2:f[1],face1:k,face2:void 0}:g[h].face2=k;for(h in g)if(f=g[h],void 0===f.face2||l[f.face1].normal.dot(l[f.face2].normal)<=e)m=u[f.index1],d.push(m.x,m.y,m.z),m=u[f.index2],d.push(m.x,m.y,m.z);this.addAttribute("position",new A(d,3))}function ob(a,b,c,d,e,f,g,h){K.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b, -height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Wa(a,b,c,d,e,f,g,h));this.mergeVertices()}function Wa(a,b,c,d,e,f,g,h){function m(c){var e,f,m,r=new C,z=new q,R=0,A=!0===c?a:b,U=!0===c?1:-1;f=y;for(e=1;e<=d;e++)k.push(0,D*U,0),n.push(0,U,0),t.push(.5,.5),y++;m=y;for(e=0;e<=d;e++){var E=e/d*h+g,da=Math.cos(E),E=Math.sin(E);z.x=A*E;z.y=D*U;z.z=A*da;k.push(z.x,z.y,z.z);n.push(0,U,0);r.x=.5*da+.5;r.y=.5*E*U+.5;t.push(r.x,r.y);y++}for(e=0;e< -d;e++)r=f+e,z=m+e,!0===c?u.push(z,z+1,r):u.push(z+1,z,r),R+=3;l.addGroup(w,R,!0===c?1:2);w+=R}G.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var l=this;a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var u=[],k=[],n=[],t=[],y=0,r=[],D=c/2,w=0;(function(){var f,m,v=new q, -F=new q,H=0,z=(b-a)/c;for(m=0;m<=e;m++){var R=[],C=m/e,U=C*(b-a)+a;for(f=0;f<=d;f++){var E=f/d,A=E*h+g,G=Math.sin(A),A=Math.cos(A);F.x=U*G;F.y=-C*c+D;F.z=U*A;k.push(F.x,F.y,F.z);v.set(G,z,A).normalize();n.push(v.x,v.y,v.z);t.push(E,1-C);R.push(y++)}r.push(R)}for(f=0;fA;A++)f[0]=t[m[A]],f[1]=t[m[(A+1)%3]],f.sort(c),h=f.toString(),void 0===g[h]?g[h]={index1:f[0],index2:f[1],face1:k,face2:void 0}:g[h].face2=k;for(h in g)if(f=g[h],void 0===f.face2||l[f.face1].normal.dot(l[f.face2].normal)<=e)m=u[f.index1],d.push(m.x,m.y,m.z),m=u[f.index2],d.push(m.x,m.y,m.z);this.addAttribute("position",new B(d,3))}function ob(a,b,c,d,e,f,g,h){K.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b, +height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};this.fromBufferGeometry(new Wa(a,b,c,d,e,f,g,h));this.mergeVertices()}function Wa(a,b,c,d,e,f,g,h){function m(c){var e,f,m,r=new D,y=new q,R=0,B=!0===c?a:b,U=!0===c?1:-1;f=A;for(e=1;e<=d;e++)k.push(0,z*U,0),n.push(0,U,0),t.push(.5,.5),A++;m=A;for(e=0;e<=d;e++){var E=e/d*h+g,da=Math.cos(E),E=Math.sin(E);y.x=B*E;y.y=z*U;y.z=B*da;k.push(y.x,y.y,y.z);n.push(0,U,0);r.x=.5*da+.5;r.y=.5*E*U+.5;t.push(r.x,r.y);A++}for(e=0;e< +d;e++)r=f+e,y=m+e,!0===c?u.push(y,y+1,r):u.push(y+1,y,r),R+=3;l.addGroup(w,R,!0===c?1:2);w+=R}G.call(this);this.type="CylinderBufferGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:f,thetaStart:g,thetaLength:h};var l=this;a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=Math.floor(d)||8;e=Math.floor(e)||1;f=void 0!==f?f:!1;g=void 0!==g?g:0;h=void 0!==h?h:2*Math.PI;var u=[],k=[],n=[],t=[],A=0,r=[],z=c/2,w=0;(function(){var f,m,v=new q, +F=new q,H=0,y=(b-a)/c;for(m=0;m<=e;m++){var R=[],D=m/e,U=D*(b-a)+a;for(f=0;f<=d;f++){var E=f/d,B=E*h+g,G=Math.sin(B),B=Math.cos(B);F.x=U*G;F.y=-D*c+z;F.z=U*B;k.push(F.x,F.y,F.z);v.set(G,y,B).normalize();n.push(v.x,v.y,v.z);t.push(E,1-D);R.push(A++)}r.push(R)}for(f=0;fthis.duration&&this.resetDuration();this.optimize()}function Fd(a){this.manager=void 0!==a?a:na;this.textures={}}function $d(a){this.manager=void 0!==a?a:na}function ec(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}}function ae(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:na;this.withCredentials=!1}function Le(a){this.manager=void 0!==a?a: na;this.texturePath=""}function Me(a,b,c,d,e){b=.5*(d-b);e=.5*(e-c);var f=a*a;return(2*c-2*d+b+e)*a*f+(-3*c+3*d-2*b-e)*f+b*a+c}function xb(a,b,c,d){var e=1-a;return e*e*b+2*(1-a)*a*c+a*a*d}function yb(a,b,c,d,e){var f=1-a,g=1-a;return f*f*f*b+3*g*g*a*c+3*(1-a)*a*a*d+a*a*a*e}function Ba(){}function Ta(a,b){this.v1=a;this.v2=b}function Zc(){this.curves=[];this.autoClose=!1}function Xa(a,b,c,d,e,f,g,h){this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=e;this.aEndAngle=f;this.aClockwise= -g;this.aRotation=h||0}function zb(a){this.points=void 0===a?[]:a}function fc(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d}function gc(a,b,c){this.v0=a;this.v1=b;this.v2=c}function $c(a){Zc.call(this);this.currentPoint=new C;a&&this.fromPoints(a)}function Ab(){$c.apply(this,arguments);this.holes=[]}function be(){this.subPaths=[];this.currentPath=null}function ce(a){this.data=a}function Ne(a){this.manager=void 0!==a?a:na}function de(a){this.manager=void 0!==a?a:na}function ee(a,b,c,d){ga.call(this, +g;this.aRotation=h||0}function zb(a){this.points=void 0===a?[]:a}function fc(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d}function gc(a,b,c){this.v0=a;this.v1=b;this.v2=c}function $c(a){Zc.call(this);this.currentPoint=new D;a&&this.fromPoints(a)}function Ab(){$c.apply(this,arguments);this.holes=[]}function be(){this.subPaths=[];this.currentPath=null}function ce(a){this.data=a}function Ne(a){this.manager=void 0!==a?a:na}function de(a){this.manager=void 0!==a?a:na}function ee(a,b,c,d){ga.call(this, a,b);this.type="RectAreaLight";this.position.set(0,1,0);this.updateMatrix();this.width=void 0!==c?c:10;this.height=void 0!==d?d:10}function Oe(){this.type="StereoCamera";this.aspect=1;this.eyeSep=.064;this.cameraL=new Ca;this.cameraL.layers.enable(1);this.cameraL.matrixAutoUpdate=!1;this.cameraR=new Ca;this.cameraR.layers.enable(2);this.cameraR.matrixAutoUpdate=!1}function Gd(a,b,c){E.call(this);this.type="CubeCamera";var d=new Ca(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new q(1,0,0));this.add(d);var e= new Ca(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new q(-1,0,0));this.add(e);var f=new Ca(90,1,a,b);f.up.set(0,0,1);f.lookAt(new q(0,1,0));this.add(f);var g=new Ca(90,1,a,b);g.up.set(0,0,-1);g.lookAt(new q(0,-1,0));this.add(g);var h=new Ca(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new q(0,0,1));this.add(h);var m=new Ca(90,1,a,b);m.up.set(0,-1,0);m.lookAt(new q(0,0,-1));this.add(m);this.renderTarget=new Eb(c,c,{format:1022,magFilter:1006,minFilter:1006});this.renderTarget.texture.name="CubeCamera";this.updateCubeMap= function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,n=c.texture.generateMipmaps;c.texture.generateMipmaps=!1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,f,c);c.activeCubeFace=3;a.render(b,g,c);c.activeCubeFace=4;a.render(b,h,c);c.texture.generateMipmaps=n;c.activeCubeFace=5;a.render(b,m,c);a.setRenderTarget(null)}}function fe(){E.call(this);this.type="AudioListener";this.context=ge.getContext();this.gain=this.context.createGain(); @@ -253,29 +253,29 @@ get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0}function ke(a,b,c,d){this.uuid=T.generateUUID();this.data=a;this.itemSize=b;this.offset=c;this.normalized=!0===d}function ic(a,b){this.uuid=T.generateUUID();this.array=a;this.stride=b;this.count=void 0!==a?a.length/b:0;this.dynamic=!1;this.updateRange={offset:0,count:-1};this.onUploadCallback=function(){};this.version=0}function jc(a,b,c){ic.call(this,a,b);this.meshPerAttribute=c||1}function kc(a,b,c){V.call(this,a,b);this.meshPerAttribute= c||1}function Te(a,b,c,d){this.ray=new fb(a,b);this.near=c||0;this.far=d||Infinity;this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}};Object.defineProperties(this.params,{PointCloud:{get:function(){console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points.");return this.Points}}})}function Ue(a,b){return a.distance-b.distance}function le(a,b,c,d){if(!1!==a.visible&&(a.raycast(b,c),!0===d)){a=a.children;d=0;for(var e=a.length;dc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new A(b,3));b=new ia({fog:!1});this.cone=new ea(a,b);this.add(this.cone);this.update()}function mc(a){this.bones=this.getBoneList(a);for(var b=new G,c=[],d=[],e=new I(0,0,1),f=new I(0,1,0),g=0;gc;c++,d++){var e=c/32*Math.PI*2,f=d/32*Math.PI*2;b.push(Math.cos(e),Math.sin(e),1,Math.cos(f),Math.sin(f),1)}a.addAttribute("position",new B(b,3));b=new ia({fog:!1});this.cone=new ea(a,b);this.add(this.cone);this.update()}function mc(a){this.bones=this.getBoneList(a);for(var b=new G,c=[],d=[],e=new I(0,0,1),f=new I(0,1,0),g=0;ga?-1:0e;e++)8===e||13===e||18===e||23===e?b[e]="-":14===e?b[e]="4":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[e]=a[19===e?d&3|8:d]);return b.join("")}}(),clamp:function(a,b,c){return Math.max(b,Math.min(c,a))},euclideanModulo:function(a, b){return(a%b+b)%b},mapLinear:function(a,b,c,d,e){return d+(a-b)*(e-d)/(c-b)},lerp:function(a,b,c){return(1-c)*a+c*b},smoothstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a,b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(.5-Math.random())},degToRad:function(a){return a* -T.DEG2RAD},radToDeg:function(a){return a*T.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}};Object.defineProperties(C.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(C.prototype,{isVector2:!0,set:function(a,b){this.x= +T.DEG2RAD},radToDeg:function(a){return a*T.RAD2DEG},isPowerOfTwo:function(a){return 0===(a&a-1)&&0!==a},nearestPowerOfTwo:function(a){return Math.pow(2,Math.round(Math.log(a)/Math.LN2))},nextPowerOfTwo:function(a){a--;a|=a>>1;a|=a>>2;a|=a>>4;a|=a>>8;a|=a>>16;a++;return a}};Object.defineProperties(D.prototype,{width:{get:function(){return this.x},set:function(a){this.x=a}},height:{get:function(){return this.y},set:function(a){this.y=a}}});Object.assign(D.prototype,{isVector2:!0,set:function(a,b){this.x= a;this.y=b;return this},setScalar:function(a){this.y=this.x=a;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}return this},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(a){this.x= a.x;this.y=a.y;return this},add:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScaledVector:function(a,b){this.x+=a.x*b;this.y+=a.y*b;return this},sub:function(a,b){if(void 0!==b)return console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), this.subVectors(a,b);this.x-=a.x;this.y-=a.y;return this},subScalar:function(a){this.x-=a;this.y-=a;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiply:function(a){this.x*=a.x;this.y*=a.y;return this},multiplyScalar:function(a){isFinite(a)?(this.x*=a,this.y*=a):this.y=this.x=0;return this},divide:function(a){this.x/=a.x;this.y/=a.y;return this},divideScalar:function(a){return this.multiplyScalar(1/a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y, -a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new C,b=new C;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.multiplyScalar(Math.max(a,Math.min(b,c))/c)},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y); +a.y);return this},max:function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y);return this},clamp:function(a,b){this.x=Math.max(a.x,Math.min(b.x,this.x));this.y=Math.max(a.y,Math.min(b.y,this.y));return this},clampScalar:function(){var a=new D,b=new D;return function(c,d){a.set(c,c);b.set(d,d);return this.clamp(a,b)}}(),clampLength:function(a,b){var c=this.length();return this.multiplyScalar(Math.max(a,Math.min(b,c))/c)},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y); return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.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())},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)},setLength:function(a){return this.multiplyScalar(a/ this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."); @@ -296,7 +296,7 @@ Math.floor(this.w);return this},negate:function(){this.x=-this.x;this.y=-this.y; setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];this.w=a[b+3];return this},toArray:function(a,b){void 0===a&&(a= []);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;a[b+3]=this.w;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b);this.w=a.getW(b);return this}});Object.assign(Db.prototype,wa.prototype,{isWebGLRenderTarget:!0,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose();this.viewport.set(0,0,a,b);this.scissor.set(0, 0,a,b)},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.width=a.width;this.height=a.height;this.viewport.copy(a.viewport);this.texture=a.texture.clone();this.depthBuffer=a.depthBuffer;this.stencilBuffer=a.stencilBuffer;this.depthTexture=a.depthTexture;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}});Eb.prototype=Object.create(Db.prototype);Eb.prototype.constructor=Eb;Eb.prototype.isWebGLRenderTargetCube=!0;Object.assign(la,{slerp:function(a,b, -c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],m=c[d+1],l=c[d+2];c=c[d+3];d=e[f+0];var k=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||h!==d||m!==k||l!==p){f=1-g;var n=h*d+m*k+l*p+c*e,t=0<=n?1:-1,y=1-n*n;y>Number.EPSILON&&(y=Math.sqrt(y),n=Math.atan2(y,n*t),f=Math.sin(f*n)/y,g=Math.sin(g*n)/y);t*=g;h=h*f+d*t;m=m*f+k*t;l=l*f+p*t;c=c*f+e*t;f===1-g&&(g=1/Math.sqrt(h*h+m*m+l*l+c*c),h*=g,m*=g,l*=g,c*=g)}a[b]=h;a[b+1]=m;a[b+2]=l;a[b+3]=c}});Object.defineProperties(la.prototype,{x:{get:function(){return this._x}, +c,d){return c.copy(a).slerp(b,d)},slerpFlat:function(a,b,c,d,e,f,g){var h=c[d+0],m=c[d+1],l=c[d+2];c=c[d+3];d=e[f+0];var k=e[f+1],p=e[f+2];e=e[f+3];if(c!==e||h!==d||m!==k||l!==p){f=1-g;var n=h*d+m*k+l*p+c*e,t=0<=n?1:-1,q=1-n*n;q>Number.EPSILON&&(q=Math.sqrt(q),n=Math.atan2(q,n*t),f=Math.sin(f*n)/q,g=Math.sin(g*n)/q);t*=g;h=h*f+d*t;m=m*f+k*t;l=l*f+p*t;c=c*f+e*t;f===1-g&&(g=1/Math.sqrt(h*h+m*m+l*l+c*c),h*=g,m*=g,l*=g,c*=g)}a[b]=h;a[b+1]=m;a[b+2]=l;a[b+3]=c}});Object.defineProperties(la.prototype,{x:{get:function(){return this._x}, set:function(a){this._x=a;this.onChangeCallback()}},y:{get:function(){return this._y},set:function(a){this._y=a;this.onChangeCallback()}},z:{get:function(){return this._z},set:function(a){this._z=a;this.onChangeCallback()}},w:{get:function(){return this._w},set:function(a){this._w=a;this.onChangeCallback()}}});Object.assign(la.prototype,{set:function(a,b,c,d){this._x=a;this._y=b;this._z=c;this._w=d;this.onChangeCallback();return this},clone:function(){return new this.constructor(this._x,this._y,this._z, this._w)},copy:function(a){this._x=a.x;this._y=a.y;this._z=a.z;this._w=a.w;this.onChangeCallback();return this},setFromEuler:function(a,b){if(!1===(a&&a.isEuler))throw Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var c=Math.cos(a._x/2),d=Math.cos(a._y/2),e=Math.cos(a._z/2),f=Math.sin(a._x/2),g=Math.sin(a._y/2),h=Math.sin(a._z/2),m=a.order;"XYZ"===m?(this._x=f*d*e+c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e-f*g*h):"YXZ"=== m?(this._x=f*d*e+c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e+f*g*h):"ZXY"===m?(this._x=f*d*e-c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e-f*g*h):"ZYX"===m?(this._x=f*d*e-c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e+f*g*h):"YZX"===m?(this._x=f*d*e+c*g*h,this._y=c*g*e+f*d*h,this._z=c*d*h-f*g*e,this._w=c*d*e-f*g*h):"XZY"===m&&(this._x=f*d*e-c*g*h,this._y=c*g*e-f*d*h,this._z=c*d*h+f*g*e,this._w=c*d*e+f*g*h);if(!1!==b)this.onChangeCallback();return this},setFromAxisAngle:function(a, @@ -321,19 +321,19 @@ d*a.x;return this},crossVectors:function(a,b){var c=a.x,d=a.y,e=a.z,f=b.x,g=b.y, a.lengthSq());return Math.acos(T.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y;a=this.z-a.z;return b*b+c*c+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+Math.abs(this.y-a.y)+Math.abs(this.z-a.z)},setFromSpherical:function(a){var b=Math.sin(a.phi)*a.radius;this.x=b*Math.sin(a.theta);this.y=Math.cos(a.phi)*a.radius;this.z=b*Math.cos(a.theta);return this},setFromCylindrical:function(a){this.x= a.radius*Math.sin(a.theta);this.y=a.y;this.z=a.radius*Math.cos(a.theta);return this},setFromMatrixPosition:function(a){return this.setFromMatrixColumn(a,3)},setFromMatrixScale:function(a){var b=this.setFromMatrixColumn(a,0).length(),c=this.setFromMatrixColumn(a,1).length();a=this.setFromMatrixColumn(a,2).length();this.x=b;this.y=c;this.z=a;return this},setFromMatrixColumn:function(a,b){if("number"===typeof a){console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index ).");var c= a;a=b;b=c}return this.fromArray(a.elements,4*b)},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];this.z=a[b+2];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;a[b+2]=this.z;return a},fromBufferAttribute:function(a,b,c){void 0!==c&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);this.z=a.getZ(b); -return this}});Object.assign(S.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,m,l,k,p,n,t,y,r){var q=this.elements;q[0]=a;q[4]=b;q[8]=c;q[12]=d;q[1]=e;q[5]=f;q[9]=g;q[13]=h;q[2]=m;q[6]=l;q[10]=k;q[14]=p;q[3]=n;q[7]=t;q[11]=y;q[15]=r;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new S).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)b[c]=a[c];return this},copyPosition:function(a){var b= +return this}});Object.assign(S.prototype,{isMatrix4:!0,set:function(a,b,c,d,e,f,g,h,m,l,k,p,n,t,q,r){var z=this.elements;z[0]=a;z[4]=b;z[8]=c;z[12]=d;z[1]=e;z[5]=f;z[9]=g;z[13]=h;z[2]=m;z[6]=l;z[10]=k;z[14]=p;z[3]=n;z[7]=t;z[11]=q;z[15]=r;return this},identity:function(){this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return this},clone:function(){return(new S).fromArray(this.elements)},copy:function(a){var b=this.elements;a=a.elements;for(var c=0;16>c;c++)b[c]=a[c];return this},copyPosition:function(a){var b= this.elements;a=a.elements;b[12]=a[12];b[13]=a[13];b[14]=a[14];return this},extractBasis:function(a,b,c){a.setFromMatrixColumn(this,0);b.setFromMatrixColumn(this,1);c.setFromMatrixColumn(this,2);return this},makeBasis:function(a,b,c){this.set(a.x,b.x,c.x,0,a.y,b.y,c.y,0,a.z,b.z,c.z,0,0,0,0,1);return this},extractRotation:function(){var a=new q;return function(b){var c=this.elements,d=b.elements,e=1/a.setFromMatrixColumn(b,0).length(),f=1/a.setFromMatrixColumn(b,1).length();b=1/a.setFromMatrixColumn(b, 2).length();c[0]=d[0]*e;c[1]=d[1]*e;c[2]=d[2]*e;c[4]=d[4]*f;c[5]=d[5]*f;c[6]=d[6]*f;c[8]=d[8]*b;c[9]=d[9]*b;c[10]=d[10]*b;return this}}(),makeRotationFromEuler:function(a){!1===(a&&a.isEuler)&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var b=this.elements,c=a.x,d=a.y,e=a.z,f=Math.cos(c),c=Math.sin(c),g=Math.cos(d),d=Math.sin(d),h=Math.cos(e),e=Math.sin(e);if("XYZ"===a.order){a=f*h;var m=f*e,l=c*h,k=c*e;b[0]=g*h;b[4]=-g*e;b[8]= d;b[1]=m+l*d;b[5]=a-k*d;b[9]=-c*g;b[2]=k-a*d;b[6]=l+m*d;b[10]=f*g}else"YXZ"===a.order?(a=g*h,m=g*e,l=d*h,k=d*e,b[0]=a+k*c,b[4]=l*c-m,b[8]=f*d,b[1]=f*e,b[5]=f*h,b[9]=-c,b[2]=m*c-l,b[6]=k+a*c,b[10]=f*g):"ZXY"===a.order?(a=g*h,m=g*e,l=d*h,k=d*e,b[0]=a-k*c,b[4]=-f*e,b[8]=l+m*c,b[1]=m+l*c,b[5]=f*h,b[9]=k-a*c,b[2]=-f*d,b[6]=c,b[10]=f*g):"ZYX"===a.order?(a=f*h,m=f*e,l=c*h,k=c*e,b[0]=g*h,b[4]=l*d-m,b[8]=a*d+k,b[1]=g*e,b[5]=k*d+a,b[9]=m*d-l,b[2]=-d,b[6]=c*g,b[10]=f*g):"YZX"===a.order?(a=f*g,m=f*d,l=c*g,k= c*d,b[0]=g*h,b[4]=k-a*e,b[8]=l*e+m,b[1]=e,b[5]=f*h,b[9]=-c*h,b[2]=-d*h,b[6]=m*e+l,b[10]=a-k*e):"XZY"===a.order&&(a=f*g,m=f*d,l=c*g,k=c*d,b[0]=g*h,b[4]=-e,b[8]=d*h,b[1]=a*e+k,b[5]=f*h,b[9]=m*e-l,b[2]=l*e-m,b[6]=c*h,b[10]=k*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},makeRotationFromQuaternion:function(a){var b=this.elements,c=a.x,d=a.y,e=a.z,f=a.w,g=c+c,h=d+d,m=e+e;a=c*g;var l=c*h,c=c*m,k=d*h,d=d*m,e=e*m,g=f*g,h=f*h,f=f*m;b[0]=1-(k+e);b[4]=l-f;b[8]=c+h;b[1]=l+f;b[5]=1-(a+ e);b[9]=d-g;b[2]=c-h;b[6]=d+g;b[10]=1-(a+k);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a=new q,b=new q,c=new q;return function(d,e,f){var g=this.elements;c.subVectors(d,e).normalize();0===c.lengthSq()&&(c.z=1);a.crossVectors(f,c).normalize();0===a.lengthSq()&&(c.z+=1E-4,a.crossVectors(f,c).normalize());b.crossVectors(c,a);g[0]=a.x;g[4]=b.x;g[8]=c.x;g[1]=a.y;g[5]=b.y;g[9]=c.y;g[2]=a.z;g[6]=b.z;g[10]=c.z;return this}}(),multiply:function(a,b){return void 0!== -b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[4],h=c[8],m=c[12],l=c[1],k=c[5],p=c[9],n=c[13],t=c[2],q=c[6],r=c[10],D=c[14],w=c[3],x=c[7],L=c[11],c=c[15],v=d[0],F=d[4],H=d[8],z=d[12],R=d[1],C=d[5],U=d[9],A=d[13],E=d[2],G=d[6], -I=d[10],P=d[14],J=d[3],N=d[7],M=d[11],d=d[15];e[0]=f*v+g*R+h*E+m*J;e[4]=f*F+g*C+h*G+m*N;e[8]=f*H+g*U+h*I+m*M;e[12]=f*z+g*A+h*P+m*d;e[1]=l*v+k*R+p*E+n*J;e[5]=l*F+k*C+p*G+n*N;e[9]=l*H+k*U+p*I+n*M;e[13]=l*z+k*A+p*P+n*d;e[2]=t*v+q*R+r*E+D*J;e[6]=t*F+q*C+r*G+D*N;e[10]=t*H+q*U+r*I+D*M;e[14]=t*z+q*A+r*P+D*d;e[3]=w*v+x*R+L*E+c*J;e[7]=w*F+x*C+L*G+c*N;e[11]=w*H+x*U+L*I+c*M;e[15]=w*z+x*A+L*P+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*= +b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},premultiply:function(a){return this.multiplyMatrices(a,this)},multiplyMatrices:function(a,b){var c=a.elements,d=b.elements,e=this.elements,f=c[0],g=c[4],h=c[8],m=c[12],l=c[1],k=c[5],p=c[9],n=c[13],t=c[2],q=c[6],r=c[10],z=c[14],w=c[3],x=c[7],L=c[11],c=c[15],v=d[0],F=d[4],H=d[8],y=d[12],R=d[1],D=d[5],U=d[9],B=d[13],E=d[2],G=d[6], +I=d[10],P=d[14],J=d[3],N=d[7],M=d[11],d=d[15];e[0]=f*v+g*R+h*E+m*J;e[4]=f*F+g*D+h*G+m*N;e[8]=f*H+g*U+h*I+m*M;e[12]=f*y+g*B+h*P+m*d;e[1]=l*v+k*R+p*E+n*J;e[5]=l*F+k*D+p*G+n*N;e[9]=l*H+k*U+p*I+n*M;e[13]=l*y+k*B+p*P+n*d;e[2]=t*v+q*R+r*E+z*J;e[6]=t*F+q*D+r*G+z*N;e[10]=t*H+q*U+r*I+z*M;e[14]=t*y+q*B+r*P+z*d;e[3]=w*v+x*R+L*E+c*J;e[7]=w*F+x*D+L*G+c*N;e[11]=w*H+x*U+L*I+c*M;e[15]=w*y+x*B+L*P+c*d;return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*= a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},applyToBufferAttribute:function(){var a=new q;return function(b){for(var c=0,d=b.count;cthis.determinant()&&(g=-g);c.x=f[12];c.y=f[13]; c.z=f[14];for(c=0;16>c;c++)b.elements[c]=this.elements[c];c=1/g;var f=1/h,l=1/m;b.elements[0]*=c;b.elements[1]*=c;b.elements[2]*=c;b.elements[4]*=f;b.elements[5]*=f;b.elements[6]*=f;b.elements[8]*=l;b.elements[9]*=l;b.elements[10]*=l;d.setFromRotationMatrix(b);e.x=g;e.y=h;e.z=m;return this}}(),makePerspective:function(a,b,c,d,e,f){void 0===f&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var g=this.elements;g[0]=2*e/(b-a);g[4]= @@ -413,17 +413,17 @@ c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0=h?m/(e+f):m/(2-e-f);switch(e){case b:g=(c-d)/m+(cthis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){return(b||new C).set((a.x- -this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){return(b||new C).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new C;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min); +{uniforms:Ha.merge([bb.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:ba.meshphysical_vert,fragmentShader:ba.meshphysical_frag};Object.assign(jd.prototype,{set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){this.makeEmpty();for(var b=0,c=a.length;bthis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){return(b||new D).set((a.x- +this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){return(b||new D).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new D;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min); this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Bf=0;Object.defineProperty(X.prototype,"needsUpdate",{get:function(){return this._needsUpdate},set:function(a){!0===a&&this.update();this._needsUpdate=a}});Object.assign(X.prototype,wa.prototype,{isMaterial:!0,setValues:function(a){if(void 0!==a)for(var b in a){var c=a[b];if(void 0===c)console.warn("THREE.Material: '"+b+ "' parameter is undefined.");else{var d=this[b];void 0===d?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):d&&d.isColor?d.set(c):d&&d.isVector3&&c&&c.isVector3?d.copy(c):this[b]="overdraw"===b?Number(c):c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var c=void 0===a;c&&(a={textures:{},images:{}});var d={metadata:{version:4.4,type:"Material",generator:"Material.toJSON"}};d.uuid=this.uuid;d.type=this.type; ""!==this.name&&(d.name=this.name);this.color&&this.color.isColor&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);this.emissive&&this.emissive.isColor&&(d.emissive=this.emissive.getHex());this.specular&&this.specular.isColor&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);void 0!==this.clearCoat&&(d.clearCoat=this.clearCoat);void 0!==this.clearCoatRoughness&&(d.clearCoatRoughness= @@ -457,8 +457,8 @@ setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){return this.orthoPoint(a,b).sub(a).negate()},orthoPoint:function(a,b){var c=this.distanceToPoint(a);return(b||new q).copy(this.normal).multiplyScalar(c)},intersectLine:function(){var a=new q;return function(b,c){var d=c||new q,e= b.delta(a),f=this.normal.dot(e);if(0===f){if(0===this.distanceToPoint(b.start))return d.copy(b.start)}else return f=-(b.start.dot(this.normal)+this.constant)/f,0>f||1b&&0a&&0c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],m=c[6],l=c[7],k=c[8],p=c[9],n=c[10],t=c[11],q=c[12],r=c[13],D=c[14],c=c[15];b[0].setComponents(f-a,l-g,t-k,c-q).normalize();b[1].setComponents(f+a,l+g,t+k,c+q).normalize();b[2].setComponents(f+d,l+h,t+p,c+r).normalize();b[3].setComponents(f- -d,l-h,t-p,c-r).normalize();b[4].setComponents(f-e,l-m,t-n,c-D).normalize();b[5].setComponents(f+e,l+m,t+n,c+D).normalize();return this},intersectsObject:function(){var a=new Pa;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Pa;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(), +g[5].copy(f);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements;a=c[0];var d=c[1],e=c[2],f=c[3],g=c[4],h=c[5],m=c[6],l=c[7],k=c[8],p=c[9],n=c[10],t=c[11],q=c[12],r=c[13],z=c[14],c=c[15];b[0].setComponents(f-a,l-g,t-k,c-q).normalize();b[1].setComponents(f+a,l+g,t+k,c+q).normalize();b[2].setComponents(f+d,l+h,t+p,c+r).normalize();b[3].setComponents(f- +d,l-h,t-p,c-r).normalize();b[4].setComponents(f-e,l-m,t-n,c-z).normalize();b[5].setComponents(f+e,l+m,t+n,c+z).normalize();return this},intersectsObject:function(){var a=new Pa;return function(b){var c=b.geometry;null===c.boundingSphere&&c.computeBoundingSphere();a.copy(c.boundingSphere).applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(),intersectsSprite:function(){var a=new Pa;return function(b){a.center.set(0,0,0);a.radius=.7071067811865476;a.applyMatrix4(b.matrixWorld);return this.intersectsSphere(a)}}(), intersectsSphere:function(a){var b=this.planes,c=a.center;a=-a.radius;for(var d=0;6>d;d++)if(b[d].distanceToPoint(c)e;e++){var f=d[e];a.x=0 g&&0>f)return!1}return!0}}(),containsPoint:function(a){for(var b=this.planes,c=0;6>c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0}});Object.assign(fb.prototype,{set:function(a,b){this.origin.copy(a);this.direction.copy(b);return this},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.origin.copy(a.origin);this.direction.copy(a.direction);return this},at:function(a,b){return(b||new q).copy(this.direction).multiplyScalar(a).add(this.origin)},lookAt:function(a){this.direction.copy(a).sub(this.origin).normalize(); return this},recast:function(){var a=new q;return function(b){this.origin.copy(this.at(b,a));return this}}(),closestPointToPoint:function(a,b){var c=b||new q;c.subVectors(a,this.origin);var d=c.dot(this.direction);return 0>d?c.copy(this.origin):c.copy(this.direction).multiplyScalar(d).add(this.origin)},distanceToPoint:function(a){return Math.sqrt(this.distanceSqToPoint(a))},distanceSqToPoint:function(){var a=new q;return function(b){var c=a.subVectors(b,this.origin).dot(this.direction);if(0>c)return this.origin.distanceToSquared(b); @@ -496,19 +496,19 @@ new ua,b=[new Gb,new Gb,new Gb],c=new q,d=new q;return function(e,f){var g=f||ne function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin= a.wireframeLinejoin;this.morphTargets=a.morphTargets;return this};Object.defineProperty(V.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(V.prototype,{isBufferAttribute:!0,setArray:function(a){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.count=void 0!==a?a.length/this.itemSize:0;this.array=a},setDynamic:function(a){this.dynamic=a;return this},copy:function(a){this.array=new a.array.constructor(a.array);this.itemSize= a.itemSize;this.count=a.count;this.normalized=a.normalized;this.dynamic=a.dynamic;return this},copyAt:function(a,b,c){a*=this.itemSize;c*=b.itemSize;for(var d=0,e=this.itemSize;dd;d++)if(e[d]===e[(d+1)%3]){a.push(f);break}for(f=a.length-1;0<=f;f--)for(e=a[f],this.faces.splice(e,1),c=0,g=this.faceVertexUvs.length;cb.far?null:{distance:c,point:w.clone(),object:a}}function c(c,d,e,f,l,k,p,u){g.fromBufferAttribute(f,k);h.fromBufferAttribute(f,p);m.fromBufferAttribute(f,u);if(c=b(c,d,e,g,h,m,D))l&&(n.fromBufferAttribute(l, -k),t.fromBufferAttribute(l,p),y.fromBufferAttribute(l,u),c.uv=a(D,g,h,m,n,t,y)),c.face=new oa(k,p,u,Va.normal(g,h,m)),c.faceIndex=k;return c}var d=new S,e=new fb,f=new Pa,g=new q,h=new q,m=new q,l=new q,k=new q,p=new q,n=new C,t=new C,y=new C,r=new q,D=new q,w=new q;return function(q,r){var v=this.geometry,w=this.material,H=this.matrixWorld;if(void 0!==w&&(null===v.boundingSphere&&v.computeBoundingSphere(),f.copy(v.boundingSphere),f.applyMatrix4(H),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(H), -e.copy(q.ray).applyMatrix4(d),null===v.boundingBox||!1!==e.intersectsBox(v.boundingBox)))){var z;if(v.isBufferGeometry){var R,C,w=v.index,A=v.attributes.position,H=v.attributes.uv,E,G;if(null!==w)for(E=0,G=w.count;Eb.far?null:{distance:c,point:w.clone(),object:a}}function c(c,d,e,f,l,k,p,u){g.fromBufferAttribute(f,k);h.fromBufferAttribute(f,p);m.fromBufferAttribute(f,u);if(c=b(c,d,e,g,h,m,z))l&&(n.fromBufferAttribute(l, +k),t.fromBufferAttribute(l,p),A.fromBufferAttribute(l,u),c.uv=a(z,g,h,m,n,t,A)),c.face=new oa(k,p,u,Va.normal(g,h,m)),c.faceIndex=k;return c}var d=new S,e=new fb,f=new Pa,g=new q,h=new q,m=new q,l=new q,k=new q,p=new q,n=new D,t=new D,A=new D,r=new q,z=new q,w=new q;return function(q,r){var v=this.geometry,w=this.material,H=this.matrixWorld;if(void 0!==w&&(null===v.boundingSphere&&v.computeBoundingSphere(),f.copy(v.boundingSphere),f.applyMatrix4(H),!1!==q.ray.intersectsSphere(f)&&(d.getInverse(H), +e.copy(q.ray).applyMatrix4(d),null===v.boundingBox||!1!==e.intersectsBox(v.boundingBox)))){var y;if(v.isBufferGeometry){var R,D,w=v.index,B=v.attributes.position,H=v.attributes.uv,E,G;if(null!==w)for(E=0,G=w.count;Ethis.scale.x*this.scale.y/4||c.push({distance:Math.sqrt(d),point:this.position,face:null,object:this})}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});Cc.prototype=Object.assign(Object.create(E.prototype),{constructor:Cc,copy:function(a){E.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(k.applyMatrix4(this.matrixWorld), -r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,y=t.length/3-1;gf||(k.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(m=g.vertices, -l=m.length,g=0;gf||(k.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ea.prototype=Object.assign(Object.create(Na.prototype),{constructor:ea,isLineSegments:!0});od.prototype=Object.assign(Object.create(Na.prototype), -{constructor:od,isLineLoop:!0});Ga.prototype=Object.create(X.prototype);Ga.prototype.constructor=Ga;Ga.prototype.isPointsMaterial=!0;Ga.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Lb.prototype=Object.assign(Object.create(E.prototype),{constructor:Lb,isPoints:!0,raycast:function(){var a=new S,b=new fb,c=new Pa;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(f< -k){var h=b.closestPointToPoint(a);h.applyMatrix4(m);var l=d.ray.origin.distanceTo(h);ld.far||e.push({distance:l,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,m=this.matrixWorld,l=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(m);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(m);b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),k=l* -l,l=new q;if(h.isBufferGeometry){var p=h.index,h=h.attributes.position.array;if(null!==p)for(var n=p.array,p=0,t=n.length;pc)return null;var d=[],e=[],f=[],g,h,m;if(0=l--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);m=h+1;c<=m&&(m=0);var k;a:{var p, -n,t,q,r,D,w,x;p=a[e[g]].x;n=a[e[g]].y;t=a[e[h]].x;q=a[e[h]].y;r=a[e[m]].x;D=a[e[m]].y;if(0>=(t-p)*(D-n)-(q-n)*(r-p))k=!1;else{var L,v,F,H,z,C,E,A,G,I;L=r-t;v=D-q;F=p-r;H=n-D;z=t-p;C=q-n;for(k=0;k=-Number.EPSILON&&A>=-Number.EPSILON&&E>=-Number.EPSILON)){k=!1;break a}k=!0}}if(k){d.push([a[e[g]],a[e[h]],a[e[m]]]);f.push([e[g],e[h],e[m]]);g=h;for(m=h+1;mNumber.EPSILON){if(0u||u>p)return[];m=l*k-m*n;if(0>m||m>p)return[]}else{if(0c?[]:m===c?f?[]:[g]:a<=c?[g,h]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],m[b]);if(!d)return!1;d=m.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(m[b],m[e],m[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;cP){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(n=E;nm;m++)k=l[m].x+":"+l[m].y,k=p[k],void 0!==k&&(l[m]=k);return n.concat()},isClockWise:function(a){return 0>za.area(a)}};ya.prototype=Object.create(K.prototype);ya.prototype.constructor=ya;ya.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;dNumber.EPSILON){var m=Math.sqrt(h),l=Math.sqrt(d*d+g*g),h=b.x-f/m;b=b.y+e/m;g=((c.x-g/l-h)*g-(c.y+d/l-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new C(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&&(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(h)):(d=e, -e=f,f=Math.sqrt(h/2));return new C(d/f,e/f)}function e(a,b){var c,d;for(Q=a.length;0<=--Q;){c=Q;d=Q-1;0>d&&(d=a.length-1);var e,f=t+2*k;for(e=0;eMath.abs(b.y-c.y)?[new C(b.x,1-b.z),new C(c.x,1-c.z),new C(d.x,1-d.z),new C(e.x,1-e.z)]:[new C(b.y,1-b.z),new C(c.y,1-c.z),new C(d.y,1-d.z),new C(e.y,1-e.z)]}};Pc.prototype=Object.create(ya.prototype);Pc.prototype.constructor=Pc;Qc.prototype=Object.create(K.prototype);Qc.prototype.constructor=Qc;nb.prototype=Object.create(G.prototype);nb.prototype.constructor=nb;Rc.prototype= -Object.create(K.prototype);Rc.prototype.constructor=Rc;Vb.prototype=Object.create(G.prototype);Vb.prototype.constructor=Vb;Sc.prototype=Object.create(K.prototype);Sc.prototype.constructor=Sc;Wb.prototype=Object.create(G.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(K.prototype);Xb.prototype.constructor=Xb;Yb.prototype=Object.create(G.prototype);Yb.prototype.constructor=Yb;Zb.prototype=Object.create(G.prototype);Zb.prototype.constructor=Zb;ob.prototype=Object.create(K.prototype); -ob.prototype.constructor=ob;Wa.prototype=Object.create(G.prototype);Wa.prototype.constructor=Wa;Tc.prototype=Object.create(ob.prototype);Tc.prototype.constructor=Tc;Uc.prototype=Object.create(Wa.prototype);Uc.prototype.constructor=Uc;Vc.prototype=Object.create(K.prototype);Vc.prototype.constructor=Vc;$b.prototype=Object.create(G.prototype);$b.prototype.constructor=$b;var Oa=Object.freeze({WireframeGeometry:Nb,ParametricGeometry:Gc,ParametricBufferGeometry:Ob,TetrahedronGeometry:Ic,TetrahedronBufferGeometry:Pb, -OctahedronGeometry:Jc,OctahedronBufferGeometry:mb,IcosahedronGeometry:Kc,IcosahedronBufferGeometry:Qb,DodecahedronGeometry:Lc,DodecahedronBufferGeometry:Rb,PolyhedronGeometry:Hc,PolyhedronBufferGeometry:va,TubeGeometry:Mc,TubeBufferGeometry:Sb,TorusKnotGeometry:Nc,TorusKnotBufferGeometry:Tb,TorusGeometry:Oc,TorusBufferGeometry:Ub,TextGeometry:Pc,SphereGeometry:Qc,SphereBufferGeometry:nb,RingGeometry:Rc,RingBufferGeometry:Vb,PlaneGeometry:yc,PlaneBufferGeometry:jb,LatheGeometry:Sc,LatheBufferGeometry:Wb, -ShapeGeometry:Xb,ShapeBufferGeometry:Yb,ExtrudeGeometry:ya,EdgesGeometry:Zb,ConeGeometry:Tc,ConeBufferGeometry:Uc,CylinderGeometry:ob,CylinderBufferGeometry:Wa,CircleGeometry:Vc,CircleBufferGeometry:$b,BoxGeometry:Hb,BoxBufferGeometry:ib});ac.prototype=Object.create(Fa.prototype);ac.prototype.constructor=ac;ac.prototype.isShadowMaterial=!0;bc.prototype=Object.create(Fa.prototype);bc.prototype.constructor=bc;bc.prototype.isRawShaderMaterial=!0;Qa.prototype=Object.create(X.prototype);Qa.prototype.constructor= -Qa;Qa.prototype.isMeshStandardMaterial=!0;Qa.prototype.copy=function(a){X.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale; -this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin= -a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pb.prototype=Object.create(Qa.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshPhysicalMaterial=!0;pb.prototype.copy=function(a){Qa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness=a.clearCoatRoughness;return this};pa.prototype=Object.create(X.prototype);pa.prototype.constructor=pa;pa.prototype.isMeshPhongMaterial= -!0;pa.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale); -this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals= -a.morphNormals;return this};qb.prototype=Object.create(pa.prototype);qb.prototype.constructor=qb;qb.prototype.isMeshToonMaterial=!0;qb.prototype.copy=function(a){pa.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};rb.prototype=Object.create(X.prototype);rb.prototype.constructor=rb;rb.prototype.isMeshNormalMaterial=!0;rb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale); -this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};sb.prototype=Object.create(X.prototype);sb.prototype.constructor=sb;sb.prototype.isMeshLambertMaterial=!0;sb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap; -this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin= -a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};tb.prototype=Object.create(X.prototype);tb.prototype.constructor=tb;tb.prototype.isLineDashedMaterial=!0;tb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var Yf=Object.freeze({ShadowMaterial:ac,SpriteMaterial:lb,RawShaderMaterial:bc,ShaderMaterial:Fa,PointsMaterial:Ga, -MeshPhysicalMaterial:pb,MeshStandardMaterial:Qa,MeshPhongMaterial:pa,MeshToonMaterial:qb,MeshNormalMaterial:rb,MeshLambertMaterial:sb,MeshDepthMaterial:ab,MeshBasicMaterial:Ia,LineDashedMaterial:tb,LineBasicMaterial:ia,Material:X}),id={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},na=new Xd;Object.assign(qa.prototype,{load:function(a,b, -c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);var e=this,f=id.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){var h=g[1],m=!!g[2],g=g[3],g=window.decodeURIComponent(g);m&&(g=window.atob(g));try{var l,k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":l=new ArrayBuffer(g.length);for(var p=new Uint8Array(l),m=0;m=e)break a;else{f=b[1];a=e)break b}d=c;c=0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f,1),e=f-1),d=this.getValueSize(),this.times=ra.arraySlice(c,e,f),this.values=ra.arraySlice(this.values, -e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys",this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ra.isTypedArray(b))for(f= -0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gf||(f=d.ray.origin.distanceTo(a),fd.far||e.push({distance:f,point:a.clone(),face:null,object:this}))}}(),clone:function(){return(new this.constructor(this.material)).copy(this)}});Cc.prototype=Object.assign(Object.create(E.prototype),{constructor:Cc,copy:function(a){E.prototype.copy.call(this,a,!1);a=a.levels;for(var b=0,c=a.length;b=d[e].distance)d[e-1].object.visible=!1,d[e].object.visible=!0;else break;for(;ef||(k.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}else for(g=0,A=t.length/3-1;gf||(k.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld), +index:g,face:null,faceIndex:null,object:this}))}else if(g.isGeometry)for(m=g.vertices,l=m.length,g=0;gf||(k.applyMatrix4(this.matrixWorld),r=d.ray.origin.distanceTo(k),rd.far||e.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:g,face:null,faceIndex:null,object:this}))}}}(),clone:function(){return(new this.constructor(this.geometry,this.material)).copy(this)}});ea.prototype=Object.assign(Object.create(Na.prototype), +{constructor:ea,isLineSegments:!0});od.prototype=Object.assign(Object.create(Na.prototype),{constructor:od,isLineLoop:!0});Ga.prototype=Object.create(X.prototype);Ga.prototype.constructor=Ga;Ga.prototype.isPointsMaterial=!0;Ga.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.size=a.size;this.sizeAttenuation=a.sizeAttenuation;return this};Lb.prototype=Object.assign(Object.create(E.prototype),{constructor:Lb,isPoints:!0,raycast:function(){var a=new S, +b=new fb,c=new Pa;return function(d,e){function f(a,c){var f=b.distanceSqToPoint(a);if(fd.far||e.push({distance:l,distanceToRay:Math.sqrt(f),point:h.clone(),index:c,face:null,object:g})}}var g=this,h=this.geometry,m=this.matrixWorld,l=d.params.Points.threshold;null===h.boundingSphere&&h.computeBoundingSphere();c.copy(h.boundingSphere);c.applyMatrix4(m);if(!1!==d.ray.intersectsSphere(c)){a.getInverse(m); +b.copy(d.ray).applyMatrix4(a);var l=l/((this.scale.x+this.scale.y+this.scale.z)/3),k=l*l,l=new q;if(h.isBufferGeometry){var p=h.index,h=h.attributes.position.array;if(null!==p)for(var n=p.array,p=0,t=n.length;pc)return null;var d=[],e=[],f=[],g,h,m;if(0=l--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"); +break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);m=h+1;c<=m&&(m=0);var k;a:{var p,n,t,q,r,z,w,x;p=a[e[g]].x;n=a[e[g]].y;t=a[e[h]].x;q=a[e[h]].y;r=a[e[m]].x;z=a[e[m]].y;if(0>=(t-p)*(z-n)-(q-n)*(r-p))k=!1;else{var L,v,F,H,y,D,E,B,G,I;L=r-t;v=z-q;F=p-r;H=n-z;y=t-p;D=q-n;for(k=0;k=-Number.EPSILON&&B>=-Number.EPSILON&&E>=-Number.EPSILON)){k=!1;break a}k=!0}}if(k){d.push([a[e[g]], +a[e[h]],a[e[m]]]);f.push([e[g],e[h],e[m]]);g=h;for(m=h+1;mNumber.EPSILON){if(0u||u>p)return[];m=l*k-m* +n;if(0>m||m>p)return[]}else{if(0c?[]:m===c?f?[]:[g]:a<=c?[g,h]:[g,l]}function f(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return Math.abs(a)>Number.EPSILON?(b=g*c-d*b,0e&&(e=d);var g=a+1;g>d&&(g=0);d=f(h[a],h[e],h[g],m[b]);if(!d)return!1;d=m.length-1;e=b-1;0>e&&(e=d);g=b+1;g>d&&(g=0);return(d=f(m[b],m[e],m[g],h[a]))?!0:!1}function d(a,b){var c,f;for(c=0;cP){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(n=E;nm;m++)k=l[m].x+":"+l[m].y,k=p[k],void 0!==k&&(l[m]=k);return n.concat()},isClockWise:function(a){return 0>za.area(a)}};ya.prototype=Object.create(K.prototype);ya.prototype.constructor=ya;ya.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;dNumber.EPSILON){var m=Math.sqrt(h),l=Math.sqrt(d*d+g*g),h=b.x-f/m;b=b.y+e/m;g=((c.x-g/l-h)*g-(c.y+d/l-b)*d)/(e*g-f*d);d=h+e*g-a.x;e=b+f*g-a.y;f=d*d+e*e;if(2>=f)return new D(d,e);f=Math.sqrt(f/2)}else a=!1,e>Number.EPSILON?d>Number.EPSILON&& +(a=!0):e<-Number.EPSILON?d<-Number.EPSILON&&(a=!0):Math.sign(f)===Math.sign(g)&&(a=!0),a?(d=-f,f=Math.sqrt(h)):(d=e,e=f,f=Math.sqrt(h/2));return new D(d/f,e/f)}function e(a,b){var c,d;for(Q=a.length;0<=--Q;){c=Q;d=Q-1;0>d&&(d=a.length-1);var e,f=t+2*k;for(e=0;eMath.abs(b.y-c.y)?[new D(b.x,1-b.z),new D(c.x,1-c.z),new D(d.x,1-d.z),new D(e.x,1-e.z)]:[new D(b.y,1-b.z),new D(c.y,1-c.z),new D(d.y,1-d.z),new D(e.y,1-e.z)]}};Pc.prototype=Object.create(ya.prototype);Pc.prototype.constructor= +Pc;Qc.prototype=Object.create(K.prototype);Qc.prototype.constructor=Qc;nb.prototype=Object.create(G.prototype);nb.prototype.constructor=nb;Rc.prototype=Object.create(K.prototype);Rc.prototype.constructor=Rc;Vb.prototype=Object.create(G.prototype);Vb.prototype.constructor=Vb;Sc.prototype=Object.create(K.prototype);Sc.prototype.constructor=Sc;Wb.prototype=Object.create(G.prototype);Wb.prototype.constructor=Wb;Xb.prototype=Object.create(K.prototype);Xb.prototype.constructor=Xb;Yb.prototype=Object.create(G.prototype); +Yb.prototype.constructor=Yb;Zb.prototype=Object.create(G.prototype);Zb.prototype.constructor=Zb;ob.prototype=Object.create(K.prototype);ob.prototype.constructor=ob;Wa.prototype=Object.create(G.prototype);Wa.prototype.constructor=Wa;Tc.prototype=Object.create(ob.prototype);Tc.prototype.constructor=Tc;Uc.prototype=Object.create(Wa.prototype);Uc.prototype.constructor=Uc;Vc.prototype=Object.create(K.prototype);Vc.prototype.constructor=Vc;$b.prototype=Object.create(G.prototype);$b.prototype.constructor= +$b;var Oa=Object.freeze({WireframeGeometry:Nb,ParametricGeometry:Gc,ParametricBufferGeometry:Ob,TetrahedronGeometry:Ic,TetrahedronBufferGeometry:Pb,OctahedronGeometry:Jc,OctahedronBufferGeometry:mb,IcosahedronGeometry:Kc,IcosahedronBufferGeometry:Qb,DodecahedronGeometry:Lc,DodecahedronBufferGeometry:Rb,PolyhedronGeometry:Hc,PolyhedronBufferGeometry:va,TubeGeometry:Mc,TubeBufferGeometry:Sb,TorusKnotGeometry:Nc,TorusKnotBufferGeometry:Tb,TorusGeometry:Oc,TorusBufferGeometry:Ub,TextGeometry:Pc,SphereGeometry:Qc, +SphereBufferGeometry:nb,RingGeometry:Rc,RingBufferGeometry:Vb,PlaneGeometry:yc,PlaneBufferGeometry:jb,LatheGeometry:Sc,LatheBufferGeometry:Wb,ShapeGeometry:Xb,ShapeBufferGeometry:Yb,ExtrudeGeometry:ya,EdgesGeometry:Zb,ConeGeometry:Tc,ConeBufferGeometry:Uc,CylinderGeometry:ob,CylinderBufferGeometry:Wa,CircleGeometry:Vc,CircleBufferGeometry:$b,BoxGeometry:Hb,BoxBufferGeometry:ib});ac.prototype=Object.create(Fa.prototype);ac.prototype.constructor=ac;ac.prototype.isShadowMaterial=!0;bc.prototype=Object.create(Fa.prototype); +bc.prototype.constructor=bc;bc.prototype.isRawShaderMaterial=!0;Qa.prototype=Object.create(X.prototype);Qa.prototype.constructor=Qa;Qa.prototype.isMeshStandardMaterial=!0;Qa.prototype.copy=function(a){X.prototype.copy.call(this,a);this.defines={STANDARD:""};this.color.copy(a.color);this.roughness=a.roughness;this.metalness=a.metalness;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive); +this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.roughnessMap=a.roughnessMap;this.metalnessMap=a.metalnessMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.envMapIntensity=a.envMapIntensity;this.refractionRatio=a.refractionRatio; +this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};pb.prototype=Object.create(Qa.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshPhysicalMaterial=!0;pb.prototype.copy=function(a){Qa.prototype.copy.call(this,a);this.defines={PHYSICAL:""};this.reflectivity=a.reflectivity;this.clearCoat=a.clearCoat;this.clearCoatRoughness= +a.clearCoatRoughness;return this};pa.prototype=Object.create(X.prototype);pa.prototype.constructor=pa;pa.prototype.isMeshPhongMaterial=!0;pa.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.specular.copy(a.specular);this.shininess=a.shininess;this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity= +a.emissiveIntensity;this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth; +this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};qb.prototype=Object.create(pa.prototype);qb.prototype.constructor=qb;qb.prototype.isMeshToonMaterial=!0;qb.prototype.copy=function(a){pa.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};rb.prototype=Object.create(X.prototype);rb.prototype.constructor=rb;rb.prototype.isMeshNormalMaterial=!0;rb.prototype.copy=function(a){X.prototype.copy.call(this, +a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};sb.prototype=Object.create(X.prototype);sb.prototype.constructor=sb;sb.prototype.isMeshLambertMaterial=!0;sb.prototype.copy= +function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe; +this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};tb.prototype=Object.create(X.prototype);tb.prototype.constructor=tb;tb.prototype.isLineDashedMaterial=!0;tb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this}; +var Yf=Object.freeze({ShadowMaterial:ac,SpriteMaterial:lb,RawShaderMaterial:bc,ShaderMaterial:Fa,PointsMaterial:Ga,MeshPhysicalMaterial:pb,MeshStandardMaterial:Qa,MeshPhongMaterial:pa,MeshToonMaterial:qb,MeshNormalMaterial:rb,MeshLambertMaterial:sb,MeshDepthMaterial:ab,MeshBasicMaterial:Ia,LineDashedMaterial:tb,LineBasicMaterial:ia,Material:X}),id={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]}, +clear:function(){this.files={}}},na=new Xd;Object.assign(qa.prototype,{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);var e=this,f=id.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){var h=g[1],m=!!g[2],g=g[3],g=window.decodeURIComponent(g);m&&(g=window.atob(g));try{var l,k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":l=new ArrayBuffer(g.length); +for(var p=new Uint8Array(l),m=0;m=e)break a;else{f=b[1];a=e)break b}d=c;c= +0}}for(;c>>1,ab;)--f;++f;if(0!==e||f!==d)e>=f&&(f=Math.max(f, +1),e=f-1),d=this.getValueSize(),this.times=ra.arraySlice(c,e,f),this.values=ra.arraySlice(this.values,e*d,f*d);return this},validate:function(){var a=!0,b=this.getValueSize();0!==b-Math.floor(b)&&(console.error("invalid value size in track",this),a=!1);var c=this.times,b=this.values,d=c.length;0===d&&(console.error("track is empty",this),a=!1);for(var e=null,f=0;f!==d;f++){var g=c[f];if("number"===typeof g&&isNaN(g)){console.error("time is not a valid number",this,f,g);a=!1;break}if(null!==e&&e>g){console.error("out of order keys", +this,f,g,e);a=!1;break}e=g}if(void 0!==b&&ra.isTypedArray(b))for(f=0,c=b.length;f!==c;++f)if(d=b[f],isNaN(d)){console.error("value is not a valid number",this,f,d);a=!1;break}return a},optimize:function(){for(var a=this.times,b=this.values,c=this.getValueSize(),d=2302===this.getInterpolation(),e=1,f=a.length-1,g=1;gl.opacity&&(l.transparent=!0);d.setTextures(m);return d.parse(l)}}()});Object.assign(ae.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:ec.prototype.extractUrlBase(a),g=new qa(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+ -a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new K,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,h,m,l,k,p,n,t,y,r,D,w,x=a.faces;k=a.vertices;var A=a.normals,v=a.colors,F=0;if(void 0!==a.uvs){for(d=0;dg;g++)n=x[m++],w=D[2*n],n=D[2*n+1],w= -new C(w,n),2!==g&&c.faceVertexUvs[d][h].push(w),0!==g&&c.faceVertexUvs[d][h+1].push(w);p&&(p=3*x[m++],t.normal.set(A[p++],A[p++],A[p]),r.normal.copy(t.normal));if(y)for(d=0;4>d;d++)p=3*x[m++],y=new q(A[p++],A[p++],A[p]),2!==d&&t.vertexNormals.push(y),0!==d&&r.vertexNormals.push(y);k&&(k=x[m++],k=v[k],t.color.setHex(k),r.color.setHex(k));if(b)for(d=0;4>d;d++)k=x[m++],k=v[k],2!==d&&t.vertexColors.push(new I(k)),0!==d&&r.vertexColors.push(new I(k));c.faces.push(t);c.faces.push(r)}else{t=new oa;t.a=x[m++]; -t.b=x[m++];t.c=x[m++];h&&(h=x[m++],t.materialIndex=h);h=c.faces.length;if(d)for(d=0;dg;g++)n=x[m++],w=D[2*n],n=D[2*n+1],w=new C(w,n),c.faceVertexUvs[d][h].push(w);p&&(p=3*x[m++],t.normal.set(A[p++],A[p++],A[p]));if(y)for(d=0;3>d;d++)p=3*x[m++],y=new q(A[p++],A[p++],A[p]),t.vertexNormals.push(y);k&&(k=x[m++],t.color.setHex(v[k]));if(b)for(d=0;3>d;d++)k=x[m++],t.vertexColors.push(new I(v[k]));c.faces.push(t)}})(d);(function(){var b=void 0!==a.influencesPerVertex? +a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new K,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,h,m,l,k,p,n,t,A,r,z,w,x=a.faces;k=a.vertices;var B=a.normals,v=a.colors,F=0;if(void 0!==a.uvs){for(d=0;dg;g++)n=x[m++],w=z[2*n],n=z[2*n+1],w= +new D(w,n),2!==g&&c.faceVertexUvs[d][h].push(w),0!==g&&c.faceVertexUvs[d][h+1].push(w);p&&(p=3*x[m++],t.normal.set(B[p++],B[p++],B[p]),r.normal.copy(t.normal));if(A)for(d=0;4>d;d++)p=3*x[m++],A=new q(B[p++],B[p++],B[p]),2!==d&&t.vertexNormals.push(A),0!==d&&r.vertexNormals.push(A);k&&(k=x[m++],k=v[k],t.color.setHex(k),r.color.setHex(k));if(b)for(d=0;4>d;d++)k=x[m++],k=v[k],2!==d&&t.vertexColors.push(new I(k)),0!==d&&r.vertexColors.push(new I(k));c.faces.push(t);c.faces.push(r)}else{t=new oa;t.a=x[m++]; +t.b=x[m++];t.c=x[m++];h&&(h=x[m++],t.materialIndex=h);h=c.faces.length;if(d)for(d=0;dg;g++)n=x[m++],w=z[2*n],n=z[2*n+1],w=new D(w,n),c.faceVertexUvs[d][h].push(w);p&&(p=3*x[m++],t.normal.set(B[p++],B[p++],B[p]));if(A)for(d=0;3>d;d++)p=3*x[m++],A=new q(B[p++],B[p++],B[p]),t.vertexNormals.push(A);k&&(k=x[m++],t.color.setHex(v[k]));if(b)for(d=0;3>d;d++)k=x[m++],t.vertexColors.push(new I(v[k]));c.faces.push(t)}})(d);(function(){var b=void 0!==a.influencesPerVertex? a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,g=a.skinWeights.length;dc;)c+=b;for(;c>b;)c-=b;cb.length- -2?b.length-1:a+1],b=b[a>b.length-3?b.length-1:a+2];return new C(Me(c,d.x,e.x,f.x,b.x),Me(c,d.y,e.y,f.y,b.y))};fc.prototype=Object.create(Ba.prototype);fc.prototype.constructor=fc;fc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new C(yb(a,b.x,c.x,d.x,e.x),yb(a,b.y,c.y,d.y,e.y))};gc.prototype=Object.create(Ba.prototype);gc.prototype.constructor=gc;gc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new C(xb(a,b.x,c.x,d.x),xb(a,b.y,c.y,d.y))}; -var pe=Object.assign(Object.create(Zc.prototype),{fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;bb.length- +2?b.length-1:a+1],b=b[a>b.length-3?b.length-1:a+2];return new D(Me(c,d.x,e.x,f.x,b.x),Me(c,d.y,e.y,f.y,b.y))};fc.prototype=Object.create(Ba.prototype);fc.prototype.constructor=fc;fc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new D(yb(a,b.x,c.x,d.x,e.x),yb(a,b.y,c.y,d.y,e.y))};gc.prototype=Object.create(Ba.prototype);gc.prototype.constructor=gc;gc.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new D(xb(a,b.x,c.x,d.x),xb(a,b.y,c.y,d.y))}; +var pe=Object.assign(Object.create(Zc.prototype),{fromPoints:function(a){this.moveTo(a[0].x,a[0].y);for(var b=1,c=a.length;bNumber.EPSILON){if(0>l&&(g=b[f],m=-m,h=b[e],l=-l),!(a.yh.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-m*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=za.isClockWise,f=this.subPaths; -if(0===f.length)return[];if(!0===b)return c(f);var g,h,m,l=[];if(1===f.length)return h=f[0],m=new Ab,m.curves=h.curves,l.push(m),l;var k=!e(f[0].getPoints()),k=a?!k:k;m=[];var p=[],n=[],q=0,y;p[q]=void 0;n[q]=[];for(var r=0,D=f.length;r=c){var p=c++,n=b[p];d[n.uuid]=q;b[q]=n;d[l]=p;b[p]= -k;k=0;for(l=f;k!==l;++k){var n=e[k],t=n[q];n[q]=n[p];n[p]=t}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var l=arguments[h].uuid,q=e[l];if(void 0!==q)if(delete e[l],q=c){var p=c++,n=b[p];d[n.uuid]=q;b[q]=n;d[l]=p;b[p]= +k;k=0;for(l=f;k!==l;++k){var n=e[k],t=n[q];n[q]=n[p];n[p]=t}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var l=arguments[h].uuid,q=e[l];if(void 0!==q)if(delete e[l],qh.end&&(h.end=f);c||(c=k)}}for(k in d)h= -d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c};ca.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};ca.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};ca.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)};ca.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a]; -c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};ca.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};ca.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};ca.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};ca.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};ca.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time= -0,b.active=!0):console.warn("THREE.MorphBlendMesh: animation["+a+"] undefined in .playAnimation()")};ca.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};ca.prototype.update=function(a){for(var b=0,c=this.animationsList.length;bd.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0, -d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.start+T.clamp(Math.floor(d.time/e),0,d.length-1),g=d.weight;f!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);d.currentFrame!==d.lastFrame?(this.morphTargetInfluences[d.currentFrame]=e*g,this.morphTargetInfluences[d.lastFrame]=(1-e)* -g):this.morphTargetInfluences[d.currentFrame]=g}}};ad.prototype=Object.create(E.prototype);ad.prototype.constructor=ad;ad.prototype.isImmediateRenderObject=!0;bd.prototype=Object.create(ea.prototype);bd.prototype.constructor=bd;bd.prototype.update=function(){var a=new q,b=new q,c=new La;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&&g.isGeometry)for(var h= -g.vertices,k=g.faces,l=g=0,q=k.length;lc.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();Cb.prototype.setLength=function(a,b,c){void 0=== -b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Cb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};Kd.prototype=Object.create(ea.prototype);Kd.prototype.constructor=Kd;var Nd=new q,qe=new ne,re=new ne,se=new ne;Ka.prototype=Object.create(Ba.prototype);Ka.prototype.constructor=Ka;Ka.prototype.getPoint=function(a){var b=this.points, -c=b.length;2>c&&console.log("duh, you need at least 2 points");a*=c-(this.closed?0:1);var d=Math.floor(a);a-=d;this.closed?d+=0d&&(d=1);1E-4>c&&(c=d);1E-4>h&&(h=d);qe.initNonuniformCatmullRom(e.x,f.x,g.x,b.x,c,d,h);re.initNonuniformCatmullRom(e.y,f.y,g.y,b.y,c,d,h);se.initNonuniformCatmullRom(e.z,f.z,g.z,b.z,c,d,h)}else"catmullrom"===this.type&&(c=void 0!==this.tension?this.tension:.5,qe.initCatmullRom(e.x,f.x,g.x,b.x,c),re.initCatmullRom(e.y,f.y,g.y,b.y,c),se.initCatmullRom(e.z,f.z,g.z,b.z,c));return new q(qe.calc(a),re.calc(a),se.calc(a))}; -fd.prototype=Object.create(Ba.prototype);fd.prototype.constructor=fd;fd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new q(yb(a,b.x,c.x,d.x,e.x),yb(a,b.y,c.y,d.y,e.y),yb(a,b.z,c.z,d.z,e.z))};gd.prototype=Object.create(Ba.prototype);gd.prototype.constructor=gd;gd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new q(xb(a,b.x,c.x,d.x),xb(a,b.y,c.y,d.y),xb(a,b.z,c.z,d.z))};hd.prototype=Object.create(Ba.prototype);hd.prototype.constructor=hd; -hd.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=new q;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b};Ld.prototype=Object.create(Xa.prototype);Ld.prototype.constructor=Ld;Ba.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(Ba.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Ye.prototype=Object.create(Ka.prototype);Ze.prototype=Object.create(Ka.prototype);oe.prototype=Object.create(Ka.prototype); -Object.assign(oe.prototype,{initFromArray:function(a){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(a){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(a){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});cd.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Object.assign(jd.prototype, -{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}});Object.assign(Ua.prototype, -{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}, -size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");return this.getSize(a)}});Gb.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};T.random16=function(){console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead.");return Math.random()};Object.assign(La.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."); +0,e=a.length;dh.end&&(h.end=f);c||(c=k)}}for(k in d)h=d[k],this.createAnimation(k,h.start,h.end,a);this.firstAnimation=c};ca.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};ca.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};ca.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)};ca.prototype.setAnimationDuration= +function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};ca.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};ca.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};ca.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b};ca.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};ca.prototype.playAnimation=function(a){var b= +this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("THREE.MorphBlendMesh: animation["+a+"] undefined in .playAnimation()")};ca.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1};ca.prototype.update=function(a){for(var b=0,c=this.animationsList.length;bd.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards= +!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.start+T.clamp(Math.floor(d.time/e),0,d.length-1),g=d.weight;f!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*g,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);d.currentFrame!==d.lastFrame?(this.morphTargetInfluences[d.currentFrame]=e*g,this.morphTargetInfluences[d.lastFrame]= +(1-e)*g):this.morphTargetInfluences[d.currentFrame]=g}}};ad.prototype=Object.create(E.prototype);ad.prototype.constructor=ad;ad.prototype.isImmediateRenderObject=!0;bd.prototype=Object.create(ea.prototype);bd.prototype.constructor=bd;bd.prototype.update=function(){var a=new q,b=new q,c=new La;return function(){var d=["a","b","c"];this.object.updateMatrixWorld(!0);c.getNormalMatrix(this.object.matrixWorld);var e=this.object.matrixWorld,f=this.geometry.attributes.position,g=this.object.geometry;if(g&& +g.isGeometry)for(var h=g.vertices,k=g.faces,l=g=0,q=k.length;lc.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();Cb.prototype.setLength= +function(a,b,c){void 0===b&&(b=.2*a);void 0===c&&(c=.2*b);this.line.scale.set(1,Math.max(0,a-b),1);this.line.updateMatrix();this.cone.scale.set(c,b,c);this.cone.position.y=a;this.cone.updateMatrix()};Cb.prototype.setColor=function(a){this.line.material.color.copy(a);this.cone.material.color.copy(a)};Kd.prototype=Object.create(ea.prototype);Kd.prototype.constructor=Kd;var Nd=new q,qe=new ne,re=new ne,se=new ne;Ka.prototype=Object.create(Ba.prototype);Ka.prototype.constructor=Ka;Ka.prototype.getPoint= +function(a){var b=this.points,c=b.length;2>c&&console.log("duh, you need at least 2 points");a*=c-(this.closed?0:1);var d=Math.floor(a);a-=d;this.closed?d+=0d&&(d=1);1E-4>c&&(c=d);1E-4>h&&(h=d);qe.initNonuniformCatmullRom(e.x,f.x,g.x,b.x,c,d,h);re.initNonuniformCatmullRom(e.y,f.y,g.y,b.y,c,d,h);se.initNonuniformCatmullRom(e.z,f.z,g.z,b.z,c,d,h)}else"catmullrom"===this.type&&(c=void 0!==this.tension?this.tension:.5,qe.initCatmullRom(e.x,f.x,g.x,b.x,c),re.initCatmullRom(e.y,f.y,g.y,b.y,c),se.initCatmullRom(e.z,f.z,g.z,b.z, +c));return new q(qe.calc(a),re.calc(a),se.calc(a))};fd.prototype=Object.create(Ba.prototype);fd.prototype.constructor=fd;fd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2,e=this.v3;return new q(yb(a,b.x,c.x,d.x,e.x),yb(a,b.y,c.y,d.y,e.y),yb(a,b.z,c.z,d.z,e.z))};gd.prototype=Object.create(Ba.prototype);gd.prototype.constructor=gd;gd.prototype.getPoint=function(a){var b=this.v0,c=this.v1,d=this.v2;return new q(xb(a,b.x,c.x,d.x),xb(a,b.y,c.y,d.y),xb(a,b.z,c.z,d.z))};hd.prototype=Object.create(Ba.prototype); +hd.prototype.constructor=hd;hd.prototype.getPoint=function(a){if(1===a)return this.v2.clone();var b=new q;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b};Ld.prototype=Object.create(Xa.prototype);Ld.prototype.constructor=Ld;Ba.create=function(a,b){console.log("THREE.Curve.create() has been deprecated");a.prototype=Object.create(Ba.prototype);a.prototype.constructor=a;a.prototype.getPoint=b;return a};Ye.prototype=Object.create(Ka.prototype);Ze.prototype=Object.create(Ka.prototype); +oe.prototype=Object.create(Ka.prototype);Object.assign(oe.prototype,{initFromArray:function(a){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(a){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(a){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}});cd.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")}; +Object.assign(jd.prototype,{center:function(a){console.warn("THREE.Box2: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},size:function(a){console.warn("THREE.Box2: .size() has been renamed to .getSize().");return this.getSize(a)}}); +Object.assign(Ua.prototype,{center:function(a){console.warn("THREE.Box3: .center() has been renamed to .getCenter().");return this.getCenter(a)},empty:function(){console.warn("THREE.Box3: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)},isIntersectionSphere:function(a){console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."); +return this.intersectsSphere(a)},size:function(a){console.warn("THREE.Box3: .size() has been renamed to .getSize().");return this.getSize(a)}});Gb.prototype.center=function(a){console.warn("THREE.Line3: .center() has been renamed to .getCenter().");return this.getCenter(a)};T.random16=function(){console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead.");return Math.random()};Object.assign(La.prototype,{flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."); return this.toArray(a,b)},multiplyVector3:function(a){console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)},multiplyVector3Array:function(a){console.warn("THREE.Matrix3: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");return this.applyToVector3Array(a)},applyToBuffer:function(a,b,c){console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."); return this.applyToBufferAttribute(a)},applyToVector3Array:function(a,b,c){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}});Object.assign(S.prototype,{extractPosition:function(a){console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().");return this.copyPosition(a)},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.");return this.toArray(a,b)},getPosition:function(){var a; return function(){void 0===a&&(a=new q);console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return a.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");return this.makeRotationFromQuaternion(a)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."); @@ -806,7 +806,7 @@ a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(a,b,c){console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead.");return this.applyToBufferAttribute(a)},applyToVector3Array:function(a,b,c){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(a,b,c,d,e,f){console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."); return this.makePerspective(a,b,d,c,e,f)}});ua.prototype.isIntersectionLine=function(a){console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().");return this.intersectsLine(a)};la.prototype.multiplyVector3=function(a){console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)};Object.assign(fb.prototype,{isIntersectionBox:function(a){console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."); return this.intersectsBox(a)},isIntersectionPlane:function(a){console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().");return this.intersectsPlane(a)},isIntersectionSphere:function(a){console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().");return this.intersectsSphere(a)}});Object.assign(Ab.prototype,{extrude:function(a){console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.");return new ya(this,a)}, -makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new Xb(this,a)}});Object.assign(C.prototype,{fromAttribute:function(a,b,c){console.error("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)}});Object.assign(q.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")}, +makeGeometry:function(a){console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.");return new Xb(this,a)}});Object.assign(D.prototype,{fromAttribute:function(a,b,c){console.error("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)}});Object.assign(q.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")}, setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(a){console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().");return this.setFromMatrixPosition(a)},getScaleFromMatrix:function(a){console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().");return this.setFromMatrixScale(a)},getColumnFromMatrix:function(a, b){console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().");return this.setFromMatrixColumn(b,a)},applyProjection:function(a){console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.");return this.applyMatrix4(a)},fromAttribute:function(a,b,c){console.error("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)}});Object.assign(fa.prototype,{fromAttribute:function(a, b,c){console.error("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().");return this.fromBufferAttribute(a,b,c)}});K.prototype.computeTangents=function(){console.warn("THREE.Geometry: .computeTangents() has been removed.")};Object.assign(E.prototype,{getChildByName:function(a){console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().");return this.getObjectByName(a)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")}, @@ -834,12 +834,12 @@ set:function(a){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now . Db;k.WebGLRenderer=Vd;k.ShaderLib=bb;k.UniformsLib=O;k.UniformsUtils=Ha;k.ShaderChunk=ba;k.FogExp2=Jb;k.Fog=Kb;k.Scene=ld;k.LensFlare=Wd;k.Sprite=Bc;k.LOD=Cc;k.SkinnedMesh=nd;k.Skeleton=Dc;k.Bone=md;k.Mesh=xa;k.LineSegments=ea;k.LineLoop=od;k.Line=Na;k.Points=Lb;k.Group=Ec;k.VideoTexture=pd;k.DataTexture=db;k.CompressedTexture=Mb;k.CubeTexture=Za;k.CanvasTexture=qd;k.DepthTexture=Fc;k.Texture=aa;k.CompressedTextureLoader=Ke;k.DataTextureLoader=Yd;k.CubeTextureLoader=Zd;k.TextureLoader=rd;k.ObjectLoader= Le;k.MaterialLoader=Fd;k.BufferGeometryLoader=$d;k.DefaultLoadingManager=na;k.LoadingManager=Xd;k.JSONLoader=ae;k.ImageLoader=Wc;k.FontLoader=Ne;k.FileLoader=qa;k.Loader=ec;k.Cache=id;k.AudioLoader=de;k.SpotLightShadow=td;k.SpotLight=ud;k.PointLight=vd;k.RectAreaLight=ee;k.HemisphereLight=sd;k.DirectionalLightShadow=wd;k.DirectionalLight=xd;k.AmbientLight=yd;k.LightShadow=ub;k.Light=ga;k.StereoCamera=Oe;k.PerspectiveCamera=Ca;k.OrthographicCamera=Ib;k.CubeCamera=Gd;k.Camera=ma;k.AudioListener=fe; k.PositionalAudio=he;k.AudioContext=ge;k.AudioAnalyser=ie;k.Audio=hc;k.VectorKeyframeTrack=cc;k.StringKeyframeTrack=Cd;k.QuaternionKeyframeTrack=Yc;k.NumberKeyframeTrack=dc;k.ColorKeyframeTrack=Ed;k.BooleanKeyframeTrack=Dd;k.PropertyMixer=je;k.PropertyBinding=ka;k.KeyframeTrack=wb;k.AnimationUtils=ra;k.AnimationObjectGroup=Qe;k.AnimationMixer=Se;k.AnimationClip=Aa;k.Uniform=Hd;k.InstancedBufferGeometry=Bb;k.BufferGeometry=G;k.GeometryIdCount=function(){return Rd++};k.Geometry=K;k.InterleavedBufferAttribute= -ke;k.InstancedInterleavedBuffer=jc;k.InterleavedBuffer=ic;k.InstancedBufferAttribute=kc;k.Face3=oa;k.Object3D=E;k.Raycaster=Te;k.Layers=Pd;k.EventDispatcher=wa;k.Clock=Ve;k.QuaternionLinearInterpolant=Bd;k.LinearInterpolant=Xc;k.DiscreteInterpolant=Ad;k.CubicInterpolant=zd;k.Interpolant=ja;k.Triangle=Va;k.Math=T;k.Spherical=We;k.Cylindrical=Xe;k.Plane=ua;k.Frustum=kd;k.Sphere=Pa;k.Ray=fb;k.Matrix4=S;k.Matrix3=La;k.Box3=Ua;k.Box2=jd;k.Line3=Gb;k.Euler=cb;k.Vector4=fa;k.Vector3=q;k.Vector2=C;k.Quaternion= +ke;k.InstancedInterleavedBuffer=jc;k.InterleavedBuffer=ic;k.InstancedBufferAttribute=kc;k.Face3=oa;k.Object3D=E;k.Raycaster=Te;k.Layers=Pd;k.EventDispatcher=wa;k.Clock=Ve;k.QuaternionLinearInterpolant=Bd;k.LinearInterpolant=Xc;k.DiscreteInterpolant=Ad;k.CubicInterpolant=zd;k.Interpolant=ja;k.Triangle=Va;k.Math=T;k.Spherical=We;k.Cylindrical=Xe;k.Plane=ua;k.Frustum=kd;k.Sphere=Pa;k.Ray=fb;k.Matrix4=S;k.Matrix3=La;k.Box3=Ua;k.Box2=jd;k.Line3=Gb;k.Euler=cb;k.Vector4=fa;k.Vector3=q;k.Vector2=D;k.Quaternion= la;k.Color=I;k.MorphBlendMesh=ca;k.ImmediateRenderObject=ad;k.VertexNormalsHelper=bd;k.SpotLightHelper=lc;k.SkeletonHelper=mc;k.PointLightHelper=nc;k.RectAreaLightHelper=oc;k.HemisphereLightHelper=pc;k.GridHelper=cd;k.PolarGridHelper=Id;k.FaceNormalsHelper=dd;k.DirectionalLightHelper=qc;k.CameraHelper=ed;k.BoxHelper=rc;k.ArrowHelper=Cb;k.AxisHelper=Kd;k.CatmullRomCurve3=Ka;k.CubicBezierCurve3=fd;k.QuadraticBezierCurve3=gd;k.LineCurve3=hd;k.ArcCurve=Ld;k.EllipseCurve=Xa;k.SplineCurve=zb;k.CubicBezierCurve= fc;k.QuadraticBezierCurve=gc;k.LineCurve=Ta;k.Shape=Ab;k.Path=$c;k.ShapePath=be;k.Font=ce;k.CurvePath=Zc;k.Curve=Ba;k.ShapeUtils=za;k.SceneUtils={createMultiMaterialObject:function(a,b){for(var c=new Ec,d=0,e=b.length;d guessSizeSq ) { + if ( worldPosition.distanceToSquared( intersectPoint ) > guessSizeSq ) return; - return; + var distance = raycaster.ray.origin.distanceTo( intersectPoint ); - } + if ( distance < raycaster.near || distance > raycaster.far ) return; intersects.push( { - distance: Math.sqrt( distanceSq ), - point: this.position, + distance: distance, + point: intersectPoint.clone(), face: null, object: this @@ -39165,7 +39168,7 @@ Object.assign( Clock.prototype, { start: function () { - this.startTime = ( performance || Date ).now(); + this.startTime = ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732 this.oldTime = this.startTime; this.elapsedTime = 0; @@ -39199,7 +39202,7 @@ Object.assign( Clock.prototype, { if ( this.running ) { - var newTime = ( performance || Date ).now(); + var newTime = ( typeof performance === 'undefined' ? Date : performance ).now(); diff = ( newTime - this.oldTime ) / 1000; this.oldTime = newTime;