Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
32c299318c
2 changed files with 50 additions and 51 deletions
  1. 24 25
      build/three.js
  2. 26 26
      build/three.min.js

+ 24 - 25
build/three.js

@@ -18401,18 +18401,21 @@ Object.assign( THREE.XHRLoader.prototype, {
 	setPath: function ( value ) {
 
 		this.path = value;
+		return this;
 
 	},
 
 	setResponseType: function ( value ) {
 
 		this.responseType = value;
+		return this;
 
 	},
 
 	setWithCredentials: function ( value ) {
 
 		this.withCredentials = value;
+		return this;
 
 	}
 
@@ -18516,12 +18519,14 @@ Object.assign( THREE.ImageLoader.prototype, {
 	setCrossOrigin: function ( value ) {
 
 		this.crossOrigin = value;
+		return this;
 
 	},
 
 	setPath: function ( value ) {
 
 		this.path = value;
+		return this;
 
 	}
 
@@ -20055,12 +20060,14 @@ Object.assign( THREE.TextureLoader.prototype, {
 	setCrossOrigin: function ( value ) {
 
 		this.crossOrigin = value;
+		return this;
 
 	},
 
 	setPath: function ( value ) {
 
 		this.path = value;
+		return this;
 
 	}
 
@@ -20123,12 +20130,14 @@ Object.assign( THREE.CubeTextureLoader.prototype, {
 	setCrossOrigin: function ( value ) {
 
 		this.crossOrigin = value;
+		return this;
 
 	},
 
 	setPath: function ( value ) {
 
 		this.path = value;
+		return this;
 
 	}
 
@@ -20354,6 +20363,7 @@ Object.assign( THREE.CompressedTextureLoader.prototype, {
 	setPath: function ( value ) {
 
 		this.path = value;
+		return this;
 
 	}
 
@@ -25683,12 +25693,6 @@ THREE.WebGLRenderer = function ( parameters ) {
 					var size = geometryAttribute.itemSize;
 					var buffer = objects.getAttributeBuffer( geometryAttribute );
 
-					if ( buffer === undefined ) {
-
-						console.error( objects, geometryAttribute );
-
-					}
-
 					if ( geometryAttribute instanceof THREE.InterleavedBufferAttribute ) {
 
 						var data = geometryAttribute.data;
@@ -25906,16 +25910,27 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		//
 
-		var needsClear = this.autoClear || forceClear;
 		var background = scene.background;
 
 		if ( background === null ) {
 
 			glClearColor( _clearColor.r, _clearColor.g, _clearColor.b, _clearAlpha );
 
-		} else if ( background instanceof THREE.CubeTexture ) {
+		} else if ( background instanceof THREE.Color ) {
+
+			glClearColor( background.r, background.g, background.b, 1 );
+
+		}
 
-			backgroundCamera2.projectionMatrix = camera.projectionMatrix;
+		if ( this.autoClear || forceClear ) {
+
+			this.clear( this.autoClearColor, this.autoClearDepth, this.autoClearStencil );
+
+		}
+
+		if ( background instanceof THREE.CubeTexture ) {
+
+			backgroundCamera2.projectionMatrix.copy( camera.projectionMatrix );
 
 			backgroundCamera2.matrixWorld.extractRotation( camera.matrixWorld );
 			backgroundCamera2.matrixWorldInverse.getInverse( backgroundCamera2.matrixWorld );
@@ -25925,28 +25940,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			_this.renderBufferDirect( backgroundCamera2, null, backgroundBoxMesh.geometry, backgroundBoxMesh.material, backgroundBoxMesh, null );
 
-			needsClear = false;
-
 		} else if ( background instanceof THREE.Texture ) {
 
 			backgroundPlaneMesh.material.map = background;
 
 			_this.renderBufferDirect( backgroundCamera, null, backgroundPlaneMesh.geometry, backgroundPlaneMesh.material, backgroundPlaneMesh, null );
 
-			needsClear = false;
-
-		} else if ( background instanceof THREE.Color ) {
-
-			glClearColor( background.r, background.g, background.b, 1 );
-
-			needsClear = true;
-
-		}
-
-		if ( needsClear ) {
-
-			this.clear( this.autoClearColor, this.autoClearDepth, this.autoClearStencil );
-
 		}
 
 		//

+ 26 - 26
build/three.min.js

@@ -383,10 +383,10 @@ d.mapRoughnessOffset,d.mapRoughnessWrap,d.mapRoughnessAnisotropy);break;case "ma
 k.opacity=n;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":k[l]=n;break;case "vertexColors":!0===n&&(k.vertexColors=THREE.VertexColors);"face"===n&&(k.vertexColors=THREE.FaceColors);break;default:console.error("THREE.Loader.createMaterial: Unsupported",l,n)}}"MeshBasicMaterial"===k.type&&delete k.emissive;"MeshPhongMaterial"!==k.type&&delete k.specular;1>k.opacity&&(k.transparent=!0);c.setTextures(h);
 return c.parse(k)}}()};THREE.Loader.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};THREE.XHRLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
 Object.assign(THREE.XHRLoader.prototype,{load:function(a,b,c,d){void 0!==this.path&&(a=this.path+a);var e=this,f=THREE.Cache.get(a);if(void 0!==f)return b&&setTimeout(function(){b(f)},0),f;var g=new XMLHttpRequest;g.overrideMimeType("text/plain");g.open("GET",a,!0);g.addEventListener("load",function(c){var f=c.target.response;THREE.Cache.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn("THREE.XHRLoader: HTTP Status 0 received."),b&&b(f),e.manager.itemEnd(a)):
-(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=a},setResponseType:function(a){this.responseType=a},setWithCredentials:function(a){this.withCredentials=a}});
-THREE.FontLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};Object.assign(THREE.FontLoader.prototype,{load:function(a,b,c,d){var e=this;(new THREE.XHRLoader(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new THREE.Font(a)}});
+(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=
+a;return this}});THREE.FontLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};Object.assign(THREE.FontLoader.prototype,{load:function(a,b,c,d){var e=this;(new THREE.XHRLoader(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new THREE.Font(a)}});
 THREE.ImageLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
-Object.assign(THREE.ImageLoader.prototype,{load:function(a,b,c,d){var e=document.createElementNS("http://www.w3.org/1999/xhtml","img");e.onload=function(){URL.revokeObjectURL(e.src);b&&b(e)};if(0===a.indexOf("data:"))e.src=a;else{var f=new THREE.XHRLoader(this.manager);f.setPath(this.path);f.setResponseType("blob");f.load(a,function(a){e.src=URL.createObjectURL(a)},c,d)}return e},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}});
+Object.assign(THREE.ImageLoader.prototype,{load:function(a,b,c,d){var e=document.createElementNS("http://www.w3.org/1999/xhtml","img");e.onload=function(){URL.revokeObjectURL(e.src);b&&b(e)};if(0===a.indexOf("data:"))e.src=a;else{var f=new THREE.XHRLoader(this.manager);f.setPath(this.path);f.setResponseType("blob");f.load(a,function(a){e.src=URL.createObjectURL(a)},c,d)}return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=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,n,p,m,q,r,s,t,u,v=a.faces;n=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=n.length;k<
@@ -422,17 +422,17 @@ a),d[a]}var g;switch(b.type){case "Scene":g=new THREE.Scene;break;case "Perspect
 new THREE.AmbientLight(b.color,b.intensity);break;case "DirectionalLight":g=new THREE.DirectionalLight(b.color,b.intensity);break;case "PointLight":g=new THREE.PointLight(b.color,b.intensity,b.distance,b.decay);break;case "SpotLight":g=new THREE.SpotLight(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case "HemisphereLight":g=new THREE.HemisphereLight(b.color,b.groundColor,b.intensity);break;case "Mesh":g=e(b.geometry);var h=f(b.material);g=g.bones&&0<g.bones.length?new THREE.SkinnedMesh(g,
 h):new THREE.Mesh(g,h);break;case "LOD":g=new THREE.LOD;break;case "Line":g=new THREE.Line(e(b.geometry),f(b.material),b.mode);break;case "PointCloud":case "Points":g=new THREE.Points(e(b.geometry),f(b.material));break;case "Sprite":g=new THREE.Sprite(f(b.material));break;case "Group":g=new THREE.Group;break;default:g=new THREE.Object3D}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),
 void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var k in b.children)g.add(this.parseObject(b.children[k],c,d));if("LOD"===b.type)for(b=b.levels,h=0;h<b.length;h++){var l=b[h];k=g.getObjectByProperty("uuid",l.object);void 0!==
-k&&g.addLevel(k,l.distance)}return g}}()});THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};Object.assign(THREE.TextureLoader.prototype,{load:function(a,b,c,d){var e=new THREE.Texture,f=new THREE.ImageLoader(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(a){e.image=a;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}});
+k&&g.addLevel(k,l.distance)}return g}}()});THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};Object.assign(THREE.TextureLoader.prototype,{load:function(a,b,c,d){var e=new THREE.Texture,f=new THREE.ImageLoader(this.manager);f.setCrossOrigin(this.crossOrigin);f.setPath(this.path);f.load(a,function(a){e.image=a;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});
 THREE.CubeTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
-Object.assign(THREE.CubeTextureLoader.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new THREE.CubeTexture,g=new THREE.ImageLoader(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}});
+Object.assign(THREE.CubeTextureLoader.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new THREE.CubeTexture,g=new THREE.ImageLoader(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});
 THREE.DataTextureLoader=THREE.BinaryTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this._parser=null};
 Object.assign(THREE.BinaryTextureLoader.prototype,{load:function(a,b,c,d){var e=this,f=new THREE.DataTexture,g=new THREE.XHRLoader(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:THREE.ClampToEdgeWrapping,f.wrapT=void 0!==a.wrapT?a.wrapT:THREE.ClampToEdgeWrapping,f.magFilter=void 0!==a.magFilter?a.magFilter:THREE.LinearFilter,
 f.minFilter=void 0!==a.minFilter?a.minFilter:THREE.LinearMipMapLinearFilter,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=THREE.LinearFilter),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});THREE.CompressedTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this._parser=null};
 Object.assign(THREE.CompressedTextureLoader.prototype,{load:function(a,b,c,d){function e(e){k.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};l+=1;6===l&&(1===a.mipmapCount&&(h.minFilter=THREE.LinearFilter),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new THREE.CompressedTexture;h.image=g;var k=new THREE.XHRLoader(this.manager);k.setPath(this.path);k.setResponseType("arraybuffer");if(Array.isArray(a))for(var l=0,
 n=0,p=a.length;n<p;++n)e(n);else k.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=THREE.LinearFilter);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=
-a}});
-THREE.Material=function(){Object.defineProperty(this,"id",{value:THREE.MaterialIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=THREE.NormalBlending;this.side=THREE.FrontSide;this.shading=THREE.SmoothShading;this.vertexColors=THREE.NoColors;this.opacity=1;this.transparent=!1;this.blendSrc=THREE.SrcAlphaFactor;this.blendDst=THREE.OneMinusSrcAlphaFactor;this.blendEquation=THREE.AddEquation;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=
-null;this.depthFunc=THREE.LessEqualDepth;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.premultipliedAlpha=!1;this.overdraw=0;this._needsUpdate=this.visible=!0};
+a;return this}});
+THREE.Material=function(){Object.defineProperty(this,"id",{value:THREE.MaterialIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=THREE.NormalBlending;this.side=THREE.FrontSide;this.shading=THREE.SmoothShading;this.vertexColors=THREE.NoColors;this.opacity=1;this.transparent=!1;this.blendSrc=THREE.SrcAlphaFactor;this.blendDst=THREE.OneMinusSrcAlphaFactor;this.blendEquation=THREE.AddEquation;this.blendEquationAlpha=this.blendDstAlpha=
+this.blendSrcAlpha=null;this.depthFunc=THREE.LessEqualDepth;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=!1;this.alphaTest=this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.premultipliedAlpha=!1;this.overdraw=0;this._needsUpdate=this.visible=!0};
 THREE.Material.prototype={constructor:THREE.Material,get needsUpdate(){return this._needsUpdate},set needsUpdate(a){!0===a&&this.update();this._needsUpdate=a},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 instanceof THREE.Color?d.set(c):d instanceof THREE.Vector3&&c instanceof THREE.Vector3?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 instanceof THREE.Color&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);
 this.emissive instanceof THREE.Color&&(d.emissive=this.emissive.getHex());this.specular instanceof THREE.Color&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);this.map instanceof THREE.Texture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap instanceof THREE.Texture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap instanceof THREE.Texture&&(d.lightMap=this.lightMap.toJSON(a).uuid);this.bumpMap instanceof THREE.Texture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,
@@ -635,24 +635,24 @@ a.normalArray,x.DYNAMIC_DRAW);R.enableAttribute(b.normal);x.vertexAttribPointer(
 x.drawArrays(x.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,g){r(d);var f=s(a,b,d,e),k=!1;a=c.id+"_"+f.id+"_"+d.wireframe;a!==aa&&(aa=a,k=!0);b=e.morphTargetInfluences;if(void 0!==b){a=[];for(var m=0,k=b.length;m<k;m++){var l=b[m];a.push([l,m])}a.sort(h);8<a.length&&(a.length=8);for(var n=c.morphAttributes,m=0,k=a.length;m<k;m++)l=a[m],H[m]=l[0],0!==l[0]?(b=l[1],!0===d.morphTargets&&n.position&&c.addAttribute("morphTarget"+m,n.position[b]),!0===d.morphNormals&&n.normal&&
 c.addAttribute("morphNormal"+m,n.normal[b])):(!0===d.morphTargets&&c.removeAttribute("morphTarget"+m),!0===d.morphNormals&&c.removeAttribute("morphNormal"+m));f.getUniforms().setValue(x,"morphTargetInfluences",H);k=!0}b=c.index;m=c.attributes.position;!0===d.wireframe&&(b=ea.getWireframeAttribute(c));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 l=c.attributes,f=f.getAttributes(),n=d.defaultAttributeValues,q;for(q in f){var v=f[q];if(0<=v){var u=l[q];if(void 0!==u){var w=x.FLOAT,C=u.array,t=u.normalized;C instanceof Float32Array?w=x.FLOAT:C instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):C instanceof Uint16Array?w=x.UNSIGNED_SHORT:C instanceof Int16Array?w=x.SHORT:C instanceof Uint32Array?w=x.UNSIGNED_INT:C instanceof Int32Array?w=x.INT:C instanceof Int8Array?
-w=x.BYTE:C instanceof Uint8Array&&(w=x.UNSIGNED_BYTE);var C=u.itemSize,y=ea.getAttributeBuffer(u);void 0===y&&console.error(ea,u);if(u instanceof THREE.InterleavedBufferAttribute){var z=u.data,A=z.stride,u=u.offset;z instanceof THREE.InstancedInterleavedBuffer?(R.enableAttributeAndDivisor(v,z.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=z.meshPerAttribute*z.count)):R.enableAttribute(v);x.bindBuffer(x.ARRAY_BUFFER,y);x.vertexAttribPointer(v,C,w,t,A*z.array.BYTES_PER_ELEMENT,
-(k*A+u)*z.array.BYTES_PER_ELEMENT)}else u instanceof THREE.InstancedBufferAttribute?(R.enableAttributeAndDivisor(v,u.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=u.meshPerAttribute*u.count)):R.enableAttribute(v),x.bindBuffer(x.ARRAY_BUFFER,y),x.vertexAttribPointer(v,C,w,t,0,k*C*u.array.BYTES_PER_ELEMENT)}else if(void 0!==n&&(w=n[q],void 0!==w))switch(w.length){case 2:x.vertexAttrib2fv(v,w);break;case 3:x.vertexAttrib3fv(v,w);break;case 4:x.vertexAttrib4fv(v,w);break;default:x.vertexAttrib1fv(v,
-w)}}}R.disableUnusedAttributes()}null!==b&&x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,ea.getAttributeBuffer(b))}p=Infinity;null!==b?p=b.count:void 0!==m&&(p=m.count);q=c.drawRange.start;b=c.drawRange.count;m=null!==g?g.start:0;k=null!==g?g.count:Infinity;g=Math.max(0,q,m);p=Math.min(0+p,q+b,m+k)-1;p=Math.max(0,p-g+1);if(e instanceof THREE.Mesh)if(!0===d.wireframe)R.setLineWidth(d.wireframeLinewidth*(null===J?$:1)),a.setMode(x.LINES);else switch(e.drawMode){case THREE.TrianglesDrawMode:a.setMode(x.TRIANGLES);
-break;case THREE.TriangleStripDrawMode:a.setMode(x.TRIANGLE_STRIP);break;case THREE.TriangleFanDrawMode:a.setMode(x.TRIANGLE_FAN)}else e instanceof THREE.Line?(d=d.linewidth,void 0===d&&(d=1),R.setLineWidth(d*(null===J?$: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,g,p):a.render(g,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 g=a.fog;aa="";G=-1;T=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===c.parent&&c.updateMatrixWorld();c.matrixWorldInverse.getInverse(c.matrixWorld);pa.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);wa.setFromMatrix(pa);B.length=0;M=K=-1;L.length=0;O.length=0;va=this.localClippingEnabled;qa=ca.init(this.clippingPlanes,va,c);m(a,c);F.length=K+1;P.length=M+1;!0===N.sortObjects&&
-(F.sort(k),P.sort(l));qa&&ca.beginShadows();for(var f=B,h=0,p=0,n=f.length;p<n;p++){var v=f[p];v.castShadow&&(S.shadows[h++]=v)}S.shadows.length=h;ya.render(a,c);for(var f=B,r=v=0,s=0,u,w,C,t,H=c.matrixWorldInverse,y=0,z=0,J=0,A=0,h=0,p=f.length;h<p;h++)if(n=f[h],u=n.color,w=n.intensity,C=n.distance,t=n.shadow&&n.shadow.map?n.shadow.map.texture:null,n instanceof THREE.AmbientLight)v+=u.r*w,r+=u.g*w,s+=u.b*w;else if(n instanceof THREE.DirectionalLight){var D=ta.get(n);D.color.copy(n.color).multiplyScalar(n.intensity);
-D.direction.setFromMatrixPosition(n.matrixWorld);W.setFromMatrixPosition(n.target.matrixWorld);D.direction.sub(W);D.direction.transformDirection(H);if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.directionalShadowMap[y]=t;S.directionalShadowMatrix[y]=n.shadow.matrix;S.directional[y++]=D}else if(n instanceof THREE.SpotLight){D=ta.get(n);D.position.setFromMatrixPosition(n.matrixWorld);D.position.applyMatrix4(H);D.color.copy(u).multiplyScalar(w);
-D.distance=C;D.direction.setFromMatrixPosition(n.matrixWorld);W.setFromMatrixPosition(n.target.matrixWorld);D.direction.sub(W);D.direction.transformDirection(H);D.coneCos=Math.cos(n.angle);D.penumbraCos=Math.cos(n.angle*(1-n.penumbra));D.decay=0===n.distance?0:n.decay;if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.spotShadowMap[J]=t;S.spotShadowMatrix[J]=n.shadow.matrix;S.spot[J++]=D}else if(n instanceof THREE.PointLight){D=ta.get(n);
-D.position.setFromMatrixPosition(n.matrixWorld);D.position.applyMatrix4(H);D.color.copy(n.color).multiplyScalar(n.intensity);D.distance=n.distance;D.decay=0===n.distance?0:n.decay;if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.pointShadowMap[z]=t;void 0===S.pointShadowMatrix[z]&&(S.pointShadowMatrix[z]=new THREE.Matrix4);W.setFromMatrixPosition(n.matrixWorld).negate();S.pointShadowMatrix[z].identity().setPosition(W);S.point[z++]=
-D}else n instanceof THREE.HemisphereLight&&(D=ta.get(n),D.direction.setFromMatrixPosition(n.matrixWorld),D.direction.transformDirection(H),D.direction.normalize(),D.skyColor.copy(n.color).multiplyScalar(w),D.groundColor.copy(n.groundColor).multiplyScalar(w),S.hemi[A++]=D);S.ambient[0]=v;S.ambient[1]=r;S.ambient[2]=s;S.directional.length=y;S.spot.length=J;S.point.length=z;S.hemi.length=A;S.hash=y+","+z+","+J+","+A+","+S.shadows.length;qa&&ca.endShadows();fa.calls=0;fa.vertices=0;fa.faces=0;fa.points=
-0;void 0===d&&(d=null);this.setRenderTarget(d);e=this.autoClear||e;f=a.background;null===f?b(V.r,V.g,V.b,Y):f instanceof THREE.CubeTexture?(la.projectionMatrix=c.projectionMatrix,la.matrixWorld.extractRotation(c.matrixWorld),la.matrixWorldInverse.getInverse(la.matrixWorld),ga.material.uniforms.tCube.value=f,ga.modelViewMatrix.multiplyMatrices(la.matrixWorldInverse,ga.matrixWorld),N.renderBufferDirect(la,null,ga.geometry,ga.material,ga,null),e=!1):f instanceof THREE.Texture?(oa.material.map=f,N.renderBufferDirect(Ca,
-null,oa.geometry,oa.material,oa,null),e=!1):f instanceof THREE.Color&&(b(f.r,f.g,f.b,1),e=!0);e&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(e=a.overrideMaterial,q(F,c,g,e),q(P,c,g,e)):(R.setBlending(THREE.NoBlending),q(F,c,g),q(P,c,g));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=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 J};this.setRenderTarget=function(a){(J=a)&&void 0===Z.get(a).__webglFramebuffer&&ka.setupRenderTarget(a);var b=a instanceof THREE.WebGLRenderTargetCube,c;a?(c=Z.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,X.copy(a.scissor),ja=a.scissorTest,ba.copy(a.viewport)):(c=null,X.copy(ua).multiplyScalar($),ja=xa,ba.copy(ma).multiplyScalar($));D!==c&&(x.bindFramebuffer(x.FRAMEBUFFER,c),D=c);R.scissor(X);R.setScissorTest(ja);R.viewport(ba);
-b&&(b=Z.get(a.texture),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!1===a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=Z.get(a).__webglFramebuffer;if(g){var h=!1;g!==D&&(x.bindFramebuffer(x.FRAMEBUFFER,g),h=!0);try{var k=a.texture;k.format!==
-THREE.RGBAFormat&&u(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||u(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,u(k.format),u(k.type),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&&x.bindFramebuffer(x.FRAMEBUFFER,D)}}}}};
+w=x.BYTE:C instanceof Uint8Array&&(w=x.UNSIGNED_BYTE);var C=u.itemSize,y=ea.getAttributeBuffer(u);if(u instanceof THREE.InterleavedBufferAttribute){var z=u.data,A=z.stride,u=u.offset;z instanceof THREE.InstancedInterleavedBuffer?(R.enableAttributeAndDivisor(v,z.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=z.meshPerAttribute*z.count)):R.enableAttribute(v);x.bindBuffer(x.ARRAY_BUFFER,y);x.vertexAttribPointer(v,C,w,t,A*z.array.BYTES_PER_ELEMENT,(k*A+u)*z.array.BYTES_PER_ELEMENT)}else u instanceof
+THREE.InstancedBufferAttribute?(R.enableAttributeAndDivisor(v,u.meshPerAttribute,p),void 0===c.maxInstancedCount&&(c.maxInstancedCount=u.meshPerAttribute*u.count)):R.enableAttribute(v),x.bindBuffer(x.ARRAY_BUFFER,y),x.vertexAttribPointer(v,C,w,t,0,k*C*u.array.BYTES_PER_ELEMENT)}else if(void 0!==n&&(w=n[q],void 0!==w))switch(w.length){case 2:x.vertexAttrib2fv(v,w);break;case 3:x.vertexAttrib3fv(v,w);break;case 4:x.vertexAttrib4fv(v,w);break;default:x.vertexAttrib1fv(v,w)}}}R.disableUnusedAttributes()}null!==
+b&&x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,ea.getAttributeBuffer(b))}p=Infinity;null!==b?p=b.count:void 0!==m&&(p=m.count);q=c.drawRange.start;b=c.drawRange.count;m=null!==g?g.start:0;k=null!==g?g.count:Infinity;g=Math.max(0,q,m);p=Math.min(0+p,q+b,m+k)-1;p=Math.max(0,p-g+1);if(e instanceof THREE.Mesh)if(!0===d.wireframe)R.setLineWidth(d.wireframeLinewidth*(null===J?$:1)),a.setMode(x.LINES);else switch(e.drawMode){case THREE.TrianglesDrawMode:a.setMode(x.TRIANGLES);break;case THREE.TriangleStripDrawMode:a.setMode(x.TRIANGLE_STRIP);
+break;case THREE.TriangleFanDrawMode:a.setMode(x.TRIANGLE_FAN)}else e instanceof THREE.Line?(d=d.linewidth,void 0===d&&(d=1),R.setLineWidth(d*(null===J?$: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,g,p):a.render(g,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 g=a.fog;aa="";G=-1;T=null;!0===a.autoUpdate&&a.updateMatrixWorld();null===c.parent&&c.updateMatrixWorld();c.matrixWorldInverse.getInverse(c.matrixWorld);pa.multiplyMatrices(c.projectionMatrix,c.matrixWorldInverse);wa.setFromMatrix(pa);B.length=0;M=K=-1;L.length=0;O.length=0;va=this.localClippingEnabled;qa=ca.init(this.clippingPlanes,va,c);m(a,c);F.length=K+1;P.length=M+1;!0===N.sortObjects&&(F.sort(k),P.sort(l));qa&&ca.beginShadows();for(var f=B,h=0,p=0,n=f.length;p<n;p++){var v=f[p];v.castShadow&&
+(S.shadows[h++]=v)}S.shadows.length=h;ya.render(a,c);for(var f=B,r=v=0,s=0,u,w,C,t,H=c.matrixWorldInverse,y=0,z=0,J=0,A=0,h=0,p=f.length;h<p;h++)if(n=f[h],u=n.color,w=n.intensity,C=n.distance,t=n.shadow&&n.shadow.map?n.shadow.map.texture:null,n instanceof THREE.AmbientLight)v+=u.r*w,r+=u.g*w,s+=u.b*w;else if(n instanceof THREE.DirectionalLight){var D=ta.get(n);D.color.copy(n.color).multiplyScalar(n.intensity);D.direction.setFromMatrixPosition(n.matrixWorld);W.setFromMatrixPosition(n.target.matrixWorld);
+D.direction.sub(W);D.direction.transformDirection(H);if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.directionalShadowMap[y]=t;S.directionalShadowMatrix[y]=n.shadow.matrix;S.directional[y++]=D}else if(n instanceof THREE.SpotLight){D=ta.get(n);D.position.setFromMatrixPosition(n.matrixWorld);D.position.applyMatrix4(H);D.color.copy(u).multiplyScalar(w);D.distance=C;D.direction.setFromMatrixPosition(n.matrixWorld);W.setFromMatrixPosition(n.target.matrixWorld);
+D.direction.sub(W);D.direction.transformDirection(H);D.coneCos=Math.cos(n.angle);D.penumbraCos=Math.cos(n.angle*(1-n.penumbra));D.decay=0===n.distance?0:n.decay;if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.spotShadowMap[J]=t;S.spotShadowMatrix[J]=n.shadow.matrix;S.spot[J++]=D}else if(n instanceof THREE.PointLight){D=ta.get(n);D.position.setFromMatrixPosition(n.matrixWorld);D.position.applyMatrix4(H);D.color.copy(n.color).multiplyScalar(n.intensity);
+D.distance=n.distance;D.decay=0===n.distance?0:n.decay;if(D.shadow=n.castShadow)D.shadowBias=n.shadow.bias,D.shadowRadius=n.shadow.radius,D.shadowMapSize=n.shadow.mapSize;S.pointShadowMap[z]=t;void 0===S.pointShadowMatrix[z]&&(S.pointShadowMatrix[z]=new THREE.Matrix4);W.setFromMatrixPosition(n.matrixWorld).negate();S.pointShadowMatrix[z].identity().setPosition(W);S.point[z++]=D}else n instanceof THREE.HemisphereLight&&(D=ta.get(n),D.direction.setFromMatrixPosition(n.matrixWorld),D.direction.transformDirection(H),
+D.direction.normalize(),D.skyColor.copy(n.color).multiplyScalar(w),D.groundColor.copy(n.groundColor).multiplyScalar(w),S.hemi[A++]=D);S.ambient[0]=v;S.ambient[1]=r;S.ambient[2]=s;S.directional.length=y;S.spot.length=J;S.point.length=z;S.hemi.length=A;S.hash=y+","+z+","+J+","+A+","+S.shadows.length;qa&&ca.endShadows();fa.calls=0;fa.vertices=0;fa.faces=0;fa.points=0;void 0===d&&(d=null);this.setRenderTarget(d);f=a.background;null===f?b(V.r,V.g,V.b,Y):f instanceof THREE.Color&&b(f.r,f.g,f.b,1);(this.autoClear||
+e)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);f instanceof THREE.CubeTexture?(la.projectionMatrix.copy(c.projectionMatrix),la.matrixWorld.extractRotation(c.matrixWorld),la.matrixWorldInverse.getInverse(la.matrixWorld),ga.material.uniforms.tCube.value=f,ga.modelViewMatrix.multiplyMatrices(la.matrixWorldInverse,ga.matrixWorld),N.renderBufferDirect(la,null,ga.geometry,ga.material,ga,null)):f instanceof THREE.Texture&&(oa.material.map=f,N.renderBufferDirect(Ca,null,oa.geometry,
+oa.material,oa,null));a.overrideMaterial?(e=a.overrideMaterial,q(F,c,g,e),q(P,c,g,e)):(R.setBlending(THREE.NoBlending),q(F,c,g),q(P,c,g));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=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 J};this.setRenderTarget=function(a){(J=a)&&void 0===Z.get(a).__webglFramebuffer&&ka.setupRenderTarget(a);
+var b=a instanceof THREE.WebGLRenderTargetCube,c;a?(c=Z.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,X.copy(a.scissor),ja=a.scissorTest,ba.copy(a.viewport)):(c=null,X.copy(ua).multiplyScalar($),ja=xa,ba.copy(ma).multiplyScalar($));D!==c&&(x.bindFramebuffer(x.FRAMEBUFFER,c),D=c);R.scissor(X);R.setScissorTest(ja);R.viewport(ba);b&&(b=Z.get(a.texture),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};
+this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!1===a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=Z.get(a).__webglFramebuffer;if(g){var h=!1;g!==D&&(x.bindFramebuffer(x.FRAMEBUFFER,g),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&u(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||u(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,u(k.format),u(k.type),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&&
+x.bindFramebuffer(x.FRAMEBUFFER,D)}}}}};
 THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;this.scissor=new THREE.Vector4(0,0,a,b);this.scissorTest=!1;this.viewport=new THREE.Vector4(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=THREE.LinearFilter);this.texture=new THREE.Texture(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=null};
 Object.assign(THREE.WebGLRenderTarget.prototype,THREE.EventDispatcher.prototype,{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;