浏览代码

Updated builds.

Mr.doob 10 年之前
父节点
当前提交
25ff6621e2
共有 2 个文件被更改,包括 66 次插入53 次删除
  1. 21 8
      build/three.js
  2. 45 45
      build/three.min.js

+ 21 - 8
build/three.js

@@ -10559,6 +10559,12 @@ THREE.BufferGeometry.prototype = {
 
 
 	},
 	},
 
 
+	removeAttribute: function ( name ) {
+
+		delete this.attributes[ name ];
+
+	},
+
 	get offsets() {
 	get offsets() {
 
 
 		console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .drawcalls.' );
 		console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .drawcalls.' );
@@ -20486,9 +20492,9 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 				if ( geometryAttribute !== undefined ) {
 				if ( geometryAttribute !== undefined ) {
 
 
-					var size = geometryAttribute.itemSize;
 					state.enableAttribute( programAttribute );
 					state.enableAttribute( programAttribute );
 
 
+					var size = geometryAttribute.itemSize;
 					var buffer = objects.getAttributeBuffer( geometryAttribute );
 					var buffer = objects.getAttributeBuffer( geometryAttribute );
 
 
 					if ( geometryAttribute instanceof THREE.InterleavedBufferAttribute ) {
 					if ( geometryAttribute instanceof THREE.InterleavedBufferAttribute ) {
@@ -20635,15 +20641,16 @@ THREE.WebGLRenderer = function ( parameters ) {
 				var influence = activeInfluences[ i ];
 				var influence = activeInfluences[ i ];
 				morphInfluences[ i ] = influence[ 0 ];
 				morphInfluences[ i ] = influence[ 0 ];
 
 
-
 				if ( influence[ 0 ] !== 0 ) {
 				if ( influence[ 0 ] !== 0 ) {
 
 
 					var attribute = geometry.morphAttributes[ influence[ 1 ] ];
 					var attribute = geometry.morphAttributes[ influence[ 1 ] ];
 
 
-					objects.updateAttribute( attribute );
-
 					geometry.addAttribute( 'morphTarget' + i, attribute );
 					geometry.addAttribute( 'morphTarget' + i, attribute );
 
 
+				} else {
+
+					geometry.removeAttribute( 'morphTarget' + i );
+
 				}
 				}
 
 
 			}
 			}
@@ -24080,8 +24087,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
 
 
 		}
 		}
 
 
-		//
-
 		var attributes = geometry.attributes;
 		var attributes = geometry.attributes;
 
 
 		for ( var name in attributes ) {
 		for ( var name in attributes ) {
@@ -24090,6 +24095,16 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
 
 
 		}
 		}
 
 
+		// morph targets
+
+		var morphAttributes = geometry.morphAttributes;
+
+		for ( var i = 0, l = morphAttributes.length; i < l; i ++ ) {
+
+			updateAttribute( morphAttributes[ i ], i );
+
+		}
+
 	}
 	}
 
 
 	function updateAttribute( attribute, name ) {
 	function updateAttribute( attribute, name ) {
@@ -24189,8 +24204,6 @@ THREE.WebGLObjects = function ( gl, properties, info ) {
 
 
 	};
 	};
 
 
-	this.updateAttribute = updateAttribute;
-
 	this.clear = function () {
 	this.clear = function () {
 
 
 		objects = {};
 		objects = {};

+ 45 - 45
build/three.min.js

@@ -226,18 +226,18 @@ t.vertexNormals;3===s.length?this.normals.push(s[0],s[1],s[2]):(s=t.normal,this.
 l),this.uvs2.push(new THREE.Vector2,new THREE.Vector2,new THREE.Vector2)));!0===f&&(s=t.vertexTangents,3===s.length?this.tangents.push(s[0],s[1],s[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined tangents ",l),this.tangents.push(new THREE.Vector4,new THREE.Vector4,new THREE.Vector4)));for(s=0;s<k;s++){var u=h[s].vertices;this.morphTargets[s].push(u[t.a],u[t.b],u[t.c])}m&&this.skinIndices.push(n[t.a],n[t.b],n[t.c]);q&&this.skinWeights.push(p[t.a],p[t.b],p[t.c])}this.verticesNeedUpdate=
 l),this.uvs2.push(new THREE.Vector2,new THREE.Vector2,new THREE.Vector2)));!0===f&&(s=t.vertexTangents,3===s.length?this.tangents.push(s[0],s[1],s[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined tangents ",l),this.tangents.push(new THREE.Vector4,new THREE.Vector4,new THREE.Vector4)));for(s=0;s<k;s++){var u=h[s].vertices;this.morphTargets[s].push(u[t.a],u[t.b],u[t.c])}m&&this.skinIndices.push(n[t.a],n[t.b],n[t.c]);q&&this.skinWeights.push(p[t.a],p[t.b],p[t.c])}this.verticesNeedUpdate=
 a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.tangentsNeedUpdate=a.tangentsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.DirectGeometry.prototype);
 a.verticesNeedUpdate;this.normalsNeedUpdate=a.normalsNeedUpdate;this.colorsNeedUpdate=a.colorsNeedUpdate;this.uvsNeedUpdate=a.uvsNeedUpdate;this.tangentsNeedUpdate=a.tangentsNeedUpdate;return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.DirectGeometry.prototype);
 THREE.BufferGeometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="BufferGeometry";this.attributes={};this.morphAttributes=[];this.drawcalls=[];this.boundingSphere=this.boundingBox=null};
 THREE.BufferGeometry=function(){Object.defineProperty(this,"id",{value:THREE.GeometryIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="BufferGeometry";this.attributes={};this.morphAttributes=[];this.drawcalls=[];this.boundingSphere=this.boundingBox=null};
-THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,addAttribute:function(a,b,c){!1===b instanceof THREE.BufferAttribute&&!1===b instanceof THREE.InterleavedBufferAttribute?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.attributes[a]={array:b,itemSize:c}):this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},get offsets(){console.warn("THREE.BufferGeometry: .offsets has been renamed to .drawcalls.");return this.drawcalls},
-addDrawCall:function(a,b,c){this.drawcalls.push({start:a,count:b,index:void 0!==c?c:0})},clearDrawCalls:function(){this.drawcalls=[]},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToVector3Array(b.array),b.needsUpdate=!0);b=this.attributes.normal;void 0!==b&&((new THREE.Matrix3).getNormalMatrix(a).applyToVector3Array(b.array),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere()},center:function(){this.computeBoundingBox();
-var a=this.boundingBox.center().negate();this.applyMatrix((new THREE.Matrix4).setPosition(a));return a},setFromObject:function(a){console.log("THREE.BufferGeometry.setFromObject(). Converting",a,this);var b=a.geometry;if(a instanceof THREE.PointCloud||a instanceof THREE.Line){a=new THREE.Float32Attribute(3*b.vertices.length,3);var c=new THREE.Float32Attribute(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",c.copyColorsArray(b.colors));b.lineDistances&&
-b.lineDistances.length===b.vertices.length&&(a=new THREE.Float32Attribute(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a instanceof THREE.Mesh&&b instanceof THREE.Geometry&&this.fromGeometry(b);return this},updateFromObject:function(a){var b=a.geometry;if(a instanceof THREE.Mesh){a=b.__directGeometry;if(void 0===a)return this.fromGeometry(b);
-a.verticesNeedUpdate=b.verticesNeedUpdate;a.normalsNeedUpdate=b.normalsNeedUpdate;a.colorsNeedUpdate=b.colorsNeedUpdate;a.uvsNeedUpdate=b.uvsNeedUpdate;a.tangentsNeedUpdate=b.tangentsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.tangentsNeedUpdate=!1;b=a}!0===b.verticesNeedUpdate&&(a=this.attributes.position,void 0!==a&&(a.copyVector3sArray(b.vertices),a.needsUpdate=!0),b.verticesNeedUpdate=!1);!0===b.normalsNeedUpdate&&(a=this.attributes.normal,
-void 0!==a&&(a.copyVector3sArray(b.normals),a.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(a=this.attributes.color,void 0!==a&&(a.copyColorsArray(b.colors),a.needsUpdate=!0),b.colorsNeedUpdate=!1);!0===b.tangentsNeedUpdate&&(a=this.attributes.tangent,void 0!==a&&(a.copyVector4sArray(b.tangents),a.needsUpdate=!0),b.tangentsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(a=this.attributes.lineDistance,void 0!==a&&(a.copyArray(b.lineDistances),a.needsUpdate=!0),b.lineDistancesNeedUpdate=
-!1);return this},fromGeometry:function(a){a.__directGeometry=(new THREE.DirectGeometry).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute("position",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.normals)));0<a.colors.length&&(b=new Float32Array(3*
-a.colors.length),this.addAttribute("color",(new THREE.BufferAttribute(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs2)));0<a.tangents.length&&(b=new Float32Array(4*a.tangents.length),this.addAttribute("tangent",(new THREE.BufferAttribute(b,4)).copyVector4sArray(a.tangents)));
-0<a.indices.length&&(b=new Uint16Array(3*a.indices.length),this.addAttribute("index",(new THREE.BufferAttribute(b,1)).copyIndicesArray(a.indices)));if(0<a.morphTargets.length)for(var b=a.morphTargets,c=0,d=b.length;c<d;c++){var e=b[c],g=new THREE.Float32Attribute(3*e.length,3);this.morphAttributes.push(g.copyVector3sArray(e))}0<a.skinIndices.length&&(b=new THREE.Float32Attribute(4*a.skinIndices.length,4),this.addAttribute("skinIndex",b.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(b=
-new THREE.Float32Attribute(4*a.skinWeights.length,4),this.addAttribute("skinWeight",b.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){var a=new THREE.Vector3;return function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var b=this.attributes.position.array;if(b){var c=this.boundingBox;c.makeEmpty();for(var d=0,e=b.length;d<
-e;d+=3)a.fromArray(b,d),c.expandByPoint(a)}if(void 0===b||0===b.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0);(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var a=new THREE.Box3,b=new THREE.Vector3;return function(){null===this.boundingSphere&&
-(this.boundingSphere=new THREE.Sphere);var c=this.attributes.position.array;if(c){a.makeEmpty();for(var d=this.boundingSphere.center,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),a.expandByPoint(b);a.center(d);for(var f=0,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),f=Math.max(f,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(f);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',
+THREE.BufferGeometry.prototype={constructor:THREE.BufferGeometry,addAttribute:function(a,b,c){!1===b instanceof THREE.BufferAttribute&&!1===b instanceof THREE.InterleavedBufferAttribute?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.attributes[a]={array:b,itemSize:c}):this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},removeAttribute:function(a){delete this.attributes[a]},get offsets(){console.warn("THREE.BufferGeometry: .offsets has been renamed to .drawcalls.");
+return this.drawcalls},addDrawCall:function(a,b,c){this.drawcalls.push({start:a,count:b,index:void 0!==c?c:0})},clearDrawCalls:function(){this.drawcalls=[]},applyMatrix:function(a){var b=this.attributes.position;void 0!==b&&(a.applyToVector3Array(b.array),b.needsUpdate=!0);b=this.attributes.normal;void 0!==b&&((new THREE.Matrix3).getNormalMatrix(a).applyToVector3Array(b.array),b.needsUpdate=!0);null!==this.boundingBox&&this.computeBoundingBox();null!==this.boundingSphere&&this.computeBoundingSphere()},
+center:function(){this.computeBoundingBox();var a=this.boundingBox.center().negate();this.applyMatrix((new THREE.Matrix4).setPosition(a));return a},setFromObject:function(a){console.log("THREE.BufferGeometry.setFromObject(). Converting",a,this);var b=a.geometry;if(a instanceof THREE.PointCloud||a instanceof THREE.Line){a=new THREE.Float32Attribute(3*b.vertices.length,3);var c=new THREE.Float32Attribute(3*b.colors.length,3);this.addAttribute("position",a.copyVector3sArray(b.vertices));this.addAttribute("color",
+c.copyColorsArray(b.colors));b.lineDistances&&b.lineDistances.length===b.vertices.length&&(a=new THREE.Float32Attribute(b.lineDistances.length,1),this.addAttribute("lineDistance",a.copyArray(b.lineDistances)));null!==b.boundingSphere&&(this.boundingSphere=b.boundingSphere.clone());null!==b.boundingBox&&(this.boundingBox=b.boundingBox.clone())}else a instanceof THREE.Mesh&&b instanceof THREE.Geometry&&this.fromGeometry(b);return this},updateFromObject:function(a){var b=a.geometry;if(a instanceof THREE.Mesh){a=
+b.__directGeometry;if(void 0===a)return this.fromGeometry(b);a.verticesNeedUpdate=b.verticesNeedUpdate;a.normalsNeedUpdate=b.normalsNeedUpdate;a.colorsNeedUpdate=b.colorsNeedUpdate;a.uvsNeedUpdate=b.uvsNeedUpdate;a.tangentsNeedUpdate=b.tangentsNeedUpdate;b.verticesNeedUpdate=!1;b.normalsNeedUpdate=!1;b.colorsNeedUpdate=!1;b.uvsNeedUpdate=!1;b.tangentsNeedUpdate=!1;b=a}!0===b.verticesNeedUpdate&&(a=this.attributes.position,void 0!==a&&(a.copyVector3sArray(b.vertices),a.needsUpdate=!0),b.verticesNeedUpdate=
+!1);!0===b.normalsNeedUpdate&&(a=this.attributes.normal,void 0!==a&&(a.copyVector3sArray(b.normals),a.needsUpdate=!0),b.normalsNeedUpdate=!1);!0===b.colorsNeedUpdate&&(a=this.attributes.color,void 0!==a&&(a.copyColorsArray(b.colors),a.needsUpdate=!0),b.colorsNeedUpdate=!1);!0===b.tangentsNeedUpdate&&(a=this.attributes.tangent,void 0!==a&&(a.copyVector4sArray(b.tangents),a.needsUpdate=!0),b.tangentsNeedUpdate=!1);b.lineDistancesNeedUpdate&&(a=this.attributes.lineDistance,void 0!==a&&(a.copyArray(b.lineDistances),
+a.needsUpdate=!0),b.lineDistancesNeedUpdate=!1);return this},fromGeometry:function(a){a.__directGeometry=(new THREE.DirectGeometry).fromGeometry(a);return this.fromDirectGeometry(a.__directGeometry)},fromDirectGeometry:function(a){var b=new Float32Array(3*a.vertices.length);this.addAttribute("position",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.vertices));0<a.normals.length&&(b=new Float32Array(3*a.normals.length),this.addAttribute("normal",(new THREE.BufferAttribute(b,3)).copyVector3sArray(a.normals)));
+0<a.colors.length&&(b=new Float32Array(3*a.colors.length),this.addAttribute("color",(new THREE.BufferAttribute(b,3)).copyColorsArray(a.colors)));0<a.uvs.length&&(b=new Float32Array(2*a.uvs.length),this.addAttribute("uv",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs)));0<a.uvs2.length&&(b=new Float32Array(2*a.uvs2.length),this.addAttribute("uv2",(new THREE.BufferAttribute(b,2)).copyVector2sArray(a.uvs2)));0<a.tangents.length&&(b=new Float32Array(4*a.tangents.length),this.addAttribute("tangent",
+(new THREE.BufferAttribute(b,4)).copyVector4sArray(a.tangents)));0<a.indices.length&&(b=new Uint16Array(3*a.indices.length),this.addAttribute("index",(new THREE.BufferAttribute(b,1)).copyIndicesArray(a.indices)));if(0<a.morphTargets.length)for(var b=a.morphTargets,c=0,d=b.length;c<d;c++){var e=b[c],g=new THREE.Float32Attribute(3*e.length,3);this.morphAttributes.push(g.copyVector3sArray(e))}0<a.skinIndices.length&&(b=new THREE.Float32Attribute(4*a.skinIndices.length,4),this.addAttribute("skinIndex",
+b.copyVector4sArray(a.skinIndices)));0<a.skinWeights.length&&(b=new THREE.Float32Attribute(4*a.skinWeights.length,4),this.addAttribute("skinWeight",b.copyVector4sArray(a.skinWeights)));null!==a.boundingSphere&&(this.boundingSphere=a.boundingSphere.clone());null!==a.boundingBox&&(this.boundingBox=a.boundingBox.clone());return this},computeBoundingBox:function(){var a=new THREE.Vector3;return function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var b=this.attributes.position.array;
+if(b){var c=this.boundingBox;c.makeEmpty();for(var d=0,e=b.length;d<e;d+=3)a.fromArray(b,d),c.expandByPoint(a)}if(void 0===b||0===b.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0);(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}}(),computeBoundingSphere:function(){var a=new THREE.Box3,
+b=new THREE.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var c=this.attributes.position.array;if(c){a.makeEmpty();for(var d=this.boundingSphere.center,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),a.expandByPoint(b);a.center(d);for(var f=0,e=0,g=c.length;e<g;e+=3)b.fromArray(c,e),f=Math.max(f,d.distanceToSquared(b));this.boundingSphere.radius=Math.sqrt(f);isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',
 this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.attributes;if(a.position){var b=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(b.length),3));else for(var c=a.normal.array,d=0,e=c.length;d<e;d++)c[d]=0;var c=a.normal.array,g,f,h,k=new THREE.Vector3,l=new THREE.Vector3,n=new THREE.Vector3,p=new THREE.Vector3,m=new THREE.Vector3;if(a.index){var q=a.index.array;0===this.drawcalls.length&&this.addDrawCall(0,
 this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.attributes;if(a.position){var b=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(b.length),3));else for(var c=a.normal.array,d=0,e=c.length;d<e;d++)c[d]=0;var c=a.normal.array,g,f,h,k=new THREE.Vector3,l=new THREE.Vector3,n=new THREE.Vector3,p=new THREE.Vector3,m=new THREE.Vector3;if(a.index){var q=a.index.array;0===this.drawcalls.length&&this.addDrawCall(0,
 q.length);for(var t=0,s=this.drawcalls.length;t<s;++t){e=this.drawcalls[t].start;g=this.drawcalls[t].count;for(var u=this.drawcalls[t].index,d=e,e=e+g;d<e;d+=3)g=3*(u+q[d]),f=3*(u+q[d+1]),h=3*(u+q[d+2]),k.fromArray(b,g),l.fromArray(b,f),n.fromArray(b,h),p.subVectors(n,l),m.subVectors(k,l),p.cross(m),c[g]+=p.x,c[g+1]+=p.y,c[g+2]+=p.z,c[f]+=p.x,c[f+1]+=p.y,c[f+2]+=p.z,c[h]+=p.x,c[h+1]+=p.y,c[h+2]+=p.z}}else for(d=0,e=b.length;d<e;d+=9)k.fromArray(b,d),l.fromArray(b,d+3),n.fromArray(b,d+6),p.subVectors(n,
 q.length);for(var t=0,s=this.drawcalls.length;t<s;++t){e=this.drawcalls[t].start;g=this.drawcalls[t].count;for(var u=this.drawcalls[t].index,d=e,e=e+g;d<e;d+=3)g=3*(u+q[d]),f=3*(u+q[d+1]),h=3*(u+q[d+2]),k.fromArray(b,g),l.fromArray(b,f),n.fromArray(b,h),p.subVectors(n,l),m.subVectors(k,l),p.cross(m),c[g]+=p.x,c[g+1]+=p.y,c[g+2]+=p.z,c[f]+=p.x,c[f+1]+=p.y,c[f+2]+=p.z,c[h]+=p.x,c[h+1]+=p.y,c[h+2]+=p.z}}else for(d=0,e=b.length;d<e;d+=9)k.fromArray(b,d),l.fromArray(b,d+3),n.fromArray(b,d+6),p.subVectors(n,
 l),m.subVectors(k,l),p.cross(m),c[d]=p.x,c[d+1]=p.y,c[d+2]=p.z,c[d+3]=p.x,c[d+4]=p.y,c[d+5]=p.z,c[d+6]=p.x,c[d+7]=p.y,c[d+8]=p.z;this.normalizeNormals();a.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){p.fromArray(d,3*a);m.fromArray(d,3*b);q.fromArray(d,3*c);t.fromArray(g,2*a);s.fromArray(g,2*b);u.fromArray(g,2*c);x=m.x-p.x;v=q.x-p.x;A=m.y-p.y;y=q.y-p.y;G=m.z-p.z;H=q.z-p.z;w=s.x-t.x;B=u.x-t.x;I=s.y-t.y;D=u.y-t.y;z=1/(w*D-B*I);Q.set((D*x-I*v)*z,(D*A-I*y)*z,(D*G-I*H)*z);F.set((w*
 l),m.subVectors(k,l),p.cross(m),c[d]=p.x,c[d+1]=p.y,c[d+2]=p.z,c[d+3]=p.x,c[d+4]=p.y,c[d+5]=p.z,c[d+6]=p.x,c[d+7]=p.y,c[d+8]=p.z;this.normalizeNormals();a.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){p.fromArray(d,3*a);m.fromArray(d,3*b);q.fromArray(d,3*c);t.fromArray(g,2*a);s.fromArray(g,2*b);u.fromArray(g,2*c);x=m.x-p.x;v=q.x-p.x;A=m.y-p.y;y=q.y-p.y;G=m.z-p.z;H=q.z-p.z;w=s.x-t.x;B=u.x-t.x;I=s.y-t.y;D=u.y-t.y;z=1/(w*D-B*I);Q.set((D*x-I*v)*z,(D*A-I*y)*z,(D*G-I*H)*z);F.set((w*
@@ -495,22 +495,22 @@ THREE.ShaderChunk.logdepthbuf_fragment,"\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_Fra
 THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===T&&(a*=d,b*=d,c*=d);r.clearColor(a,b,c,d)}function c(){N.init();r.viewport(Ia,Ca,ya,Ja);b($.r,$.g,$.b,ja)}function d(){Ya=mb=null;Da="";Za=-1;gb=!0;N.reset()}function e(a){a=a.target;a.removeEventListener("dispose",e);a:{var b=aa.get(a);if(a.image&&b.__image__webglTextureCube)r.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;r.deleteTexture(b.__webglTexture)}aa.delete(a)}Ea.textures--}function g(a){a=a.target;
 THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===T&&(a*=d,b*=d,c*=d);r.clearColor(a,b,c,d)}function c(){N.init();r.viewport(Ia,Ca,ya,Ja);b($.r,$.g,$.b,ja)}function d(){Ya=mb=null;Da="";Za=-1;gb=!0;N.reset()}function e(a){a=a.target;a.removeEventListener("dispose",e);a:{var b=aa.get(a);if(a.image&&b.__image__webglTextureCube)r.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;r.deleteTexture(b.__webglTexture)}aa.delete(a)}Ea.textures--}function g(a){a=a.target;
 a.removeEventListener("dispose",g);var b=aa.get(a);if(a&&void 0!==b.__webglTexture){r.deleteTexture(b.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(var c=0;6>c;c++)r.deleteFramebuffer(b.__webglFramebuffer[c]),r.deleteRenderbuffer(b.__webglRenderbuffer[c]);else r.deleteFramebuffer(b.__webglFramebuffer),r.deleteRenderbuffer(b.__webglRenderbuffer);aa.delete(a)}Ea.textures--}function f(a){a=a.target;a.removeEventListener("dispose",f);h(a);aa.delete(a)}function h(a){var b=aa.get(a).program.program;
 a.removeEventListener("dispose",g);var b=aa.get(a);if(a&&void 0!==b.__webglTexture){r.deleteTexture(b.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(var c=0;6>c;c++)r.deleteFramebuffer(b.__webglFramebuffer[c]),r.deleteRenderbuffer(b.__webglRenderbuffer[c]);else r.deleteFramebuffer(b.__webglFramebuffer),r.deleteRenderbuffer(b.__webglRenderbuffer);aa.delete(a)}Ea.textures--}function f(a){a=a.target;a.removeEventListener("dispose",f);h(a);aa.delete(a)}function h(a){var b=aa.get(a).program.program;
 if(void 0!==b){a.program=void 0;a=0;for(var c=wa.length;a!==c;++a){var d=wa[a];if(d.program===b){0===--d.usedTimes&&(c-=1,wa[a]=wa[c],wa.pop(),r.deleteProgram(b),Ea.programs=c);break}}}}function k(a,b,c,d){var e;if(c instanceof THREE.InstancedBufferGeometry&&(e=W.get("ANGLE_instanced_arrays"),null===e)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}var f=c.attributes;b=b.getAttributes();
 if(void 0!==b){a.program=void 0;a=0;for(var c=wa.length;a!==c;++a){var d=wa[a];if(d.program===b){0===--d.usedTimes&&(c-=1,wa[a]=wa[c],wa.pop(),r.deleteProgram(b),Ea.programs=c);break}}}}function k(a,b,c,d){var e;if(c instanceof THREE.InstancedBufferGeometry&&(e=W.get("ANGLE_instanced_arrays"),null===e)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}var f=c.attributes;b=b.getAttributes();
-a=a.defaultAttributeValues;for(var g in b){var h=b[g];if(0<=h){var k=f[g];if(void 0!==k){var l=k.itemSize;N.enableAttribute(h);var m=ka.getAttributeBuffer(k);if(k instanceof THREE.InterleavedBufferAttribute){var n=k.data,p=n.stride,k=k.offset;r.bindBuffer(r.ARRAY_BUFFER,m);r.vertexAttribPointer(h,l,r.FLOAT,!1,p*n.array.BYTES_PER_ELEMENT,(d*p+k)*n.array.BYTES_PER_ELEMENT);if(n instanceof THREE.InstancedInterleavedBuffer){if(null===e){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");
+a=a.defaultAttributeValues;for(var g in b){var h=b[g];if(0<=h){var k=f[g];if(void 0!==k){N.enableAttribute(h);var l=k.itemSize,m=ma.getAttributeBuffer(k);if(k instanceof THREE.InterleavedBufferAttribute){var n=k.data,p=n.stride,k=k.offset;r.bindBuffer(r.ARRAY_BUFFER,m);r.vertexAttribPointer(h,l,r.FLOAT,!1,p*n.array.BYTES_PER_ELEMENT,(d*p+k)*n.array.BYTES_PER_ELEMENT);if(n instanceof THREE.InstancedInterleavedBuffer){if(null===e){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");
 return}e.vertexAttribDivisorANGLE(h,n.meshPerAttribute);void 0===c.maxInstancedCount&&(c.maxInstancedCount=n.meshPerAttribute*n.count)}}else if(r.bindBuffer(r.ARRAY_BUFFER,m),r.vertexAttribPointer(h,l,r.FLOAT,!1,0,d*l*4),k instanceof THREE.InstancedBufferAttribute){if(null===e){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");return}e.vertexAttribDivisorANGLE(h,k.meshPerAttribute);void 0===
 return}e.vertexAttribDivisorANGLE(h,n.meshPerAttribute);void 0===c.maxInstancedCount&&(c.maxInstancedCount=n.meshPerAttribute*n.count)}}else if(r.bindBuffer(r.ARRAY_BUFFER,m),r.vertexAttribPointer(h,l,r.FLOAT,!1,0,d*l*4),k instanceof THREE.InstancedBufferAttribute){if(null===e){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");return}e.vertexAttribDivisorANGLE(h,k.meshPerAttribute);void 0===
 c.maxInstancedCount&&(c.maxInstancedCount=k.meshPerAttribute*k.count)}}else if(void 0!==a&&(l=a[g],void 0!==l))switch(l.length){case 2:r.vertexAttrib2fv(h,l);break;case 3:r.vertexAttrib3fv(h,l);break;case 4:r.vertexAttrib4fv(h,l);break;default:r.vertexAttrib1fv(h,l)}}}N.disableUnusedAttributes()}function l(a,b){return b[0]-a[0]}function n(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.object.material.id!==b.object.material.id?a.object.material.id-
 c.maxInstancedCount&&(c.maxInstancedCount=k.meshPerAttribute*k.count)}}else if(void 0!==a&&(l=a[g],void 0!==l))switch(l.length){case 2:r.vertexAttrib2fv(h,l);break;case 3:r.vertexAttrib3fv(h,l);break;case 4:r.vertexAttrib4fv(h,l);break;default:r.vertexAttrib1fv(h,l)}}}N.disableUnusedAttributes()}function l(a,b){return b[0]-a[0]}function n(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.object.material.id!==b.object.material.id?a.object.material.id-
-b.object.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a){if(!0===a.visible){if(!(a instanceof THREE.Scene||a instanceof THREE.Group))if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),ka.init(a),a instanceof THREE.Light)ga.push(a);else if(a instanceof THREE.Sprite)Ra.push(a);else if(a instanceof THREE.LensFlare)Sa.push(a);else if(a instanceof THREE.ImmediateRenderObject){var b=
-a.material;b.transparent?Qa.push(a):pa.push(a)}else{var c=ka.objects[a.id];!c||!1!==a.frustumCulled&&!0!==$a.intersectsObject(a)||(b=a.material,aa.get(b)&&(b.program=aa.get(b).program),b.transparent?va.push(c):ra.push(c),!0===la.sortObjects&&(na.setFromMatrixPosition(a.matrixWorld),na.applyProjection(Ka),c.z=na.z))}b=0;for(c=a.children.length;b<c;b++)m(a.children[b])}}function q(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g].object,l=k;l._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,
-l.matrixWorld);l._normalMatrix.getNormalMatrix(l._modelViewMatrix);null===e&&(f=k.material);if(f instanceof THREE.MeshFaceMaterial)for(var l=f.materials,m=0,n=l.length;m<n;m++)la.renderBufferDirect(b,c,d,l[m],k);else la.renderBufferDirect(b,c,d,f,k)}}function t(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g],l=k;l._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,l.matrixWorld);l._normalMatrix.getNormalMatrix(l._modelViewMatrix);!0===k.visible&&(null===e&&(f=k.material),la.renderImmediateObject(b,
+b.object.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a){if(!0===a.visible){if(!(a instanceof THREE.Scene||a instanceof THREE.Group))if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),ma.init(a),a instanceof THREE.Light)ga.push(a);else if(a instanceof THREE.Sprite)Ra.push(a);else if(a instanceof THREE.LensFlare)Sa.push(a);else if(a instanceof THREE.ImmediateRenderObject){var b=
+a.material;b.transparent?Qa.push(a):pa.push(a)}else{var c=ma.objects[a.id];!c||!1!==a.frustumCulled&&!0!==$a.intersectsObject(a)||(b=a.material,aa.get(b)&&(b.program=aa.get(b).program),b.transparent?va.push(c):ra.push(c),!0===ka.sortObjects&&(na.setFromMatrixPosition(a.matrixWorld),na.applyProjection(Ka),c.z=na.z))}b=0;for(c=a.children.length;b<c;b++)m(a.children[b])}}function q(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g].object,l=k;l._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,
+l.matrixWorld);l._normalMatrix.getNormalMatrix(l._modelViewMatrix);null===e&&(f=k.material);if(f instanceof THREE.MeshFaceMaterial)for(var l=f.materials,m=0,n=l.length;m<n;m++)ka.renderBufferDirect(b,c,d,l[m],k);else ka.renderBufferDirect(b,c,d,f,k)}}function t(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g],l=k;l._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,l.matrixWorld);l._normalMatrix.getNormalMatrix(l._modelViewMatrix);!0===k.visible&&(null===e&&(f=k.material),ka.renderImmediateObject(b,
 c,d,f,k))}}function s(a){u(a);!0===a.transparent?N.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha):N.setBlending(THREE.NoBlending);N.setDepthFunc(a.depthFunc);N.setDepthTest(a.depthTest);N.setDepthWrite(a.depthWrite);N.setColorWrite(a.colorWrite);N.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}function u(a){a.side!==THREE.DoubleSide?N.enable(r.CULL_FACE):N.disable(r.CULL_FACE);N.setFlipSided(a.side===
 c,d,f,k))}}function s(a){u(a);!0===a.transparent?N.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha):N.setBlending(THREE.NoBlending);N.setDepthFunc(a.depthFunc);N.setDepthTest(a.depthTest);N.setDepthWrite(a.depthWrite);N.setColorWrite(a.colorWrite);N.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}function u(a){a.side!==THREE.DoubleSide?N.enable(r.CULL_FACE):N.disable(r.CULL_FACE);N.setFlipSided(a.side===
 THREE.BackSide)}function x(a,b,c,d,g){var k,l,m,n;hb=0;var p=aa.get(d);if(d.needsUpdate||!p.program){a:{for(var q=aa.get(d),t=Zb[d.type],s=0,w=0,u=0,x=0,B=0,C=b.length;B<C;B++){var I=b[B];I.onlyShadow||!1===I.visible||(I instanceof THREE.DirectionalLight&&s++,I instanceof THREE.PointLight&&w++,I instanceof THREE.SpotLight&&u++,I instanceof THREE.HemisphereLight&&x++)}k=s;l=w;m=u;n=x;for(var F,E=0,M=0,Q=b.length;M<Q;M++){var R=b[M];R.castShadow&&(R instanceof THREE.SpotLight&&E++,R instanceof THREE.DirectionalLight&&
 THREE.BackSide)}function x(a,b,c,d,g){var k,l,m,n;hb=0;var p=aa.get(d);if(d.needsUpdate||!p.program){a:{for(var q=aa.get(d),t=Zb[d.type],s=0,w=0,u=0,x=0,B=0,C=b.length;B<C;B++){var I=b[B];I.onlyShadow||!1===I.visible||(I instanceof THREE.DirectionalLight&&s++,I instanceof THREE.PointLight&&w++,I instanceof THREE.SpotLight&&u++,I instanceof THREE.HemisphereLight&&x++)}k=s;l=w;m=u;n=x;for(var F,E=0,M=0,Q=b.length;M<Q;M++){var R=b[M];R.castShadow&&(R instanceof THREE.SpotLight&&E++,R instanceof THREE.DirectionalLight&&
 !R.shadowCascade&&E++)}F=E;var K;if(nb&&g&&g.skeleton&&g.skeleton.useVertexTexture)K=1024;else{var ga=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),S=Math.floor((ga-20)/4);void 0!==g&&g instanceof THREE.SkinnedMesh&&(S=Math.min(g.skeleton.bones.length,S),S<g.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+g.skeleton.bones.length+", this GPU supports just "+S+" (try OpenGL instead of ANGLE)"));K=S}var U={precision:J,supportsVertexTextures:ob,map:!!d.map,envMap:!!d.envMap,envMapMode:d.envMap&&
 !R.shadowCascade&&E++)}F=E;var K;if(nb&&g&&g.skeleton&&g.skeleton.useVertexTexture)K=1024;else{var ga=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),S=Math.floor((ga-20)/4);void 0!==g&&g instanceof THREE.SkinnedMesh&&(S=Math.min(g.skeleton.bones.length,S),S<g.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+g.skeleton.bones.length+", this GPU supports just "+S+" (try OpenGL instead of ANGLE)"));K=S}var U={precision:J,supportsVertexTextures:ob,map:!!d.map,envMap:!!d.envMap,envMapMode:d.envMap&&
 d.envMap.mapping,lightMap:!!d.lightMap,aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,combine:d.combine,vertexColors:d.vertexColors,fog:c,useFog:d.fog,fogExp:c instanceof THREE.FogExp2,flatShading:d.shading===THREE.FlatShading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:qa,skinning:d.skinning,maxBones:K,useVertexTexture:nb&&g&&g.skeleton&&g.skeleton.useVertexTexture,morphTargets:d.morphTargets,
 d.envMap.mapping,lightMap:!!d.lightMap,aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,combine:d.combine,vertexColors:d.vertexColors,fog:c,useFog:d.fog,fogExp:c instanceof THREE.FogExp2,flatShading:d.shading===THREE.FlatShading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:qa,skinning:d.skinning,maxBones:K,useVertexTexture:nb&&g&&g.skeleton&&g.skeleton.useVertexTexture,morphTargets:d.morphTargets,
-morphNormals:d.morphNormals,maxMorphTargets:la.maxMorphTargets,maxMorphNormals:la.maxMorphNormals,maxDirLights:k,maxPointLights:l,maxSpotLights:m,maxHemiLights:n,maxShadows:F,shadowMapEnabled:ma.enabled&&g.receiveShadow&&0<F,shadowMapType:ma.type,shadowMapDebug:ma.debug,shadowMapCascade:ma.cascade,alphaTest:d.alphaTest,metal:d.metal,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},P=[];t?P.push(t):(P.push(d.fragmentShader),P.push(d.vertexShader));if(void 0!==d.defines)for(var T in d.defines)P.push(T),
+morphNormals:d.morphNormals,maxMorphTargets:ka.maxMorphTargets,maxMorphNormals:ka.maxMorphNormals,maxDirLights:k,maxPointLights:l,maxSpotLights:m,maxHemiLights:n,maxShadows:F,shadowMapEnabled:la.enabled&&g.receiveShadow&&0<F,shadowMapType:la.type,shadowMapDebug:la.debug,shadowMapCascade:la.cascade,alphaTest:d.alphaTest,metal:d.metal,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},P=[];t?P.push(t):(P.push(d.fragmentShader),P.push(d.vertexShader));if(void 0!==d.defines)for(var T in d.defines)P.push(T),
 P.push(d.defines[T]);for(T in U)P.push(T),P.push(U[T]);var W=P.join(),ra=!0;if(q.program)if(q.program.code!==W)h(d);else if(void 0!==t)break a;else ra=!1;else d.addEventListener("dispose",f);if(t){var va=THREE.ShaderLib[t];q.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(va.uniforms),vertexShader:va.vertexShader,fragmentShader:va.fragmentShader}}else q.__webglShader={name:d.type,uniforms:d.uniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader};for(var pa,$=0,Qa=wa.length;$<
 P.push(d.defines[T]);for(T in U)P.push(T),P.push(U[T]);var W=P.join(),ra=!0;if(q.program)if(q.program.code!==W)h(d);else if(void 0!==t)break a;else ra=!1;else d.addEventListener("dispose",f);if(t){var va=THREE.ShaderLib[t];q.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(va.uniforms),vertexShader:va.vertexShader,fragmentShader:va.fragmentShader}}else q.__webglShader={name:d.type,uniforms:d.uniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader};for(var pa,$=0,Qa=wa.length;$<
-Qa;$++){var Ra=wa[$];if(Ra.code===W){pa=Ra;ra&&pa.usedTimes++;break}}void 0===pa&&(d.__webglShader=q.__webglShader,pa=new THREE.WebGLProgram(la,W,d,U),wa.push(pa),Ea.programs=wa.length);q.program=pa;var Sa=pa.getAttributes();if(d.morphTargets)for(var xa=d.numSupportedMorphTargets=0;xa<la.maxMorphTargets;xa++)0<=Sa["morphTarget"+xa]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(xa=d.numSupportedMorphNormals=0;xa<la.maxMorphNormals;xa++)0<=Sa["morphNormal"+xa]&&d.numSupportedMorphNormals++;q.uniformsList=
-[];var ja=q.program.getUniforms(),ka;for(ka in q.__webglShader.uniforms){var Da=ja[ka];Da&&q.uniformsList.push([q.__webglShader.uniforms[ka],Da])}}d.needsUpdate=!1}var Ia=!1,Ca=!1,ya=!1,ab=p.program,ca=ab.getUniforms(),L=p.__webglShader.uniforms;ab.id!==mb&&(r.useProgram(ab.program),mb=ab.id,ya=Ca=Ia=!0);d.id!==Za&&(-1===Za&&(ya=!0),Za=d.id,Ca=!0);if(Ia||a!==Ya)r.uniformMatrix4fv(ca.projectionMatrix,!1,a.projectionMatrix.elements),qa&&r.uniform1f(ca.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==
+Qa;$++){var Ra=wa[$];if(Ra.code===W){pa=Ra;ra&&pa.usedTimes++;break}}void 0===pa&&(d.__webglShader=q.__webglShader,pa=new THREE.WebGLProgram(ka,W,d,U),wa.push(pa),Ea.programs=wa.length);q.program=pa;var Sa=pa.getAttributes();if(d.morphTargets)for(var xa=d.numSupportedMorphTargets=0;xa<ka.maxMorphTargets;xa++)0<=Sa["morphTarget"+xa]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(xa=d.numSupportedMorphNormals=0;xa<ka.maxMorphNormals;xa++)0<=Sa["morphNormal"+xa]&&d.numSupportedMorphNormals++;q.uniformsList=
+[];var ja=q.program.getUniforms(),ma;for(ma in q.__webglShader.uniforms){var Da=ja[ma];Da&&q.uniformsList.push([q.__webglShader.uniforms[ma],Da])}}d.needsUpdate=!1}var Ia=!1,Ca=!1,ya=!1,ab=p.program,ca=ab.getUniforms(),L=p.__webglShader.uniforms;ab.id!==mb&&(r.useProgram(ab.program),mb=ab.id,ya=Ca=Ia=!0);d.id!==Za&&(-1===Za&&(ya=!0),Za=d.id,Ca=!0);if(Ia||a!==Ya)r.uniformMatrix4fv(ca.projectionMatrix,!1,a.projectionMatrix.elements),qa&&r.uniform1f(ca.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==
 Ya&&(Ya=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&void 0!==ca.cameraPosition&&(na.setFromMatrixPosition(a.matrixWorld),r.uniform3f(ca.cameraPosition,na.x,na.y,na.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==ca.viewMatrix&&r.uniformMatrix4fv(ca.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(g.bindMatrix&&void 0!==
 Ya&&(Ya=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&void 0!==ca.cameraPosition&&(na.setFromMatrixPosition(a.matrixWorld),r.uniform3f(ca.cameraPosition,na.x,na.y,na.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==ca.viewMatrix&&r.uniformMatrix4fv(ca.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(g.bindMatrix&&void 0!==
-ca.bindMatrix&&r.uniformMatrix4fv(ca.bindMatrix,!1,g.bindMatrix.elements),g.bindMatrixInverse&&void 0!==ca.bindMatrixInverse&&r.uniformMatrix4fv(ca.bindMatrixInverse,!1,g.bindMatrixInverse.elements),nb&&g.skeleton&&g.skeleton.useVertexTexture){if(void 0!==ca.boneTexture){var Ja=A();r.uniform1i(ca.boneTexture,Ja);la.setTexture(g.skeleton.boneTexture,Ja)}void 0!==ca.boneTextureWidth&&r.uniform1i(ca.boneTextureWidth,g.skeleton.boneTextureWidth);void 0!==ca.boneTextureHeight&&r.uniform1i(ca.boneTextureHeight,
+ca.bindMatrix&&r.uniformMatrix4fv(ca.bindMatrix,!1,g.bindMatrix.elements),g.bindMatrixInverse&&void 0!==ca.bindMatrixInverse&&r.uniformMatrix4fv(ca.bindMatrixInverse,!1,g.bindMatrixInverse.elements),nb&&g.skeleton&&g.skeleton.useVertexTexture){if(void 0!==ca.boneTexture){var Ja=A();r.uniform1i(ca.boneTexture,Ja);ka.setTexture(g.skeleton.boneTexture,Ja)}void 0!==ca.boneTextureWidth&&r.uniform1i(ca.boneTextureWidth,g.skeleton.boneTextureWidth);void 0!==ca.boneTextureHeight&&r.uniform1i(ca.boneTextureHeight,
 g.skeleton.boneTextureHeight)}else g.skeleton&&g.skeleton.boneMatrices&&void 0!==ca.boneGlobalMatrices&&r.uniformMatrix4fv(ca.boneGlobalMatrices,!1,g.skeleton.boneMatrices);if(Ca){c&&d.fog&&(L.fogColor.value=c.color,c instanceof THREE.Fog?(L.fogNear.value=c.near,L.fogFar.value=c.far):c instanceof THREE.FogExp2&&(L.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(gb){var ya=!0,ba,sa,Z,Ha=0,Ka=0,pb=0,La,$a,fb,Ta,qb,da=Nb,rb=da.directional.colors,
 g.skeleton.boneTextureHeight)}else g.skeleton&&g.skeleton.boneMatrices&&void 0!==ca.boneGlobalMatrices&&r.uniformMatrix4fv(ca.boneGlobalMatrices,!1,g.skeleton.boneMatrices);if(Ca){c&&d.fog&&(L.fogColor.value=c.color,c instanceof THREE.Fog?(L.fogNear.value=c.near,L.fogFar.value=c.far):c instanceof THREE.FogExp2&&(L.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(gb){var ya=!0,ba,sa,Z,Ha=0,Ka=0,pb=0,La,$a,fb,Ta,qb,da=Nb,rb=da.directional.colors,
 sb=da.directional.positions,tb=da.point.colors,ub=da.point.positions,kb=da.point.distances,lb=da.point.decays,vb=da.spot.colors,wb=da.spot.positions,Ib=da.spot.distances,xb=da.spot.directions,Jb=da.spot.anglesCos,Kb=da.spot.exponents,Lb=da.spot.decays,yb=da.hemi.skyColors,zb=da.hemi.groundColors,Ab=da.hemi.positions,bb=0,Ma=0,za=0,Ua=0,Bb=0,Cb=0,Db=0,ib=0,cb=0,db=0,Fa=0,Va=0;ba=0;for(sa=b.length;ba<sa;ba++)Z=b[ba],Z.onlyShadow||(La=Z.color,Ta=Z.intensity,qb=Z.distance,Z instanceof THREE.AmbientLight?
 sb=da.directional.positions,tb=da.point.colors,ub=da.point.positions,kb=da.point.distances,lb=da.point.decays,vb=da.spot.colors,wb=da.spot.positions,Ib=da.spot.distances,xb=da.spot.directions,Jb=da.spot.anglesCos,Kb=da.spot.exponents,Lb=da.spot.decays,yb=da.hemi.skyColors,zb=da.hemi.groundColors,Ab=da.hemi.positions,bb=0,Ma=0,za=0,Ua=0,Bb=0,Cb=0,Db=0,ib=0,cb=0,db=0,Fa=0,Va=0;ba=0;for(sa=b.length;ba<sa;ba++)Z=b[ba],Z.onlyShadow||(La=Z.color,Ta=Z.intensity,qb=Z.distance,Z instanceof THREE.AmbientLight?
 Z.visible&&(Ha+=La.r,Ka+=La.g,pb+=La.b):Z instanceof THREE.DirectionalLight?(Bb+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),na.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(na),fa.normalize(),cb=3*bb,sb[cb+0]=fa.x,sb[cb+1]=fa.y,sb[cb+2]=fa.z,y(rb,cb,La,Ta),bb+=1)):Z instanceof THREE.PointLight?(Cb+=1,Z.visible&&(db=3*Ma,y(tb,db,La,Ta),na.setFromMatrixPosition(Z.matrixWorld),ub[db+0]=na.x,ub[db+1]=na.y,ub[db+2]=na.z,kb[Ma]=qb,lb[Ma]=0===Z.distance?0:Z.decay,Ma+=1)):Z instanceof THREE.SpotLight?
 Z.visible&&(Ha+=La.r,Ka+=La.g,pb+=La.b):Z instanceof THREE.DirectionalLight?(Bb+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),na.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(na),fa.normalize(),cb=3*bb,sb[cb+0]=fa.x,sb[cb+1]=fa.y,sb[cb+2]=fa.z,y(rb,cb,La,Ta),bb+=1)):Z instanceof THREE.PointLight?(Cb+=1,Z.visible&&(db=3*Ma,y(tb,db,La,Ta),na.setFromMatrixPosition(Z.matrixWorld),ub[db+0]=na.x,ub[db+1]=na.y,ub[db+2]=na.z,kb[Ma]=qb,lb[Ma]=0===Z.distance?0:Z.decay,Ma+=1)):Z instanceof THREE.SpotLight?
@@ -527,15 +527,15 @@ case "1iv":r.uniform1iv(Y,O);break;case "3iv":r.uniform3iv(Y,O);break;case "1fv"
 case "c":r.uniform3f(Y,O.r,O.g,O.b);break;case "iv1":r.uniform1iv(Y,O);break;case "iv":r.uniform3iv(Y,O);break;case "fv1":r.uniform1fv(Y,O);break;case "fv":r.uniform3fv(Y,O);break;case "v2v":void 0===X._array&&(X._array=new Float32Array(2*O.length));for(var V=0,oa=O.length;V<oa;V++)ua=2*V,X._array[ua+0]=O[V].x,X._array[ua+1]=O[V].y;r.uniform2fv(Y,X._array);break;case "v3v":void 0===X._array&&(X._array=new Float32Array(3*O.length));V=0;for(oa=O.length;V<oa;V++)ua=3*V,X._array[ua+0]=O[V].x,X._array[ua+
 case "c":r.uniform3f(Y,O.r,O.g,O.b);break;case "iv1":r.uniform1iv(Y,O);break;case "iv":r.uniform3iv(Y,O);break;case "fv1":r.uniform1fv(Y,O);break;case "fv":r.uniform3fv(Y,O);break;case "v2v":void 0===X._array&&(X._array=new Float32Array(2*O.length));for(var V=0,oa=O.length;V<oa;V++)ua=2*V,X._array[ua+0]=O[V].x,X._array[ua+1]=O[V].y;r.uniform2fv(Y,X._array);break;case "v3v":void 0===X._array&&(X._array=new Float32Array(3*O.length));V=0;for(oa=O.length;V<oa;V++)ua=3*V,X._array[ua+0]=O[V].x,X._array[ua+
 1]=O[V].y,X._array[ua+2]=O[V].z;r.uniform3fv(Y,X._array);break;case "v4v":void 0===X._array&&(X._array=new Float32Array(4*O.length));V=0;for(oa=O.length;V<oa;V++)ua=4*V,X._array[ua+0]=O[V].x,X._array[ua+1]=O[V].y,X._array[ua+2]=O[V].z,X._array[ua+3]=O[V].w;r.uniform4fv(Y,X._array);break;case "m3":r.uniformMatrix3fv(Y,!1,O.elements);break;case "m3v":void 0===X._array&&(X._array=new Float32Array(9*O.length));V=0;for(oa=O.length;V<oa;V++)O[V].flattenToArrayOffset(X._array,9*V);r.uniformMatrix3fv(Y,!1,
 1]=O[V].y,X._array[ua+2]=O[V].z;r.uniform3fv(Y,X._array);break;case "v4v":void 0===X._array&&(X._array=new Float32Array(4*O.length));V=0;for(oa=O.length;V<oa;V++)ua=4*V,X._array[ua+0]=O[V].x,X._array[ua+1]=O[V].y,X._array[ua+2]=O[V].z,X._array[ua+3]=O[V].w;r.uniform4fv(Y,X._array);break;case "m3":r.uniformMatrix3fv(Y,!1,O.elements);break;case "m3v":void 0===X._array&&(X._array=new Float32Array(9*O.length));V=0;for(oa=O.length;V<oa;V++)O[V].flattenToArrayOffset(X._array,9*V);r.uniformMatrix3fv(Y,!1,
 X._array);break;case "m4":r.uniformMatrix4fv(Y,!1,O.elements);break;case "m4v":void 0===X._array&&(X._array=new Float32Array(16*O.length));V=0;for(oa=O.length;V<oa;V++)O[V].flattenToArrayOffset(X._array,16*V);r.uniformMatrix4fv(Y,!1,X._array);break;case "t":ta=O;Na=A();r.uniform1i(Y,Na);if(!ta)continue;if(ta instanceof THREE.CubeTexture||Array.isArray(ta.image)&&6===ta.image.length){var ea=ta,Tb=Na,Xa=aa.get(ea);if(6===ea.image.length)if(0<ea.version&&Xa.__version!==ea.version){Xa.__image__webglTextureCube||
 X._array);break;case "m4":r.uniformMatrix4fv(Y,!1,O.elements);break;case "m4v":void 0===X._array&&(X._array=new Float32Array(16*O.length));V=0;for(oa=O.length;V<oa;V++)O[V].flattenToArrayOffset(X._array,16*V);r.uniformMatrix4fv(Y,!1,X._array);break;case "t":ta=O;Na=A();r.uniform1i(Y,Na);if(!ta)continue;if(ta instanceof THREE.CubeTexture||Array.isArray(ta.image)&&6===ta.image.length){var ea=ta,Tb=Na,Xa=aa.get(ea);if(6===ea.image.length)if(0<ea.version&&Xa.__version!==ea.version){Xa.__image__webglTextureCube||
-(ea.addEventListener("dispose",e),Xa.__image__webglTextureCube=r.createTexture(),Ea.textures++);N.activeTexture(r.TEXTURE0+Tb);N.bindTexture(r.TEXTURE_CUBE_MAP,Xa.__image__webglTextureCube);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,ea.flipY);for(var Ub=ea instanceof THREE.CompressedTexture,Gb=ea.image[0]instanceof THREE.DataTexture,Oa=[],ha=0;6>ha;ha++)Oa[ha]=!la.autoScaleCubemaps||Ub||Gb?Gb?ea.image[ha].image:ea.image[ha]:H(ea.image[ha],ac);var Vb=Oa[0],Wb=THREE.Math.isPowerOfTwo(Vb.width)&&THREE.Math.isPowerOfTwo(Vb.height),
+(ea.addEventListener("dispose",e),Xa.__image__webglTextureCube=r.createTexture(),Ea.textures++);N.activeTexture(r.TEXTURE0+Tb);N.bindTexture(r.TEXTURE_CUBE_MAP,Xa.__image__webglTextureCube);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,ea.flipY);for(var Ub=ea instanceof THREE.CompressedTexture,Gb=ea.image[0]instanceof THREE.DataTexture,Oa=[],ha=0;6>ha;ha++)Oa[ha]=!ka.autoScaleCubemaps||Ub||Gb?Gb?ea.image[ha].image:ea.image[ha]:H(ea.image[ha],ac);var Vb=Oa[0],Wb=THREE.Math.isPowerOfTwo(Vb.width)&&THREE.Math.isPowerOfTwo(Vb.height),
 Ga=D(ea.format),Hb=D(ea.type);G(r.TEXTURE_CUBE_MAP,ea,Wb);for(ha=0;6>ha;ha++)if(Ub)for(var Pa,Xb=Oa[ha].mipmaps,eb=0,bc=Xb.length;eb<bc;eb++)Pa=Xb[eb],ea.format!==THREE.RGBAFormat&&ea.format!==THREE.RGBFormat?-1<Yb().indexOf(Ga)?N.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,eb,Ga,Pa.width,Pa.height,0,Pa.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,eb,Ga,Pa.width,Pa.height,
 Ga=D(ea.format),Hb=D(ea.type);G(r.TEXTURE_CUBE_MAP,ea,Wb);for(ha=0;6>ha;ha++)if(Ub)for(var Pa,Xb=Oa[ha].mipmaps,eb=0,bc=Xb.length;eb<bc;eb++)Pa=Xb[eb],ea.format!==THREE.RGBAFormat&&ea.format!==THREE.RGBFormat?-1<Yb().indexOf(Ga)?N.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,eb,Ga,Pa.width,Pa.height,0,Pa.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,eb,Ga,Pa.width,Pa.height,
 0,Ga,Hb,Pa.data);else Gb?N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,0,Ga,Oa[ha].width,Oa[ha].height,0,Ga,Hb,Oa[ha].data):N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,0,Ga,Ga,Hb,Oa[ha]);ea.generateMipmaps&&Wb&&r.generateMipmap(r.TEXTURE_CUBE_MAP);Xa.__version=ea.version;if(ea.onUpdate)ea.onUpdate(ea)}else N.activeTexture(r.TEXTURE0+Tb),N.bindTexture(r.TEXTURE_CUBE_MAP,Xa.__image__webglTextureCube)}else if(ta instanceof THREE.WebGLRenderTargetCube){var cc=ta;N.activeTexture(r.TEXTURE0+Na);N.bindTexture(r.TEXTURE_CUBE_MAP,
 0,Ga,Hb,Pa.data);else Gb?N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,0,Ga,Oa[ha].width,Oa[ha].height,0,Ga,Hb,Oa[ha].data):N.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ha,0,Ga,Ga,Hb,Oa[ha]);ea.generateMipmaps&&Wb&&r.generateMipmap(r.TEXTURE_CUBE_MAP);Xa.__version=ea.version;if(ea.onUpdate)ea.onUpdate(ea)}else N.activeTexture(r.TEXTURE0+Tb),N.bindTexture(r.TEXTURE_CUBE_MAP,Xa.__image__webglTextureCube)}else if(ta instanceof THREE.WebGLRenderTargetCube){var cc=ta;N.activeTexture(r.TEXTURE0+Na);N.bindTexture(r.TEXTURE_CUBE_MAP,
-aa.get(cc).__webglTexture)}else la.setTexture(ta,Na);break;case "tv":void 0===X._array&&(X._array=[]);V=0;for(oa=X.value.length;V<oa;V++)X._array[V]=A();r.uniform1iv(Y,X._array);V=0;for(oa=X.value.length;V<oa;V++)ta=X.value[V],Na=X._array[V],ta&&la.setTexture(ta,Na);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Sb)}}}}r.uniformMatrix4fv(ca.modelViewMatrix,!1,g._modelViewMatrix.elements);ca.normalMatrix&&r.uniformMatrix3fv(ca.normalMatrix,!1,g._normalMatrix.elements);void 0!==
+aa.get(cc).__webglTexture)}else ka.setTexture(ta,Na);break;case "tv":void 0===X._array&&(X._array=[]);V=0;for(oa=X.value.length;V<oa;V++)X._array[V]=A();r.uniform1iv(Y,X._array);V=0;for(oa=X.value.length;V<oa;V++)ta=X.value[V],Na=X._array[V],ta&&ka.setTexture(ta,Na);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Sb)}}}}r.uniformMatrix4fv(ca.modelViewMatrix,!1,g._modelViewMatrix.elements);ca.normalMatrix&&r.uniformMatrix3fv(ca.normalMatrix,!1,g._normalMatrix.elements);void 0!==
 ca.modelMatrix&&r.uniformMatrix4fv(ca.modelMatrix,!1,g.matrixWorld.elements);return ab}function v(a,b){a.ambientLightColor.needsUpdate=b;a.directionalLightColor.needsUpdate=b;a.directionalLightDirection.needsUpdate=b;a.pointLightColor.needsUpdate=b;a.pointLightPosition.needsUpdate=b;a.pointLightDistance.needsUpdate=b;a.pointLightDecay.needsUpdate=b;a.spotLightColor.needsUpdate=b;a.spotLightPosition.needsUpdate=b;a.spotLightDistance.needsUpdate=b;a.spotLightDirection.needsUpdate=b;a.spotLightAngleCos.needsUpdate=
 ca.modelMatrix&&r.uniformMatrix4fv(ca.modelMatrix,!1,g.matrixWorld.elements);return ab}function v(a,b){a.ambientLightColor.needsUpdate=b;a.directionalLightColor.needsUpdate=b;a.directionalLightDirection.needsUpdate=b;a.pointLightColor.needsUpdate=b;a.pointLightPosition.needsUpdate=b;a.pointLightDistance.needsUpdate=b;a.pointLightDecay.needsUpdate=b;a.spotLightColor.needsUpdate=b;a.spotLightPosition.needsUpdate=b;a.spotLightDistance.needsUpdate=b;a.spotLightDirection.needsUpdate=b;a.spotLightAngleCos.needsUpdate=
 b;a.spotLightExponent.needsUpdate=b;a.spotLightDecay.needsUpdate=b;a.hemisphereLightSkyColor.needsUpdate=b;a.hemisphereLightGroundColor.needsUpdate=b;a.hemisphereLightDirection.needsUpdate=b}function A(){var a=hb;a>=fb&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+fb);hb+=1;return a}function y(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function G(a,b,c){c?(r.texParameteri(a,r.TEXTURE_WRAP_S,D(b.wrapS)),r.texParameteri(a,r.TEXTURE_WRAP_T,D(b.wrapT)),
 b;a.spotLightExponent.needsUpdate=b;a.spotLightDecay.needsUpdate=b;a.hemisphereLightSkyColor.needsUpdate=b;a.hemisphereLightGroundColor.needsUpdate=b;a.hemisphereLightDirection.needsUpdate=b}function A(){var a=hb;a>=fb&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+fb);hb+=1;return a}function y(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function G(a,b,c){c?(r.texParameteri(a,r.TEXTURE_WRAP_S,D(b.wrapS)),r.texParameteri(a,r.TEXTURE_WRAP_T,D(b.wrapT)),
 r.texParameteri(a,r.TEXTURE_MAG_FILTER,D(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,D(b.minFilter))):(r.texParameteri(a,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(a,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),b.wrapS===THREE.ClampToEdgeWrapping&&b.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping. ( "+b.sourceFile+" )"),r.texParameteri(a,r.TEXTURE_MAG_FILTER,I(b.magFilter)),
 r.texParameteri(a,r.TEXTURE_MAG_FILTER,D(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,D(b.minFilter))):(r.texParameteri(a,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(a,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),b.wrapS===THREE.ClampToEdgeWrapping&&b.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping. ( "+b.sourceFile+" )"),r.texParameteri(a,r.TEXTURE_MAG_FILTER,I(b.magFilter)),
 r.texParameteri(a,r.TEXTURE_MIN_FILTER,I(b.minFilter)),b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( "+b.sourceFile+" )"));(c=W.get("EXT_texture_filter_anisotropic"))&&b.type!==THREE.FloatType&&b.type!==THREE.HalfFloatType&&(1<b.anisotropy||aa.get(b).__currentAnisotropy)&&(r.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,
 r.texParameteri(a,r.TEXTURE_MIN_FILTER,I(b.minFilter)),b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter. ( "+b.sourceFile+" )"));(c=W.get("EXT_texture_filter_anisotropic"))&&b.type!==THREE.FloatType&&b.type!==THREE.HalfFloatType&&(1<b.anisotropy||aa.get(b).__currentAnisotropy)&&(r.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,
-la.getMaxAnisotropy())),aa.get(b).__currentAnisotropy=b.anisotropy)}function H(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElement("canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function w(a,b,c){r.bindFramebuffer(r.FRAMEBUFFER,
+ka.getMaxAnisotropy())),aa.get(b).__currentAnisotropy=b.anisotropy)}function H(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElement("canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function w(a,b,c){r.bindFramebuffer(r.FRAMEBUFFER,
 a);r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,c,aa.get(b).__webglTexture,0)}function B(a,b){r.bindRenderbuffer(r.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT16,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,
 a);r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,c,aa.get(b).__webglTexture,0)}function B(a,b){r.bindRenderbuffer(r.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT16,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,
 a)):r.renderbufferStorage(r.RENDERBUFFER,r.RGBA4,b.width,b.height)}function I(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?r.NEAREST:r.LINEAR}function D(a){var b;if(a===THREE.RepeatWrapping)return r.REPEAT;if(a===THREE.ClampToEdgeWrapping)return r.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return r.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return r.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return r.NEAREST_MIPMAP_NEAREST;
 a)):r.renderbufferStorage(r.RENDERBUFFER,r.RGBA4,b.width,b.height)}function I(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?r.NEAREST:r.LINEAR}function D(a){var b;if(a===THREE.RepeatWrapping)return r.REPEAT;if(a===THREE.ClampToEdgeWrapping)return r.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return r.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return r.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return r.NEAREST_MIPMAP_NEAREST;
 if(a===THREE.NearestMipMapLinearFilter)return r.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return r.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return r.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return r.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return r.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return r.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return r.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return r.UNSIGNED_SHORT_5_6_5;
 if(a===THREE.NearestMipMapLinearFilter)return r.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return r.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return r.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return r.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return r.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return r.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return r.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return r.UNSIGNED_SHORT_5_6_5;
@@ -544,11 +544,11 @@ if(a===THREE.LuminanceAlphaFormat)return r.LUMINANCE_ALPHA;if(a===THREE.AddEquat
 if(a===THREE.DstAlphaFactor)return r.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return r.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return r.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return r.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return r.SRC_ALPHA_SATURATE;b=W.get("WEBGL_compressed_texture_s3tc");if(null!==b){if(a===THREE.RGB_S3TC_DXT1_Format)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;
 if(a===THREE.DstAlphaFactor)return r.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return r.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return r.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return r.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return r.SRC_ALPHA_SATURATE;b=W.get("WEBGL_compressed_texture_s3tc");if(null!==b){if(a===THREE.RGB_S3TC_DXT1_Format)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;
 if(a===THREE.RGBA_S3TC_DXT5_Format)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}b=W.get("WEBGL_compressed_texture_pvrtc");if(null!==b){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}b=W.get("EXT_blend_minmax");if(null!==b){if(a===THREE.MinEquation)return b.MIN_EXT;
 if(a===THREE.RGBA_S3TC_DXT5_Format)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}b=W.get("WEBGL_compressed_texture_pvrtc");if(null!==b){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}b=W.get("EXT_blend_minmax");if(null!==b){if(a===THREE.MinEquation)return b.MIN_EXT;
 if(a===THREE.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var z=void 0!==a.canvas?a.canvas:document.createElement("canvas"),Q=void 0!==a.context?a.context:null,F=z.width,E=z.height,C=1,J=void 0!==a.precision?a.precision:"highp",M=void 0!==a.alpha?a.alpha:!1,R=void 0!==a.depth?a.depth:!0,U=void 0!==a.stencil?a.stencil:!0,S=void 0!==a.antialias?a.antialias:!1,T=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,K=void 0!==a.preserveDrawingBuffer?
 if(a===THREE.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var z=void 0!==a.canvas?a.canvas:document.createElement("canvas"),Q=void 0!==a.context?a.context:null,F=z.width,E=z.height,C=1,J=void 0!==a.precision?a.precision:"highp",M=void 0!==a.alpha?a.alpha:!1,R=void 0!==a.depth?a.depth:!0,U=void 0!==a.stencil?a.stencil:!0,S=void 0!==a.antialias?a.antialias:!1,T=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,K=void 0!==a.preserveDrawingBuffer?
-a.preserveDrawingBuffer:!1,qa=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:!1,$=new THREE.Color(0),ja=0,ga=[],ra=[],va=[],pa=[],Qa=[],xa=new Float32Array(8),Ra=[],Sa=[];this.domElement=z;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.gammaFactor=2;this.gammaOutput=this.gammaInput=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var la=this,wa=[],mb=null,Ha=null,Za=-1,Da="",Ya=null,hb=0,
+a.preserveDrawingBuffer:!1,qa=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:!1,$=new THREE.Color(0),ja=0,ga=[],ra=[],va=[],pa=[],Qa=[],xa=new Float32Array(8),Ra=[],Sa=[];this.domElement=z;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.gammaFactor=2;this.gammaOutput=this.gammaInput=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var ka=this,wa=[],mb=null,Ha=null,Za=-1,Da="",Ya=null,hb=0,
 Ia=0,Ca=0,ya=z.width,Ja=z.height,kb=0,lb=0,$a=new THREE.Frustum,Ka=new THREE.Matrix4,na=new THREE.Vector3,fa=new THREE.Vector3,gb=!0,Nb={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[],decays:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[],decays:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},Ea={programs:0,geometries:0,textures:0},P={calls:0,vertices:0,faces:0,points:0};
 Ia=0,Ca=0,ya=z.width,Ja=z.height,kb=0,lb=0,$a=new THREE.Frustum,Ka=new THREE.Matrix4,na=new THREE.Vector3,fa=new THREE.Vector3,gb=!0,Nb={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[],decays:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[],decays:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},Ea={programs:0,geometries:0,textures:0},P={calls:0,vertices:0,faces:0,points:0};
-this.info={render:P,memory:Ea,programs:wa};var r;try{a={alpha:M,depth:R,stencil:U,antialias:S,premultipliedAlpha:T,preserveDrawingBuffer:K};r=Q||z.getContext("webgl",a)||z.getContext("experimental-webgl",a);if(null===r){if(null!==z.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}z.addEventListener("webglcontextlost",function(a){a.preventDefault();d();c();ka.clear();aa.clear()},!1)}catch(Ib){console.error("THREE.WebGLRenderer: "+
-Ib)}var N=new THREE.WebGLState(r,D);void 0===r.getShaderPrecisionFormat&&(r.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});var aa=new THREE.WebGLProperties,ka=new THREE.WebGLObjects(r,aa,this.info),W=new THREE.WebGLExtensions(r);W.get("OES_texture_float");W.get("OES_texture_float_linear");W.get("OES_texture_half_float");W.get("OES_texture_half_float_linear");W.get("OES_standard_derivatives");W.get("ANGLE_instanced_arrays");W.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=
-4294967296);qa&&W.get("EXT_frag_depth");c();this.context=r;this.extensions=W;this.state=N;var ma=new THREE.WebGLShadowMap(this,ga,ka);this.shadowMap=ma;var fb=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),Q=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Jb=r.getParameter(r.MAX_TEXTURE_SIZE),ac=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),ob=0<Q,nb=ob&&W.get("OES_texture_float"),Kb=W.get("ANGLE_instanced_arrays"),M=r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT),Q=r.getShaderPrecisionFormat(r.VERTEX_SHADER,
+this.info={render:P,memory:Ea,programs:wa};var r;try{a={alpha:M,depth:R,stencil:U,antialias:S,premultipliedAlpha:T,preserveDrawingBuffer:K};r=Q||z.getContext("webgl",a)||z.getContext("experimental-webgl",a);if(null===r){if(null!==z.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}z.addEventListener("webglcontextlost",function(a){a.preventDefault();d();c();ma.clear();aa.clear()},!1)}catch(Ib){console.error("THREE.WebGLRenderer: "+
+Ib)}var N=new THREE.WebGLState(r,D);void 0===r.getShaderPrecisionFormat&&(r.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});var aa=new THREE.WebGLProperties,ma=new THREE.WebGLObjects(r,aa,this.info),W=new THREE.WebGLExtensions(r);W.get("OES_texture_float");W.get("OES_texture_float_linear");W.get("OES_texture_half_float");W.get("OES_texture_half_float_linear");W.get("OES_standard_derivatives");W.get("ANGLE_instanced_arrays");W.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=
+4294967296);qa&&W.get("EXT_frag_depth");c();this.context=r;this.extensions=W;this.state=N;var la=new THREE.WebGLShadowMap(this,ga,ma);this.shadowMap=la;var fb=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),Q=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Jb=r.getParameter(r.MAX_TEXTURE_SIZE),ac=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),ob=0<Q,nb=ob&&W.get("OES_texture_float"),Kb=W.get("ANGLE_instanced_arrays"),M=r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT),Q=r.getShaderPrecisionFormat(r.VERTEX_SHADER,
 r.MEDIUM_FLOAT),R=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);a=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT);var Yb=function(){var a;return function(){if(void 0!==a)return a;a=[];if(W.get("WEBGL_compressed_texture_pvrtc")||W.get("WEBGL_compressed_texture_s3tc"))for(var b=r.getParameter(r.COMPRESSED_TEXTURE_FORMATS),c=0;c<b.length;c++)a.push(b[c]);return a}}(),M=0<M.precision&&0<R.precision,Q=0<Q.precision&&0<a.precision;"highp"!==J||M||(Q?(J="mediump",console.warn("THREE.WebGLRenderer: highp not supported, using mediump.")):
 r.MEDIUM_FLOAT),R=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);a=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT);var Yb=function(){var a;return function(){if(void 0!==a)return a;a=[];if(W.get("WEBGL_compressed_texture_pvrtc")||W.get("WEBGL_compressed_texture_s3tc"))for(var b=r.getParameter(r.COMPRESSED_TEXTURE_FORMATS),c=0;c<b.length;c++)a.push(b[c]);return a}}(),M=0<M.precision&&0<R.precision,Q=0<Q.precision&&0<a.precision;"highp"!==J||M||(Q?(J="mediump",console.warn("THREE.WebGLRenderer: highp not supported, using mediump.")):
 (J="lowp",console.warn("THREE.WebGLRenderer: highp and mediump not supported, using lowp.")));"mediump"!==J||Q||(J="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));var Lb=new THREE.SpritePlugin(this,Ra),Mb=new THREE.LensFlarePlugin(this,Sa);this.getContext=function(){return r};this.getContextAttributes=function(){return r.getContextAttributes()};this.forceContextLoss=function(){W.get("WEBGL_lose_context").loseContext()};this.supportsVertexTextures=function(){return ob};
 (J="lowp",console.warn("THREE.WebGLRenderer: highp and mediump not supported, using lowp.")));"mediump"!==J||Q||(J="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));var Lb=new THREE.SpritePlugin(this,Ra),Mb=new THREE.LensFlarePlugin(this,Sa);this.getContext=function(){return r};this.getContextAttributes=function(){return r.getContextAttributes()};this.forceContextLoss=function(){W.get("WEBGL_lose_context").loseContext()};this.supportsVertexTextures=function(){return ob};
 this.supportsInstancedArrays=function(){return Kb};this.supportsFloatTextures=function(){return W.get("OES_texture_float")};this.supportsHalfFloatTextures=function(){return W.get("OES_texture_half_float")};this.supportsStandardDerivatives=function(){return W.get("OES_standard_derivatives")};this.supportsCompressedTextureS3TC=function(){return W.get("WEBGL_compressed_texture_s3tc")};this.supportsCompressedTexturePVRTC=function(){return W.get("WEBGL_compressed_texture_pvrtc")};this.supportsBlendMinMax=
 this.supportsInstancedArrays=function(){return Kb};this.supportsFloatTextures=function(){return W.get("OES_texture_float")};this.supportsHalfFloatTextures=function(){return W.get("OES_texture_half_float")};this.supportsStandardDerivatives=function(){return W.get("OES_standard_derivatives")};this.supportsCompressedTextureS3TC=function(){return W.get("WEBGL_compressed_texture_s3tc")};this.supportsCompressedTexturePVRTC=function(){return W.get("WEBGL_compressed_texture_pvrtc")};this.supportsBlendMinMax=
@@ -558,19 +558,19 @@ c){var d=0;if(void 0===a||a)d|=r.COLOR_BUFFER_BIT;if(void 0===b||b)d|=r.DEPTH_BU
 !d.__webglVertexBuffer&&(d.__webglVertexBuffer=r.createBuffer());a.hasNormals&&!d.__webglNormalBuffer&&(d.__webglNormalBuffer=r.createBuffer());a.hasUvs&&!d.__webglUvBuffer&&(d.__webglUvBuffer=r.createBuffer());a.hasColors&&!d.__webglColorBuffer&&(d.__webglColorBuffer=r.createBuffer());b=b.getAttributes();a.hasPositions&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglVertexBuffer),r.bufferData(r.ARRAY_BUFFER,a.positionArray,r.DYNAMIC_DRAW),N.enableAttribute(b.position),r.vertexAttribPointer(b.position,3,r.FLOAT,
 !d.__webglVertexBuffer&&(d.__webglVertexBuffer=r.createBuffer());a.hasNormals&&!d.__webglNormalBuffer&&(d.__webglNormalBuffer=r.createBuffer());a.hasUvs&&!d.__webglUvBuffer&&(d.__webglUvBuffer=r.createBuffer());a.hasColors&&!d.__webglColorBuffer&&(d.__webglColorBuffer=r.createBuffer());b=b.getAttributes();a.hasPositions&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglVertexBuffer),r.bufferData(r.ARRAY_BUFFER,a.positionArray,r.DYNAMIC_DRAW),N.enableAttribute(b.position),r.vertexAttribPointer(b.position,3,r.FLOAT,
 !1,0,0));if(a.hasNormals){r.bindBuffer(r.ARRAY_BUFFER,d.__webglNormalBuffer);if(!1===c instanceof THREE.MeshPhongMaterial&&c.shading===THREE.FlatShading){var e,f,g,h,k,l,m,n,p,q,t,s=3*a.count;for(t=0;t<s;t+=9)q=a.normalArray,e=q[t],f=q[t+1],g=q[t+2],h=q[t+3],l=q[t+4],n=q[t+5],k=q[t+6],m=q[t+7],p=q[t+8],e=(e+h+k)/3,f=(f+l+m)/3,g=(g+n+p)/3,q[t]=e,q[t+1]=f,q[t+2]=g,q[t+3]=e,q[t+4]=f,q[t+5]=g,q[t+6]=e,q[t+7]=f,q[t+8]=g}r.bufferData(r.ARRAY_BUFFER,a.normalArray,r.DYNAMIC_DRAW);N.enableAttribute(b.normal);
 !1,0,0));if(a.hasNormals){r.bindBuffer(r.ARRAY_BUFFER,d.__webglNormalBuffer);if(!1===c instanceof THREE.MeshPhongMaterial&&c.shading===THREE.FlatShading){var e,f,g,h,k,l,m,n,p,q,t,s=3*a.count;for(t=0;t<s;t+=9)q=a.normalArray,e=q[t],f=q[t+1],g=q[t+2],h=q[t+3],l=q[t+4],n=q[t+5],k=q[t+6],m=q[t+7],p=q[t+8],e=(e+h+k)/3,f=(f+l+m)/3,g=(g+n+p)/3,q[t]=e,q[t+1]=f,q[t+2]=g,q[t+3]=e,q[t+4]=f,q[t+5]=g,q[t+6]=e,q[t+7]=f,q[t+8]=g}r.bufferData(r.ARRAY_BUFFER,a.normalArray,r.DYNAMIC_DRAW);N.enableAttribute(b.normal);
 r.vertexAttribPointer(b.normal,3,r.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglUvBuffer),r.bufferData(r.ARRAY_BUFFER,a.uvArray,r.DYNAMIC_DRAW),N.enableAttribute(b.uv),r.vertexAttribPointer(b.uv,2,r.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglColorBuffer),r.bufferData(r.ARRAY_BUFFER,a.colorArray,r.DYNAMIC_DRAW),N.enableAttribute(b.color),r.vertexAttribPointer(b.color,3,r.FLOAT,!1,0,0));N.disableUnusedAttributes();r.drawArrays(r.TRIANGLES,
 r.vertexAttribPointer(b.normal,3,r.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglUvBuffer),r.bufferData(r.ARRAY_BUFFER,a.uvArray,r.DYNAMIC_DRAW),N.enableAttribute(b.uv),r.vertexAttribPointer(b.uv,2,r.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(r.bindBuffer(r.ARRAY_BUFFER,d.__webglColorBuffer),r.bufferData(r.ARRAY_BUFFER,a.colorArray,r.DYNAMIC_DRAW),N.enableAttribute(b.color),r.vertexAttribPointer(b.color,3,r.FLOAT,!1,0,0));N.disableUnusedAttributes();r.drawArrays(r.TRIANGLES,
-0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e){if(!1!==d.visible){s(d);var f=ka.geometries.get(e);a=x(a,b,c,d,e);c=!1;b=f.id+"_"+a.id+"_"+(d.wireframe?1:0);b!==Da&&(Da=b,c=!0);c&&N.initAttributes();b=e.morphTargetInfluences;if(void 0!==b){c=[];for(var g=0,h=b.length;g<h;g++){var m=b[g];c.push([m,g])}c.sort(l);8<c.length&&(c.length=8);g=0;for(h=c.length;g<h;g++)m=c[g],xa[g]=m[0],0!==m[0]&&(b=f.morphAttributes[m[1]],ka.updateAttribute(b),f.addAttribute("morphTarget"+g,b));b=a.getUniforms();
-null!==b.morphTargetInfluences&&r.uniform1fv(b.morphTargetInfluences,xa);c=!0}if(e instanceof THREE.Mesh)a:{b=c;e=r.TRIANGLES;!0===d.wireframe&&(e=r.LINES,N.setLineWidth(d.wireframeLinewidth*C));var n=f.attributes.index;if(n)if(h=ka.getAttributeBuffer(n),n.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(c=r.UNSIGNED_INT,g=4):(c=r.UNSIGNED_SHORT,g=2),m=f.drawcalls,0===m.length){b&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h));if(f instanceof THREE.InstancedBufferGeometry&&0<f.maxInstancedCount){var p=
-W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}p.drawElementsInstancedANGLE(e,n.array.length,c,0,f.maxInstancedCount)}else r.drawElements(e,n.array.length,c,0);P.calls++;P.vertices+=n.array.length;P.faces+=n.array.length/3}else{b=!0;for(var n=0,q=m.length;n<q;n++){p=m[n].index;b&&(k(d,a,f,p),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h));if(f instanceof
-THREE.InstancedBufferGeometry&&0<m[n].instances){p=W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}p.drawElementsInstancedANGLE(e,m[n].count,c,m[n].start*g,m[n].count,c,m[n].instances)}else r.drawElements(e,m[n].count,c,m[n].start*g);P.calls++;P.vertices+=m[n].count;P.faces+=m[n].count/3}}else if(m=f.drawcalls,0===m.length){b&&k(d,a,f,0);d=f.attributes.position;
-if(f instanceof THREE.InstancedBufferGeometry&&0<f.maxInstancedCount){p=W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}d instanceof THREE.InterleavedBufferAttribute?p.drawArraysInstancedANGLE(e,0,d.data.count,f.maxInstancedCount):p.drawArraysInstancedANGLE(e,0,d.count,f.maxInstancedCount)}else d instanceof THREE.InterleavedBufferAttribute?r.drawArrays(e,
-0,d.data.count):r.drawArrays(e,0,d.count);P.calls++;P.vertices+=d.count;P.faces+=d.array.length/3}else for(b&&k(d,a,f,0),n=0,q=m.length;n<q;n++){if(f instanceof THREE.InstancedBufferGeometry){console.error("THREE.WebGLRenderer.renderMesh: cannot use drawCalls with THREE.InstancedBufferGeometry.");break a}else r.drawArrays(e,m[n].start,m[n].count);P.calls++;P.vertices+=m[n].count;P.faces+=m[n].count/3}}else if(e instanceof THREE.Line)if(b=c,e=e instanceof THREE.LineSegments?r.LINES:r.LINE_STRIP,N.setLineWidth((void 0!==
-d.linewidth?d.linewidth:1)*C),p=f.attributes.index)if(m=ka.getAttributeBuffer(p),p.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(g=r.UNSIGNED_INT,h=4):(g=r.UNSIGNED_SHORT,h=2),c=f.drawcalls,0===c.length)b&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,p.array.length,g,0),P.calls++,P.vertices+=p.array.length;else for(1<c.length&&(b=!0),p=0,n=c.length;p<n;p++)q=c[p].index,b&&(k(d,a,f,q),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,c[p].count,g,c[p].start*
-h),P.calls++,P.vertices+=c[p].count;else if(b&&k(d,a,f,0),d=f.attributes.position,c=f.drawcalls,0===c.length)r.drawArrays(e,0,d.array.length/3),P.calls++,P.vertices+=d.array.length/3;else for(p=0,n=c.length;p<n;p++)r.drawArrays(e,c[p].index,c[p].count),P.calls++,P.vertices+=c[p].count;else if(e instanceof THREE.PointCloud)if(e=r.POINTS,p=f.attributes.index)if(m=ka.getAttributeBuffer(p),p.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(g=r.UNSIGNED_INT,h=4):(g=r.UNSIGNED_SHORT,h=2),
-b=f.drawcalls,0===b.length)c&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,p.array.length,g,0),P.calls++,P.points+=p.array.length;else for(1<b.length&&(c=!0),p=0,n=b.length;p<n;p++)q=b[p].index,c&&(k(d,a,f,q),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,b[p].count,g,b[p].start*h),P.calls++,P.points+=b[p].count;else if(c&&k(d,a,f,0),d=f.attributes.position,b=f.drawcalls,0===b.length)r.drawArrays(e,0,d.array.length/3),P.calls++,P.points+=d.array.length/3;else for(p=
-0,n=b.length;p<n;p++)r.drawArrays(e,b[p].index,b[p].count),P.calls++,P.points+=b[p].count}};this.render=function(a,b,c,d){if(!1===b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;Da="";Za=-1;Ya=null;gb=!0;!0===a.autoUpdate&&a.updateMatrixWorld();void 0===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);Ka.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);$a.setFromMatrix(Ka);ga.length=
-0;ra.length=0;va.length=0;pa.length=0;Qa.length=0;Ra.length=0;Sa.length=0;m(a);!0===la.sortObjects&&(ra.sort(n),va.sort(p));ka.update(ra);ka.update(va);ma.render(a,b);P.calls=0;P.vertices=0;P.faces=0;P.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,q(ra,b,ga,e,d),q(va,b,ga,e,d),t(pa,b,ga,e,d),t(Qa,b,ga,e,d)):(N.setBlending(THREE.NoBlending),q(ra,b,ga,e,null),t(pa,b,ga,e,null),
-q(va,b,ga,e,null),t(Qa,b,ga,e,null));Lb.render(a,b);Mb.render(a,b,kb,lb);c&&c.generateMipmaps&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(N.bindTexture(r.TEXTURE_CUBE_MAP,aa.get(c).__webglTexture),r.generateMipmap(r.TEXTURE_CUBE_MAP),N.bindTexture(r.TEXTURE_CUBE_MAP,null)):(N.bindTexture(r.TEXTURE_2D,aa.get(c).__webglTexture),r.generateMipmap(r.TEXTURE_2D),N.bindTexture(r.TEXTURE_2D,null)));N.setDepthTest(!0);N.setDepthWrite(!0);
-N.setColorWrite(!0)}};this.renderImmediateObject=function(a,b,c,d,e){s(d);var f=x(a,b,c,d,e);Da="";e.render(function(a){la.renderBufferImmediate(a,f,d)})};var Zb={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointCloudMaterial:"particle_basic"};this.setFaceCulling=function(a,b){a===THREE.CullFaceNone?N.disable(r.CULL_FACE):(b===THREE.FrontFaceDirectionCW?
+0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e){if(!1!==d.visible){s(d);var f=ma.geometries.get(e);a=x(a,b,c,d,e);c=!1;b=f.id+"_"+a.id+"_"+(d.wireframe?1:0);b!==Da&&(Da=b,c=!0);c&&N.initAttributes();b=e.morphTargetInfluences;if(void 0!==b){c=[];for(var g=0,h=b.length;g<h;g++){var m=b[g];c.push([m,g])}c.sort(l);8<c.length&&(c.length=8);g=0;for(h=c.length;g<h;g++)m=c[g],xa[g]=m[0],0!==m[0]?f.addAttribute("morphTarget"+g,f.morphAttributes[m[1]]):f.removeAttribute("morphTarget"+g);b=
+a.getUniforms();null!==b.morphTargetInfluences&&r.uniform1fv(b.morphTargetInfluences,xa);c=!0}if(e instanceof THREE.Mesh)a:{b=c;e=r.TRIANGLES;!0===d.wireframe&&(e=r.LINES,N.setLineWidth(d.wireframeLinewidth*C));var n=f.attributes.index;if(n)if(h=ma.getAttributeBuffer(n),n.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(c=r.UNSIGNED_INT,g=4):(c=r.UNSIGNED_SHORT,g=2),m=f.drawcalls,0===m.length){b&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,h));if(f instanceof THREE.InstancedBufferGeometry&&
+0<f.maxInstancedCount){var p=W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}p.drawElementsInstancedANGLE(e,n.array.length,c,0,f.maxInstancedCount)}else r.drawElements(e,n.array.length,c,0);P.calls++;P.vertices+=n.array.length;P.faces+=n.array.length/3}else{b=!0;for(var n=0,q=m.length;n<q;n++){p=m[n].index;b&&(k(d,a,f,p),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,
+h));if(f instanceof THREE.InstancedBufferGeometry&&0<m[n].instances){p=W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}p.drawElementsInstancedANGLE(e,m[n].count,c,m[n].start*g,m[n].count,c,m[n].instances)}else r.drawElements(e,m[n].count,c,m[n].start*g);P.calls++;P.vertices+=m[n].count;P.faces+=m[n].count/3}}else if(m=f.drawcalls,0===m.length){b&&
+k(d,a,f,0);d=f.attributes.position;if(f instanceof THREE.InstancedBufferGeometry&&0<f.maxInstancedCount){p=W.get("ANGLE_instanced_arrays");if(null===p){console.error("THREE.WebGLRenderer.renderMesh: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}d instanceof THREE.InterleavedBufferAttribute?p.drawArraysInstancedANGLE(e,0,d.data.count,f.maxInstancedCount):p.drawArraysInstancedANGLE(e,0,d.count,f.maxInstancedCount)}else d instanceof THREE.InterleavedBufferAttribute?
+r.drawArrays(e,0,d.data.count):r.drawArrays(e,0,d.count);P.calls++;P.vertices+=d.count;P.faces+=d.array.length/3}else for(b&&k(d,a,f,0),n=0,q=m.length;n<q;n++){if(f instanceof THREE.InstancedBufferGeometry){console.error("THREE.WebGLRenderer.renderMesh: cannot use drawCalls with THREE.InstancedBufferGeometry.");break a}else r.drawArrays(e,m[n].start,m[n].count);P.calls++;P.vertices+=m[n].count;P.faces+=m[n].count/3}}else if(e instanceof THREE.Line)if(b=c,e=e instanceof THREE.LineSegments?r.LINES:
+r.LINE_STRIP,N.setLineWidth((void 0!==d.linewidth?d.linewidth:1)*C),p=f.attributes.index)if(m=ma.getAttributeBuffer(p),p.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(g=r.UNSIGNED_INT,h=4):(g=r.UNSIGNED_SHORT,h=2),c=f.drawcalls,0===c.length)b&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,p.array.length,g,0),P.calls++,P.vertices+=p.array.length;else for(1<c.length&&(b=!0),p=0,n=c.length;p<n;p++)q=c[p].index,b&&(k(d,a,f,q),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,
+m)),r.drawElements(e,c[p].count,g,c[p].start*h),P.calls++,P.vertices+=c[p].count;else if(b&&k(d,a,f,0),d=f.attributes.position,c=f.drawcalls,0===c.length)r.drawArrays(e,0,d.array.length/3),P.calls++,P.vertices+=d.array.length/3;else for(p=0,n=c.length;p<n;p++)r.drawArrays(e,c[p].index,c[p].count),P.calls++,P.vertices+=c[p].count;else if(e instanceof THREE.PointCloud)if(e=r.POINTS,p=f.attributes.index)if(m=ma.getAttributeBuffer(p),p.array instanceof Uint32Array&&W.get("OES_element_index_uint")?(g=
+r.UNSIGNED_INT,h=4):(g=r.UNSIGNED_SHORT,h=2),b=f.drawcalls,0===b.length)c&&(k(d,a,f,0),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,p.array.length,g,0),P.calls++,P.points+=p.array.length;else for(1<b.length&&(c=!0),p=0,n=b.length;p<n;p++)q=b[p].index,c&&(k(d,a,f,q),r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,m)),r.drawElements(e,b[p].count,g,b[p].start*h),P.calls++,P.points+=b[p].count;else if(c&&k(d,a,f,0),d=f.attributes.position,b=f.drawcalls,0===b.length)r.drawArrays(e,0,d.array.length/3),
+P.calls++,P.points+=d.array.length/3;else for(p=0,n=b.length;p<n;p++)r.drawArrays(e,b[p].index,b[p].count),P.calls++,P.points+=b[p].count}};this.render=function(a,b,c,d){if(!1===b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;Da="";Za=-1;Ya=null;gb=!0;!0===a.autoUpdate&&a.updateMatrixWorld();void 0===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);Ka.multiplyMatrices(b.projectionMatrix,
+b.matrixWorldInverse);$a.setFromMatrix(Ka);ga.length=0;ra.length=0;va.length=0;pa.length=0;Qa.length=0;Ra.length=0;Sa.length=0;m(a);!0===ka.sortObjects&&(ra.sort(n),va.sort(p));ma.update(ra);ma.update(va);la.render(a,b);P.calls=0;P.vertices=0;P.faces=0;P.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,q(ra,b,ga,e,d),q(va,b,ga,e,d),t(pa,b,ga,e,d),t(Qa,b,ga,e,d)):(N.setBlending(THREE.NoBlending),
+q(ra,b,ga,e,null),t(pa,b,ga,e,null),q(va,b,ga,e,null),t(Qa,b,ga,e,null));Lb.render(a,b);Mb.render(a,b,kb,lb);c&&c.generateMipmaps&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(N.bindTexture(r.TEXTURE_CUBE_MAP,aa.get(c).__webglTexture),r.generateMipmap(r.TEXTURE_CUBE_MAP),N.bindTexture(r.TEXTURE_CUBE_MAP,null)):(N.bindTexture(r.TEXTURE_2D,aa.get(c).__webglTexture),r.generateMipmap(r.TEXTURE_2D),N.bindTexture(r.TEXTURE_2D,null)));N.setDepthTest(!0);
+N.setDepthWrite(!0);N.setColorWrite(!0)}};this.renderImmediateObject=function(a,b,c,d,e){s(d);var f=x(a,b,c,d,e);Da="";e.render(function(a){ka.renderBufferImmediate(a,f,d)})};var Zb={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointCloudMaterial:"particle_basic"};this.setFaceCulling=function(a,b){a===THREE.CullFaceNone?N.disable(r.CULL_FACE):(b===THREE.FrontFaceDirectionCW?
 r.frontFace(r.CW):r.frontFace(r.CCW),a===THREE.CullFaceBack?r.cullFace(r.BACK):a===THREE.CullFaceFront?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK),N.enable(r.CULL_FACE))};this.setMaterialFaces=u;this.setTexture=function(a,b){var c=aa.get(a);if(0<a.version&&c.__version!==a.version){var d=a.image;if(void 0===d)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",a);else if(!1===d.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",
 r.frontFace(r.CW):r.frontFace(r.CCW),a===THREE.CullFaceBack?r.cullFace(r.BACK):a===THREE.CullFaceFront?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK),N.enable(r.CULL_FACE))};this.setMaterialFaces=u;this.setTexture=function(a,b){var c=aa.get(a);if(0<a.version&&c.__version!==a.version){var d=a.image;if(void 0===d)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",a);else if(!1===d.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",
 a);else{void 0===c.__webglInit&&(c.__webglInit=!0,a.__webglInit=!0,a.addEventListener("dispose",e),c.__webglTexture=r.createTexture(),Ea.textures++);N.activeTexture(r.TEXTURE0+b);N.bindTexture(r.TEXTURE_2D,c.__webglTexture);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);r.pixelStorei(r.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=H(a.image,Jb);var f=a.image,d=THREE.Math.isPowerOfTwo(f.width)&&THREE.Math.isPowerOfTwo(f.height),g=D(a.format),
 a);else{void 0===c.__webglInit&&(c.__webglInit=!0,a.__webglInit=!0,a.addEventListener("dispose",e),c.__webglTexture=r.createTexture(),Ea.textures++);N.activeTexture(r.TEXTURE0+b);N.bindTexture(r.TEXTURE_2D,c.__webglTexture);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);r.pixelStorei(r.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=H(a.image,Jb);var f=a.image,d=THREE.Math.isPowerOfTwo(f.width)&&THREE.Math.isPowerOfTwo(f.height),g=D(a.format),
 h=D(a.type);G(r.TEXTURE_2D,a,d);var k=a.mipmaps;if(a instanceof THREE.DataTexture)if(0<k.length&&d){for(var l=0,m=k.length;l<m;l++)f=k[l],N.texImage2D(r.TEXTURE_2D,l,g,f.width,f.height,0,g,h,f.data);a.generateMipmaps=!1}else N.texImage2D(r.TEXTURE_2D,0,g,f.width,f.height,0,g,h,f.data);else if(a instanceof THREE.CompressedTexture)for(l=0,m=k.length;l<m;l++)f=k[l],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<Yb().indexOf(g)?N.compressedTexImage2D(r.TEXTURE_2D,l,g,f.width,f.height,0,f.data):
 h=D(a.type);G(r.TEXTURE_2D,a,d);var k=a.mipmaps;if(a instanceof THREE.DataTexture)if(0<k.length&&d){for(var l=0,m=k.length;l<m;l++)f=k[l],N.texImage2D(r.TEXTURE_2D,l,g,f.width,f.height,0,g,h,f.data);a.generateMipmaps=!1}else N.texImage2D(r.TEXTURE_2D,0,g,f.width,f.height,0,g,h,f.data);else if(a instanceof THREE.CompressedTexture)for(l=0,m=k.length;l<m;l++)f=k[l],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<Yb().indexOf(g)?N.compressedTexImage2D(r.TEXTURE_2D,l,g,f.width,f.height,0,f.data):
@@ -580,9 +580,9 @@ c.__webglTexture);G(r.TEXTURE_CUBE_MAP,a,d);for(var h=0;6>h;h++)c.__webglFramebu
 r.createRenderbuffer(),N.bindTexture(r.TEXTURE_2D,c.__webglTexture),G(r.TEXTURE_2D,a,d),N.texImage2D(r.TEXTURE_2D,0,e,a.width,a.height,0,e,f,null),w(c.__webglFramebuffer,a,r.TEXTURE_2D),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):B(c.__webglRenderbuffer,a),a.generateMipmaps&&
 r.createRenderbuffer(),N.bindTexture(r.TEXTURE_2D,c.__webglTexture),G(r.TEXTURE_2D,a,d),N.texImage2D(r.TEXTURE_2D,0,e,a.width,a.height,0,e,f,null),w(c.__webglFramebuffer,a,r.TEXTURE_2D),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):B(c.__webglRenderbuffer,a),a.generateMipmaps&&
 d&&r.generateMipmap(r.TEXTURE_2D);b?N.bindTexture(r.TEXTURE_CUBE_MAP,null):N.bindTexture(r.TEXTURE_2D,null);r.bindRenderbuffer(r.RENDERBUFFER,null);r.bindFramebuffer(r.FRAMEBUFFER,null)}a?(c=aa.get(a),b=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=ya,a=Ja,d=Ia,e=Ca);b!==Ha&&(r.bindFramebuffer(r.FRAMEBUFFER,b),r.viewport(d,e,c,a),Ha=b);kb=c;lb=a};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!(a instanceof THREE.WebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
 d&&r.generateMipmap(r.TEXTURE_2D);b?N.bindTexture(r.TEXTURE_CUBE_MAP,null):N.bindTexture(r.TEXTURE_2D,null);r.bindRenderbuffer(r.RENDERBUFFER,null);r.bindFramebuffer(r.FRAMEBUFFER,null)}a?(c=aa.get(a),b=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=ya,a=Ja,d=Ia,e=Ca);b!==Ha&&(r.bindFramebuffer(r.FRAMEBUFFER,b),r.viewport(d,e,c,a),Ha=b);kb=c;lb=a};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!(a instanceof THREE.WebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
 else if(aa.get(a).__webglFramebuffer)if(a.format!==THREE.RGBAFormat)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.");else{var g=!1;aa.get(a).__webglFramebuffer!==Ha&&(r.bindFramebuffer(r.FRAMEBUFFER,aa.get(a).__webglFramebuffer),g=!0);r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE?r.readPixels(b,c,d,e,r.RGBA,r.UNSIGNED_BYTE,f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");
 else if(aa.get(a).__webglFramebuffer)if(a.format!==THREE.RGBAFormat)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA format. readPixels can read only RGBA format.");else{var g=!1;aa.get(a).__webglFramebuffer!==Ha&&(r.bindFramebuffer(r.FRAMEBUFFER,aa.get(a).__webglFramebuffer),g=!0);r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE?r.readPixels(b,c,d,e,r.RGBA,r.UNSIGNED_BYTE,f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");
-g&&r.bindFramebuffer(r.FRAMEBUFFER,Ha)}};this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};this.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};this.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};this.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};Object.defineProperties(this,{shadowMapEnabled:{get:function(){return ma.enabled},
-set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");ma.enabled=a}},shadowMapType:{get:function(){return ma.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");ma.type=a}},shadowMapCullFace:{get:function(){return ma.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");ma.cullFace=a}},shadowMapDebug:{get:function(){return ma.debug},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.");
-ma.debug=a}},shadowMapCascade:{get:function(){return ma.cascade},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCascade is now .shadowMap.cascade.");ma.cascade=a}}})};
+g&&r.bindFramebuffer(r.FRAMEBUFFER,Ha)}};this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};this.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};this.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};this.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};Object.defineProperties(this,{shadowMapEnabled:{get:function(){return la.enabled},
+set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");la.enabled=a}},shadowMapType:{get:function(){return la.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");la.type=a}},shadowMapCullFace:{get:function(){return la.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");la.cullFace=a}},shadowMapDebug:{get:function(){return la.debug},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.");
+la.debug=a}},shadowMapCascade:{get:function(){return la.cascade},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCascade is now .shadowMap.cascade.");la.cascade=a}}})};
 THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,
 THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,
 1);this.format=void 0!==c.format?c.format:THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=void 0!==c.shareDepthFrom?c.shareDepthFrom:null};
 1);this.format=void 0!==c.format?c.format:THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=void 0!==c.shareDepthFrom?c.shareDepthFrom:null};
 THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose()},clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=
 THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.dispose()},clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=
@@ -594,8 +594,8 @@ d);b instanceof THREE.BufferGeometry?e[b.id]=b:b instanceof THREE.Geometry&&(voi
 THREE.WebGLObjects=function(a,b,c){function d(a){a.target.traverse(function(a){a.removeEventListener("remove",d);(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)&&delete g[a.id];delete a._modelViewMatrix;delete a._normalMatrix;b.delete(a)})}function e(c,d){var e="index"===d?a.ELEMENT_ARRAY_BUFFER:a.ARRAY_BUFFER,f=c instanceof THREE.InterleavedBufferAttribute?c.data:c,g=b.get(f);if(void 0===g.__webglBuffer){g.__webglBuffer=a.createBuffer();a.bindBuffer(e,g.__webglBuffer);
 THREE.WebGLObjects=function(a,b,c){function d(a){a.target.traverse(function(a){a.removeEventListener("remove",d);(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)&&delete g[a.id];delete a._modelViewMatrix;delete a._normalMatrix;b.delete(a)})}function e(c,d){var e="index"===d?a.ELEMENT_ARRAY_BUFFER:a.ARRAY_BUFFER,f=c instanceof THREE.InterleavedBufferAttribute?c.data:c,g=b.get(f);if(void 0===g.__webglBuffer){g.__webglBuffer=a.createBuffer();a.bindBuffer(e,g.__webglBuffer);
 var m=a.STATIC_DRAW;if(f instanceof THREE.DynamicBufferAttribute||f instanceof THREE.InstancedBufferAttribute&&!0===f.dynamic||f instanceof THREE.InterleavedBuffer&&!0===f.dynamic)m=a.DYNAMIC_DRAW;a.bufferData(e,f.array,m);g.version=f.version}else g.version!==f.version&&(a.bindBuffer(e,g.__webglBuffer),void 0===f.updateRange||-1===f.updateRange.count?a.bufferSubData(e,0,f.array):0===f.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually."):
 var m=a.STATIC_DRAW;if(f instanceof THREE.DynamicBufferAttribute||f instanceof THREE.InstancedBufferAttribute&&!0===f.dynamic||f instanceof THREE.InterleavedBuffer&&!0===f.dynamic)m=a.DYNAMIC_DRAW;a.bufferData(e,f.array,m);g.version=f.version}else g.version!==f.version&&(a.bindBuffer(e,g.__webglBuffer),void 0===f.updateRange||-1===f.updateRange.count?a.bufferSubData(e,0,f.array):0===f.updateRange.count?console.error("THREE.WebGLObjects.updateBuffer: using updateRange for THREE.DynamicBufferAttribute and marked as needsUpdate but count is 0, ensure you are using set methods or updating manually."):
 (a.bufferSubData(e,f.updateRange.offset*f.array.BYTES_PER_ELEMENT,f.array.subarray(f.updateRange.offset,f.updateRange.offset+f.updateRange.count)),f.updateRange.count=0),g.version=f.version)}var g={},f=new THREE.WebGLGeometries(a,b,c);this.objects=g;this.geometries=f;this.init=function(a){var c=b.get(a);void 0===c.__webglInit&&(c.__webglInit=!0,a._modelViewMatrix=new THREE.Matrix4,a._normalMatrix=new THREE.Matrix3,a.addEventListener("removed",d));void 0===c.__webglActive&&(c.__webglActive=!0,a instanceof
 (a.bufferSubData(e,f.updateRange.offset*f.array.BYTES_PER_ELEMENT,f.array.subarray(f.updateRange.offset,f.updateRange.offset+f.updateRange.count)),f.updateRange.count=0),g.version=f.version)}var g={},f=new THREE.WebGLGeometries(a,b,c);this.objects=g;this.geometries=f;this.init=function(a){var c=b.get(a);void 0===c.__webglInit&&(c.__webglInit=!0,a._modelViewMatrix=new THREE.Matrix4,a._normalMatrix=new THREE.Matrix3,a.addEventListener("removed",d));void 0===c.__webglActive&&(c.__webglActive=!0,a instanceof
-THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.PointCloud)&&(g[a.id]={id:a.id,object:a,z:0})};this.getAttributeBuffer=function(a){return a instanceof THREE.InterleavedBufferAttribute?b.get(a.data).__webglBuffer:b.get(a).__webglBuffer};this.update=function(a){for(var b=0,c=a.length;b<c;b++){var d=a[b].object;if(!1!==d.material.visible){var g=f.get(d);d.geometry instanceof THREE.Geometry&&g.updateFromObject(d);d=g.attributes;g=void 0;for(g in d)e(d[g],g)}}};this.updateAttribute=e;this.clear=
-function(){g={}}};
+THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.PointCloud)&&(g[a.id]={id:a.id,object:a,z:0})};this.getAttributeBuffer=function(a){return a instanceof THREE.InterleavedBufferAttribute?b.get(a.data).__webglBuffer:b.get(a).__webglBuffer};this.update=function(a){for(var b=0,c=a.length;b<c;b++){var d=a[b].object;if(!1!==d.material.visible){var g=d,d=f.get(g);g.geometry instanceof THREE.Geometry&&d.updateFromObject(g);var g=d.attributes,m=void 0;for(m in g)e(g[m],m);d=d.morphAttributes;g=0;for(m=
+d.length;g<m;g++)e(d[g],g)}}};this.clear=function(){g={}}};
 THREE.WebGLProgram=function(){function a(a){var b=[],c;for(c in a){var f=a[c];!1!==f&&b.push("#define "+c+" "+f)}return b.join("\n")}function b(a){return""!==a}var c=0;return function(d,e,g,f){var h=d.context,k=g.defines,l=g.__webglShader.vertexShader,n=g.__webglShader.fragmentShader,p=g.index0AttributeName,m="SHADOWMAP_TYPE_BASIC";f.shadowMapType===THREE.PCFShadowMap?m="SHADOWMAP_TYPE_PCF":f.shadowMapType===THREE.PCFSoftShadowMap&&(m="SHADOWMAP_TYPE_PCF_SOFT");var q="ENVMAP_TYPE_CUBE",t="ENVMAP_MODE_REFLECTION",
 THREE.WebGLProgram=function(){function a(a){var b=[],c;for(c in a){var f=a[c];!1!==f&&b.push("#define "+c+" "+f)}return b.join("\n")}function b(a){return""!==a}var c=0;return function(d,e,g,f){var h=d.context,k=g.defines,l=g.__webglShader.vertexShader,n=g.__webglShader.fragmentShader,p=g.index0AttributeName,m="SHADOWMAP_TYPE_BASIC";f.shadowMapType===THREE.PCFShadowMap?m="SHADOWMAP_TYPE_PCF":f.shadowMapType===THREE.PCFSoftShadowMap&&(m="SHADOWMAP_TYPE_PCF_SOFT");var q="ENVMAP_TYPE_CUBE",t="ENVMAP_MODE_REFLECTION",
 s="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(g.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:q="ENVMAP_TYPE_CUBE";break;case THREE.EquirectangularReflectionMapping:case THREE.EquirectangularRefractionMapping:q="ENVMAP_TYPE_EQUIREC";break;case THREE.SphericalReflectionMapping:q="ENVMAP_TYPE_SPHERE"}switch(g.envMap.mapping){case THREE.CubeRefractionMapping:case THREE.EquirectangularRefractionMapping:t="ENVMAP_MODE_REFRACTION"}switch(g.combine){case THREE.MultiplyOperation:s=
 s="ENVMAP_BLENDING_MULTIPLY";if(f.envMap){switch(g.envMap.mapping){case THREE.CubeReflectionMapping:case THREE.CubeRefractionMapping:q="ENVMAP_TYPE_CUBE";break;case THREE.EquirectangularReflectionMapping:case THREE.EquirectangularRefractionMapping:q="ENVMAP_TYPE_EQUIREC";break;case THREE.SphericalReflectionMapping:q="ENVMAP_TYPE_SPHERE"}switch(g.envMap.mapping){case THREE.CubeRefractionMapping:case THREE.EquirectangularRefractionMapping:t="ENVMAP_MODE_REFRACTION"}switch(g.combine){case THREE.MultiplyOperation:s=
 "ENVMAP_BLENDING_MULTIPLY";break;case THREE.MixOperation:s="ENVMAP_BLENDING_MIX";break;case THREE.AddOperation:s="ENVMAP_BLENDING_ADD"}}var u=0<d.gammaFactor?d.gammaFactor:1,x=a(k),v=h.createProgram();g instanceof THREE.RawShaderMaterial?d=k="":(k=["precision "+f.precision+" float;","precision "+f.precision+" int;","#define SHADER_NAME "+g.__webglShader.name,x,f.supportsVertexTextures?"#define VERTEX_TEXTURES":"",d.gammaInput?"#define GAMMA_INPUT":"",d.gammaOutput?"#define GAMMA_OUTPUT":"","#define GAMMA_FACTOR "+
 "ENVMAP_BLENDING_MULTIPLY";break;case THREE.MixOperation:s="ENVMAP_BLENDING_MIX";break;case THREE.AddOperation:s="ENVMAP_BLENDING_ADD"}}var u=0<d.gammaFactor?d.gammaFactor:1,x=a(k),v=h.createProgram();g instanceof THREE.RawShaderMaterial?d=k="":(k=["precision "+f.precision+" float;","precision "+f.precision+" int;","#define SHADER_NAME "+g.__webglShader.name,x,f.supportsVertexTextures?"#define VERTEX_TEXTURES":"",d.gammaInput?"#define GAMMA_INPUT":"",d.gammaOutput?"#define GAMMA_OUTPUT":"","#define GAMMA_FACTOR "+