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],k=c[12],l=c[1],m=c[5],p=c[9],n=c[13],q=c[2],r=c[6],s=c[10],v=c[14],t=c[3],u=c[7],C=c[11],c=c[15],
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],k=c[12],l=c[1],m=c[5],p=c[9],n=c[13],q=c[2],r=c[6],s=c[10],v=c[14],t=c[3],u=c[7],A=c[11],c=c[15],
a[5],h=a[9],k=a[13],l=a[2],m=a[6],p=a[10],n=a[14];return a[3]*(+e*h*m-d*k*m-e*g*p+c*k*p+d*g*n-c*h*n)+a[7]*(+b*h*n-b*k*p+e*f*p-d*f*n+d*k*l-e*h*l)+a[11]*(+b*k*m-b*g*n-e*f*m+c*f*n+e*g*l-c*k*l)+a[15]*(-d*g*l-b*h*m+b*g*p+d*f*m-c*f*p+c*h*l)},transpose:function(){var a=this.elements,b;b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b;return this},flattenToArrayOffset:function(a,b){console.warn("THREE.Matrix3: .flattenToArrayOffset is deprecated - just use .toArray instead.");
return this.toArray(a,b)},getPosition:function(){var a;return function(){void 0===a&&(a=new THREE.Vector3);console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.");return a.setFromMatrixColumn(this,3)}}(),setPosition:function(a){var b=this.elements;b[12]=a.x;b[13]=a.y;b[14]=a.z;return this},getInverse:function(a,b){var c=this.elements,d=a.elements,e=d[0],f=d[1],g=d[2],h=d[3],k=d[4],l=d[5],m=d[6],p=d[7],n=d[8],q=d[9],r=d[10],s=d[11],v=d[12],
t=d[13],u=d[14],d=d[15],C=q*u*p-t*r*p+t*m*s-l*u*s-q*m*d+l*r*d,w=v*r*p-n*u*p-v*m*s+k*u*s+n*m*d-k*r*d,E=n*t*p-v*q*p+v*l*s-k*t*s-n*l*d+k*q*d,y=v*q*m-n*t*m-v*l*r+k*t*r+n*l*u-k*q*u,z=e*C+f*w+g*E+h*y;if(0===z){if(b)throw Error("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");return this.identity()}z=1/z;c[0]=C*z;c[1]=(t*r*h-q*u*h-t*g*s+f*u*s+q*g*d-f*r*d)*z;c[2]=(l*u*h-t*m*h+t*g*p-f*u*p-l*g*d+f*m*d)*z;c[3]=
t=d[13],u=d[14],d=d[15],A=q*u*p-t*r*p+t*m*s-l*u*s-q*m*d+l*r*d,w=v*r*p-n*u*p-v*m*s+k*u*s+n*m*d-k*r*d,E=n*t*p-v*q*p+v*l*s-k*t*s-n*l*d+k*q*d,y=v*q*m-n*t*m-v*l*r+k*t*r+n*l*u-k*q*u,z=e*A+f*w+g*E+h*y;if(0===z){if(b)throw Error("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");console.warn("THREE.Matrix4.getInverse(): can't invert matrix, determinant is 0");return this.identity()}z=1/z;c[0]=A*z;c[1]=(t*r*h-q*u*h-t*g*s+f*u*s+q*g*d-f*r*d)*z;c[2]=(l*u*h-t*m*h+t*g*p-f*u*p-l*g*d+f*m*d)*z;c[3]=
Object.assign(THREE.DirectGeometry.prototype,THREE.EventDispatcher.prototype,{computeBoundingBox:THREE.Geometry.prototype.computeBoundingBox,computeBoundingSphere:THREE.Geometry.prototype.computeBoundingSphere,computeFaceNormals:function(){console.warn("THREE.DirectGeometry: computeFaceNormals() is not a method of this type of geometry.")},computeVertexNormals:function(){console.warn("THREE.DirectGeometry: computeVertexNormals() is not a method of this type of geometry.")},computeGroups:function(a){var b,
Object.assign(THREE.BufferGeometry.prototype,THREE.EventDispatcher.prototype,{getIndex:function(){return this.index},setIndex:function(a){this.index=a},addAttribute:function(a,b,c){if(!1===b instanceof THREE.BufferAttribute&&!1===b instanceof THREE.InterleavedBufferAttribute)console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(a,new THREE.BufferAttribute(b,c));else if("index"===a)console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),
e,g,(g+1)%e);k.push(0,1,0);var l=THREE.AnimationUtils.getKeyframeOrder(h),h=THREE.AnimationUtils.sortedArray(h,1,l),k=THREE.AnimationUtils.sortedArray(k,1,l);d||0!==h[0]||(h.push(e),k.push(k[0]));f.push((new THREE.NumberKeyframeTrack(".morphTargetInfluences["+b[g].name+"]",h,k)).scale(1/c))}return new THREE.AnimationClip(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},
CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,g=a.length;f<g;f++){var h=a[f],k=h.name.match(e);if(k&&1<k.length){var l=k[1];(k=d[l])||(d[l]=k=[]);k.push(h)}}a=[];for(l in d)a.push(THREE.AnimationClip.CreateFromMorphTargetSequence(l,d[l],b,c));return a},parseAnimation:function(a,b,c){if(!a)return console.error(" no animation in JSONLoader data"),null;c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];THREE.AnimationUtils.flattenJSON(c,f,g,d);0!==f.length&&
e.push(new a(b,f,g))}};var d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30;a=a.hierarchy||[];for(var h=0;h<a.length;h++){var k=a[h].keys;if(k&&0!==k.length)if(k[0].morphTargets){for(var f={},l=0;l<k.length;l++)if(k[l].morphTargets)for(var m=0;m<k[l].morphTargets.length;m++)f[k[l].morphTargets[m]]=-1;for(var p in f){for(var n=[],q=[],m=0;m!==k[l].morphTargets.length;++m){var r=k[l];n.push(r.time);q.push(r.morphTarget===p?1:0)}d.push(new THREE.NumberKeyframeTrack(".morphTargetInfluence["+p+"]",
a;return this}});THREE.JSONLoader=function(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.withCredentials=!1};
Object.assign(THREE.JSONLoader.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:THREE.Loader.prototype.extractUrlBase(a),g=new THREE.XHRLoader(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 THREE.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,h,k,l,m,p,n,q,r,s,v,t,u=a.faces;m=a.vertices;var C=a.normals,w=a.colors,E=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&E++;for(d=0;d<E;d++)c.faceVertexUvs[d]=[]}k=0;for(l=m.length;k<
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 THREE.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,h,k,l,m,p,n,q,r,s,v,t,u=a.faces;m=a.vertices;var A=a.normals,w=a.colors,E=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&E++;for(d=0;d<E;d++)c.faceVertexUvs[d]=[]}k=0;for(l=m.length;k<
c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.")})();(function(b){if(void 0!==a.morphTargets)for(var d=0,g=a.morphTargets.length;d<g;d++){c.morphTargets[d]={};c.morphTargets[d].name=a.morphTargets[d].name;c.morphTargets[d].vertices=[];for(var h=c.morphTargets[d].vertices,k=a.morphTargets[d].vertices,l=0,m=k.length;l<
m;l+=3){var p=new THREE.Vector3;p.x=k[l]*b;p.y=k[l+1]*b;p.z=k[l+2]*b;h.push(p)}}if(void 0!==a.morphColors&&0<a.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),b=c.faces,h=a.morphColors[0].colors,d=0,g=b.length;d<g;d++)b[d].color.fromArray(h,3*d)})(d);(function(){var b=[],d=[];void 0!==a.animation&&d.push(a.animation);void 0!==a.animations&&(a.animations.length?d=d.concat(a.animations):d.push(a.animations));for(var g=0;g<d.length;g++){var h=
c instanceof THREE.MeshStandardMaterial||c instanceof THREE.ShaderMaterial||c.skinning)&&l.setValue(x,"viewMatrix",a.matrixWorldInverse);l.set(x,N,"toneMappingExposure");l.set(x,N,"toneMappingWhitePoint")}c.skinning&&(l.setOptional(x,d,"bindMatrix"),l.setOptional(x,d,"bindMatrixInverse"),p=d.skeleton)&&(da.floatVertexTextures&&p.useVertexTexture?(l.set(x,p,"boneTexture"),l.set(x,p,"boneTextureWidth"),l.set(x,p,"boneTextureHeight")):l.setOptional(x,p,"boneMatrices"));if(n){c.lights&&(n=m,k.ambientLightColor.needsUpdate=
c instanceof THREE.MeshStandardMaterial||c instanceof THREE.ShaderMaterial||c.skinning)&&l.setValue(x,"viewMatrix",a.matrixWorldInverse);l.set(x,N,"toneMappingExposure");l.set(x,N,"toneMappingWhitePoint")}c.skinning&&(l.setOptional(x,d,"bindMatrix"),l.setOptional(x,d,"bindMatrixInverse"),p=d.skeleton)&&(ba.floatVertexTextures&&p.useVertexTexture?(l.set(x,p,"boneTexture"),l.set(x,p,"boneTextureWidth"),l.set(x,p,"boneTextureHeight")):l.setOptional(x,p,"boneMatrices"));if(n){c.lights&&(n=m,k.ambientLightColor.needsUpdate=
b?(a=Ba,a.setIndex(b)):a=Aa;if(k){a:{var k=void 0,p;if(c instanceof THREE.InstancedBufferGeometry&&(p=U.get("ANGLE_instanced_arrays"),null===p)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===k&&(k=0);R.initAttributes();var n=c.attributes,g=g.getAttributes(),m=d.defaultAttributeValues,q;for(q in g){var u=g[q];if(0<=u){var w=n[q];if(void 0!==w){var t=x.FLOAT,C=w.array,v=
null!==b?(a=Ba,a.setIndex(b)):a=Aa;if(k){a:{var k=void 0,p;if(c instanceof THREE.InstancedBufferGeometry&&(p=U.get("ANGLE_instanced_arrays"),null===p)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===k&&(k=0);R.initAttributes();var n=c.attributes,g=g.getAttributes(),m=d.defaultAttributeValues,q;for(q in g){var u=g[q];if(0<=u){var w=n[q];if(void 0!==w){var t=x.FLOAT,A=w.array,
L?$:1)),e instanceof THREE.LineSegments?a.setMode(x.LINES):a.setMode(x.LINE_STRIP)):e instanceof THREE.Points&&a.setMode(x.POINTS);c instanceof THREE.InstancedBufferGeometry?0<c.maxInstancedCount&&a.renderInstances(c,f,p):a.render(f,p)};this.render=function(a,c,d,e){if(!1===c instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var f=a.fog;aa="";I=-1;T=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===c.parent&&c.updateMatrixWorld();
q(G,c,f,e),q(P,c,f,e)):(R.setBlending(THREE.NoBlending),q(G,c,f),q(P,c,f));Da.render(a,c);Ea.render(a,c,ba);d&&ka.updateRenderTargetMipmap(d);R.setDepthTest(!0);R.setDepthWrite(!0);R.setColorWrite(!0)}};this.setFaceCulling=function(a,b){R.setCullFace(a);R.setFlipSided(b===THREE.FrontFaceDirectionCW)};this.allocTextureUnit=function(){var a=ia;a>=da.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+da.maxTextures);ia+=1;return a};this.setTexture2D=
q(G,c,f,e),q(P,c,f,e)):(R.setBlending(THREE.NoBlending),q(G,c,f),q(P,c,f));Da.render(a,c);Ea.render(a,c,ca);d&&ka.updateRenderTargetMipmap(d);R.setDepthTest(!0);R.setDepthWrite(!0);R.setColorWrite(!0)}};this.setFaceCulling=function(a,b){R.setCullFace(a);R.setFlipSided(b===THREE.FrontFaceDirectionCW)};this.allocTextureUnit=function(){var a=ia;a>=ba.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ba.maxTextures);ia+=1;return a};this.setTexture2D=
function(){var a=!1;return function(b,c){b instanceof THREE.WebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);ka.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);ka.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b instanceof
THREE.WebGLRenderTargetCube&&(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 instanceof THREE.CubeTexture||Array.isArray(b.image)&&6===b.image.length?ka.setTextureCube(b,c):ka.setTextureCubeDynamic(b,c)}}();this.getCurrentRenderTarget=function(){return L};this.setRenderTarget=function(a){(L=a)&&void 0===Z.get(a).__webglFramebuffer&&ka.setupRenderTarget(a);var b=a instanceof THREE.WebGLRenderTargetCube,
function(a,b,c,d,e,g){if(!1===a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var f=Z.get(a).__webglFramebuffer;if(f){var h=!1;f!==D&&(x.bindFramebuffer(x.FRAMEBUFFER,f),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&t(k.format)!==x.getParameter(x.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):
k.type===THREE.UnsignedByteType||t(k.type)===x.getParameter(x.IMPLEMENTATION_COLOR_READ_TYPE)||k.type===THREE.FloatType&&U.get("WEBGL_color_buffer_float")||k.type===THREE.HalfFloatType&&U.get("EXT_color_buffer_half_float")?x.checkFramebufferStatus(x.FRAMEBUFFER)===x.FRAMEBUFFER_COMPLETE?0<=b&&b<=a.width-d&&0<=c&&c<=a.height-e&&x.readPixels(b,c,d,e,t(k.format),t(k.type),g):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+">");return k(c)})}function l(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]");return a})}var m=0;return function(a,n,q,r){var s=a.context,v=q.extensions,t=q.defines,u=q.__webglShader.vertexShader,C=q.__webglShader.fragmentShader,w="SHADOWMAP_TYPE_BASIC";r.shadowMapType===THREE.PCFShadowMap?w="SHADOWMAP_TYPE_PCF":r.shadowMapType===THREE.PCFSoftShadowMap&&(w="SHADOWMAP_TYPE_PCF_SOFT");
b+">");return k(c)})}function l(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,b,c,d){a="";for(b=parseInt(b);b<parseInt(c);b++)a+=d.replace(/\[ i \]/g,"[ "+b+" ]");return a})}var m=0;return function(a,n,q,r){var s=a.context,v=q.extensions,t=q.defines,u=q.__webglShader.vertexShader,A=q.__webglShader.fragmentShader,w="SHADOWMAP_TYPE_BASIC";r.shadowMapType===THREE.PCFShadowMap?w="SHADOWMAP_TYPE_PCF":r.shadowMapType===THREE.PCFSoftShadowMap&&(w="SHADOWMAP_TYPE_PCF_SOFT");
this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=m++;this.code=n;this.usedTimes=1;this.program=A;this.vertexShader=u;this.fragmentShader=C;return this}}();
this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=m++;this.code=n;this.usedTimes=1;this.program=B;this.vertexShader=u;this.fragmentShader=A;return this}}();
THREE.WebGLPrograms=function(a,b){function c(a,b){var c;a?a instanceof THREE.Texture?c=a.encoding:a instanceof THREE.WebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),c=a.texture.encoding):c=THREE.LinearEncoding;c===THREE.LinearEncoding&&b&&(c=THREE.GammaEncoding);return c}var d=[],e={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",
this.getParameters=function(d,f,k,l,m){var p=e[d.type],n;b.floatVertexTextures&&m&&m.skeleton&&m.skeleton.useVertexTexture?n=1024:(n=Math.floor((b.maxVertexUniforms-20)/4),void 0!==m&&m instanceof THREE.SkinnedMesh&&(n=Math.min(m.skeleton.bones.length,n),n<m.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+m.skeleton.bones.length+", this GPU supports just "+n+" (try OpenGL instead of ANGLE)")));var q=a.getPrecision();null!==d.precision&&(q=b.getMaxPrecision(d.precision),q!==
b.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",b);else if(!1===n.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",b);else{void 0===l.__webglInit&&(l.__webglInit=!0,b.addEventListener("dispose",m),l.__webglTexture=a.createTexture(),v.textures++);c.activeTexture(a.TEXTURE0+g);c.bindTexture(a.TEXTURE_2D,l.__webglTexture);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
0,0,r.width,r.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+n.width+"x"+n.height+"). Resized to "+r.width+"x"+r.height,n);p=r}else p=n;var n=k(p),r=f(b.format),s=f(b.type);q(a.TEXTURE_2D,b,n);var F=b.mipmaps;if(b instanceof THREE.DepthTexture){F=a.DEPTH_COMPONENT;if(b.type===THREE.FloatType){if(!t)throw Error("Float Depth Texture only supported in WebGL2.0");F=a.DEPTH_COMPONENT32F}else t&&(F=a.DEPTH_COMPONENT16);c.texImage2D(a.TEXTURE_2D,0,F,p.width,p.height,0,r,s,null)}else if(b instanceof
THREE.DataTexture)if(0<F.length&&n){for(var A=0,G=F.length;A<G;A++)p=F[A],c.texImage2D(a.TEXTURE_2D,A,r,p.width,p.height,0,r,s,p.data);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,r,p.width,p.height,0,r,s,p.data);else if(b instanceof THREE.CompressedTexture)for(A=0,G=F.length;A<G;A++)p=F[A],b.format!==THREE.RGBAFormat&&b.format!==THREE.RGBFormat?-1<c.getCompressedTextureFormats().indexOf(r)?c.compressedTexImage2D(a.TEXTURE_2D,A,r,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
THREE.DataTexture)if(0<F.length&&n){for(var B=0,G=F.length;B<G;B++)p=F[B],c.texImage2D(a.TEXTURE_2D,B,r,p.width,p.height,0,r,s,p.data);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,r,p.width,p.height,0,r,s,p.data);else if(b instanceof THREE.CompressedTexture)for(B=0,G=F.length;B<G;B++)p=F[B],b.format!==THREE.RGBAFormat&&b.format!==THREE.RGBFormat?-1<c.getCompressedTextureFormats().indexOf(r)?c.compressedTexImage2D(a.TEXTURE_2D,B,r,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
f(g.wrapT)),a.texParameteri(c,a.TEXTURE_MAG_FILTER,f(g.magFilter)),a.texParameteri(c,a.TEXTURE_MIN_FILTER,f(g.minFilter))):(a.texParameteri(c,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(c,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),g.wrapS===THREE.ClampToEdgeWrapping&&g.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",g),a.texParameteri(c,a.TEXTURE_MAG_FILTER,l(g.magFilter)),
a.texParameteri(c,a.TEXTURE_MIN_FILTER,l(g.minFilter)),g.minFilter!==THREE.NearestFilter&&g.minFilter!==THREE.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",g));!(h=b.get("EXT_texture_filter_anisotropic"))||g.type===THREE.FloatType&&null===b.get("OES_texture_float_linear")||g.type===THREE.HalfFloatType&&null===b.get("OES_texture_half_float_linear")||!(1<g.anisotropy||d.get(g).__currentAnisotropy)||
n||p?p?b.image[s].image:b.image[s]:h(b.image[s],e.maxCubemapSize);var t=k(r[0]),A=f(b.format),G=f(b.type);q(a.TEXTURE_CUBE_MAP,b,t);for(s=0;6>s;s++)if(n)for(var J,P=r[s].mipmaps,K=0,H=P.length;K<H;K++)J=P[K],b.format!==THREE.RGBAFormat&&b.format!==THREE.RGBFormat?-1<c.getCompressedTextureFormats().indexOf(A)?c.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+s,K,A,J.width,J.height,0,J.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):
n||p?p?b.image[s].image:b.image[s]:h(b.image[s],e.maxCubemapSize);var t=k(r[0]),B=f(b.format),G=f(b.type);q(a.TEXTURE_CUBE_MAP,b,t);for(s=0;6>s;s++)if(n)for(var J,P=r[s].mipmaps,K=0,H=P.length;K<H;K++)J=P[K],b.format!==THREE.RGBAFormat&&b.format!==THREE.RGBFormat?-1<c.getCompressedTextureFormats().indexOf(B)?c.compressedTexImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+s,K,B,J.width,J.height,0,J.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):
0;6>l;l++)r(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),q(a.TEXTURE_2D,b.texture,h),r(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=b instanceof THREE.WebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");
if(b instanceof THREE.WebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported!");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!(b.depthTexture instanceof THREE.DepthTexture))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=
Object.assign(THREE,{Face4:function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)},LineStrip:0,LinePieces:1,MeshFaceMaterial:THREE.MultiMaterial,PointCloud:function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new THREE.Points(a,b)},Particle:THREE.Sprite,ParticleSystem:function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new THREE.Points(a,
b)},PointCloudMaterial:function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleBasicMaterial:function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleSystemMaterial:function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},Vertex:function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");
...
...
@@ -825,13 +825,13 @@ THREE.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been mov
new THREE.Geometry,c=0,d=a.length;c<d;c++){var e=a[c];b.vertices.push(new THREE.Vector3(e.x,e.y,e.z||0))}return b}});THREE.Font=function(a){this.data=a};
THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,d>Number.EPSILON?
f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(I=a.length;0<=--I;){c=I;d=I-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*m,e=0;e<f;e++){var g=Q*e,h=Q*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+A,g=g+A,l=l+A,h=h+A;F.faces.push(new THREE.Face3(k,g,h,null,null,1));F.faces.push(new THREE.Face3(g,l,h,null,null,1));k=t.generateSideWallUV(F,
THREE.TextGeometry=function(a,b){b=b||{};var c=b.font;if(!1===c instanceof THREE.Font)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new THREE.Geometry;c=c.generateShapes(a,b.size,b.curveSegments);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);THREE.ExtrudeGeometry.call(this,c,b);this.type="TextGeometry"};
THREE.TorusKnotGeometry=function(a,b,c,d,e,f,g){THREE.Geometry.call(this);this.type="TorusKnotGeometry";this.parameters={radius:a,tube:b,tubularSegments:c,radialSegments:d,p:e,q:f};void 0!==g&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead.");this.fromBufferGeometry(new THREE.TorusKnotBufferGeometry(a,b,c,d,e,f));this.mergeVertices()};THREE.TorusKnotGeometry.prototype=Object.create(THREE.Geometry.prototype);