Browse Source

Updated builds.

Mr.doob 10 years ago
parent
commit
bace89892d
2 changed files with 179 additions and 183 deletions
  1. 45 49
      build/three.js
  2. 134 134
      build/three.min.js

+ 45 - 49
build/three.js

@@ -11604,33 +11604,36 @@ THREE.BufferGeometry.prototype = {
 
 
 	computeTangents: function () {
 	computeTangents: function () {
 
 
+		var index = this.index;
+		var attributes = this.attributes;
+
 		// based on http://www.terathon.com/code/tangent.html
 		// based on http://www.terathon.com/code/tangent.html
 		// (per vertex tangents)
 		// (per vertex tangents)
 
 
-		if ( this.index === undefined ||
-			 this.attributes.position === undefined ||
-			 this.attributes.normal === undefined ||
-			 this.attributes.uv === undefined ) {
+		if ( index === undefined ||
+			 attributes.position === undefined ||
+			 attributes.normal === undefined ||
+			 attributes.uv === undefined ) {
 
 
 			console.warn( 'THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()' );
 			console.warn( 'THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()' );
 			return;
 			return;
 
 
 		}
 		}
 
 
-		var indices = this.index.array;
-		var positions = this.attributes.position.array;
-		var normals = this.attributes.normal.array;
-		var uvs = this.attributes.uv.array;
+		var indices = index.array;
+		var positions = attributes.position.array;
+		var normals = attributes.normal.array;
+		var uvs = attributes.uv.array;
 
 
 		var nVertices = positions.length / 3;
 		var nVertices = positions.length / 3;
 
 
-		if ( this.attributes.tangent === undefined ) {
+		if ( attributes.tangent === undefined ) {
 
 
 			this.addAttribute( 'tangent', new THREE.BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );
 			this.addAttribute( 'tangent', new THREE.BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );
 
 
 		}
 		}
 
 
-		var tangents = this.attributes.tangent.array;
+		var tangents = attributes.tangent.array;
 
 
 		var tan1 = [], tan2 = [];
 		var tan1 = [], tan2 = [];
 
 
@@ -11649,10 +11652,8 @@ THREE.BufferGeometry.prototype = {
 			uvB = new THREE.Vector2(),
 			uvB = new THREE.Vector2(),
 			uvC = new THREE.Vector2(),
 			uvC = new THREE.Vector2(),
 
 
-			x1, x2, y1, y2, z1, z2,
-			s1, s2, t1, t2, r;
-
-		var sdir = new THREE.Vector3(), tdir = new THREE.Vector3();
+			sdir = new THREE.Vector3(),
+			tdir = new THREE.Vector3();
 
 
 		function handleTriangle( a, b, c ) {
 		function handleTriangle( a, b, c ) {
 
 
@@ -11664,22 +11665,22 @@ THREE.BufferGeometry.prototype = {
 			uvB.fromArray( uvs, b * 2 );
 			uvB.fromArray( uvs, b * 2 );
 			uvC.fromArray( uvs, c * 2 );
 			uvC.fromArray( uvs, c * 2 );
 
 
-			x1 = vB.x - vA.x;
-			x2 = vC.x - vA.x;
+			var x1 = vB.x - vA.x;
+			var x2 = vC.x - vA.x;
 
 
-			y1 = vB.y - vA.y;
-			y2 = vC.y - vA.y;
+			var y1 = vB.y - vA.y;
+			var y2 = vC.y - vA.y;
 
 
-			z1 = vB.z - vA.z;
-			z2 = vC.z - vA.z;
+			var z1 = vB.z - vA.z;
+			var z2 = vC.z - vA.z;
 
 
-			s1 = uvB.x - uvA.x;
-			s2 = uvC.x - uvA.x;
+			var s1 = uvB.x - uvA.x;
+			var s2 = uvC.x - uvA.x;
 
 
-			t1 = uvB.y - uvA.y;
-			t2 = uvC.y - uvA.y;
+			var t1 = uvB.y - uvA.y;
+			var t2 = uvC.y - uvA.y;
 
 
-			r = 1.0 / ( s1 * t2 - s2 * t1 );
+			var r = 1.0 / ( s1 * t2 - s2 * t1 );
 
 
 			sdir.set(
 			sdir.set(
 				( t2 * x1 - t1 * x2 ) * r,
 				( t2 * x1 - t1 * x2 ) * r,
@@ -11703,32 +11704,31 @@ THREE.BufferGeometry.prototype = {
 
 
 		}
 		}
 
 
-		var i, il;
-		var j, jl;
-		var iA, iB, iC;
+		var groups = this.groups;
 
 
-		if ( this.groups.length === 0 ) {
+		if ( groups.length === 0 ) {
 
 
-			this.addGroup( 0, indices.length );
+			groups = [ {
+				start: 0,
+				count: indices.length
+			} ];
 
 
 		}
 		}
 
 
-		var groups = this.groups;
-
-		for ( j = 0, jl = groups.length; j < jl; ++ j ) {
+		for ( var j = 0, jl = groups.length; j < jl; ++ j ) {
 
 
 			var group = groups[ j ];
 			var group = groups[ j ];
 
 
 			var start = group.start;
 			var start = group.start;
 			var count = group.count;
 			var count = group.count;
 
 
-			for ( i = start, il = start + count; i < il; i += 3 ) {
+			for ( var i = start, il = start + count; i < il; i += 3 ) {
 
 
-				iA = indices[ i + 0 ];
-				iB = indices[ i + 1 ];
-				iC = indices[ i + 2 ];
-
-				handleTriangle( iA, iB, iC );
+				handleTriangle(
+					indices[ i + 0 ],
+					indices[ i + 1 ],
+					indices[ i + 2 ]
+				);
 
 
 			}
 			}
 
 
@@ -11763,22 +11763,18 @@ THREE.BufferGeometry.prototype = {
 
 
 		}
 		}
 
 
-		for ( j = 0, jl = groups.length; j < jl; ++ j ) {
+		for ( var j = 0, jl = groups.length; j < jl; ++ j ) {
 
 
 			var group = groups[ j ];
 			var group = groups[ j ];
 
 
 			var start = group.start;
 			var start = group.start;
 			var count = group.count;
 			var count = group.count;
 
 
-			for ( i = start, il = start + count; i < il; i += 3 ) {
-
-				iA = indices[ i + 0 ];
-				iB = indices[ i + 1 ];
-				iC = indices[ i + 2 ];
+			for ( var i = start, il = start + count; i < il; i += 3 ) {
 
 
-				handleVertex( iA );
-				handleVertex( iB );
-				handleVertex( iC );
+				handleVertex( indices[ i + 0 ] );
+				handleVertex( indices[ i + 1 ] );
+				handleVertex( indices[ i + 2 ] );
 
 
 			}
 			}
 
 
@@ -17600,7 +17596,7 @@ THREE.Mesh.prototype.raycast = ( function () {
 
 
 				var uv;
 				var uv;
 
 
-				if ( geometry.faceVertexUvs[ 0 ] !== undefined ) {
+				if ( geometry.faceVertexUvs[ 0 ].length > 0 ) {
 
 
 					var uvs = geometry.faceVertexUvs[ 0 ][ f ];
 					var uvs = geometry.faceVertexUvs[ 0 ][ f ];
 					uvA.copy( uvs[ 0 ] );
 					uvA.copy( uvs[ 0 ] );

+ 134 - 134
build/three.min.js

@@ -106,8 +106,8 @@ e=Math.sin(e);if("XYZ"===a.order){a=g*h;var k=g*e,l=c*h,n=c*e;b[0]=f*h;b[4]=-f*e
 n*d+a,b[9]=k*d-l,b[2]=-d,b[6]=c*f,b[10]=g*f):"YZX"===a.order?(a=g*f,k=g*d,l=c*f,n=c*d,b[0]=f*h,b[4]=n-a*e,b[8]=l*e+k,b[1]=e,b[5]=g*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+l,b[10]=a-n*e):"XZY"===a.order&&(a=g*f,k=g*d,l=c*f,n=c*d,b[0]=f*h,b[4]=-e,b[8]=d*h,b[1]=a*e+n,b[5]=g*h,b[9]=k*e-l,b[2]=l*e-k,b[6]=c*h,b[10]=n*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");
 n*d+a,b[9]=k*d-l,b[2]=-d,b[6]=c*f,b[10]=g*f):"YZX"===a.order?(a=g*f,k=g*d,l=c*f,n=c*d,b[0]=f*h,b[4]=n-a*e,b[8]=l*e+k,b[1]=e,b[5]=g*h,b[9]=-c*h,b[2]=-d*h,b[6]=k*e+l,b[10]=a-n*e):"XZY"===a.order&&(a=g*f,k=g*d,l=c*f,n=c*d,b[0]=f*h,b[4]=-e,b[8]=d*h,b[1]=a*e+n,b[5]=g*h,b[9]=k*e-l,b[2]=l*e-k,b[6]=c*h,b[10]=n*e+a);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},setRotationFromQuaternion:function(a){console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().");
 return this.makeRotationFromQuaternion(a)},makeRotationFromQuaternion:function(a){var b=this.elements,c=a.x,d=a.y,e=a.z,g=a.w,f=c+c,h=d+d,k=e+e;a=c*f;var l=c*h,c=c*k,n=d*h,d=d*k,e=e*k,f=g*f,h=g*h,g=g*k;b[0]=1-(n+e);b[4]=l-g;b[8]=c+h;b[1]=l+g;b[5]=1-(a+e);b[9]=d-f;b[2]=c-h;b[6]=d+f;b[10]=1-(a+n);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a,b,c;return function(d,e,g){void 0===a&&(a=new THREE.Vector3);void 0===b&&(b=new THREE.Vector3);void 0===c&&(c=new THREE.Vector3);
 return this.makeRotationFromQuaternion(a)},makeRotationFromQuaternion:function(a){var b=this.elements,c=a.x,d=a.y,e=a.z,g=a.w,f=c+c,h=d+d,k=e+e;a=c*f;var l=c*h,c=c*k,n=d*h,d=d*k,e=e*k,f=g*f,h=g*h,g=g*k;b[0]=1-(n+e);b[4]=l-g;b[8]=c+h;b[1]=l+g;b[5]=1-(a+e);b[9]=d-f;b[2]=c-h;b[6]=d+f;b[10]=1-(a+n);b[3]=0;b[7]=0;b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return this},lookAt:function(){var a,b,c;return function(d,e,g){void 0===a&&(a=new THREE.Vector3);void 0===b&&(b=new THREE.Vector3);void 0===c&&(c=new THREE.Vector3);
 var f=this.elements;c.subVectors(d,e).normalize();0===c.length()&&(c.z=1);a.crossVectors(g,c).normalize();0===a.length()&&(c.x+=1E-4,a.crossVectors(g,c).normalize());b.crossVectors(c,a);f[0]=a.x;f[4]=b.x;f[8]=c.x;f[1]=a.y;f[5]=b.y;f[9]=c.y;f[2]=a.z;f[6]=b.z;f[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},multiplyMatrices:function(a,
 var f=this.elements;c.subVectors(d,e).normalize();0===c.length()&&(c.z=1);a.crossVectors(g,c).normalize();0===a.length()&&(c.x+=1E-4,a.crossVectors(g,c).normalize());b.crossVectors(c,a);f[0]=a.x;f[4]=b.x;f[8]=c.x;f[1]=a.y;f[5]=b.y;f[9]=c.y;f[2]=a.z;f[6]=b.z;f[10]=c.z;return this}}(),multiply:function(a,b){return void 0!==b?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(a,b)):this.multiplyMatrices(this,a)},multiplyMatrices:function(a,
-b){var c=a.elements,d=b.elements,e=this.elements,g=c[0],f=c[4],h=c[8],k=c[12],l=c[1],n=c[5],p=c[9],m=c[13],q=c[2],s=c[6],r=c[10],u=c[14],x=c[3],v=c[7],y=c[11],c=c[15],w=d[0],E=d[4],F=d[8],z=d[12],B=d[1],K=d[5],L=d[9],C=d[13],M=d[2],I=d[6],D=d[10],A=d[14],H=d[3],O=d[7],R=d[11],d=d[15];e[0]=g*w+f*B+h*M+k*H;e[4]=g*E+f*K+h*I+k*O;e[8]=g*F+f*L+h*D+k*R;e[12]=g*z+f*C+h*A+k*d;e[1]=l*w+n*B+p*M+m*H;e[5]=l*E+n*K+p*I+m*O;e[9]=l*F+n*L+p*D+m*R;e[13]=l*z+n*C+p*A+m*d;e[2]=q*w+s*B+r*M+u*H;e[6]=q*E+s*K+r*I+u*O;e[10]=
-q*F+s*L+r*D+u*R;e[14]=q*z+s*C+r*A+u*d;e[3]=x*w+v*B+y*M+c*H;e[7]=x*E+v*K+y*I+c*O;e[11]=x*F+v*L+y*D+c*R;e[15]=x*z+v*C+y*A+c*d;return this},multiplyToArray:function(a,b,c){var d=this.elements;this.multiplyMatrices(a,b);c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];c[4]=d[4];c[5]=d[5];c[6]=d[6];c[7]=d[7];c[8]=d[8];c[9]=d[9];c[10]=d[10];c[11]=d[11];c[12]=d[12];c[13]=d[13];c[14]=d[14];c[15]=d[15];return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=
+b){var c=a.elements,d=b.elements,e=this.elements,g=c[0],f=c[4],h=c[8],k=c[12],l=c[1],n=c[5],p=c[9],m=c[13],q=c[2],s=c[6],r=c[10],u=c[14],x=c[3],v=c[7],y=c[11],c=c[15],w=d[0],A=d[4],E=d[8],z=d[12],C=d[1],H=d[5],N=d[9],B=d[13],L=d[2],G=d[6],K=d[10],D=d[14],I=d[3],P=d[7],R=d[11],d=d[15];e[0]=g*w+f*C+h*L+k*I;e[4]=g*A+f*H+h*G+k*P;e[8]=g*E+f*N+h*K+k*R;e[12]=g*z+f*B+h*D+k*d;e[1]=l*w+n*C+p*L+m*I;e[5]=l*A+n*H+p*G+m*P;e[9]=l*E+n*N+p*K+m*R;e[13]=l*z+n*B+p*D+m*d;e[2]=q*w+s*C+r*L+u*I;e[6]=q*A+s*H+r*G+u*P;e[10]=
+q*E+s*N+r*K+u*R;e[14]=q*z+s*B+r*D+u*d;e[3]=x*w+v*C+y*L+c*I;e[7]=x*A+v*H+y*G+c*P;e[11]=x*E+v*N+y*K+c*R;e[15]=x*z+v*B+y*D+c*d;return this},multiplyToArray:function(a,b,c){var d=this.elements;this.multiplyMatrices(a,b);c[0]=d[0];c[1]=d[1];c[2]=d[2];c[3]=d[3];c[4]=d[4];c[5]=d[5];c[6]=d[6];c[7]=d[7];c[8]=d[8];c[9]=d[9];c[10]=d[10];c[11]=d[11];c[12]=d[12];c[13]=d[13];c[14]=d[14];c[15]=d[15];return this},multiplyScalar:function(a){var b=this.elements;b[0]*=a;b[4]*=a;b[8]*=a;b[12]*=a;b[1]*=a;b[5]*=a;b[9]*=
 a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.");return a.applyProjection(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector3Array:function(a){console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");
 a;b[13]*=a;b[2]*=a;b[6]*=a;b[10]*=a;b[14]*=a;b[3]*=a;b[7]*=a;b[11]*=a;b[15]*=a;return this},multiplyVector3:function(a){console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) or vector.applyProjection( matrix ) instead.");return a.applyProjection(this)},multiplyVector4:function(a){console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},multiplyVector3Array:function(a){console.warn("THREE.Matrix4: .multiplyVector3Array() has been renamed. Use matrix.applyToVector3Array( array ) instead.");
 return this.applyToVector3Array(a)},applyToVector3Array:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length);for(var e=0;e<d;e+=3,c+=3)a.fromArray(b,c),a.applyMatrix4(this),a.toArray(b,c);return b}}(),applyToBuffer:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length/b.itemSize);for(var e=0;e<d;e++,c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(a.x,
 return this.applyToVector3Array(a)},applyToVector3Array:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length);for(var e=0;e<d;e+=3,c+=3)a.fromArray(b,c),a.applyMatrix4(this),a.toArray(b,c);return b}}(),applyToBuffer:function(){var a;return function(b,c,d){void 0===a&&(a=new THREE.Vector3);void 0===c&&(c=0);void 0===d&&(d=b.length/b.itemSize);for(var e=0;e<d;e++,c++)a.x=b.getX(c),a.y=b.getY(c),a.z=b.getZ(c),a.applyMatrix4(this),b.setXYZ(a.x,
 a.y,a.z);return b}}(),rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],g=a[1],f=a[5],h=a[9],k=a[13],l=a[2],n=a[6],p=a[10],m=a[14];return a[3]*(+e*h*n-d*k*
 a.y,a.z);return b}}(),rotateAxis:function(a){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.");a.transformDirection(this)},crossVector:function(a){console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.");return a.applyMatrix4(this)},determinant:function(){var a=this.elements,b=a[0],c=a[4],d=a[8],e=a[12],g=a[1],f=a[5],h=a[9],k=a[13],l=a[2],n=a[6],p=a[10],m=a[14];return a[3]*(+e*h*n-d*k*
@@ -211,9 +211,9 @@ a.normalize();e.normal.copy(a)}},computeVertexNormals:function(a){var b,c,d;d=Ar
 d[c.b].add(c.normal),d[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone())},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),
 d[c.b].add(c.normal),d[c.c].add(c.normal);b=0;for(c=this.vertices.length;b<c;b++)d[b].normalize();a=0;for(b=this.faces.length;a<b;a++)c=this.faces[a],e=c.vertexNormals,3===e.length?(e[0].copy(d[c.a]),e[1].copy(d[c.b]),e[2].copy(d[c.c])):(e[0]=d[c.a].clone(),e[1]=d[c.b].clone(),e[2]=d[c.c].clone())},computeMorphNormals:function(){var a,b,c,d,e;c=0;for(d=this.faces.length;c<d;c++)for(e=this.faces[c],e.__originalFaceNormal?e.__originalFaceNormal.copy(e.normal):e.__originalFaceNormal=e.normal.clone(),
 e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone();var g=new THREE.Geometry;g.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var f=this.morphNormals[a].vertexNormals,
 e.__originalVertexNormals||(e.__originalVertexNormals=[]),a=0,b=e.vertexNormals.length;a<b;a++)e.__originalVertexNormals[a]?e.__originalVertexNormals[a].copy(e.vertexNormals[a]):e.__originalVertexNormals[a]=e.vertexNormals[a].clone();var g=new THREE.Geometry;g.faces=this.faces;a=0;for(b=this.morphTargets.length;a<b;a++){if(!this.morphNormals[a]){this.morphNormals[a]={};this.morphNormals[a].faceNormals=[];this.morphNormals[a].vertexNormals=[];e=this.morphNormals[a].faceNormals;var f=this.morphNormals[a].vertexNormals,
 h,k;c=0;for(d=this.faces.length;c<d;c++)h=new THREE.Vector3,k={a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3},e.push(h),f.push(k)}f=this.morphNormals[a];g.vertices=this.morphTargets[a].vertices;g.computeFaceNormals();g.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],h=f.faceNormals[c],k=f.vertexNormals[c],h.copy(e.normal),k.a.copy(e.vertexNormals[0]),k.b.copy(e.vertexNormals[1]),k.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],
 h,k;c=0;for(d=this.faces.length;c<d;c++)h=new THREE.Vector3,k={a:new THREE.Vector3,b:new THREE.Vector3,c:new THREE.Vector3},e.push(h),f.push(k)}f=this.morphNormals[a];g.vertices=this.morphTargets[a].vertices;g.computeFaceNormals();g.computeVertexNormals();c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],h=f.faceNormals[c],k=f.vertexNormals[c],h.copy(e.normal),k.a.copy(e.vertexNormals[0]),k.b.copy(e.vertexNormals[1]),k.c.copy(e.vertexNormals[2])}c=0;for(d=this.faces.length;c<d;c++)e=this.faces[c],
-e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeTangents:function(){var a,b,c,d,e,g,f,h,k,l,n,p,m,q,s,r,u,x=[],v=[];c=new THREE.Vector3;var y=new THREE.Vector3,w=new THREE.Vector3,E=new THREE.Vector3,F=new THREE.Vector3;a=0;for(b=this.vertices.length;a<b;a++)x[a]=new THREE.Vector3,v[a]=new THREE.Vector3;a=0;for(b=this.faces.length;a<b;a++)e=this.faces[a],g=this.faceVertexUvs[0][a],d=e.a,u=e.b,e=e.c,f=this.vertices[d],h=this.vertices[u],k=this.vertices[e],l=g[0],n=
-g[1],p=g[2],g=h.x-f.x,m=k.x-f.x,q=h.y-f.y,s=k.y-f.y,h=h.z-f.z,f=k.z-f.z,k=n.x-l.x,r=p.x-l.x,n=n.y-l.y,l=p.y-l.y,p=1/(k*l-r*n),c.set((l*g-n*m)*p,(l*q-n*s)*p,(l*h-n*f)*p),y.set((k*m-r*g)*p,(k*s-r*q)*p,(k*f-r*h)*p),x[d].add(c),x[u].add(c),x[e].add(c),v[d].add(y),v[u].add(y),v[e].add(y);y=["a","b","c","d"];a=0;for(b=this.faces.length;a<b;a++)for(e=this.faces[a],c=0;c<Math.min(e.vertexNormals.length,3);c++)F.copy(e.vertexNormals[c]),d=e[y[c]],u=x[d],w.copy(u),w.sub(F.multiplyScalar(F.dot(u))).normalize(),
-E.crossVectors(e.vertexNormals[c],u),d=E.dot(v[d]),d=0>d?-1:1,e.vertexTangents[c]=new THREE.Vector4(w.x,w.y,w.z,d);this.hasTangents=!0},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);
+e.normal=e.__originalFaceNormal,e.vertexNormals=e.__originalVertexNormals},computeTangents:function(){var a,b,c,d,e,g,f,h,k,l,n,p,m,q,s,r,u,x=[],v=[];c=new THREE.Vector3;var y=new THREE.Vector3,w=new THREE.Vector3,A=new THREE.Vector3,E=new THREE.Vector3;a=0;for(b=this.vertices.length;a<b;a++)x[a]=new THREE.Vector3,v[a]=new THREE.Vector3;a=0;for(b=this.faces.length;a<b;a++)e=this.faces[a],g=this.faceVertexUvs[0][a],d=e.a,u=e.b,e=e.c,f=this.vertices[d],h=this.vertices[u],k=this.vertices[e],l=g[0],n=
+g[1],p=g[2],g=h.x-f.x,m=k.x-f.x,q=h.y-f.y,s=k.y-f.y,h=h.z-f.z,f=k.z-f.z,k=n.x-l.x,r=p.x-l.x,n=n.y-l.y,l=p.y-l.y,p=1/(k*l-r*n),c.set((l*g-n*m)*p,(l*q-n*s)*p,(l*h-n*f)*p),y.set((k*m-r*g)*p,(k*s-r*q)*p,(k*f-r*h)*p),x[d].add(c),x[u].add(c),x[e].add(c),v[d].add(y),v[u].add(y),v[e].add(y);y=["a","b","c","d"];a=0;for(b=this.faces.length;a<b;a++)for(e=this.faces[a],c=0;c<Math.min(e.vertexNormals.length,3);c++)E.copy(e.vertexNormals[c]),d=e[y[c]],u=x[d],w.copy(u),w.sub(E.multiplyScalar(E.dot(u))).normalize(),
+A.crossVectors(e.vertexNormals[c],u),d=A.dot(v[d]),d=0>d?-1:1,e.vertexTangents[c]=new THREE.Vector4(w.x,w.y,w.z,d);this.hasTangents=!0},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;c<d;c++)0<c&&(a+=b[c].distanceTo(b[c-1])),this.lineDistances[c]=a},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);
 this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(!1===a instanceof THREE.Geometry)console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a);else{var d,e=this.vertices.length,g=this.vertices,f=a.vertices,h=this.faces,k=a.faces,l=this.faceVertexUvs[0];a=a.faceVertexUvs[0];void 0===c&&(c=0);void 0!==b&&(d=(new THREE.Matrix3).getNormalMatrix(b));for(var n=0,p=f.length;n<p;n++){var m=f[n].clone();void 0!==b&&m.applyMatrix4(b);g.push(m)}n=0;for(p=k.length;n<
 this.boundingSphere.setFromPoints(this.vertices)},merge:function(a,b,c){if(!1===a instanceof THREE.Geometry)console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",a);else{var d,e=this.vertices.length,g=this.vertices,f=a.vertices,h=this.faces,k=a.faces,l=this.faceVertexUvs[0];a=a.faceVertexUvs[0];void 0===c&&(c=0);void 0!==b&&(d=(new THREE.Matrix3).getNormalMatrix(b));for(var n=0,p=f.length;n<p;n++){var m=f[n].clone();void 0!==b&&m.applyMatrix4(b);g.push(m)}n=0;for(p=k.length;n<
 p;n++){var f=k[n],q,s=f.vertexNormals,r=f.vertexColors,m=new THREE.Face3(f.a+e,f.b+e,f.c+e);m.normal.copy(f.normal);void 0!==d&&m.normal.applyMatrix3(d).normalize();b=0;for(g=s.length;b<g;b++)q=s[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),m.vertexNormals.push(q);m.color.copy(f.color);b=0;for(g=r.length;b<g;b++)q=r[b],m.vertexColors.push(q.clone());m.materialIndex=f.materialIndex+c;h.push(m)}n=0;for(p=a.length;n<p;n++)if(c=a[n],d=[],void 0!==c){b=0;for(g=c.length;b<g;b++)d.push(c[b].clone());
 p;n++){var f=k[n],q,s=f.vertexNormals,r=f.vertexColors,m=new THREE.Face3(f.a+e,f.b+e,f.c+e);m.normal.copy(f.normal);void 0!==d&&m.normal.applyMatrix3(d).normalize();b=0;for(g=s.length;b<g;b++)q=s[b].clone(),void 0!==d&&q.applyMatrix3(d).normalize(),m.vertexNormals.push(q);m.color.copy(f.color);b=0;for(g=r.length;b<g;b++)q=r[b],m.vertexColors.push(q.clone());m.materialIndex=f.materialIndex+c;h.push(m)}n=0;for(p=a.length;n<p;n++)if(c=a[n],d=[],void 0!==c){b=0;for(g=c.length;b<g;b++)d.push(c[b].clone());
 l.push(d)}}},mergeMesh:function(a){!1===a instanceof THREE.Mesh?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),g,f;g=0;for(f=this.vertices.length;g<f;g++)d=this.vertices[g],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=g,b.push(this.vertices[g]),c[g]=b.length-1):c[g]=c[a[d]];a=[];g=0;for(f=this.faces.length;g<
 l.push(d)}}},mergeMesh:function(a){!1===a instanceof THREE.Mesh?console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",a):(a.matrixAutoUpdate&&a.updateMatrix(),this.merge(a.geometry,a.matrix))},mergeVertices:function(){var a={},b=[],c=[],d,e=Math.pow(10,4),g,f;g=0;for(f=this.vertices.length;g<f;g++)d=this.vertices[g],d=Math.round(d.x*e)+"_"+Math.round(d.y*e)+"_"+Math.round(d.z*e),void 0===a[d]?(a[d]=g,b.push(this.vertices[g]),c[g]=b.length-1):c[g]=c[a[d]];a=[];g=0;for(f=this.faces.length;g<
@@ -247,17 +247,17 @@ new THREE.Box3);var b=this.attributes.position.array;if(b){var c=this.boundingBo
 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.',
 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.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(d.length),3));else for(var e=b.normal.array,g=0,f=e.length;g<f;g++)e[g]=0;var e=b.normal.array,h,k,l,n=new THREE.Vector3,p=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector3;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);
 this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=this.index,b=this.attributes,c=this.groups;if(b.position){var d=b.position.array;if(void 0===b.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(d.length),3));else for(var e=b.normal.array,g=0,f=e.length;g<f;g++)e[g]=0;var e=b.normal.array,h,k,l,n=new THREE.Vector3,p=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector3;if(a){a=a.array;0===c.length&&this.addGroup(0,a.length);
 for(var r=0,u=c.length;r<u;++r)for(g=c[r],f=g.start,h=g.count,g=f,f+=h;g<f;g+=3)h=3*a[g+0],k=3*a[g+1],l=3*a[g+2],n.fromArray(d,h),p.fromArray(d,k),m.fromArray(d,l),q.subVectors(m,p),s.subVectors(n,p),q.cross(s),e[h]+=q.x,e[h+1]+=q.y,e[h+2]+=q.z,e[k]+=q.x,e[k+1]+=q.y,e[k+2]+=q.z,e[l]+=q.x,e[l+1]+=q.y,e[l+2]+=q.z}else for(g=0,f=d.length;g<f;g+=9)n.fromArray(d,g),p.fromArray(d,g+3),m.fromArray(d,g+6),q.subVectors(m,p),s.subVectors(n,p),q.cross(s),e[g]=q.x,e[g+1]=q.y,e[g+2]=q.z,e[g+3]=q.x,e[g+4]=q.y,
 for(var r=0,u=c.length;r<u;++r)for(g=c[r],f=g.start,h=g.count,g=f,f+=h;g<f;g+=3)h=3*a[g+0],k=3*a[g+1],l=3*a[g+2],n.fromArray(d,h),p.fromArray(d,k),m.fromArray(d,l),q.subVectors(m,p),s.subVectors(n,p),q.cross(s),e[h]+=q.x,e[h+1]+=q.y,e[h+2]+=q.z,e[k]+=q.x,e[k+1]+=q.y,e[k+2]+=q.z,e[l]+=q.x,e[l+1]+=q.y,e[l+2]+=q.z}else for(g=0,f=d.length;g<f;g+=9)n.fromArray(d,g),p.fromArray(d,g+3),m.fromArray(d,g+6),q.subVectors(m,p),s.subVectors(n,p),q.cross(s),e[g]=q.x,e[g+1]=q.y,e[g+2]=q.z,e[g+3]=q.x,e[g+4]=q.y,
-e[g+5]=q.z,e[g+6]=q.x,e[g+7]=q.y,e[g+8]=q.z;this.normalizeNormals();b.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);s.fromArray(g,2*a);r.fromArray(g,2*b);u.fromArray(g,2*c);x=m.x-p.x;v=q.x-p.x;y=m.y-p.y;w=q.y-p.y;E=m.z-p.z;F=q.z-p.z;z=r.x-s.x;B=u.x-s.x;K=r.y-s.y;L=u.y-s.y;C=1/(z*L-B*K);M.set((L*x-K*v)*C,(L*y-K*w)*C,(L*E-K*F)*C);I.set((z*v-B*x)*C,(z*w-B*y)*C,(z*F-B*E)*C);k[a].add(M);k[b].add(M);k[c].add(M);l[a].add(I);
-l[b].add(I);l[c].add(I)}function b(a){G.fromArray(e,3*a);ha.copy(G);ia=k[a];Q.copy(ia);Q.sub(G.multiplyScalar(G.dot(ia))).normalize();S.crossVectors(ha,ia);qa=S.dot(l[a]);X=0>qa?-1:1;h[4*a]=Q.x;h[4*a+1]=Q.y;h[4*a+2]=Q.z;h[4*a+3]=X}if(void 0===this.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=this.index.array,
-d=this.attributes.position.array,e=this.attributes.normal.array,g=this.attributes.uv.array,f=d.length/3;void 0===this.attributes.tangent&&this.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*f),4));for(var h=this.attributes.tangent.array,k=[],l=[],n=0;n<f;n++)k[n]=new THREE.Vector3,l[n]=new THREE.Vector3;var p=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector2,r=new THREE.Vector2,u=new THREE.Vector2,x,v,y,w,E,F,z,B,K,L,C,M=new THREE.Vector3,I=new THREE.Vector3,
-D,A,H,O,R;0===this.groups.length&&this.addGroup(0,c.length);for(var T=this.groups,f=0,n=T.length;f<n;++f)for(D=T[f],A=D.start,H=D.count,D=A,A+=H;D<A;D+=3)H=c[D+0],O=c[D+1],R=c[D+2],a(H,O,R);for(var Q=new THREE.Vector3,S=new THREE.Vector3,G=new THREE.Vector3,ha=new THREE.Vector3,X,ia,qa,f=0,n=T.length;f<n;++f)for(D=T[f],A=D.start,H=D.count,D=A,A+=H;D<A;D+=3)H=c[D+0],O=c[D+1],R=c[D+2],b(H),b(O),b(R)}},computeOffsets:function(a){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},
-merge:function(a,b){if(!1===a instanceof THREE.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,g=a.attributes[d],f=g.array,h=0,g=g.itemSize*b;h<f.length;h++,g++)e[g]=f[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,g=a.length;e<g;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+
-d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);
-a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));c=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),radius:c.radius});return a},clone:function(){return(new this.constructor).copy(this)},copy:function(a){var b=a.index;null!==b&&this.addIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];
-this.addGroup(d.start,d.count)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);THREE.BufferGeometry.MaxIndex=65535;THREE.InstancedBufferGeometry=function(){THREE.BufferGeometry.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0};THREE.InstancedBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.InstancedBufferGeometry.prototype.constructor=THREE.InstancedBufferGeometry;
-THREE.InstancedBufferGeometry.prototype.addGroup=function(a,b,c){this.groups.push({start:a,count:b,instances:c})};THREE.InstancedBufferGeometry.prototype.copy=function(a){var b=a.index;null!==b&&this.addIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count,d.instances)}return this};THREE.EventDispatcher.prototype.apply(THREE.InstancedBufferGeometry.prototype);
-THREE.Camera=function(){THREE.Object3D.call(this);this.type="Camera";this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4};THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.getWorldDirection=function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Vector3;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();
-THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.Camera.prototype.clone=function(){return(new this.constructor).copy(this)};THREE.Camera.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};
+e[g+5]=q.z,e[g+6]=q.x,e[g+7]=q.y,e[g+8]=q.z;this.normalizeNormals();b.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){p.fromArray(e,3*a);m.fromArray(e,3*b);q.fromArray(e,3*c);s.fromArray(f,2*a);r.fromArray(f,2*b);u.fromArray(f,2*c);var d=m.x-p.x,g=q.x-p.x,h=m.y-p.y,k=q.y-p.y,w=m.z-p.z,y=q.z-p.z,H=r.x-s.x,z=u.x-s.x,E=r.y-s.y,A=u.y-s.y,B=1/(H*A-z*E);x.set((A*d-E*g)*B,(A*h-E*k)*B,(A*w-E*y)*B);v.set((H*g-z*d)*B,(H*k-z*h)*B,(H*y-z*w)*B);l[a].add(x);l[b].add(x);l[c].add(x);n[a].add(v);
+n[b].add(v);n[c].add(v)}function b(a){H.fromArray(g,3*a);N.copy(H);L=l[a];z.copy(L);z.sub(H.multiplyScalar(H.dot(L))).normalize();C.crossVectors(N,L);G=C.dot(n[a]);B=0>G?-1:1;k[4*a]=z.x;k[4*a+1]=z.y;k[4*a+2]=z.z;k[4*a+3]=B}var c=this.index,d=this.attributes;if(void 0===c||void 0===d.position||void 0===d.normal||void 0===d.uv)console.warn("THREE.BufferGeometry: Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=c.array,e=d.position.array,g=
+d.normal.array,f=d.uv.array,h=e.length/3;void 0===d.tangent&&this.addAttribute("tangent",new THREE.BufferAttribute(new Float32Array(4*h),4));for(var k=d.tangent.array,l=[],n=[],d=0;d<h;d++)l[d]=new THREE.Vector3,n[d]=new THREE.Vector3;var p=new THREE.Vector3,m=new THREE.Vector3,q=new THREE.Vector3,s=new THREE.Vector2,r=new THREE.Vector2,u=new THREE.Vector2,x=new THREE.Vector3,v=new THREE.Vector3,d=this.groups;0===d.length&&(d=[{start:0,count:c.length}]);for(var h=0,y=d.length;h<y;++h)for(var w=d[h],
+A=w.start,E=w.count,w=A,A=A+E;w<A;w+=3)a(c[w+0],c[w+1],c[w+2]);for(var z=new THREE.Vector3,C=new THREE.Vector3,H=new THREE.Vector3,N=new THREE.Vector3,B,L,G,h=0,y=d.length;h<y;++h)for(w=d[h],A=w.start,E=w.count,w=A,A+=E;w<A;w+=3)b(c[w+0]),b(c[w+1]),b(c[w+2])}},computeOffsets:function(a){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},merge:function(a,b){if(!1===a instanceof THREE.BufferGeometry)console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",
+a);else{void 0===b&&(b=0);var c=this.attributes,d;for(d in c)if(void 0!==a.attributes[d])for(var e=c[d].array,g=a.attributes[d],f=g.array,h=0,g=g.itemSize*b;h<f.length;h++,g++)e[g]=f[h];return this}},normalizeNormals:function(){for(var a=this.attributes.normal.array,b,c,d,e=0,g=a.length;e<g;e+=3)b=a[e],c=a[e+1],d=a[e+2],b=1/Math.sqrt(b*b+c*c+d*d),a[e]*=b,a[e+1]*=b,a[e+2]*=b},toJSON:function(){var a={metadata:{version:4.4,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};a.uuid=this.uuid;a.type=
+this.type;""!==this.name&&(a.name=this.name);if(void 0!==this.parameters){var b=this.parameters,c;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a}a.data={attributes:{}};var d=this.index;null!==d&&(b=Array.prototype.slice.call(d.array),a.data.index={type:d.array.constructor.name,array:b});d=this.attributes;for(c in d){var e=d[c],b=Array.prototype.slice.call(e.array);a.data.attributes[c]={itemSize:e.itemSize,type:e.array.constructor.name,array:b}}c=this.groups;0<c.length&&(a.data.groups=JSON.parse(JSON.stringify(c)));
+c=this.boundingSphere;null!==c&&(a.data.boundingSphere={center:c.center.toArray(),radius:c.radius});return a},clone:function(){return(new this.constructor).copy(this)},copy:function(a){var b=a.index;null!==b&&this.addIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count)}return this},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.EventDispatcher.prototype.apply(THREE.BufferGeometry.prototype);
+THREE.BufferGeometry.MaxIndex=65535;THREE.InstancedBufferGeometry=function(){THREE.BufferGeometry.call(this);this.type="InstancedBufferGeometry";this.maxInstancedCount=void 0};THREE.InstancedBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.InstancedBufferGeometry.prototype.constructor=THREE.InstancedBufferGeometry;THREE.InstancedBufferGeometry.prototype.addGroup=function(a,b,c){this.groups.push({start:a,count:b,instances:c})};
+THREE.InstancedBufferGeometry.prototype.copy=function(a){var b=a.index;null!==b&&this.addIndex(b.clone());var b=a.attributes,c;for(c in b)this.addAttribute(c,b[c].clone());a=a.groups;c=0;for(b=a.length;c<b;c++){var d=a[c];this.addGroup(d.start,d.count,d.instances)}return this};THREE.EventDispatcher.prototype.apply(THREE.InstancedBufferGeometry.prototype);THREE.Camera=function(){THREE.Object3D.call(this);this.type="Camera";this.matrixWorldInverse=new THREE.Matrix4;this.projectionMatrix=new THREE.Matrix4};
+THREE.Camera.prototype=Object.create(THREE.Object3D.prototype);THREE.Camera.prototype.constructor=THREE.Camera;THREE.Camera.prototype.getWorldDirection=function(){var a=new THREE.Quaternion;return function(b){b=b||new THREE.Vector3;this.getWorldQuaternion(a);return b.set(0,0,-1).applyQuaternion(a)}}();THREE.Camera.prototype.lookAt=function(){var a=new THREE.Matrix4;return function(b){a.lookAt(this.position,b,this.up);this.quaternion.setFromRotationMatrix(a)}}();THREE.Camera.prototype.clone=function(){return(new this.constructor).copy(this)};
+THREE.Camera.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.matrixWorldInverse.copy(a.matrixWorldInverse);this.projectionMatrix.copy(a.projectionMatrix);return this};
 THREE.CubeCamera=function(a,b,c){THREE.Object3D.call(this);this.type="CubeCamera";var d=new THREE.PerspectiveCamera(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new THREE.Vector3(1,0,0));this.add(d);var e=new THREE.PerspectiveCamera(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new THREE.Vector3(-1,0,0));this.add(e);var g=new THREE.PerspectiveCamera(90,1,a,b);g.up.set(0,0,1);g.lookAt(new THREE.Vector3(0,1,0));this.add(g);var f=new THREE.PerspectiveCamera(90,1,a,b);f.up.set(0,0,-1);f.lookAt(new THREE.Vector3(0,-1,0));
 THREE.CubeCamera=function(a,b,c){THREE.Object3D.call(this);this.type="CubeCamera";var d=new THREE.PerspectiveCamera(90,1,a,b);d.up.set(0,-1,0);d.lookAt(new THREE.Vector3(1,0,0));this.add(d);var e=new THREE.PerspectiveCamera(90,1,a,b);e.up.set(0,-1,0);e.lookAt(new THREE.Vector3(-1,0,0));this.add(e);var g=new THREE.PerspectiveCamera(90,1,a,b);g.up.set(0,0,1);g.lookAt(new THREE.Vector3(0,1,0));this.add(g);var f=new THREE.PerspectiveCamera(90,1,a,b);f.up.set(0,0,-1);f.lookAt(new THREE.Vector3(0,-1,0));
 this.add(f);var h=new THREE.PerspectiveCamera(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new THREE.Vector3(0,0,1));this.add(h);var k=new THREE.PerspectiveCamera(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new THREE.Vector3(0,0,-1));this.add(k);this.renderTarget=new THREE.WebGLRenderTargetCube(c,c,{format:THREE.RGBFormat,magFilter:THREE.LinearFilter,minFilter:THREE.LinearFilter});this.updateCubeMap=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.generateMipmaps;c.generateMipmaps=
 this.add(f);var h=new THREE.PerspectiveCamera(90,1,a,b);h.up.set(0,-1,0);h.lookAt(new THREE.Vector3(0,0,1));this.add(h);var k=new THREE.PerspectiveCamera(90,1,a,b);k.up.set(0,-1,0);k.lookAt(new THREE.Vector3(0,0,-1));this.add(k);this.renderTarget=new THREE.WebGLRenderTargetCube(c,c,{format:THREE.RGBFormat,magFilter:THREE.LinearFilter,minFilter:THREE.LinearFilter});this.updateCubeMap=function(a,b){null===this.parent&&this.updateMatrixWorld();var c=this.renderTarget,m=c.generateMipmaps;c.generateMipmaps=
 !1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,g,c);c.activeCubeFace=3;a.render(b,f,c);c.activeCubeFace=4;a.render(b,h,c);c.generateMipmaps=m;c.activeCubeFace=5;a.render(b,k,c);a.setRenderTarget(null)}};THREE.CubeCamera.prototype=Object.create(THREE.Object3D.prototype);THREE.CubeCamera.prototype.constructor=THREE.CubeCamera;
 !1;c.activeCubeFace=0;a.render(b,d,c);c.activeCubeFace=1;a.render(b,e,c);c.activeCubeFace=2;a.render(b,g,c);c.activeCubeFace=3;a.render(b,f,c);c.activeCubeFace=4;a.render(b,h,c);c.generateMipmaps=m;c.activeCubeFace=5;a.render(b,k,c);a.setRenderTarget(null)}};THREE.CubeCamera.prototype=Object.create(THREE.Object3D.prototype);THREE.CubeCamera.prototype.constructor=THREE.CubeCamera;
@@ -296,10 +296,10 @@ this.crossOrigin);void 0!==this.responseType&&(f.responseType=this.responseType)
 THREE.ImageLoader.prototype={constructor:THREE.ImageLoader,load:function(a,b,c,d){var e=this,g=THREE.Cache.get(a);if(void 0!==g)return b&&setTimeout(function(){b(g)},0),g;var f=document.createElement("img");f.addEventListener("load",function(c){THREE.Cache.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);void 0!==c&&f.addEventListener("progress",function(a){c(a)},!1);f.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.crossOrigin&&(f.crossOrigin=this.crossOrigin);
 THREE.ImageLoader.prototype={constructor:THREE.ImageLoader,load:function(a,b,c,d){var e=this,g=THREE.Cache.get(a);if(void 0!==g)return b&&setTimeout(function(){b(g)},0),g;var f=document.createElement("img");f.addEventListener("load",function(c){THREE.Cache.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);void 0!==c&&f.addEventListener("progress",function(a){c(a)},!1);f.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.crossOrigin&&(f.crossOrigin=this.crossOrigin);
 e.manager.itemStart(a);f.src=a;return f},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.JSONLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.withCredentials=!1};
 e.manager.itemStart(a);f.src=a;return f},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.JSONLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.withCredentials=!1};
 THREE.JSONLoader.prototype={constructor:THREE.JSONLoader,load:function(a,b,c,d){var e=this,g=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:THREE.Loader.prototype.extractUrlBase(a);c=new THREE.XHRLoader(this.manager);c.setCrossOrigin(this.crossOrigin);c.setWithCredentials(this.withCredentials);c.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d){if("object"===d.type){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===
 THREE.JSONLoader.prototype={constructor:THREE.JSONLoader,load:function(a,b,c,d){var e=this,g=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:THREE.Loader.prototype.extractUrlBase(a);c=new THREE.XHRLoader(this.manager);c.setCrossOrigin(this.crossOrigin);c.setWithCredentials(this.withCredentials);c.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d){if("object"===d.type){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===
-d.type){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,g);b(c.geometry,c.materials)})},setCrossOrigin:function(a){this.crossOrigin=a},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new THREE.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,f,h,k,l,n,p,m,q,s,r,u,x,v=a.faces;n=a.vertices;var y=a.normals,w=a.colors,E=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&E++;for(d=0;d<E;d++)c.faceVertexUvs[d]=
-[]}k=0;for(l=n.length;k<l;)d=new THREE.Vector3,d.x=n[k++]*b,d.y=n[k++]*b,d.z=n[k++]*b,c.vertices.push(d);k=0;for(l=v.length;k<l;)if(b=v[k++],q=b&1,h=b&2,d=b&8,p=b&16,s=b&32,n=b&64,b&=128,q){q=new THREE.Face3;q.a=v[k];q.b=v[k+1];q.c=v[k+3];r=new THREE.Face3;r.a=v[k+1];r.b=v[k+2];r.c=v[k+3];k+=4;h&&(h=v[k++],q.materialIndex=h,r.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<E;d++)for(u=a.uvs[d],c.faceVertexUvs[d][h]=[],c.faceVertexUvs[d][h+1]=[],f=0;4>f;f++)m=v[k++],x=u[2*m],m=u[2*m+1],x=new THREE.Vector2(x,
+d.type){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,g);b(c.geometry,c.materials)})},setCrossOrigin:function(a){this.crossOrigin=a},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new THREE.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,f,h,k,l,n,p,m,q,s,r,u,x,v=a.faces;n=a.vertices;var y=a.normals,w=a.colors,A=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&A++;for(d=0;d<A;d++)c.faceVertexUvs[d]=
+[]}k=0;for(l=n.length;k<l;)d=new THREE.Vector3,d.x=n[k++]*b,d.y=n[k++]*b,d.z=n[k++]*b,c.vertices.push(d);k=0;for(l=v.length;k<l;)if(b=v[k++],q=b&1,h=b&2,d=b&8,p=b&16,s=b&32,n=b&64,b&=128,q){q=new THREE.Face3;q.a=v[k];q.b=v[k+1];q.c=v[k+3];r=new THREE.Face3;r.a=v[k+1];r.b=v[k+2];r.c=v[k+3];k+=4;h&&(h=v[k++],q.materialIndex=h,r.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<A;d++)for(u=a.uvs[d],c.faceVertexUvs[d][h]=[],c.faceVertexUvs[d][h+1]=[],f=0;4>f;f++)m=v[k++],x=u[2*m],m=u[2*m+1],x=new THREE.Vector2(x,
 m),2!==f&&c.faceVertexUvs[d][h].push(x),0!==f&&c.faceVertexUvs[d][h+1].push(x);p&&(p=3*v[k++],q.normal.set(y[p++],y[p++],y[p]),r.normal.copy(q.normal));if(s)for(d=0;4>d;d++)p=3*v[k++],s=new THREE.Vector3(y[p++],y[p++],y[p]),2!==d&&q.vertexNormals.push(s),0!==d&&r.vertexNormals.push(s);n&&(n=v[k++],n=w[n],q.color.setHex(n),r.color.setHex(n));if(b)for(d=0;4>d;d++)n=v[k++],n=w[n],2!==d&&q.vertexColors.push(new THREE.Color(n)),0!==d&&r.vertexColors.push(new THREE.Color(n));c.faces.push(q);c.faces.push(r)}else{q=
 m),2!==f&&c.faceVertexUvs[d][h].push(x),0!==f&&c.faceVertexUvs[d][h+1].push(x);p&&(p=3*v[k++],q.normal.set(y[p++],y[p++],y[p]),r.normal.copy(q.normal));if(s)for(d=0;4>d;d++)p=3*v[k++],s=new THREE.Vector3(y[p++],y[p++],y[p]),2!==d&&q.vertexNormals.push(s),0!==d&&r.vertexNormals.push(s);n&&(n=v[k++],n=w[n],q.color.setHex(n),r.color.setHex(n));if(b)for(d=0;4>d;d++)n=v[k++],n=w[n],2!==d&&q.vertexColors.push(new THREE.Color(n)),0!==d&&r.vertexColors.push(new THREE.Color(n));c.faces.push(q);c.faces.push(r)}else{q=
-new THREE.Face3;q.a=v[k++];q.b=v[k++];q.c=v[k++];h&&(h=v[k++],q.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<E;d++)for(u=a.uvs[d],c.faceVertexUvs[d][h]=[],f=0;3>f;f++)m=v[k++],x=u[2*m],m=u[2*m+1],x=new THREE.Vector2(x,m),c.faceVertexUvs[d][h].push(x);p&&(p=3*v[k++],q.normal.set(y[p++],y[p++],y[p]));if(s)for(d=0;3>d;d++)p=3*v[k++],s=new THREE.Vector3(y[p++],y[p++],y[p]),q.vertexNormals.push(s);n&&(n=v[k++],q.color.setHex(w[n]));if(b)for(d=0;3>d;d++)n=v[k++],q.vertexColors.push(new THREE.Color(w[n]));
+new THREE.Face3;q.a=v[k++];q.b=v[k++];q.c=v[k++];h&&(h=v[k++],q.materialIndex=h);h=c.faces.length;if(d)for(d=0;d<A;d++)for(u=a.uvs[d],c.faceVertexUvs[d][h]=[],f=0;3>f;f++)m=v[k++],x=u[2*m],m=u[2*m+1],x=new THREE.Vector2(x,m),c.faceVertexUvs[d][h].push(x);p&&(p=3*v[k++],q.normal.set(y[p++],y[p++],y[p]));if(s)for(d=0;3>d;d++)p=3*v[k++],s=new THREE.Vector3(y[p++],y[p++],y[p]),q.vertexNormals.push(s);n&&(n=v[k++],q.color.setHex(w[n]));if(b)for(d=0;3>d;d++)n=v[k++],q.vertexColors.push(new THREE.Color(w[n]));
 c.faces.push(q)}})(d);(function(){var b=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,f=a.skinWeights.length;d<f;d+=b)c.skinWeights.push(new THREE.Vector4(a.skinWeights[d],1<b?a.skinWeights[d+1]:0,2<b?a.skinWeights[d+2]:0,3<b?a.skinWeights[d+3]:0));if(a.skinIndices)for(d=0,f=a.skinIndices.length;d<f;d+=b)c.skinIndices.push(new THREE.Vector4(a.skinIndices[d],1<b?a.skinIndices[d+1]:0,2<b?a.skinIndices[d+2]:0,3<b?a.skinIndices[d+3]:0));c.bones=a.bones;c.bones&&0<
 c.faces.push(q)}})(d);(function(){var b=void 0!==a.influencesPerVertex?a.influencesPerVertex:2;if(a.skinWeights)for(var d=0,f=a.skinWeights.length;d<f;d+=b)c.skinWeights.push(new THREE.Vector4(a.skinWeights[d],1<b?a.skinWeights[d+1]:0,2<b?a.skinWeights[d+2]:0,3<b?a.skinWeights[d+3]:0));if(a.skinIndices)for(d=0,f=a.skinIndices.length;d<f;d+=b)c.skinIndices.push(new THREE.Vector4(a.skinIndices[d],1<b?a.skinIndices[d+1]:0,2<b?a.skinIndices[d+2]:0,3<b?a.skinIndices[d+3]:0));c.bones=a.bones;c.bones&&0<
 c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.");c.animation=a.animation;c.animations=a.animations})();(function(b){if(void 0!==a.morphTargets){var d,f,h,k,l,n;d=0;for(f=a.morphTargets.length;d<f;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=a.morphTargets[d].name,c.morphTargets[d].vertices=
 c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.");c.animation=a.animation;c.animations=a.animations})();(function(b){if(void 0!==a.morphTargets){var d,f,h,k,l,n;d=0;for(f=a.morphTargets.length;d<f;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=a.morphTargets[d].name,c.morphTargets[d].vertices=
 [],l=c.morphTargets[d].vertices,n=a.morphTargets[d].vertices,h=0,k=n.length;h<k;h+=3){var p=new THREE.Vector3;p.x=n[h]*b;p.y=n[h+1]*b;p.z=n[h+2]*b;l.push(p)}}if(void 0!==a.morphColors)for(d=0,f=a.morphColors.length;d<f;d++)for(c.morphColors[d]={},c.morphColors[d].name=a.morphColors[d].name,c.morphColors[d].colors=[],k=c.morphColors[d].colors,l=a.morphColors[d].colors,b=0,h=l.length;b<h;b+=3)n=new THREE.Color(16755200),n.setRGB(l[b],l[b+1],l[b+2]),k.push(n)})(d);c.computeFaceNormals();c.computeBoundingSphere();
 [],l=c.morphTargets[d].vertices,n=a.morphTargets[d].vertices,h=0,k=n.length;h<k;h+=3){var p=new THREE.Vector3;p.x=n[h]*b;p.y=n[h+1]*b;p.z=n[h+2]*b;l.push(p)}}if(void 0!==a.morphColors)for(d=0,f=a.morphColors.length;d<f;d++)for(c.morphColors[d]={},c.morphColors[d].name=a.morphColors[d].name,c.morphColors[d].colors=[],k=c.morphColors[d].colors,l=a.morphColors[d].colors,b=0,h=l.length;b<h;b+=3)n=new THREE.Color(16755200),n.setRGB(l[b],l[b+1],l[b+2]),k.push(n)})(d);c.computeFaceNormals();c.computeBoundingSphere();
@@ -395,12 +395,12 @@ THREE.LineSegments.prototype=Object.create(THREE.Line.prototype);THREE.LineSegme
 THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
 THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&0<this.geometry.morphTargets.length){this.morphTargetBase=-1;this.morphTargetInfluences=[];this.morphTargetDictionary={};for(var a=0,b=this.geometry.morphTargets.length;a<b;a++)this.morphTargetInfluences.push(0),this.morphTargetDictionary[this.geometry.morphTargets[a].name]=a}};
 THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};
 THREE.Mesh.prototype.getMorphTargetIndexByName=function(a){if(void 0!==this.morphTargetDictionary[a])return this.morphTargetDictionary[a];console.warn("THREE.Mesh.getMorphTargetIndexByName: morph target "+a+" does not exist. Returning 0.");return 0};
 THREE.Mesh.prototype.raycast=function(){function a(a,b,c,d,e,f,g){THREE.Triangle.barycoordFromPoint(a,b,c,d,q);e.multiplyScalar(q.x);f.multiplyScalar(q.y);g.multiplyScalar(q.z);e.add(f).add(g);return e.clone()}var b=new THREE.Matrix4,c=new THREE.Ray,d=new THREE.Sphere,e=new THREE.Vector3,g=new THREE.Vector3,f=new THREE.Vector3,h=new THREE.Vector3,k=new THREE.Vector3,l=new THREE.Vector3,n=new THREE.Vector2,p=new THREE.Vector2,m=new THREE.Vector2,q=new THREE.Vector3,s=new THREE.Vector3,r=new THREE.Vector3;
 THREE.Mesh.prototype.raycast=function(){function a(a,b,c,d,e,f,g){THREE.Triangle.barycoordFromPoint(a,b,c,d,q);e.multiplyScalar(q.x);f.multiplyScalar(q.y);g.multiplyScalar(q.z);e.add(f).add(g);return e.clone()}var b=new THREE.Matrix4,c=new THREE.Ray,d=new THREE.Sphere,e=new THREE.Vector3,g=new THREE.Vector3,f=new THREE.Vector3,h=new THREE.Vector3,k=new THREE.Vector3,l=new THREE.Vector3,n=new THREE.Vector2,p=new THREE.Vector2,m=new THREE.Vector2,q=new THREE.Vector3,s=new THREE.Vector3,r=new THREE.Vector3;
-return function(q,x){var v=this.geometry,y=this.material;if(void 0!==y&&(null===v.boundingSphere&&v.computeBoundingSphere(),d.copy(v.boundingSphere),d.applyMatrix4(this.matrixWorld),!1!==q.ray.isIntersectionSphere(d)&&(b.getInverse(this.matrixWorld),c.copy(q.ray).applyMatrix4(b),null===v.boundingBox||!1!==c.isIntersectionBox(v.boundingBox)))){var w,E,F;if(v instanceof THREE.BufferGeometry){w=v.index;var z=v.attributes;if(null!==w){var B=w.array,K=z.position.array,v=v.groups;0===v.length&&(v=[{start:0,
-count:B.length}]);for(var L=0,C=v.length;L<C;++L){w=v[L];for(var M=E=w.start,I=E+w.count;M<I;M+=3){w=B[M];E=B[M+1];F=B[M+2];e.fromArray(K,3*w);g.fromArray(K,3*E);f.fromArray(K,3*F);if(y.side===THREE.BackSide){if(null===c.intersectTriangle(f,g,e,!0,s))continue}else if(null===c.intersectTriangle(e,g,f,y.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);var D=q.ray.origin.distanceTo(r);if(!(D<q.near||D>q.far)){var A;void 0!==z.uv&&(A=z.uv.array,n.fromArray(A,2*w),p.fromArray(A,
-2*E),m.fromArray(A,2*F),A=a(s,e,g,f,n,p,m));x.push({distance:D,point:r.clone(),uv:A,face:new THREE.Face3(w,E,F,THREE.Triangle.normal(e,g,f)),faceIndex:Math.floor(M/3),object:this})}}}}else for(K=z.position.array,M=0,I=K.length;M<I;M+=9){e.fromArray(K,M);g.fromArray(K,M+3);f.fromArray(K,M+6);if(y.side===THREE.BackSide){if(null===c.intersectTriangle(f,g,e,!0,s))continue}else if(null===c.intersectTriangle(e,g,f,y.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);D=q.ray.origin.distanceTo(r);
-D<q.near||D>q.far||(void 0!==z.uv&&(A=z.uv.array,n.fromArray(A,M),p.fromArray(A,M+2),m.fromArray(A,M+4),A=a(s,e,g,f,n,p,m)),w=M/3,E=w+1,F=w+2,x.push({distance:D,point:r.clone(),uv:A,face:new THREE.Face3(w,E,F,THREE.Triangle.normal(e,g,f)),index:w,object:this}))}}else if(v instanceof THREE.Geometry)for(z=y instanceof THREE.MeshFaceMaterial,B=!0===z?y.materials:null,K=v.vertices,L=v.faces,C=0,M=L.length;C<M;C++)if(I=L[C],D=!0===z?B[I.materialIndex]:y,void 0!==D){w=K[I.a];E=K[I.b];F=K[I.c];if(!0===D.morphTargets){var H=
-v.morphTargets,O=this.morphTargetInfluences;e.set(0,0,0);g.set(0,0,0);f.set(0,0,0);for(var R=0,T=H.length;R<T;R++){var Q=O[R];if(0!==Q){var S=H[R].vertices;e.addScaledVector(h.subVectors(S[I.a],w),Q);g.addScaledVector(k.subVectors(S[I.b],E),Q);f.addScaledVector(l.subVectors(S[I.c],F),Q)}}e.add(w);g.add(E);f.add(F);w=e;E=g;F=f}if(D.side===THREE.BackSide){if(null===c.intersectTriangle(F,E,w,!0,s))continue}else if(null===c.intersectTriangle(w,E,F,D.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);
-D=q.ray.origin.distanceTo(r);D<q.near||D>q.far||(void 0!==v.faceVertexUvs[0]&&(A=v.faceVertexUvs[0][C],n.copy(A[0]),p.copy(A[1]),m.copy(A[2]),A=a(s,w,E,F,n,p,m)),x.push({distance:D,point:r.clone(),uv:A,face:I,faceIndex:C,object:this}))}}}}();THREE.Mesh.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};
+return function(q,x){var v=this.geometry,y=this.material;if(void 0!==y&&(null===v.boundingSphere&&v.computeBoundingSphere(),d.copy(v.boundingSphere),d.applyMatrix4(this.matrixWorld),!1!==q.ray.isIntersectionSphere(d)&&(b.getInverse(this.matrixWorld),c.copy(q.ray).applyMatrix4(b),null===v.boundingBox||!1!==c.isIntersectionBox(v.boundingBox)))){var w,A,E;if(v instanceof THREE.BufferGeometry){w=v.index;var z=v.attributes;if(null!==w){var C=w.array,H=z.position.array,v=v.groups;0===v.length&&(v=[{start:0,
+count:C.length}]);for(var N=0,B=v.length;N<B;++N){w=v[N];for(var L=A=w.start,G=A+w.count;L<G;L+=3){w=C[L];A=C[L+1];E=C[L+2];e.fromArray(H,3*w);g.fromArray(H,3*A);f.fromArray(H,3*E);if(y.side===THREE.BackSide){if(null===c.intersectTriangle(f,g,e,!0,s))continue}else if(null===c.intersectTriangle(e,g,f,y.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);var K=q.ray.origin.distanceTo(r);if(!(K<q.near||K>q.far)){var D;void 0!==z.uv&&(D=z.uv.array,n.fromArray(D,2*w),p.fromArray(D,
+2*A),m.fromArray(D,2*E),D=a(s,e,g,f,n,p,m));x.push({distance:K,point:r.clone(),uv:D,face:new THREE.Face3(w,A,E,THREE.Triangle.normal(e,g,f)),faceIndex:Math.floor(L/3),object:this})}}}}else for(H=z.position.array,L=0,G=H.length;L<G;L+=9){e.fromArray(H,L);g.fromArray(H,L+3);f.fromArray(H,L+6);if(y.side===THREE.BackSide){if(null===c.intersectTriangle(f,g,e,!0,s))continue}else if(null===c.intersectTriangle(e,g,f,y.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);K=q.ray.origin.distanceTo(r);
+K<q.near||K>q.far||(void 0!==z.uv&&(D=z.uv.array,n.fromArray(D,L),p.fromArray(D,L+2),m.fromArray(D,L+4),D=a(s,e,g,f,n,p,m)),w=L/3,A=w+1,E=w+2,x.push({distance:K,point:r.clone(),uv:D,face:new THREE.Face3(w,A,E,THREE.Triangle.normal(e,g,f)),index:w,object:this}))}}else if(v instanceof THREE.Geometry)for(z=y instanceof THREE.MeshFaceMaterial,C=!0===z?y.materials:null,H=v.vertices,N=v.faces,B=0,L=N.length;B<L;B++)if(G=N[B],K=!0===z?C[G.materialIndex]:y,void 0!==K){w=H[G.a];A=H[G.b];E=H[G.c];if(!0===K.morphTargets){var I=
+v.morphTargets,P=this.morphTargetInfluences;e.set(0,0,0);g.set(0,0,0);f.set(0,0,0);for(var R=0,V=I.length;R<V;R++){var Q=P[R];if(0!==Q){var S=I[R].vertices;e.addScaledVector(h.subVectors(S[G.a],w),Q);g.addScaledVector(k.subVectors(S[G.b],A),Q);f.addScaledVector(l.subVectors(S[G.c],E),Q)}}e.add(w);g.add(A);f.add(E);w=e;A=g;E=f}if(K.side===THREE.BackSide){if(null===c.intersectTriangle(E,A,w,!0,s))continue}else if(null===c.intersectTriangle(w,A,E,K.side!==THREE.DoubleSide,s))continue;r.copy(s);r.applyMatrix4(this.matrixWorld);
+K=q.ray.origin.distanceTo(r);K<q.near||K>q.far||(0<v.faceVertexUvs[0].length&&(D=v.faceVertexUvs[0][B],n.copy(D[0]),p.copy(D[1]),m.copy(D[2]),D=a(s,w,A,E,n,p,m)),x.push({distance:K,point:r.clone(),uv:D,face:G,faceIndex:B,object:this}))}}}}();THREE.Mesh.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};
 THREE.Mesh.prototype.toJSON=function(a){var b=THREE.Object3D.prototype.toJSON.call(this,a);void 0===a.geometries[this.geometry.uuid]&&(a.geometries[this.geometry.uuid]=this.geometry.toJSON(a));void 0===a.materials[this.material.uuid]&&(a.materials[this.material.uuid]=this.material.toJSON(a));b.object.geometry=this.geometry.uuid;b.object.material=this.material.uuid;return b};THREE.Bone=function(a){THREE.Object3D.call(this);this.type="Bone";this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Mesh.prototype.toJSON=function(a){var b=THREE.Object3D.prototype.toJSON.call(this,a);void 0===a.geometries[this.geometry.uuid]&&(a.geometries[this.geometry.uuid]=this.geometry.toJSON(a));void 0===a.materials[this.material.uuid]&&(a.materials[this.material.uuid]=this.material.toJSON(a));b.object.geometry=this.geometry.uuid;b.object.material=this.material.uuid;return b};THREE.Bone=function(a){THREE.Object3D.call(this);this.type="Bone";this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.skin=a.skin;return this};
 THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.skin=a.skin;return this};
 THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(a=Math.sqrt(4*this.bones.length),a=THREE.Math.nextPowerOfTwo(Math.ceil(a)),this.boneTextureHeight=this.boneTextureWidth=a=Math.max(a,4),this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType)):
 THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(a=Math.sqrt(4*this.bones.length),a=THREE.Math.nextPowerOfTwo(Math.ceil(a)),this.boneTextureHeight=this.boneTextureWidth=a=Math.max(a,4),this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType)):
@@ -494,88 +494,88 @@ tFlip:{type:"f",value:-1}},vertexShader:["varying vec3 vWorldPosition;",THREE.Sh
 THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;",THREE.ShaderChunk.common,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\nvec3 direction = normalize( vWorldPosition );\nvec2 sampleUV;\nsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\nsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\ngl_FragColor = texture2D( tEquirect, sampleUV );",THREE.ShaderChunk.logdepthbuf_fragment,
 THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform sampler2D tEquirect;\nuniform float tFlip;\nvarying vec3 vWorldPosition;",THREE.ShaderChunk.common,THREE.ShaderChunk.logdepthbuf_pars_fragment,"void main() {\nvec3 direction = normalize( vWorldPosition );\nvec2 sampleUV;\nsampleUV.y = saturate( tFlip * direction.y * -0.5 + 0.5 );\nsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\ngl_FragColor = texture2D( tEquirect, sampleUV );",THREE.ShaderChunk.logdepthbuf_fragment,
 "}"].join("\n")},depthRGBA:{uniforms:{},vertexShader:[THREE.ShaderChunk.common,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:[THREE.ShaderChunk.common,THREE.ShaderChunk.logdepthbuf_pars_fragment,"vec4 pack_depth( const in float depth ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nvoid main() {",
 "}"].join("\n")},depthRGBA:{uniforms:{},vertexShader:[THREE.ShaderChunk.common,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.logdepthbuf_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:[THREE.ShaderChunk.common,THREE.ShaderChunk.logdepthbuf_pars_fragment,"vec4 pack_depth( const in float depth ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nvoid main() {",
 THREE.ShaderChunk.logdepthbuf_fragment,"\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n\t#else\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n\t#endif\n}"].join("\n")}};
 THREE.ShaderChunk.logdepthbuf_fragment,"\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n\t#else\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n\t#endif\n}"].join("\n")}};
-THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===Q&&(a*=d,b*=d,c*=d);t.clearColor(a,b,c,d)}function c(){N.init();t.viewport(Ia,Aa,Ba,Ca);b(G.r,G.g,G.b,ha)}function d(){$a=rb=null;wa="";ab=-1;jb=!0;N.reset()}function e(a){a.preventDefault();d();c();$.clear()}function g(a){a=a.target;a.removeEventListener("dispose",g);a:{var b=$.get(a);if(a.image&&b.__image__webglTextureCube)t.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;t.deleteTexture(b.__webglTexture)}$.delete(a)}Da.textures--}
+THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===Q&&(a*=d,b*=d,c*=d);t.clearColor(a,b,c,d)}function c(){M.init();t.viewport(Ha,Aa,Ba,Ca);b(F.r,F.g,F.b,ja)}function d(){Za=rb=null;wa="";$a=-1;jb=!0;M.reset()}function e(a){a.preventDefault();d();c();$.clear()}function g(a){a=a.target;a.removeEventListener("dispose",g);a:{var b=$.get(a);if(a.image&&b.__image__webglTextureCube)t.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;t.deleteTexture(b.__webglTexture)}$.delete(a)}Da.textures--}
 function f(a){a=a.target;a.removeEventListener("dispose",f);var b=$.get(a);if(a&&void 0!==b.__webglTexture){t.deleteTexture(b.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(var c=0;6>c;c++)t.deleteFramebuffer(b.__webglFramebuffer[c]),t.deleteRenderbuffer(b.__webglRenderbuffer[c]);else t.deleteFramebuffer(b.__webglFramebuffer),t.deleteRenderbuffer(b.__webglRenderbuffer);$.delete(a)}Da.textures--}function h(a){a=a.target;a.removeEventListener("dispose",h);k(a);$.delete(a)}function k(a){var b=
 function f(a){a=a.target;a.removeEventListener("dispose",f);var b=$.get(a);if(a&&void 0!==b.__webglTexture){t.deleteTexture(b.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(var c=0;6>c;c++)t.deleteFramebuffer(b.__webglFramebuffer[c]),t.deleteRenderbuffer(b.__webglRenderbuffer[c]);else t.deleteFramebuffer(b.__webglFramebuffer),t.deleteRenderbuffer(b.__webglRenderbuffer);$.delete(a)}Da.textures--}function h(a){a=a.target;a.removeEventListener("dispose",h);k(a);$.delete(a)}function k(a){var b=
-$.get(a).program.program;if(void 0!==b){a.program=void 0;a=0;for(var c=sa.length;a!==c;++a){var d=sa[a];if(d.program===b){0===--d.usedTimes&&(c-=1,sa[a]=sa[c],sa.pop(),t.deleteProgram(b),Da.programs=c);break}}}}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.material.id!==b.material.id?a.material.id-b.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,b,c,d,e){var f;c.transparent?(d=za,f=++Ha):(d=ia,f=++qa);f=d[f];void 0!==f?(f.id=a.id,f.object=a,f.geometry=b,f.material=c,f.z=ba.z,f.group=e):(f={id:a.id,object:a,geometry:b,material:c,z:ba.z,group:e},d.push(f))}function q(a){if(!1!==a.visible){if(a instanceof THREE.Light)X.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,
-c;a.material.transparent?(b=Ja,c=++Ka):(b=ra,c=++bb);c<b.length?b[c]=a:b.push(a)}else if(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.PointCloud)if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),!1===a.frustumCulled||!0===kb.intersectsObject(a)){var d=a.material;if(!0===d.visible)if(!0===la.sortObjects&&(ba.setFromMatrixPosition(a.matrixWorld),ba.applyProjection(Ta)),b=ta.update(a),d instanceof THREE.MeshFaceMaterial){c=b.groups;for(var e=d.materials,d=0,f=c.length;d<
-f;d++){var g=c[d],h=e[g.materialIndex];!0===h.visible&&m(a,b,h,ba.z,g)}}else m(a,b,d,ba.z)}a=a.children;d=0;for(f=a.length;d<f;d++)q(a[d])}}function s(a,b,c,d,e){for(var f=0,g=a.length;f<g;f++){var h=a[f],k=h.object,l=h.geometry,m=void 0===e?h.material:e,h=h.group;k.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,k.matrixWorld);k.normalMatrix.getNormalMatrix(k.modelViewMatrix);la.renderBufferDirect(b,c,d,l,m,k,h)}}function r(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g];k.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,
-k.matrixWorld);k.normalMatrix.getNormalMatrix(k.modelViewMatrix);void 0===e&&(f=k.material);u(f);var l=x(b,c,d,f,k);wa="";k.render(function(a){la.renderBufferImmediate(a,l,f)})}}function u(a){a.side!==THREE.DoubleSide?N.enable(t.CULL_FACE):N.disable(t.CULL_FACE);N.setFlipSided(a.side===THREE.BackSide);!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 x(a,b,c,d,e){var f,l,m,n;lb=0;var q=$.get(d);if(d.needsUpdate||!q.program){a:{for(var p=$.get(d),s=$b[d.type],r=0,x=0,u=0,K=0,z=0,A=b.length;z<A;z++){var B=b[z];B.onlyShadow||!1===B.visible||(B instanceof THREE.DirectionalLight&&r++,B instanceof THREE.PointLight&&x++,B instanceof THREE.SpotLight&&u++,B instanceof THREE.HemisphereLight&&K++)}f=r;l=x;m=
-u;n=K;for(var D,I=0,H=0,G=b.length;H<G;H++){var O=b[H];O.castShadow&&(O instanceof THREE.SpotLight&&I++,O instanceof THREE.DirectionalLight&&I++)}D=I;var R;if(ka.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture)R=1024;else{var M=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),Q=Math.floor((M-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(Q=Math.min(e.skeleton.bones.length,Q),Q<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+
-Q+" (try OpenGL instead of ANGLE)"));R=Q}var qa=ka.precision;null!==d.precision&&(qa=ka.getMaxPrecision(d.precision),qa!==d.precision&&console.warn("THREE.WebGLRenderer.initMaterial:",d.precision,"not supported, using",qa,"instead."));var T={precision:qa,supportsVertexTextures:ka.vertexTextures,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:ka.logarithmicDepthBuffer,skinning:d.skinning,maxBones:R,useVertexTexture:ka.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:la.maxMorphTargets,maxMorphNormals:la.maxMorphNormals,maxDirLights:f,
-maxPointLights:l,maxSpotLights:m,maxHemiLights:n,maxShadows:D,shadowMapEnabled:ma.enabled&&e.receiveShadow&&0<D,shadowMapType:ma.type,shadowMapDebug:ma.debug,alphaTest:d.alphaTest,metal:d.metal,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},S=[];s?S.push(s):(S.push(d.fragmentShader),S.push(d.vertexShader));if(void 0!==d.defines)for(var ra in d.defines)S.push(ra),S.push(d.defines[ra]);for(ra in T)S.push(ra),S.push(T[ra]);var W=S.join(),za=!0;if(p.program)if(p.program.code!==
-W)k(d);else if(void 0!==s)break a;else za=!1;else d.addEventListener("dispose",h);if(s){var Ha=THREE.ShaderLib[s];p.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(Ha.uniforms),vertexShader:Ha.vertexShader,fragmentShader:Ha.fragmentShader}}else p.__webglShader={name:d.type,uniforms:d.uniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader};for(var X,Ka=0,bb=sa.length;Ka<bb;Ka++){var Ra=sa[Ka];if(Ra.code===W){X=Ra;za&&X.usedTimes++;break}}void 0===X&&(d.__webglShader=p.__webglShader,
-X=new THREE.WebGLProgram(la,W,d,T),sa.push(X),Da.programs=sa.length);p.program=X;d.program=X;var Ja=X.getAttributes();if(d.morphTargets)for(var ua=d.numSupportedMorphTargets=0;ua<la.maxMorphTargets;ua++)0<=Ja["morphTarget"+ua]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(ua=d.numSupportedMorphNormals=0;ua<la.maxMorphNormals;ua++)0<=Ja["morphNormal"+ua]&&d.numSupportedMorphNormals++;p.uniformsList=[];var ia=p.program.getUniforms(),ha;for(ha in p.__webglShader.uniforms){var Sa=ia[ha];Sa&&p.uniformsList.push([p.__webglShader.uniforms[ha],
-Sa])}}d.needsUpdate=!1}var va=!1,wa=!1,ta=!1,cb=q.program,ca=cb.getUniforms(),J=q.__webglShader.uniforms;cb.id!==rb&&(t.useProgram(cb.program),rb=cb.id,ta=wa=va=!0);d.id!==ab&&(-1===ab&&(ta=!0),ab=d.id,wa=!0);if(va||a!==$a)t.uniformMatrix4fv(ca.projectionMatrix,!1,a.projectionMatrix.elements),ka.logarithmicDepthBuffer&&t.uniform1f(ca.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==$a&&($a=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&void 0!==ca.cameraPosition&&
+$.get(a).program.program;if(void 0!==b){a.program=void 0;a=0;for(var c=qa.length;a!==c;++a){var d=qa[a];if(d.program===b){0===--d.usedTimes&&(c-=1,qa[a]=qa[c],qa.pop(),t.deleteProgram(b),Da.programs=c);break}}}}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.material.id!==b.material.id?a.material.id-b.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,b,c,d,e){var f;c.transparent?(d=za,f=++Ia):(d=la,f=++va);f=d[f];void 0!==f?(f.id=a.id,f.object=a,f.geometry=b,f.material=c,f.z=ba.z,f.group=e):(f={id:a.id,object:a,geometry:b,material:c,z:ba.z,group:e},d.push(f))}function q(a){if(!1!==a.visible){if(a instanceof THREE.Light)Y.push(a);else if(a instanceof THREE.Sprite)Ra.push(a);else if(a instanceof THREE.LensFlare)ab.push(a);else if(a instanceof THREE.ImmediateRenderObject){var b,
+c;a.material.transparent?(b=Ja,c=++Ka):(b=ra,c=++bb);c<b.length?b[c]=a:b.push(a)}else if(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.PointCloud)if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),!1===a.frustumCulled||!0===kb.intersectsObject(a)){var d=a.material;if(!0===d.visible)if(!0===ka.sortObjects&&(ba.setFromMatrixPosition(a.matrixWorld),ba.applyProjection(Sa)),b=sa.update(a),d instanceof THREE.MeshFaceMaterial){c=b.groups;for(var e=d.materials,d=0,f=c.length;d<
+f;d++){var g=c[d],h=e[g.materialIndex];!0===h.visible&&m(a,b,h,ba.z,g)}}else m(a,b,d,ba.z)}a=a.children;d=0;for(f=a.length;d<f;d++)q(a[d])}}function s(a,b,c,d,e){for(var f=0,g=a.length;f<g;f++){var h=a[f],k=h.object,l=h.geometry,m=void 0===e?h.material:e,h=h.group;k.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,k.matrixWorld);k.normalMatrix.getNormalMatrix(k.modelViewMatrix);ka.renderBufferDirect(b,c,d,l,m,k,h)}}function r(a,b,c,d,e){for(var f=e,g=0,h=a.length;g<h;g++){var k=a[g];k.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,
+k.matrixWorld);k.normalMatrix.getNormalMatrix(k.modelViewMatrix);void 0===e&&(f=k.material);u(f);var l=x(b,c,d,f,k);wa="";k.render(function(a){ka.renderBufferImmediate(a,l,f)})}}function u(a){a.side!==THREE.DoubleSide?M.enable(t.CULL_FACE):M.disable(t.CULL_FACE);M.setFlipSided(a.side===THREE.BackSide);!0===a.transparent?M.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha):M.setBlending(THREE.NoBlending);M.setDepthFunc(a.depthFunc);M.setDepthTest(a.depthTest);
+M.setDepthWrite(a.depthWrite);M.setColorWrite(a.colorWrite);M.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}function x(a,b,c,d,e){var f,l,m,n;lb=0;var q=$.get(d);if(d.needsUpdate||!q.program){a:{for(var p=$.get(d),s=$b[d.type],r=0,x=0,u=0,H=0,z=0,D=b.length;z<D;z++){var C=b[z];C.onlyShadow||!1===C.visible||(C instanceof THREE.DirectionalLight&&r++,C instanceof THREE.PointLight&&x++,C instanceof THREE.SpotLight&&u++,C instanceof THREE.HemisphereLight&&H++)}f=r;l=x;m=
+u;n=H;for(var G,I=0,K=0,F=b.length;K<F;K++){var P=b[K];P.castShadow&&(P instanceof THREE.SpotLight&&I++,P instanceof THREE.DirectionalLight&&I++)}G=I;var L;if(ia.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture)L=1024;else{var R=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),va=Math.floor((R-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(va=Math.min(e.skeleton.bones.length,va),va<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+
+va+" (try OpenGL instead of ANGLE)"));L=va}var Q=ia.precision;null!==d.precision&&(Q=ia.getMaxPrecision(d.precision),Q!==d.precision&&console.warn("THREE.WebGLRenderer.initMaterial:",d.precision,"not supported, using",Q,"instead."));var V={precision:Q,supportsVertexTextures:ia.vertexTextures,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:ia.logarithmicDepthBuffer,skinning:d.skinning,maxBones:L,useVertexTexture:ia.floatVertexTextures&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:ka.maxMorphTargets,maxMorphNormals:ka.maxMorphNormals,maxDirLights:f,maxPointLights:l,maxSpotLights:m,
+maxHemiLights:n,maxShadows:G,shadowMapEnabled:ma.enabled&&e.receiveShadow&&0<G,shadowMapType:ma.type,shadowMapDebug:ma.debug,alphaTest:d.alphaTest,metal:d.metal,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},S=[];s?S.push(s):(S.push(d.fragmentShader),S.push(d.vertexShader));if(void 0!==d.defines)for(var ra in d.defines)S.push(ra),S.push(d.defines[ra]);for(ra in V)S.push(ra),S.push(V[ra]);var W=S.join(),za=!0;if(p.program)if(p.program.code!==W)k(d);else if(void 0!==s)break a;
+else za=!1;else d.addEventListener("dispose",h);if(s){var Ia=THREE.ShaderLib[s];p.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(Ia.uniforms),vertexShader:Ia.vertexShader,fragmentShader:Ia.fragmentShader}}else p.__webglShader={name:d.type,uniforms:d.uniforms,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader};for(var Y,Ka=0,bb=qa.length;Ka<bb;Ka++){var Ra=qa[Ka];if(Ra.code===W){Y=Ra;za&&Y.usedTimes++;break}}void 0===Y&&(d.__webglShader=p.__webglShader,Y=new THREE.WebGLProgram(ka,
+W,d,V),qa.push(Y),Da.programs=qa.length);p.program=Y;d.program=Y;var Ja=Y.getAttributes();if(d.morphTargets)for(var ta=d.numSupportedMorphTargets=0;ta<ka.maxMorphTargets;ta++)0<=Ja["morphTarget"+ta]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(ta=d.numSupportedMorphNormals=0;ta<ka.maxMorphNormals;ta++)0<=Ja["morphNormal"+ta]&&d.numSupportedMorphNormals++;p.uniformsList=[];var ab=p.program.getUniforms(),ja;for(ja in p.__webglShader.uniforms){var la=ab[ja];la&&p.uniformsList.push([p.__webglShader.uniforms[ja],
+la])}}d.needsUpdate=!1}var ua=!1,wa=!1,sa=!1,cb=q.program,ca=cb.getUniforms(),J=q.__webglShader.uniforms;cb.id!==rb&&(t.useProgram(cb.program),rb=cb.id,sa=wa=ua=!0);d.id!==$a&&(-1===$a&&(sa=!0),$a=d.id,wa=!0);if(ua||a!==Za)t.uniformMatrix4fv(ca.projectionMatrix,!1,a.projectionMatrix.elements),ia.logarithmicDepthBuffer&&t.uniform1f(ca.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==Za&&(Za=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&void 0!==ca.cameraPosition&&
 (ba.setFromMatrixPosition(a.matrixWorld),t.uniform3f(ca.cameraPosition,ba.x,ba.y,ba.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==ca.viewMatrix&&t.uniformMatrix4fv(ca.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(e.bindMatrix&&void 0!==ca.bindMatrix&&t.uniformMatrix4fv(ca.bindMatrix,!1,e.bindMatrix.elements),e.bindMatrixInverse&&void 0!==ca.bindMatrixInverse&&
 (ba.setFromMatrixPosition(a.matrixWorld),t.uniform3f(ca.cameraPosition,ba.x,ba.y,ba.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==ca.viewMatrix&&t.uniformMatrix4fv(ca.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(e.bindMatrix&&void 0!==ca.bindMatrix&&t.uniformMatrix4fv(ca.bindMatrix,!1,e.bindMatrix.elements),e.bindMatrixInverse&&void 0!==ca.bindMatrixInverse&&
-t.uniformMatrix4fv(ca.bindMatrixInverse,!1,e.bindMatrixInverse.elements),ka.floatVertexTextures&&e.skeleton&&e.skeleton.useVertexTexture){if(void 0!==ca.boneTexture){var Ia=y();t.uniform1i(ca.boneTexture,Ia);la.setTexture(e.skeleton.boneTexture,Ia)}void 0!==ca.boneTextureWidth&&t.uniform1i(ca.boneTextureWidth,e.skeleton.boneTextureWidth);void 0!==ca.boneTextureHeight&&t.uniform1i(ca.boneTextureHeight,e.skeleton.boneTextureHeight)}else e.skeleton&&e.skeleton.boneMatrices&&void 0!==ca.boneGlobalMatrices&&
-t.uniformMatrix4fv(ca.boneGlobalMatrices,!1,e.skeleton.boneMatrices);if(wa){c&&d.fog&&(J.fogColor.value=c.color,c instanceof THREE.Fog?(J.fogNear.value=c.near,J.fogFar.value=c.far):c instanceof THREE.FogExp2&&(J.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(jb){var ta=!0,aa,oa,Z,Aa=0,Ba=0,Ca=0,La,Qa,Ta,Ua,sb,da=Pb,db=a.matrixWorldInverse,tb=da.directional.colors,ub=da.directional.positions,vb=da.point.colors,wb=da.point.positions,
-kb=da.point.distances,pb=da.point.decays,xb=da.spot.colors,yb=da.spot.positions,qb=da.spot.distances,zb=da.spot.directions,Kb=da.spot.anglesCos,Lb=da.spot.exponents,Mb=da.spot.decays,Ab=da.hemi.skyColors,Bb=da.hemi.groundColors,Cb=da.hemi.positions,eb=0,Ma=0,xa=0,Va=0,Db=0,Eb=0,Fb=0,mb=0,fb=0,gb=0,Ea=0,Wa=0;aa=0;for(oa=b.length;aa<oa;aa++)Z=b[aa],Z.onlyShadow||(La=Z.color,Ua=Z.intensity,sb=Z.distance,Z instanceof THREE.AmbientLight?Z.visible&&(Aa+=La.r,Ba+=La.g,Ca+=La.b):Z instanceof THREE.DirectionalLight?
-(Db+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),ba.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(ba),fa.transformDirection(db),fb=3*eb,ub[fb+0]=fa.x,ub[fb+1]=fa.y,ub[fb+2]=fa.z,w(tb,fb,La,Ua),eb+=1)):Z instanceof THREE.PointLight?(Eb+=1,Z.visible&&(gb=3*Ma,w(vb,gb,La,Ua),ba.setFromMatrixPosition(Z.matrixWorld),ba.applyMatrix4(db),wb[gb+0]=ba.x,wb[gb+1]=ba.y,wb[gb+2]=ba.z,kb[Ma]=sb,pb[Ma]=0===Z.distance?0:Z.decay,Ma+=1)):Z instanceof THREE.SpotLight?(Fb+=1,Z.visible&&(Ea=3*xa,w(xb,
-Ea,La,Ua),fa.setFromMatrixPosition(Z.matrixWorld),ba.copy(fa).applyMatrix4(db),yb[Ea+0]=ba.x,yb[Ea+1]=ba.y,yb[Ea+2]=ba.z,qb[xa]=sb,ba.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(ba),fa.transformDirection(db),zb[Ea+0]=fa.x,zb[Ea+1]=fa.y,zb[Ea+2]=fa.z,Kb[xa]=Math.cos(Z.angle),Lb[xa]=Z.exponent,Mb[xa]=0===Z.distance?0:Z.decay,xa+=1)):Z instanceof THREE.HemisphereLight&&(mb+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),fa.transformDirection(db),Wa=3*Va,Cb[Wa+0]=fa.x,Cb[Wa+1]=fa.y,Cb[Wa+
-2]=fa.z,Qa=Z.color,Ta=Z.groundColor,w(Ab,Wa,Qa,Ua),w(Bb,Wa,Ta,Ua),Va+=1)));aa=3*eb;for(oa=Math.max(tb.length,3*Db);aa<oa;aa++)tb[aa]=0;aa=3*Ma;for(oa=Math.max(vb.length,3*Eb);aa<oa;aa++)vb[aa]=0;aa=3*xa;for(oa=Math.max(xb.length,3*Fb);aa<oa;aa++)xb[aa]=0;aa=3*Va;for(oa=Math.max(Ab.length,3*mb);aa<oa;aa++)Ab[aa]=0;aa=3*Va;for(oa=Math.max(Bb.length,3*mb);aa<oa;aa++)Bb[aa]=0;da.directional.length=eb;da.point.length=Ma;da.spot.length=xa;da.hemi.length=Va;da.ambient[0]=Aa;da.ambient[1]=Ba;da.ambient[2]=
-Ca;jb=!1}if(ta){var ja=Pb;J.ambientLightColor.value=ja.ambient;J.directionalLightColor.value=ja.directional.colors;J.directionalLightDirection.value=ja.directional.positions;J.pointLightColor.value=ja.point.colors;J.pointLightPosition.value=ja.point.positions;J.pointLightDistance.value=ja.point.distances;J.pointLightDecay.value=ja.point.decays;J.spotLightColor.value=ja.spot.colors;J.spotLightPosition.value=ja.spot.positions;J.spotLightDistance.value=ja.spot.distances;J.spotLightDirection.value=ja.spot.directions;
-J.spotLightAngleCos.value=ja.spot.anglesCos;J.spotLightExponent.value=ja.spot.exponents;J.spotLightDecay.value=ja.spot.decays;J.hemisphereLightSkyColor.value=ja.hemi.skyColors;J.hemisphereLightGroundColor.value=ja.hemi.groundColors;J.hemisphereLightDirection.value=ja.hemi.positions;v(J,!0)}else v(J,!1)}if(d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial){J.opacity.value=d.opacity;J.diffuse.value=d.color;J.map.value=d.map;J.specularMap.value=
+t.uniformMatrix4fv(ca.bindMatrixInverse,!1,e.bindMatrixInverse.elements),ia.floatVertexTextures&&e.skeleton&&e.skeleton.useVertexTexture){if(void 0!==ca.boneTexture){var Ha=y();t.uniform1i(ca.boneTexture,Ha);ka.setTexture(e.skeleton.boneTexture,Ha)}void 0!==ca.boneTextureWidth&&t.uniform1i(ca.boneTextureWidth,e.skeleton.boneTextureWidth);void 0!==ca.boneTextureHeight&&t.uniform1i(ca.boneTextureHeight,e.skeleton.boneTextureHeight)}else e.skeleton&&e.skeleton.boneMatrices&&void 0!==ca.boneGlobalMatrices&&
+t.uniformMatrix4fv(ca.boneGlobalMatrices,!1,e.skeleton.boneMatrices);if(wa){c&&d.fog&&(J.fogColor.value=c.color,c instanceof THREE.Fog?(J.fogNear.value=c.near,J.fogFar.value=c.far):c instanceof THREE.FogExp2&&(J.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(jb){var sa=!0,aa,oa,Z,Aa=0,Ba=0,Ca=0,La,Qa,Sa,Ta,sb,da=Pb,db=a.matrixWorldInverse,tb=da.directional.colors,ub=da.directional.positions,vb=da.point.colors,wb=da.point.positions,
+kb=da.point.distances,pb=da.point.decays,xb=da.spot.colors,yb=da.spot.positions,qb=da.spot.distances,zb=da.spot.directions,Kb=da.spot.anglesCos,Lb=da.spot.exponents,Mb=da.spot.decays,Ab=da.hemi.skyColors,Bb=da.hemi.groundColors,Cb=da.hemi.positions,eb=0,Ma=0,xa=0,Ua=0,Db=0,Eb=0,Fb=0,mb=0,fb=0,gb=0,Ea=0,Va=0;aa=0;for(oa=b.length;aa<oa;aa++)Z=b[aa],Z.onlyShadow||(La=Z.color,Ta=Z.intensity,sb=Z.distance,Z instanceof THREE.AmbientLight?Z.visible&&(Aa+=La.r,Ba+=La.g,Ca+=La.b):Z instanceof THREE.DirectionalLight?
+(Db+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),ba.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(ba),fa.transformDirection(db),fb=3*eb,ub[fb+0]=fa.x,ub[fb+1]=fa.y,ub[fb+2]=fa.z,w(tb,fb,La,Ta),eb+=1)):Z instanceof THREE.PointLight?(Eb+=1,Z.visible&&(gb=3*Ma,w(vb,gb,La,Ta),ba.setFromMatrixPosition(Z.matrixWorld),ba.applyMatrix4(db),wb[gb+0]=ba.x,wb[gb+1]=ba.y,wb[gb+2]=ba.z,kb[Ma]=sb,pb[Ma]=0===Z.distance?0:Z.decay,Ma+=1)):Z instanceof THREE.SpotLight?(Fb+=1,Z.visible&&(Ea=3*xa,w(xb,
+Ea,La,Ta),fa.setFromMatrixPosition(Z.matrixWorld),ba.copy(fa).applyMatrix4(db),yb[Ea+0]=ba.x,yb[Ea+1]=ba.y,yb[Ea+2]=ba.z,qb[xa]=sb,ba.setFromMatrixPosition(Z.target.matrixWorld),fa.sub(ba),fa.transformDirection(db),zb[Ea+0]=fa.x,zb[Ea+1]=fa.y,zb[Ea+2]=fa.z,Kb[xa]=Math.cos(Z.angle),Lb[xa]=Z.exponent,Mb[xa]=0===Z.distance?0:Z.decay,xa+=1)):Z instanceof THREE.HemisphereLight&&(mb+=1,Z.visible&&(fa.setFromMatrixPosition(Z.matrixWorld),fa.transformDirection(db),Va=3*Ua,Cb[Va+0]=fa.x,Cb[Va+1]=fa.y,Cb[Va+
+2]=fa.z,Qa=Z.color,Sa=Z.groundColor,w(Ab,Va,Qa,Ta),w(Bb,Va,Sa,Ta),Ua+=1)));aa=3*eb;for(oa=Math.max(tb.length,3*Db);aa<oa;aa++)tb[aa]=0;aa=3*Ma;for(oa=Math.max(vb.length,3*Eb);aa<oa;aa++)vb[aa]=0;aa=3*xa;for(oa=Math.max(xb.length,3*Fb);aa<oa;aa++)xb[aa]=0;aa=3*Ua;for(oa=Math.max(Ab.length,3*mb);aa<oa;aa++)Ab[aa]=0;aa=3*Ua;for(oa=Math.max(Bb.length,3*mb);aa<oa;aa++)Bb[aa]=0;da.directional.length=eb;da.point.length=Ma;da.spot.length=xa;da.hemi.length=Ua;da.ambient[0]=Aa;da.ambient[1]=Ba;da.ambient[2]=
+Ca;jb=!1}if(sa){var ha=Pb;J.ambientLightColor.value=ha.ambient;J.directionalLightColor.value=ha.directional.colors;J.directionalLightDirection.value=ha.directional.positions;J.pointLightColor.value=ha.point.colors;J.pointLightPosition.value=ha.point.positions;J.pointLightDistance.value=ha.point.distances;J.pointLightDecay.value=ha.point.decays;J.spotLightColor.value=ha.spot.colors;J.spotLightPosition.value=ha.spot.positions;J.spotLightDistance.value=ha.spot.distances;J.spotLightDirection.value=ha.spot.directions;
+J.spotLightAngleCos.value=ha.spot.anglesCos;J.spotLightExponent.value=ha.spot.exponents;J.spotLightDecay.value=ha.spot.decays;J.hemisphereLightSkyColor.value=ha.hemi.skyColors;J.hemisphereLightGroundColor.value=ha.hemi.groundColors;J.hemisphereLightDirection.value=ha.hemi.positions;v(J,!0)}else v(J,!1)}if(d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial){J.opacity.value=d.opacity;J.diffuse.value=d.color;J.map.value=d.map;J.specularMap.value=
 d.specularMap;J.alphaMap.value=d.alphaMap;d.bumpMap&&(J.bumpMap.value=d.bumpMap,J.bumpScale.value=d.bumpScale);d.normalMap&&(J.normalMap.value=d.normalMap,J.normalScale.value.copy(d.normalScale));var ya;d.map?ya=d.map:d.specularMap?ya=d.specularMap:d.normalMap?ya=d.normalMap:d.bumpMap?ya=d.bumpMap:d.alphaMap?ya=d.alphaMap:d.emissiveMap&&(ya=d.emissiveMap);if(void 0!==ya){var Qb=ya.offset,Rb=ya.repeat;J.offsetRepeat.value.set(Qb.x,Qb.y,Rb.x,Rb.y)}J.envMap.value=d.envMap;J.flipEnvMap.value=d.envMap instanceof
 d.specularMap;J.alphaMap.value=d.alphaMap;d.bumpMap&&(J.bumpMap.value=d.bumpMap,J.bumpScale.value=d.bumpScale);d.normalMap&&(J.normalMap.value=d.normalMap,J.normalScale.value.copy(d.normalScale));var ya;d.map?ya=d.map:d.specularMap?ya=d.specularMap:d.normalMap?ya=d.normalMap:d.bumpMap?ya=d.bumpMap:d.alphaMap?ya=d.alphaMap:d.emissiveMap&&(ya=d.emissiveMap);if(void 0!==ya){var Qb=ya.offset,Rb=ya.repeat;J.offsetRepeat.value.set(Qb.x,Qb.y,Rb.x,Rb.y)}J.envMap.value=d.envMap;J.flipEnvMap.value=d.envMap instanceof
 THREE.WebGLRenderTargetCube?1:-1;J.reflectivity.value=d.reflectivity;J.refractionRatio.value=d.refractionRatio}if(d instanceof THREE.LineBasicMaterial)J.diffuse.value=d.color,J.opacity.value=d.opacity;else if(d instanceof THREE.LineDashedMaterial)J.diffuse.value=d.color,J.opacity.value=d.opacity,J.dashSize.value=d.dashSize,J.totalSize.value=d.dashSize+d.gapSize,J.scale.value=d.scale;else if(d instanceof THREE.PointCloudMaterial){if(J.psColor.value=d.color,J.opacity.value=d.opacity,J.size.value=d.size,
 THREE.WebGLRenderTargetCube?1:-1;J.reflectivity.value=d.reflectivity;J.refractionRatio.value=d.refractionRatio}if(d instanceof THREE.LineBasicMaterial)J.diffuse.value=d.color,J.opacity.value=d.opacity;else if(d instanceof THREE.LineDashedMaterial)J.diffuse.value=d.color,J.opacity.value=d.opacity,J.dashSize.value=d.dashSize,J.totalSize.value=d.dashSize+d.gapSize,J.scale.value=d.scale;else if(d instanceof THREE.PointCloudMaterial){if(J.psColor.value=d.color,J.opacity.value=d.opacity,J.size.value=d.size,
-J.scale.value=C.height/2,J.map.value=d.map,null!==d.map){var Sb=d.map.offset,Tb=d.map.repeat;J.offsetRepeat.value.set(Sb.x,Sb.y,Tb.x,Tb.y)}}else d instanceof THREE.MeshPhongMaterial?(J.shininess.value=d.shininess,J.emissive.value=d.emissive,J.specular.value=d.specular,J.lightMap.value=d.lightMap,J.lightMapIntensity.value=d.lightMapIntensity,J.aoMap.value=d.aoMap,J.aoMapIntensity.value=d.aoMapIntensity,J.emissiveMap.value=d.emissiveMap):d instanceof THREE.MeshLambertMaterial?J.emissive.value=d.emissive:
-d instanceof THREE.MeshBasicMaterial?(J.aoMap.value=d.aoMap,J.aoMapIntensity.value=d.aoMapIntensity):d instanceof THREE.MeshDepthMaterial?(J.mNear.value=a.near,J.mFar.value=a.far,J.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(J.opacity.value=d.opacity);if(e.receiveShadow&&!d._shadowPass&&J.shadowMatrix)for(var Xa=0,Gb=0,Nb=b.length;Gb<Nb;Gb++){var Fa=b[Gb];Fa.castShadow&&(Fa instanceof THREE.SpotLight||Fa instanceof THREE.DirectionalLight)&&(J.shadowMap.value[Xa]=Fa.shadowMap,
-J.shadowMapSize.value[Xa]=Fa.shadowMapSize,J.shadowMatrix.value[Xa]=Fa.shadowMatrix,J.shadowDarkness.value[Xa]=Fa.shadowDarkness,J.shadowBias.value[Xa]=Fa.shadowBias,Xa++)}for(var Hb=q.uniformsList,pa,Na,nb=0,Ob=Hb.length;nb<Ob;nb++){var U=Hb[nb][0];if(!1!==U.needsUpdate){var Ub=U.type,P=U.value,Y=Hb[nb][1];switch(Ub){case "1i":t.uniform1i(Y,P);break;case "1f":t.uniform1f(Y,P);break;case "2f":t.uniform2f(Y,P[0],P[1]);break;case "3f":t.uniform3f(Y,P[0],P[1],P[2]);break;case "4f":t.uniform4f(Y,P[0],
-P[1],P[2],P[3]);break;case "1iv":t.uniform1iv(Y,P);break;case "3iv":t.uniform3iv(Y,P);break;case "1fv":t.uniform1fv(Y,P);break;case "2fv":t.uniform2fv(Y,P);break;case "3fv":t.uniform3fv(Y,P);break;case "4fv":t.uniform4fv(Y,P);break;case "Matrix3fv":t.uniformMatrix3fv(Y,!1,P);break;case "Matrix4fv":t.uniformMatrix4fv(Y,!1,P);break;case "i":t.uniform1i(Y,P);break;case "f":t.uniform1f(Y,P);break;case "v2":t.uniform2f(Y,P.x,P.y);break;case "v3":t.uniform3f(Y,P.x,P.y,P.z);break;case "v4":t.uniform4f(Y,
-P.x,P.y,P.z,P.w);break;case "c":t.uniform3f(Y,P.r,P.g,P.b);break;case "iv1":t.uniform1iv(Y,P);break;case "iv":t.uniform3iv(Y,P);break;case "fv1":t.uniform1fv(Y,P);break;case "fv":t.uniform3fv(Y,P);break;case "v2v":void 0===U._array&&(U._array=new Float32Array(2*P.length));for(var V=0,ob=0,na=P.length;V<na;V++,ob+=2)U._array[ob+0]=P[V].x,U._array[ob+1]=P[V].y;t.uniform2fv(Y,U._array);break;case "v3v":void 0===U._array&&(U._array=new Float32Array(3*P.length));for(var hb=V=0,na=P.length;V<na;V++,hb+=
-3)U._array[hb+0]=P[V].x,U._array[hb+1]=P[V].y,U._array[hb+2]=P[V].z;t.uniform3fv(Y,U._array);break;case "v4v":void 0===U._array&&(U._array=new Float32Array(4*P.length));for(var Ya=V=0,na=P.length;V<na;V++,Ya+=4)U._array[Ya+0]=P[V].x,U._array[Ya+1]=P[V].y,U._array[Ya+2]=P[V].z,U._array[Ya+3]=P[V].w;t.uniform4fv(Y,U._array);break;case "m3":t.uniformMatrix3fv(Y,!1,P.elements);break;case "m3v":void 0===U._array&&(U._array=new Float32Array(9*P.length));V=0;for(na=P.length;V<na;V++)P[V].flattenToArrayOffset(U._array,
-9*V);t.uniformMatrix3fv(Y,!1,U._array);break;case "m4":t.uniformMatrix4fv(Y,!1,P.elements);break;case "m4v":void 0===U._array&&(U._array=new Float32Array(16*P.length));V=0;for(na=P.length;V<na;V++)P[V].flattenToArrayOffset(U._array,16*V);t.uniformMatrix4fv(Y,!1,U._array);break;case "t":pa=P;Na=y();t.uniform1i(Y,Na);if(!pa)continue;if(pa instanceof THREE.CubeTexture||Array.isArray(pa.image)&&6===pa.image.length){var ea=pa,Vb=Na,Za=$.get(ea);if(6===ea.image.length)if(0<ea.version&&Za.__version!==ea.version){Za.__image__webglTextureCube||
-(ea.addEventListener("dispose",g),Za.__image__webglTextureCube=t.createTexture(),Da.textures++);N.activeTexture(t.TEXTURE0+Vb);N.bindTexture(t.TEXTURE_CUBE_MAP,Za.__image__webglTextureCube);t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,ea.flipY);for(var Wb=ea instanceof THREE.CompressedTexture,Ib=ea.image[0]instanceof THREE.DataTexture,Oa=[],ga=0;6>ga;ga++)Oa[ga]=!la.autoScaleCubemaps||Wb||Ib?Ib?ea.image[ga].image:ea.image[ga]:F(ea.image[ga],ka.maxCubemapSize);var Xb=Oa[0],Yb=THREE.Math.isPowerOfTwo(Xb.width)&&
-THREE.Math.isPowerOfTwo(Xb.height),Ga=L(ea.format),Jb=L(ea.type);E(t.TEXTURE_CUBE_MAP,ea,Yb);for(ga=0;6>ga;ga++)if(Wb)for(var Pa,Zb=Oa[ga].mipmaps,ib=0,ac=Zb.length;ib<ac;ib++)Pa=Zb[ib],ea.format!==THREE.RGBAFormat&&ea.format!==THREE.RGBFormat?-1<N.getCompressedTextureFormats().indexOf(Ga)?N.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,ib,Ga,Pa.width,Pa.height,0,Pa.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):N.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+
-ga,ib,Ga,Pa.width,Pa.height,0,Ga,Jb,Pa.data);else Ib?N.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,0,Ga,Oa[ga].width,Oa[ga].height,0,Ga,Jb,Oa[ga].data):N.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,0,Ga,Ga,Jb,Oa[ga]);ea.generateMipmaps&&Yb&&t.generateMipmap(t.TEXTURE_CUBE_MAP);Za.__version=ea.version;if(ea.onUpdate)ea.onUpdate(ea)}else N.activeTexture(t.TEXTURE0+Vb),N.bindTexture(t.TEXTURE_CUBE_MAP,Za.__image__webglTextureCube)}else if(pa instanceof THREE.WebGLRenderTargetCube){var bc=pa;N.activeTexture(t.TEXTURE0+
-Na);N.bindTexture(t.TEXTURE_CUBE_MAP,$.get(bc).__webglTexture)}else la.setTexture(pa,Na);break;case "tv":void 0===U._array&&(U._array=[]);V=0;for(na=U.value.length;V<na;V++)U._array[V]=y();t.uniform1iv(Y,U._array);V=0;for(na=U.value.length;V<na;V++)pa=U.value[V],Na=U._array[V],pa&&la.setTexture(pa,Na);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Ub)}}}}t.uniformMatrix4fv(ca.modelViewMatrix,!1,e.modelViewMatrix.elements);ca.normalMatrix&&t.uniformMatrix3fv(ca.normalMatrix,
+J.scale.value=B.height/2,J.map.value=d.map,null!==d.map){var Sb=d.map.offset,Tb=d.map.repeat;J.offsetRepeat.value.set(Sb.x,Sb.y,Tb.x,Tb.y)}}else d instanceof THREE.MeshPhongMaterial?(J.shininess.value=d.shininess,J.emissive.value=d.emissive,J.specular.value=d.specular,J.lightMap.value=d.lightMap,J.lightMapIntensity.value=d.lightMapIntensity,J.aoMap.value=d.aoMap,J.aoMapIntensity.value=d.aoMapIntensity,J.emissiveMap.value=d.emissiveMap):d instanceof THREE.MeshLambertMaterial?J.emissive.value=d.emissive:
+d instanceof THREE.MeshBasicMaterial?(J.aoMap.value=d.aoMap,J.aoMapIntensity.value=d.aoMapIntensity):d instanceof THREE.MeshDepthMaterial?(J.mNear.value=a.near,J.mFar.value=a.far,J.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(J.opacity.value=d.opacity);if(e.receiveShadow&&!d._shadowPass&&J.shadowMatrix)for(var Wa=0,Gb=0,Nb=b.length;Gb<Nb;Gb++){var Fa=b[Gb];Fa.castShadow&&(Fa instanceof THREE.SpotLight||Fa instanceof THREE.DirectionalLight)&&(J.shadowMap.value[Wa]=Fa.shadowMap,
+J.shadowMapSize.value[Wa]=Fa.shadowMapSize,J.shadowMatrix.value[Wa]=Fa.shadowMatrix,J.shadowDarkness.value[Wa]=Fa.shadowDarkness,J.shadowBias.value[Wa]=Fa.shadowBias,Wa++)}for(var Hb=q.uniformsList,pa,Na,nb=0,Ob=Hb.length;nb<Ob;nb++){var T=Hb[nb][0];if(!1!==T.needsUpdate){var Ub=T.type,O=T.value,X=Hb[nb][1];switch(Ub){case "1i":t.uniform1i(X,O);break;case "1f":t.uniform1f(X,O);break;case "2f":t.uniform2f(X,O[0],O[1]);break;case "3f":t.uniform3f(X,O[0],O[1],O[2]);break;case "4f":t.uniform4f(X,O[0],
+O[1],O[2],O[3]);break;case "1iv":t.uniform1iv(X,O);break;case "3iv":t.uniform3iv(X,O);break;case "1fv":t.uniform1fv(X,O);break;case "2fv":t.uniform2fv(X,O);break;case "3fv":t.uniform3fv(X,O);break;case "4fv":t.uniform4fv(X,O);break;case "Matrix3fv":t.uniformMatrix3fv(X,!1,O);break;case "Matrix4fv":t.uniformMatrix4fv(X,!1,O);break;case "i":t.uniform1i(X,O);break;case "f":t.uniform1f(X,O);break;case "v2":t.uniform2f(X,O.x,O.y);break;case "v3":t.uniform3f(X,O.x,O.y,O.z);break;case "v4":t.uniform4f(X,
+O.x,O.y,O.z,O.w);break;case "c":t.uniform3f(X,O.r,O.g,O.b);break;case "iv1":t.uniform1iv(X,O);break;case "iv":t.uniform3iv(X,O);break;case "fv1":t.uniform1fv(X,O);break;case "fv":t.uniform3fv(X,O);break;case "v2v":void 0===T._array&&(T._array=new Float32Array(2*O.length));for(var U=0,ob=0,na=O.length;U<na;U++,ob+=2)T._array[ob+0]=O[U].x,T._array[ob+1]=O[U].y;t.uniform2fv(X,T._array);break;case "v3v":void 0===T._array&&(T._array=new Float32Array(3*O.length));for(var hb=U=0,na=O.length;U<na;U++,hb+=
+3)T._array[hb+0]=O[U].x,T._array[hb+1]=O[U].y,T._array[hb+2]=O[U].z;t.uniform3fv(X,T._array);break;case "v4v":void 0===T._array&&(T._array=new Float32Array(4*O.length));for(var Xa=U=0,na=O.length;U<na;U++,Xa+=4)T._array[Xa+0]=O[U].x,T._array[Xa+1]=O[U].y,T._array[Xa+2]=O[U].z,T._array[Xa+3]=O[U].w;t.uniform4fv(X,T._array);break;case "m3":t.uniformMatrix3fv(X,!1,O.elements);break;case "m3v":void 0===T._array&&(T._array=new Float32Array(9*O.length));U=0;for(na=O.length;U<na;U++)O[U].flattenToArrayOffset(T._array,
+9*U);t.uniformMatrix3fv(X,!1,T._array);break;case "m4":t.uniformMatrix4fv(X,!1,O.elements);break;case "m4v":void 0===T._array&&(T._array=new Float32Array(16*O.length));U=0;for(na=O.length;U<na;U++)O[U].flattenToArrayOffset(T._array,16*U);t.uniformMatrix4fv(X,!1,T._array);break;case "t":pa=O;Na=y();t.uniform1i(X,Na);if(!pa)continue;if(pa instanceof THREE.CubeTexture||Array.isArray(pa.image)&&6===pa.image.length){var ea=pa,Vb=Na,Ya=$.get(ea);if(6===ea.image.length)if(0<ea.version&&Ya.__version!==ea.version){Ya.__image__webglTextureCube||
+(ea.addEventListener("dispose",g),Ya.__image__webglTextureCube=t.createTexture(),Da.textures++);M.activeTexture(t.TEXTURE0+Vb);M.bindTexture(t.TEXTURE_CUBE_MAP,Ya.__image__webglTextureCube);t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,ea.flipY);for(var Wb=ea instanceof THREE.CompressedTexture,Ib=ea.image[0]instanceof THREE.DataTexture,Oa=[],ga=0;6>ga;ga++)Oa[ga]=!ka.autoScaleCubemaps||Wb||Ib?Ib?ea.image[ga].image:ea.image[ga]:E(ea.image[ga],ia.maxCubemapSize);var Xb=Oa[0],Yb=THREE.Math.isPowerOfTwo(Xb.width)&&
+THREE.Math.isPowerOfTwo(Xb.height),Ga=N(ea.format),Jb=N(ea.type);A(t.TEXTURE_CUBE_MAP,ea,Yb);for(ga=0;6>ga;ga++)if(Wb)for(var Pa,Zb=Oa[ga].mipmaps,ib=0,ac=Zb.length;ib<ac;ib++)Pa=Zb[ib],ea.format!==THREE.RGBAFormat&&ea.format!==THREE.RGBFormat?-1<M.getCompressedTextureFormats().indexOf(Ga)?M.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,ib,Ga,Pa.width,Pa.height,0,Pa.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):M.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+
+ga,ib,Ga,Pa.width,Pa.height,0,Ga,Jb,Pa.data);else Ib?M.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,0,Ga,Oa[ga].width,Oa[ga].height,0,Ga,Jb,Oa[ga].data):M.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+ga,0,Ga,Ga,Jb,Oa[ga]);ea.generateMipmaps&&Yb&&t.generateMipmap(t.TEXTURE_CUBE_MAP);Ya.__version=ea.version;if(ea.onUpdate)ea.onUpdate(ea)}else M.activeTexture(t.TEXTURE0+Vb),M.bindTexture(t.TEXTURE_CUBE_MAP,Ya.__image__webglTextureCube)}else if(pa instanceof THREE.WebGLRenderTargetCube){var bc=pa;M.activeTexture(t.TEXTURE0+
+Na);M.bindTexture(t.TEXTURE_CUBE_MAP,$.get(bc).__webglTexture)}else ka.setTexture(pa,Na);break;case "tv":void 0===T._array&&(T._array=[]);U=0;for(na=T.value.length;U<na;U++)T._array[U]=y();t.uniform1iv(X,T._array);U=0;for(na=T.value.length;U<na;U++)pa=T.value[U],Na=T._array[U],pa&&ka.setTexture(pa,Na);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Ub)}}}}t.uniformMatrix4fv(ca.modelViewMatrix,!1,e.modelViewMatrix.elements);ca.normalMatrix&&t.uniformMatrix3fv(ca.normalMatrix,
 !1,e.normalMatrix.elements);void 0!==ca.modelMatrix&&t.uniformMatrix4fv(ca.modelMatrix,!1,e.matrixWorld.elements);return cb}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=
 !1,e.normalMatrix.elements);void 0!==ca.modelMatrix&&t.uniformMatrix4fv(ca.modelMatrix,!1,e.matrixWorld.elements);return cb}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 y(){var a=lb;a>=ka.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ka.maxTextures);lb+=1;return a}function w(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function E(a,b,c){c?(t.texParameteri(a,t.TEXTURE_WRAP_S,
-L(b.wrapS)),t.texParameteri(a,t.TEXTURE_WRAP_T,L(b.wrapT)),t.texParameteri(a,t.TEXTURE_MAG_FILTER,L(b.magFilter)),t.texParameteri(a,t.TEXTURE_MIN_FILTER,L(b.minFilter))):(t.texParameteri(a,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(a,t.TEXTURE_WRAP_T,t.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+
-" )"),t.texParameteri(a,t.TEXTURE_MAG_FILTER,K(b.magFilter)),t.texParameteri(a,t.TEXTURE_MIN_FILTER,K(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&&null===W.get("OES_texture_float_linear")||b.type===THREE.HalfFloatType&&null===
-W.get("OES_texture_half_float_linear")||!(1<b.anisotropy||$.get(b).__currentAnisotropy)||(t.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,la.getMaxAnisotropy())),$.get(b).__currentAnisotropy=b.anisotropy)}function F(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 z(a,b,c){t.bindFramebuffer(t.FRAMEBUFFER,a);t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,c,$.get(b).__webglTexture,0)}function B(a,b){t.bindRenderbuffer(t.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,b.width,b.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,
-t.DEPTH_STENCIL,b.width,b.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,a)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,b.width,b.height)}function K(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?t.NEAREST:t.LINEAR}function L(a){var b;if(a===THREE.RepeatWrapping)return t.REPEAT;if(a===THREE.ClampToEdgeWrapping)return t.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return t.MIRRORED_REPEAT;
+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 y(){var a=lb;a>=ia.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ia.maxTextures);lb+=1;return a}function w(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function A(a,b,c){c?(t.texParameteri(a,t.TEXTURE_WRAP_S,
+N(b.wrapS)),t.texParameteri(a,t.TEXTURE_WRAP_T,N(b.wrapT)),t.texParameteri(a,t.TEXTURE_MAG_FILTER,N(b.magFilter)),t.texParameteri(a,t.TEXTURE_MIN_FILTER,N(b.minFilter))):(t.texParameteri(a,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(a,t.TEXTURE_WRAP_T,t.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+
+" )"),t.texParameteri(a,t.TEXTURE_MAG_FILTER,H(b.magFilter)),t.texParameteri(a,t.TEXTURE_MIN_FILTER,H(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&&null===W.get("OES_texture_float_linear")||b.type===THREE.HalfFloatType&&null===
+W.get("OES_texture_half_float_linear")||!(1<b.anisotropy||$.get(b).__currentAnisotropy)||(t.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,ka.getMaxAnisotropy())),$.get(b).__currentAnisotropy=b.anisotropy)}function E(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 z(a,b,c){t.bindFramebuffer(t.FRAMEBUFFER,a);t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,c,$.get(b).__webglTexture,0)}function C(a,b){t.bindRenderbuffer(t.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,b.width,b.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,
+t.DEPTH_STENCIL,b.width,b.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,a)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,b.width,b.height)}function H(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?t.NEAREST:t.LINEAR}function N(a){var b;if(a===THREE.RepeatWrapping)return t.REPEAT;if(a===THREE.ClampToEdgeWrapping)return t.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return t.MIRRORED_REPEAT;
 if(a===THREE.NearestFilter)return t.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return t.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return t.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return t.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return t.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return t.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return t.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return t.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return t.UNSIGNED_SHORT_5_5_5_1;
 if(a===THREE.NearestFilter)return t.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return t.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return t.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return t.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return t.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return t.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return t.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return t.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return t.UNSIGNED_SHORT_5_5_5_1;
 if(a===THREE.UnsignedShort565Type)return t.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return t.BYTE;if(a===THREE.ShortType)return t.SHORT;if(a===THREE.UnsignedShortType)return t.UNSIGNED_SHORT;if(a===THREE.IntType)return t.INT;if(a===THREE.UnsignedIntType)return t.UNSIGNED_INT;if(a===THREE.FloatType)return t.FLOAT;b=W.get("OES_texture_half_float");if(null!==b&&a===THREE.HalfFloatType)return b.HALF_FLOAT_OES;if(a===THREE.AlphaFormat)return t.ALPHA;if(a===THREE.RGBFormat)return t.RGB;if(a===THREE.RGBAFormat)return t.RGBA;
 if(a===THREE.UnsignedShort565Type)return t.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return t.BYTE;if(a===THREE.ShortType)return t.SHORT;if(a===THREE.UnsignedShortType)return t.UNSIGNED_SHORT;if(a===THREE.IntType)return t.INT;if(a===THREE.UnsignedIntType)return t.UNSIGNED_INT;if(a===THREE.FloatType)return t.FLOAT;b=W.get("OES_texture_half_float");if(null!==b&&a===THREE.HalfFloatType)return b.HALF_FLOAT_OES;if(a===THREE.AlphaFormat)return t.ALPHA;if(a===THREE.RGBFormat)return t.RGB;if(a===THREE.RGBAFormat)return t.RGBA;
 if(a===THREE.LuminanceFormat)return t.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return t.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return t.FUNC_ADD;if(a===THREE.SubtractEquation)return t.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return t.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return t.ZERO;if(a===THREE.OneFactor)return t.ONE;if(a===THREE.SrcColorFactor)return t.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return t.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return t.SRC_ALPHA;
 if(a===THREE.LuminanceFormat)return t.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return t.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return t.FUNC_ADD;if(a===THREE.SubtractEquation)return t.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return t.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return t.ZERO;if(a===THREE.OneFactor)return t.ONE;if(a===THREE.SrcColorFactor)return t.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return t.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return t.SRC_ALPHA;
 if(a===THREE.OneMinusSrcAlphaFactor)return t.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return t.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return t.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return t.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return t.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return t.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.OneMinusSrcAlphaFactor)return t.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return t.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return t.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return t.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return t.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return t.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=
 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.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var C=void 0!==a.canvas?a.canvas:document.createElement("canvas"),M=void 0!==a.context?a.context:null,I=C.width,D=C.height,A=1,H=void 0!==a.alpha?a.alpha:!1,O=void 0!==a.depth?a.depth:!0,R=void 0!==a.stencil?a.stencil:!0,T=void 0!==a.antialias?a.antialias:!1,Q=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:
-!0,S=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,G=new THREE.Color(0),ha=0,X=[],ia=[],qa=-1,za=[],Ha=-1,ra=[],bb=-1,Ja=[],Ka=-1,ua=new Float32Array(8),Ra=[],Sa=[];this.domElement=C;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,sa=[],rb=null,Qa=null,ab=-1,wa="",$a=null,lb=0,Ia=
-0,Aa=0,Ba=C.width,Ca=C.height,pb=0,qb=0,kb=new THREE.Frustum,Ta=new THREE.Matrix4,ba=new THREE.Vector3,fa=new THREE.Vector3,jb=!0,Pb={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:[]}},Da={programs:0,geometries:0,textures:0},va={calls:0,vertices:0,faces:0,points:0};
-this.info={render:va,memory:Da,programs:sa};var t;try{H={alpha:H,depth:O,stencil:R,antialias:T,premultipliedAlpha:Q,preserveDrawingBuffer:S};t=M||C.getContext("webgl",H)||C.getContext("experimental-webgl",H);if(null===t){if(null!==C.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}C.addEventListener("webglcontextlost",e,!1)}catch(Kb){console.error("THREE.WebGLRenderer: "+Kb)}var W=new THREE.WebGLExtensions(t);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);var ka=new THREE.WebGLCapabilities(t,W,a),N=new THREE.WebGLState(t,W,L),$=new THREE.WebGLProperties,ta=new THREE.WebGLObjects(t,$,this.info),Lb=new THREE.WebGLBufferRenderer(t,W,va),Mb=new THREE.WebGLIndexedBufferRenderer(t,W,va);c();this.context=t;this.capabilities=
-ka;this.extensions=W;this.state=N;var ma=new THREE.WebGLShadowMap(this,X,ta);this.shadowMap=ma;var Nb=new THREE.SpritePlugin(this,Ra),Ob=new THREE.LensFlarePlugin(this,Sa);this.getContext=function(){return t};this.getContextAttributes=function(){return t.getContextAttributes()};this.forceContextLoss=function(){W.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){var a;return function(){if(void 0!==a)return a;var b=W.get("EXT_texture_filter_anisotropic");return a=null!==b?t.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):
-0}}();this.getPrecision=function(){return ka.precision};this.getPixelRatio=function(){return A};this.setPixelRatio=function(a){void 0!==a&&(A=a)};this.getSize=function(){return{width:I,height:D}};this.setSize=function(a,b,c){I=a;D=b;C.width=a*A;C.height=b*A;!1!==c&&(C.style.width=a+"px",C.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){Ia=a*A;Aa=b*A;Ba=c*A;Ca=d*A;t.viewport(Ia,Aa,Ba,Ca)};this.setScissor=function(a,b,c,d){t.scissor(a*A,b*A,c*A,d*A)};this.enableScissorTest=
-function(a){N.setScissorTest(a)};this.getClearColor=function(){return G};this.setClearColor=function(a,c){G.set(a);ha=void 0!==c?c:1;b(G.r,G.g,G.b,ha)};this.getClearAlpha=function(){return ha};this.setClearAlpha=function(a){ha=a;b(G.r,G.g,G.b,ha)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=t.COLOR_BUFFER_BIT;if(void 0===b||b)d|=t.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=t.STENCIL_BUFFER_BIT;t.clear(d)};this.clearColor=function(){t.clear(t.COLOR_BUFFER_BIT)};this.clearDepth=function(){t.clear(t.DEPTH_BUFFER_BIT)};
-this.clearStencil=function(){t.clear(t.STENCIL_BUFFER_BIT)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=d;this.dispose=function(){C.removeEventListener("webglcontextlost",e,!1)};this.renderBufferImmediate=function(a,b,c){N.initAttributes();var d=$.get(a);a.hasPositions&&!d.position&&(d.position=t.createBuffer());a.hasNormals&&!d.normal&&(d.normal=t.createBuffer());a.hasUvs&&!d.uv&&(d.uv=t.createBuffer());a.hasColors&&!d.color&&(d.color=t.createBuffer());
-b=b.getAttributes();a.hasPositions&&(t.bindBuffer(t.ARRAY_BUFFER,d.position),t.bufferData(t.ARRAY_BUFFER,a.positionArray,t.DYNAMIC_DRAW),N.enableAttribute(b.position),t.vertexAttribPointer(b.position,3,t.FLOAT,!1,0,0));if(a.hasNormals){t.bindBuffer(t.ARRAY_BUFFER,d.normal);if("MeshPhongMaterial"!==c.type&&c.shading===THREE.FlatShading)for(var e=0,f=3*a.count;e<f;e+=9){var g=a.normalArray,h=(g[e+0]+g[e+3]+g[e+6])/3,k=(g[e+1]+g[e+4]+g[e+7])/3,l=(g[e+2]+g[e+5]+g[e+8])/3;g[e+0]=h;g[e+1]=k;g[e+2]=l;g[e+
-3]=h;g[e+4]=k;g[e+5]=l;g[e+6]=h;g[e+7]=k;g[e+8]=l}t.bufferData(t.ARRAY_BUFFER,a.normalArray,t.DYNAMIC_DRAW);N.enableAttribute(b.normal);t.vertexAttribPointer(b.normal,3,t.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(t.bindBuffer(t.ARRAY_BUFFER,d.uv),t.bufferData(t.ARRAY_BUFFER,a.uvArray,t.DYNAMIC_DRAW),N.enableAttribute(b.uv),t.vertexAttribPointer(b.uv,2,t.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(t.bindBuffer(t.ARRAY_BUFFER,d.color),t.bufferData(t.ARRAY_BUFFER,a.colorArray,t.DYNAMIC_DRAW),
-N.enableAttribute(b.color),t.vertexAttribPointer(b.color,3,t.FLOAT,!1,0,0));N.disableUnusedAttributes();t.drawArrays(t.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f,g){u(e);var h=x(a,b,c,e,f),k=!1;a=d.id+"_"+h.id+"_"+e.wireframe;a!==wa&&(wa=a,k=!0);a=f.morphTargetInfluences;if(void 0!==a){b=[];c=0;for(k=a.length;c<k;c++){var m=a[c];b.push([m,c])}b.sort(l);8<b.length&&(b.length=8);var n=d.morphAttributes;c=0;for(k=b.length;c<k;c++)m=b[c],ua[c]=m[0],0!==m[0]?(a=m[1],!0===
-e.morphTargets&&n.position&&d.addAttribute("morphTarget"+c,n.position[a]),!0===e.morphNormals&&n.normal&&d.addAttribute("morphNormal"+c,n.normal[a])):(!0===e.morphTargets&&d.removeAttribute("morphTarget"+c),!0===e.morphNormals&&d.removeAttribute("morphNormal"+c));a=h.getUniforms();null!==a.morphTargetInfluences&&t.uniform1fv(a.morphTargetInfluences,ua);k=!0}a=d.index;c=d.attributes.position;!0===e.wireframe&&(a=ta.getWireframeAttribute(d));null!==a?(b=Mb,b.setIndex(a)):b=Lb;if(k){a:{var k=void 0,
-q;if(d instanceof THREE.InstancedBufferGeometry&&(q=W.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===k&&(k=0);N.initAttributes();var m=d.attributes,h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var s=h[p];if(0<=s){var r=m[p];if(void 0!==r){N.enableAttribute(s);var v=r.itemSize,w=ta.getAttributeBuffer(r);if(r instanceof
-THREE.InterleavedBufferAttribute){var y=r.data,K=y.stride,r=r.offset;t.bindBuffer(t.ARRAY_BUFFER,w);t.vertexAttribPointer(s,v,t.FLOAT,!1,K*y.array.BYTES_PER_ELEMENT,(k*K+r)*y.array.BYTES_PER_ELEMENT);if(y instanceof THREE.InstancedInterleavedBuffer){if(null===q){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");break a}q.vertexAttribDivisorANGLE(s,y.meshPerAttribute);void 0===d.maxInstancedCount&&
+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 B=void 0!==a.canvas?a.canvas:document.createElement("canvas"),L=void 0!==a.context?a.context:null,G=B.width,K=B.height,D=1,I=void 0!==a.alpha?a.alpha:!1,P=void 0!==a.depth?a.depth:!0,R=void 0!==a.stencil?a.stencil:!0,V=void 0!==a.antialias?a.antialias:!1,Q=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:
+!0,S=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,F=new THREE.Color(0),ja=0,Y=[],la=[],va=-1,za=[],Ia=-1,ra=[],bb=-1,Ja=[],Ka=-1,ta=new Float32Array(8),Ra=[],ab=[];this.domElement=B;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,qa=[],rb=null,Qa=null,$a=-1,wa="",Za=null,lb=0,Ha=
+0,Aa=0,Ba=B.width,Ca=B.height,pb=0,qb=0,kb=new THREE.Frustum,Sa=new THREE.Matrix4,ba=new THREE.Vector3,fa=new THREE.Vector3,jb=!0,Pb={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:[]}},Da={programs:0,geometries:0,textures:0},ua={calls:0,vertices:0,faces:0,points:0};
+this.info={render:ua,memory:Da,programs:qa};var t;try{I={alpha:I,depth:P,stencil:R,antialias:V,premultipliedAlpha:Q,preserveDrawingBuffer:S};t=L||B.getContext("webgl",I)||B.getContext("experimental-webgl",I);if(null===t){if(null!==B.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}B.addEventListener("webglcontextlost",e,!1)}catch(Kb){console.error("THREE.WebGLRenderer: "+Kb)}var W=new THREE.WebGLExtensions(t);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);var ia=new THREE.WebGLCapabilities(t,W,a),M=new THREE.WebGLState(t,W,N),$=new THREE.WebGLProperties,sa=new THREE.WebGLObjects(t,$,this.info),Lb=new THREE.WebGLBufferRenderer(t,W,ua),Mb=new THREE.WebGLIndexedBufferRenderer(t,W,ua);c();this.context=t;this.capabilities=
+ia;this.extensions=W;this.state=M;var ma=new THREE.WebGLShadowMap(this,Y,sa);this.shadowMap=ma;var Nb=new THREE.SpritePlugin(this,Ra),Ob=new THREE.LensFlarePlugin(this,ab);this.getContext=function(){return t};this.getContextAttributes=function(){return t.getContextAttributes()};this.forceContextLoss=function(){W.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){var a;return function(){if(void 0!==a)return a;var b=W.get("EXT_texture_filter_anisotropic");return a=null!==b?t.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):
+0}}();this.getPrecision=function(){return ia.precision};this.getPixelRatio=function(){return D};this.setPixelRatio=function(a){void 0!==a&&(D=a)};this.getSize=function(){return{width:G,height:K}};this.setSize=function(a,b,c){G=a;K=b;B.width=a*D;B.height=b*D;!1!==c&&(B.style.width=a+"px",B.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){Ha=a*D;Aa=b*D;Ba=c*D;Ca=d*D;t.viewport(Ha,Aa,Ba,Ca)};this.setScissor=function(a,b,c,d){t.scissor(a*D,b*D,c*D,d*D)};this.enableScissorTest=
+function(a){M.setScissorTest(a)};this.getClearColor=function(){return F};this.setClearColor=function(a,c){F.set(a);ja=void 0!==c?c:1;b(F.r,F.g,F.b,ja)};this.getClearAlpha=function(){return ja};this.setClearAlpha=function(a){ja=a;b(F.r,F.g,F.b,ja)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=t.COLOR_BUFFER_BIT;if(void 0===b||b)d|=t.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=t.STENCIL_BUFFER_BIT;t.clear(d)};this.clearColor=function(){t.clear(t.COLOR_BUFFER_BIT)};this.clearDepth=function(){t.clear(t.DEPTH_BUFFER_BIT)};
+this.clearStencil=function(){t.clear(t.STENCIL_BUFFER_BIT)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=d;this.dispose=function(){B.removeEventListener("webglcontextlost",e,!1)};this.renderBufferImmediate=function(a,b,c){M.initAttributes();var d=$.get(a);a.hasPositions&&!d.position&&(d.position=t.createBuffer());a.hasNormals&&!d.normal&&(d.normal=t.createBuffer());a.hasUvs&&!d.uv&&(d.uv=t.createBuffer());a.hasColors&&!d.color&&(d.color=t.createBuffer());
+b=b.getAttributes();a.hasPositions&&(t.bindBuffer(t.ARRAY_BUFFER,d.position),t.bufferData(t.ARRAY_BUFFER,a.positionArray,t.DYNAMIC_DRAW),M.enableAttribute(b.position),t.vertexAttribPointer(b.position,3,t.FLOAT,!1,0,0));if(a.hasNormals){t.bindBuffer(t.ARRAY_BUFFER,d.normal);if("MeshPhongMaterial"!==c.type&&c.shading===THREE.FlatShading)for(var e=0,f=3*a.count;e<f;e+=9){var g=a.normalArray,h=(g[e+0]+g[e+3]+g[e+6])/3,k=(g[e+1]+g[e+4]+g[e+7])/3,l=(g[e+2]+g[e+5]+g[e+8])/3;g[e+0]=h;g[e+1]=k;g[e+2]=l;g[e+
+3]=h;g[e+4]=k;g[e+5]=l;g[e+6]=h;g[e+7]=k;g[e+8]=l}t.bufferData(t.ARRAY_BUFFER,a.normalArray,t.DYNAMIC_DRAW);M.enableAttribute(b.normal);t.vertexAttribPointer(b.normal,3,t.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(t.bindBuffer(t.ARRAY_BUFFER,d.uv),t.bufferData(t.ARRAY_BUFFER,a.uvArray,t.DYNAMIC_DRAW),M.enableAttribute(b.uv),t.vertexAttribPointer(b.uv,2,t.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(t.bindBuffer(t.ARRAY_BUFFER,d.color),t.bufferData(t.ARRAY_BUFFER,a.colorArray,t.DYNAMIC_DRAW),
+M.enableAttribute(b.color),t.vertexAttribPointer(b.color,3,t.FLOAT,!1,0,0));M.disableUnusedAttributes();t.drawArrays(t.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f,g){u(e);var h=x(a,b,c,e,f),k=!1;a=d.id+"_"+h.id+"_"+e.wireframe;a!==wa&&(wa=a,k=!0);a=f.morphTargetInfluences;if(void 0!==a){b=[];c=0;for(k=a.length;c<k;c++){var m=a[c];b.push([m,c])}b.sort(l);8<b.length&&(b.length=8);var n=d.morphAttributes;c=0;for(k=b.length;c<k;c++)m=b[c],ta[c]=m[0],0!==m[0]?(a=m[1],!0===
+e.morphTargets&&n.position&&d.addAttribute("morphTarget"+c,n.position[a]),!0===e.morphNormals&&n.normal&&d.addAttribute("morphNormal"+c,n.normal[a])):(!0===e.morphTargets&&d.removeAttribute("morphTarget"+c),!0===e.morphNormals&&d.removeAttribute("morphNormal"+c));a=h.getUniforms();null!==a.morphTargetInfluences&&t.uniform1fv(a.morphTargetInfluences,ta);k=!0}a=d.index;c=d.attributes.position;!0===e.wireframe&&(a=sa.getWireframeAttribute(d));null!==a?(b=Mb,b.setIndex(a)):b=Lb;if(k){a:{var k=void 0,
+q;if(d instanceof THREE.InstancedBufferGeometry&&(q=W.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===k&&(k=0);M.initAttributes();var m=d.attributes,h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var s=h[p];if(0<=s){var r=m[p];if(void 0!==r){M.enableAttribute(s);var v=r.itemSize,w=sa.getAttributeBuffer(r);if(r instanceof
+THREE.InterleavedBufferAttribute){var y=r.data,H=y.stride,r=r.offset;t.bindBuffer(t.ARRAY_BUFFER,w);t.vertexAttribPointer(s,v,t.FLOAT,!1,H*y.array.BYTES_PER_ELEMENT,(k*H+r)*y.array.BYTES_PER_ELEMENT);if(y instanceof THREE.InstancedInterleavedBuffer){if(null===q){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");break a}q.vertexAttribDivisorANGLE(s,y.meshPerAttribute);void 0===d.maxInstancedCount&&
 (d.maxInstancedCount=y.meshPerAttribute*y.count)}}else if(t.bindBuffer(t.ARRAY_BUFFER,w),t.vertexAttribPointer(s,v,t.FLOAT,!1,0,k*v*4),r instanceof THREE.InstancedBufferAttribute){if(null===q){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");break a}q.vertexAttribDivisorANGLE(s,r.meshPerAttribute);void 0===d.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)}}else if(void 0!==
 (d.maxInstancedCount=y.meshPerAttribute*y.count)}}else if(t.bindBuffer(t.ARRAY_BUFFER,w),t.vertexAttribPointer(s,v,t.FLOAT,!1,0,k*v*4),r instanceof THREE.InstancedBufferAttribute){if(null===q){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferAttribute but hardware does not support extension ANGLE_instanced_arrays.");break a}q.vertexAttribDivisorANGLE(s,r.meshPerAttribute);void 0===d.maxInstancedCount&&(d.maxInstancedCount=r.meshPerAttribute*r.count)}}else if(void 0!==
-n&&(v=n[p],void 0!==v))switch(v.length){case 2:t.vertexAttrib2fv(s,v);break;case 3:t.vertexAttrib3fv(s,v);break;case 4:t.vertexAttrib4fv(s,v);break;default:t.vertexAttrib1fv(s,v)}}}N.disableUnusedAttributes()}null!==a&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,ta.getAttributeBuffer(a))}void 0===g&&(g={start:0,count:null!==a?a.array.length:c instanceof THREE.InterleavedBufferAttribute?c.data.array.length/3:c.array.length/3});f instanceof THREE.Mesh?(!0===e.wireframe?(N.setLineWidth(e.wireframeLinewidth*
-A),b.setMode(t.LINES)):b.setMode(t.TRIANGLES),d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?b.renderInstances(d):c instanceof THREE.InterleavedBufferAttribute?b.render(0,c.data.count):b.render(g.start,g.count)):f instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),N.setLineWidth(d*A),f instanceof THREE.LineSegments?b.setMode(t.LINES):b.setMode(t.LINE_STRIP),b.render(g.start,g.count)):f instanceof THREE.PointCloud&&(b.setMode(t.POINTS),b.render(g.start,g.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;wa="";ab=-1;$a=null;jb=!0;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);Ta.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);kb.setFromMatrix(Ta);X.length=0;Ka=bb=Ha=qa=-1;Ra.length=0;Sa.length=0;q(a);ia.length=qa+1;za.length=Ha+1;ra.length=bb+1;Ja.length=
-Ka+1;!0===la.sortObjects&&(ia.sort(n),za.sort(p));ma.render(a,b);va.calls=0;va.vertices=0;va.faces=0;va.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,s(ia,b,X,e,d),s(za,b,X,e,d),r(ra,b,X,e,d),r(Ja,b,X,e,d)):(N.setBlending(THREE.NoBlending),s(ia,b,X,e),r(ra,b,X,e),s(za,b,X,e),r(Ja,b,X,e));Nb.render(a,b);Ob.render(a,b,pb,qb);c&&c.generateMipmaps&&c.minFilter!==THREE.NearestFilter&&
-c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(N.bindTexture(t.TEXTURE_CUBE_MAP,$.get(c).__webglTexture),t.generateMipmap(t.TEXTURE_CUBE_MAP),N.bindTexture(t.TEXTURE_CUBE_MAP,null)):(N.bindTexture(t.TEXTURE_2D,$.get(c).__webglTexture),t.generateMipmap(t.TEXTURE_2D),N.bindTexture(t.TEXTURE_2D,null)));N.setDepthTest(!0);N.setDepthWrite(!0);N.setColorWrite(!0)}};var $b={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(t.CULL_FACE):(b===THREE.FrontFaceDirectionCW?t.frontFace(t.CW):t.frontFace(t.CCW),a===THREE.CullFaceBack?t.cullFace(t.BACK):a===THREE.CullFaceFront?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK),N.enable(t.CULL_FACE))};this.setTexture=function(a,b){var c=$.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",g),c.__webglTexture=t.createTexture(),Da.textures++);N.activeTexture(t.TEXTURE0+b);N.bindTexture(t.TEXTURE_2D,c.__webglTexture);t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY);t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
-a.premultiplyAlpha);t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=F(a.image,ka.maxTextureSize);var e=a.image,d=THREE.Math.isPowerOfTwo(e.width)&&THREE.Math.isPowerOfTwo(e.height),f=L(a.format),h=L(a.type);E(t.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++)e=k[l],N.texImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,f,h,e.data);a.generateMipmaps=!1}else N.texImage2D(t.TEXTURE_2D,0,f,e.width,e.height,0,f,h,e.data);else if(a instanceof
-THREE.CompressedTexture)for(l=0,m=k.length;l<m;l++)e=k[l],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<N.getCompressedTextureFormats().indexOf(f)?N.compressedTexImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):N.texImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,f,h,e.data);else if(0<k.length&&d){l=0;for(m=k.length;l<m;l++)e=k[l],N.texImage2D(t.TEXTURE_2D,l,f,f,h,e);a.generateMipmaps=
-!1}else N.texImage2D(t.TEXTURE_2D,0,f,f,h,a.image);a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_2D);c.__version=a.version;if(a.onUpdate)a.onUpdate(a)}}else N.activeTexture(t.TEXTURE0+b),N.bindTexture(t.TEXTURE_2D,c.__webglTexture)};this.setRenderTarget=function(a){var b=a instanceof THREE.WebGLRenderTargetCube;if(a&&void 0===$.get(a).__webglFramebuffer){var c=$.get(a);void 0===a.depthBuffer&&(a.depthBuffer=!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",f);c.__webglTexture=
-t.createTexture();Da.textures++;var d=THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height),e=L(a.format),g=L(a.type);if(b){c.__webglFramebuffer=[];c.__webglRenderbuffer=[];N.bindTexture(t.TEXTURE_CUBE_MAP,c.__webglTexture);E(t.TEXTURE_CUBE_MAP,a,d);for(var h=0;6>h;h++)c.__webglFramebuffer[h]=t.createFramebuffer(),c.__webglRenderbuffer[h]=t.createRenderbuffer(),N.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e,a.width,a.height,0,e,g,null),z(c.__webglFramebuffer[h],a,t.TEXTURE_CUBE_MAP_POSITIVE_X+
-h),B(c.__webglRenderbuffer[h],a);a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_CUBE_MAP)}else c.__webglFramebuffer=t.createFramebuffer(),c.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:t.createRenderbuffer(),N.bindTexture(t.TEXTURE_2D,c.__webglTexture),E(t.TEXTURE_2D,a,d),N.texImage2D(t.TEXTURE_2D,0,e,a.width,a.height,0,e,g,null),z(c.__webglFramebuffer,a,t.TEXTURE_2D),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,
-t.RENDERBUFFER,c.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,c.__webglRenderbuffer):B(c.__webglRenderbuffer,a),a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_2D);b?N.bindTexture(t.TEXTURE_CUBE_MAP,null):N.bindTexture(t.TEXTURE_2D,null);t.bindRenderbuffer(t.RENDERBUFFER,null);t.bindFramebuffer(t.FRAMEBUFFER,null)}a?(c=$.get(a),b=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,a=a.height,
-e=d=0):(b=null,c=Ba,a=Ca,d=Ia,e=Aa);b!==Qa&&(t.bindFramebuffer(t.FRAMEBUFFER,b),t.viewport(d,e,c,a),Qa=b);pb=c;qb=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($.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.");
+n&&(v=n[p],void 0!==v))switch(v.length){case 2:t.vertexAttrib2fv(s,v);break;case 3:t.vertexAttrib3fv(s,v);break;case 4:t.vertexAttrib4fv(s,v);break;default:t.vertexAttrib1fv(s,v)}}}M.disableUnusedAttributes()}null!==a&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,sa.getAttributeBuffer(a))}void 0===g&&(g={start:0,count:null!==a?a.array.length:c instanceof THREE.InterleavedBufferAttribute?c.data.array.length/3:c.array.length/3});f instanceof THREE.Mesh?(!0===e.wireframe?(M.setLineWidth(e.wireframeLinewidth*
+D),b.setMode(t.LINES)):b.setMode(t.TRIANGLES),d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?b.renderInstances(d):c instanceof THREE.InterleavedBufferAttribute?b.render(0,c.data.count):b.render(g.start,g.count)):f instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),M.setLineWidth(d*D),f instanceof THREE.LineSegments?b.setMode(t.LINES):b.setMode(t.LINE_STRIP),b.render(g.start,g.count)):f instanceof THREE.PointCloud&&(b.setMode(t.POINTS),b.render(g.start,g.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;wa="";$a=-1;Za=null;jb=!0;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);Sa.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);kb.setFromMatrix(Sa);Y.length=0;Ka=bb=Ia=va=-1;Ra.length=0;ab.length=0;q(a);la.length=va+1;za.length=Ia+1;ra.length=bb+1;Ja.length=
+Ka+1;!0===ka.sortObjects&&(la.sort(n),za.sort(p));ma.render(a,b);ua.calls=0;ua.vertices=0;ua.faces=0;ua.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,s(la,b,Y,e,d),s(za,b,Y,e,d),r(ra,b,Y,e,d),r(Ja,b,Y,e,d)):(M.setBlending(THREE.NoBlending),s(la,b,Y,e),r(ra,b,Y,e),s(za,b,Y,e),r(Ja,b,Y,e));Nb.render(a,b);Ob.render(a,b,pb,qb);c&&c.generateMipmaps&&c.minFilter!==THREE.NearestFilter&&
+c.minFilter!==THREE.LinearFilter&&(c instanceof THREE.WebGLRenderTargetCube?(M.bindTexture(t.TEXTURE_CUBE_MAP,$.get(c).__webglTexture),t.generateMipmap(t.TEXTURE_CUBE_MAP),M.bindTexture(t.TEXTURE_CUBE_MAP,null)):(M.bindTexture(t.TEXTURE_2D,$.get(c).__webglTexture),t.generateMipmap(t.TEXTURE_2D),M.bindTexture(t.TEXTURE_2D,null)));M.setDepthTest(!0);M.setDepthWrite(!0);M.setColorWrite(!0)}};var $b={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?M.disable(t.CULL_FACE):(b===THREE.FrontFaceDirectionCW?t.frontFace(t.CW):t.frontFace(t.CCW),a===THREE.CullFaceBack?t.cullFace(t.BACK):a===THREE.CullFaceFront?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK),M.enable(t.CULL_FACE))};this.setTexture=function(a,b){var c=$.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",g),c.__webglTexture=t.createTexture(),Da.textures++);M.activeTexture(t.TEXTURE0+b);M.bindTexture(t.TEXTURE_2D,c.__webglTexture);t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY);t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
+a.premultiplyAlpha);t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=E(a.image,ia.maxTextureSize);var e=a.image,d=THREE.Math.isPowerOfTwo(e.width)&&THREE.Math.isPowerOfTwo(e.height),f=N(a.format),h=N(a.type);A(t.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++)e=k[l],M.texImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,f,h,e.data);a.generateMipmaps=!1}else M.texImage2D(t.TEXTURE_2D,0,f,e.width,e.height,0,f,h,e.data);else if(a instanceof
+THREE.CompressedTexture)for(l=0,m=k.length;l<m;l++)e=k[l],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<M.getCompressedTextureFormats().indexOf(f)?M.compressedTexImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,e.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):M.texImage2D(t.TEXTURE_2D,l,f,e.width,e.height,0,f,h,e.data);else if(0<k.length&&d){l=0;for(m=k.length;l<m;l++)e=k[l],M.texImage2D(t.TEXTURE_2D,l,f,f,h,e);a.generateMipmaps=
+!1}else M.texImage2D(t.TEXTURE_2D,0,f,f,h,a.image);a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_2D);c.__version=a.version;if(a.onUpdate)a.onUpdate(a)}}else M.activeTexture(t.TEXTURE0+b),M.bindTexture(t.TEXTURE_2D,c.__webglTexture)};this.setRenderTarget=function(a){var b=a instanceof THREE.WebGLRenderTargetCube;if(a&&void 0===$.get(a).__webglFramebuffer){var c=$.get(a);void 0===a.depthBuffer&&(a.depthBuffer=!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",f);c.__webglTexture=
+t.createTexture();Da.textures++;var d=THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height),e=N(a.format),g=N(a.type);if(b){c.__webglFramebuffer=[];c.__webglRenderbuffer=[];M.bindTexture(t.TEXTURE_CUBE_MAP,c.__webglTexture);A(t.TEXTURE_CUBE_MAP,a,d);for(var h=0;6>h;h++)c.__webglFramebuffer[h]=t.createFramebuffer(),c.__webglRenderbuffer[h]=t.createRenderbuffer(),M.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,e,a.width,a.height,0,e,g,null),z(c.__webglFramebuffer[h],a,t.TEXTURE_CUBE_MAP_POSITIVE_X+
+h),C(c.__webglRenderbuffer[h],a);a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_CUBE_MAP)}else c.__webglFramebuffer=t.createFramebuffer(),c.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:t.createRenderbuffer(),M.bindTexture(t.TEXTURE_2D,c.__webglTexture),A(t.TEXTURE_2D,a,d),M.texImage2D(t.TEXTURE_2D,0,e,a.width,a.height,0,e,g,null),z(c.__webglFramebuffer,a,t.TEXTURE_2D),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,
+t.RENDERBUFFER,c.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,c.__webglRenderbuffer):C(c.__webglRenderbuffer,a),a.generateMipmaps&&d&&t.generateMipmap(t.TEXTURE_2D);b?M.bindTexture(t.TEXTURE_CUBE_MAP,null):M.bindTexture(t.TEXTURE_2D,null);t.bindRenderbuffer(t.RENDERBUFFER,null);t.bindFramebuffer(t.FRAMEBUFFER,null)}a?(c=$.get(a),b=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,a=a.height,
+e=d=0):(b=null,c=Ba,a=Ca,d=Ha,e=Aa);b!==Qa&&(t.bindFramebuffer(t.FRAMEBUFFER,b),t.viewport(d,e,c,a),Qa=b);pb=c;qb=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($.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;$.get(a).__webglFramebuffer!==Qa&&(t.bindFramebuffer(t.FRAMEBUFFER,$.get(a).__webglFramebuffer),g=!0);t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE?t.readPixels(b,c,d,e,t.RGBA,t.UNSIGNED_BYTE,f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");g&&t.bindFramebuffer(t.FRAMEBUFFER,Qa)}};this.supportsFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");
 else{var g=!1;$.get(a).__webglFramebuffer!==Qa&&(t.bindFramebuffer(t.FRAMEBUFFER,$.get(a).__webglFramebuffer),g=!0);t.checkFramebufferStatus(t.FRAMEBUFFER)===t.FRAMEBUFFER_COMPLETE?t.readPixels(b,c,d,e,t.RGBA,t.UNSIGNED_BYTE,f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");g&&t.bindFramebuffer(t.FRAMEBUFFER,Qa)}};this.supportsFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");
 return W.get("OES_texture_float")};this.supportsHalfFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return W.get("OES_texture_half_float")};this.supportsStandardDerivatives=function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return W.get("OES_standard_derivatives")};this.supportsCompressedTextureS3TC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");
 return W.get("OES_texture_float")};this.supportsHalfFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return W.get("OES_texture_half_float")};this.supportsStandardDerivatives=function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");return W.get("OES_standard_derivatives")};this.supportsCompressedTextureS3TC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");
-return W.get("WEBGL_compressed_texture_s3tc")};this.supportsCompressedTexturePVRTC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return W.get("WEBGL_compressed_texture_pvrtc")};this.supportsBlendMinMax=function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return W.get("EXT_blend_minmax")};this.supportsVertexTextures=function(){return ka.vertexTextures};
+return W.get("WEBGL_compressed_texture_s3tc")};this.supportsCompressedTexturePVRTC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return W.get("WEBGL_compressed_texture_pvrtc")};this.supportsBlendMinMax=function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return W.get("EXT_blend_minmax")};this.supportsVertexTextures=function(){return ia.vertexTextures};
 this.supportsInstancedArrays=function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return W.get("ANGLE_instanced_arrays")};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.supportsInstancedArrays=function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return W.get("ANGLE_instanced_arrays")};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},
 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}}})};
 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}}})};
@@ -620,35 +620,35 @@ THREE.WebGLShadowMap=function(a,b,c){function d(a,b){var c=a.geometry,c=void 0!=
 vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,morphTargets:!0}),r=new THREE.ShaderMaterial({uniforms:m,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,skinning:!0}),u=new THREE.ShaderMaterial({uniforms:m,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,morphTargets:!0,skinning:!0});q._shadowPass=!0;s._shadowPass=!0;r._shadowPass=!0;u._shadowPass=!0;var x=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=THREE.PCFShadowMap;this.cullFace=THREE.CullFaceFront;
 vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,morphTargets:!0}),r=new THREE.ShaderMaterial({uniforms:m,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,skinning:!0}),u=new THREE.ShaderMaterial({uniforms:m,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader,morphTargets:!0,skinning:!0});q._shadowPass=!0;s._shadowPass=!0;r._shadowPass=!0;u._shadowPass=!0;var x=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=THREE.PCFShadowMap;this.cullFace=THREE.CullFaceFront;
 this.render=function(m,q){if(!1!==x.enabled&&(!1!==x.autoUpdate||!1!==x.needsUpdate)){g.clearColor(1,1,1,1);f.disable(g.BLEND);f.enable(g.CULL_FACE);g.frontFace(g.CCW);x.cullFace===THREE.CullFaceFront?g.cullFace(g.FRONT):g.cullFace(g.BACK);f.setDepthTest(!0);for(var p=0,s=b.length;p<s;p++){var r=b[p];if(r.castShadow){if(!r.shadowMap){var u=THREE.LinearFilter;x.type===THREE.PCFSoftShadowMap&&(u=THREE.NearestFilter);r.shadowMap=new THREE.WebGLRenderTarget(r.shadowMapWidth,r.shadowMapHeight,{minFilter:u,
 this.render=function(m,q){if(!1!==x.enabled&&(!1!==x.autoUpdate||!1!==x.needsUpdate)){g.clearColor(1,1,1,1);f.disable(g.BLEND);f.enable(g.CULL_FACE);g.frontFace(g.CCW);x.cullFace===THREE.CullFaceFront?g.cullFace(g.FRONT):g.cullFace(g.BACK);f.setDepthTest(!0);for(var p=0,s=b.length;p<s;p++){var r=b[p];if(r.castShadow){if(!r.shadowMap){var u=THREE.LinearFilter;x.type===THREE.PCFSoftShadowMap&&(u=THREE.NearestFilter);r.shadowMap=new THREE.WebGLRenderTarget(r.shadowMapWidth,r.shadowMapHeight,{minFilter:u,
 magFilter:u,format:THREE.RGBAFormat});r.shadowMapSize=new THREE.Vector2(r.shadowMapWidth,r.shadowMapHeight);r.shadowMatrix=new THREE.Matrix4}if(!r.shadowCamera){if(r instanceof THREE.SpotLight)r.shadowCamera=new THREE.PerspectiveCamera(r.shadowCameraFov,r.shadowMapWidth/r.shadowMapHeight,r.shadowCameraNear,r.shadowCameraFar);else if(r instanceof THREE.DirectionalLight)r.shadowCamera=new THREE.OrthographicCamera(r.shadowCameraLeft,r.shadowCameraRight,r.shadowCameraTop,r.shadowCameraBottom,r.shadowCameraNear,
 magFilter:u,format:THREE.RGBAFormat});r.shadowMapSize=new THREE.Vector2(r.shadowMapWidth,r.shadowMapHeight);r.shadowMatrix=new THREE.Matrix4}if(!r.shadowCamera){if(r instanceof THREE.SpotLight)r.shadowCamera=new THREE.PerspectiveCamera(r.shadowCameraFov,r.shadowMapWidth/r.shadowMapHeight,r.shadowCameraNear,r.shadowCameraFar);else if(r instanceof THREE.DirectionalLight)r.shadowCamera=new THREE.OrthographicCamera(r.shadowCameraLeft,r.shadowCameraRight,r.shadowCameraTop,r.shadowCameraBottom,r.shadowCameraNear,
-r.shadowCameraFar);else{console.error("THREE.ShadowMapPlugin: Unsupported light type for shadow",r);continue}m.add(r.shadowCamera);!0===m.autoUpdate&&m.updateMatrixWorld()}r.shadowCameraVisible&&!r.cameraHelper&&(r.cameraHelper=new THREE.CameraHelper(r.shadowCamera),m.add(r.cameraHelper));var B=r.shadowMap,K=r.shadowMatrix,u=r.shadowCamera;u.position.setFromMatrixPosition(r.matrixWorld);l.setFromMatrixPosition(r.target.matrixWorld);u.lookAt(l);u.updateMatrixWorld();u.matrixWorldInverse.getInverse(u.matrixWorld);
-r.cameraHelper&&(r.cameraHelper.visible=r.shadowCameraVisible);r.shadowCameraVisible&&r.cameraHelper.update();K.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);K.multiply(u.projectionMatrix);K.multiply(u.matrixWorldInverse);k.multiplyMatrices(u.projectionMatrix,u.matrixWorldInverse);h.setFromMatrix(k);a.setRenderTarget(B);a.clear();n.length=0;e(m,u);r=0;for(B=n.length;r<B;r++){var K=n[r],L=c.update(K),C=K.material;if(C instanceof THREE.MeshFaceMaterial)for(var M=L.groups,C=C.materials,I=0,D=M.length;I<
-D;I++){var A=M[I],H=C[A.materialIndex];!0===H.visible&&a.renderBufferDirect(u,b,null,L,d(K,H),K,A)}else a.renderBufferDirect(u,b,null,L,d(K,C),K)}}}p=a.getClearColor();s=a.getClearAlpha();g.clearColor(p.r,p.g,p.b,s);f.enable(g.BLEND);x.cullFace===THREE.CullFaceFront&&g.cullFace(g.BACK);a.resetGLState();x.needsUpdate=!1}}};
-THREE.WebGLState=function(a,b,c){var d=this,e=new Uint8Array(16),g=new Uint8Array(16),f={},h=null,k=null,l=null,n=null,p=null,m=null,q=null,s=null,r=null,u=null,x=null,v=null,y=null,w=null,E=null,F=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),z=void 0,B={};this.init=function(){a.clearColor(0,0,0,1);a.clearDepth(1);a.clearStencil(0);this.enable(a.DEPTH_TEST);a.depthFunc(a.LEQUAL);a.frontFace(a.CCW);a.cullFace(a.BACK);this.enable(a.CULL_FACE);this.enable(a.BLEND);a.blendEquation(a.FUNC_ADD);a.blendFunc(a.SRC_ALPHA,
+r.shadowCameraFar);else{console.error("THREE.ShadowMapPlugin: Unsupported light type for shadow",r);continue}m.add(r.shadowCamera);!0===m.autoUpdate&&m.updateMatrixWorld()}r.shadowCameraVisible&&!r.cameraHelper&&(r.cameraHelper=new THREE.CameraHelper(r.shadowCamera),m.add(r.cameraHelper));var C=r.shadowMap,H=r.shadowMatrix,u=r.shadowCamera;u.position.setFromMatrixPosition(r.matrixWorld);l.setFromMatrixPosition(r.target.matrixWorld);u.lookAt(l);u.updateMatrixWorld();u.matrixWorldInverse.getInverse(u.matrixWorld);
+r.cameraHelper&&(r.cameraHelper.visible=r.shadowCameraVisible);r.shadowCameraVisible&&r.cameraHelper.update();H.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1);H.multiply(u.projectionMatrix);H.multiply(u.matrixWorldInverse);k.multiplyMatrices(u.projectionMatrix,u.matrixWorldInverse);h.setFromMatrix(k);a.setRenderTarget(C);a.clear();n.length=0;e(m,u);r=0;for(C=n.length;r<C;r++){var H=n[r],N=c.update(H),B=H.material;if(B instanceof THREE.MeshFaceMaterial)for(var L=N.groups,B=B.materials,G=0,K=L.length;G<
+K;G++){var D=L[G],I=B[D.materialIndex];!0===I.visible&&a.renderBufferDirect(u,b,null,N,d(H,I),H,D)}else a.renderBufferDirect(u,b,null,N,d(H,B),H)}}}p=a.getClearColor();s=a.getClearAlpha();g.clearColor(p.r,p.g,p.b,s);f.enable(g.BLEND);x.cullFace===THREE.CullFaceFront&&g.cullFace(g.BACK);a.resetGLState();x.needsUpdate=!1}}};
+THREE.WebGLState=function(a,b,c){var d=this,e=new Uint8Array(16),g=new Uint8Array(16),f={},h=null,k=null,l=null,n=null,p=null,m=null,q=null,s=null,r=null,u=null,x=null,v=null,y=null,w=null,A=null,E=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),z=void 0,C={};this.init=function(){a.clearColor(0,0,0,1);a.clearDepth(1);a.clearStencil(0);this.enable(a.DEPTH_TEST);a.depthFunc(a.LEQUAL);a.frontFace(a.CCW);a.cullFace(a.BACK);this.enable(a.CULL_FACE);this.enable(a.BLEND);a.blendEquation(a.FUNC_ADD);a.blendFunc(a.SRC_ALPHA,
 a.ONE_MINUS_SRC_ALPHA)};this.initAttributes=function(){for(var a=0,b=e.length;a<b;a++)e[a]=0};this.enableAttribute=function(b){e[b]=1;0===g[b]&&(a.enableVertexAttribArray(b),g[b]=1)};this.disableUnusedAttributes=function(){for(var b=0,c=g.length;b<c;b++)g[b]!==e[b]&&(a.disableVertexAttribArray(b),g[b]=0)};this.enable=function(b){!0!==f[b]&&(a.enable(b),f[b]=!0)};this.disable=function(b){!1!==f[b]&&(a.disable(b),f[b]=!1)};this.getCompressedTextureFormats=function(){if(null===h&&(h=[],b.get("WEBGL_compressed_texture_pvrtc")||
 a.ONE_MINUS_SRC_ALPHA)};this.initAttributes=function(){for(var a=0,b=e.length;a<b;a++)e[a]=0};this.enableAttribute=function(b){e[b]=1;0===g[b]&&(a.enableVertexAttribArray(b),g[b]=1)};this.disableUnusedAttributes=function(){for(var b=0,c=g.length;b<c;b++)g[b]!==e[b]&&(a.disableVertexAttribArray(b),g[b]=0)};this.enable=function(b){!0!==f[b]&&(a.enable(b),f[b]=!0)};this.disable=function(b){!1!==f[b]&&(a.disable(b),f[b]=!1)};this.getCompressedTextureFormats=function(){if(null===h&&(h=[],b.get("WEBGL_compressed_texture_pvrtc")||
 b.get("WEBGL_compressed_texture_s3tc")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)h.push(c[d]);return h};this.setBlending=function(b,d,e,f,g,h,r){b!==k&&(b===THREE.NoBlending?this.disable(a.BLEND):b===THREE.AdditiveBlending?(this.enable(a.BLEND),a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):b===THREE.SubtractiveBlending?(this.enable(a.BLEND),a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):b===THREE.MultiplyBlending?(this.enable(a.BLEND),
 b.get("WEBGL_compressed_texture_s3tc")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)h.push(c[d]);return h};this.setBlending=function(b,d,e,f,g,h,r){b!==k&&(b===THREE.NoBlending?this.disable(a.BLEND):b===THREE.AdditiveBlending?(this.enable(a.BLEND),a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):b===THREE.SubtractiveBlending?(this.enable(a.BLEND),a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):b===THREE.MultiplyBlending?(this.enable(a.BLEND),
 a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR)):b===THREE.CustomBlending?this.enable(a.BLEND):(this.enable(a.BLEND),a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),k=b);if(b===THREE.CustomBlending){g=g||d;h=h||e;r=r||f;if(d!==l||g!==m)a.blendEquationSeparate(c(d),c(g)),l=d,m=g;if(e!==n||f!==p||h!==q||r!==s)a.blendFuncSeparate(c(e),c(f),c(h),c(r)),n=e,p=f,q=h,s=r}else s=q=m=p=n=l=null};this.setDepthFunc=
 a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR)):b===THREE.CustomBlending?this.enable(a.BLEND):(this.enable(a.BLEND),a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),k=b);if(b===THREE.CustomBlending){g=g||d;h=h||e;r=r||f;if(d!==l||g!==m)a.blendEquationSeparate(c(d),c(g)),l=d,m=g;if(e!==n||f!==p||h!==q||r!==s)a.blendFuncSeparate(c(e),c(f),c(h),c(r)),n=e,p=f,q=h,s=r}else s=q=m=p=n=l=null};this.setDepthFunc=
 function(b){if(r!==b){if(b)switch(b){case THREE.NeverDepth:a.depthFunc(a.NEVER);break;case THREE.AlwaysDepth:a.depthFunc(a.ALWAYS);break;case THREE.LessDepth:a.depthFunc(a.LESS);break;case THREE.LessEqualDepth:a.depthFunc(a.LEQUAL);break;case THREE.EqualDepth:a.depthFunc(a.EQUAL);break;case THREE.GreaterEqualDepth:a.depthFunc(a.GEQUAL);break;case THREE.GreaterDepth:a.depthFunc(a.GREATER);break;case THREE.NotEqualDepth:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);
 function(b){if(r!==b){if(b)switch(b){case THREE.NeverDepth:a.depthFunc(a.NEVER);break;case THREE.AlwaysDepth:a.depthFunc(a.ALWAYS);break;case THREE.LessDepth:a.depthFunc(a.LESS);break;case THREE.LessEqualDepth:a.depthFunc(a.LEQUAL);break;case THREE.EqualDepth:a.depthFunc(a.EQUAL);break;case THREE.GreaterEqualDepth:a.depthFunc(a.GEQUAL);break;case THREE.GreaterDepth:a.depthFunc(a.GREATER);break;case THREE.NotEqualDepth:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);
-r=b}};this.setDepthTest=function(b){b?this.enable(a.DEPTH_TEST):this.disable(a.DEPTH_TEST)};this.setDepthWrite=function(b){u!==b&&(a.depthMask(b),u=b)};this.setColorWrite=function(b){x!==b&&(a.colorMask(b,b,b,b),x=b)};this.setFlipSided=function(b){v!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),v=b)};this.setLineWidth=function(b){b!==y&&(a.lineWidth(b),y=b)};this.setPolygonOffset=function(b,c,d){b?this.enable(a.POLYGON_OFFSET_FILL):this.disable(a.POLYGON_OFFSET_FILL);!b||w===c&&E===d||(a.polygonOffset(c,
-d),w=c,E=d)};this.setScissorTest=function(b){b?this.enable(a.SCISSOR_TEST):this.disable(a.SCISSOR_TEST)};this.activeTexture=function(b){void 0===b&&(b=a.TEXTURE0+F-1);z!==b&&(a.activeTexture(b),z=b)};this.bindTexture=function(b,c){void 0===z&&d.activeTexture();var e=B[z];void 0===e&&(e={type:void 0,texture:void 0},B[z]=e);if(e.type!==b||e.texture!==c)a.bindTexture(b,c),e.type=b,e.texture=c};this.compressedTexImage2D=function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(b){console.error(b)}};
+r=b}};this.setDepthTest=function(b){b?this.enable(a.DEPTH_TEST):this.disable(a.DEPTH_TEST)};this.setDepthWrite=function(b){u!==b&&(a.depthMask(b),u=b)};this.setColorWrite=function(b){x!==b&&(a.colorMask(b,b,b,b),x=b)};this.setFlipSided=function(b){v!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),v=b)};this.setLineWidth=function(b){b!==y&&(a.lineWidth(b),y=b)};this.setPolygonOffset=function(b,c,d){b?this.enable(a.POLYGON_OFFSET_FILL):this.disable(a.POLYGON_OFFSET_FILL);!b||w===c&&A===d||(a.polygonOffset(c,
+d),w=c,A=d)};this.setScissorTest=function(b){b?this.enable(a.SCISSOR_TEST):this.disable(a.SCISSOR_TEST)};this.activeTexture=function(b){void 0===b&&(b=a.TEXTURE0+E-1);z!==b&&(a.activeTexture(b),z=b)};this.bindTexture=function(b,c){void 0===z&&d.activeTexture();var e=C[z];void 0===e&&(e={type:void 0,texture:void 0},C[z]=e);if(e.type!==b||e.texture!==c)a.bindTexture(b,c),e.type=b,e.texture=c};this.compressedTexImage2D=function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(b){console.error(b)}};
 this.texImage2D=function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.reset=function(){for(var b=0;b<g.length;b++)1===g[b]&&(a.disableVertexAttribArray(b),g[b]=0);f={};v=x=u=k=h=null}};
 this.texImage2D=function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(b)}};this.reset=function(){for(var b=0;b<g.length;b++)1===g[b]&&(a.disableVertexAttribArray(b),g[b]=0);f={};v=x=u=k=h=null}};
-THREE.LensFlarePlugin=function(a,b){var c,d,e,g,f,h,k,l,n,p,m=a.context,q=a.state,s,r,u,x,v,y;this.render=function(w,E,F,z){if(0!==b.length){w=new THREE.Vector3;var B=z/F,K=.5*F,L=.5*z,C=16/z,M=new THREE.Vector2(C*B,C),I=new THREE.Vector3(1,1,0),D=new THREE.Vector2(1,1);if(void 0===u){var C=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),A=new Uint16Array([0,1,2,0,2,3]);s=m.createBuffer();r=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,s);m.bufferData(m.ARRAY_BUFFER,C,m.STATIC_DRAW);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,
-r);m.bufferData(m.ELEMENT_ARRAY_BUFFER,A,m.STATIC_DRAW);v=m.createTexture();y=m.createTexture();q.bindTexture(m.TEXTURE_2D,v);m.texImage2D(m.TEXTURE_2D,0,m.RGB,16,16,0,m.RGB,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);q.bindTexture(m.TEXTURE_2D,y);m.texImage2D(m.TEXTURE_2D,0,
-m.RGBA,16,16,0,m.RGBA,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);var C=(x=0<m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS))?{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility =        visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *=       visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
+THREE.LensFlarePlugin=function(a,b){var c,d,e,g,f,h,k,l,n,p,m=a.context,q=a.state,s,r,u,x,v,y;this.render=function(w,A,E,z){if(0!==b.length){w=new THREE.Vector3;var C=z/E,H=.5*E,N=.5*z,B=16/z,L=new THREE.Vector2(B*C,B),G=new THREE.Vector3(1,1,0),K=new THREE.Vector2(1,1);if(void 0===u){var B=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),D=new Uint16Array([0,1,2,0,2,3]);s=m.createBuffer();r=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,s);m.bufferData(m.ARRAY_BUFFER,B,m.STATIC_DRAW);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,
+r);m.bufferData(m.ELEMENT_ARRAY_BUFFER,D,m.STATIC_DRAW);v=m.createTexture();y=m.createTexture();q.bindTexture(m.TEXTURE_2D,v);m.texImage2D(m.TEXTURE_2D,0,m.RGB,16,16,0,m.RGB,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);q.bindTexture(m.TEXTURE_2D,y);m.texImage2D(m.TEXTURE_2D,0,
+m.RGBA,16,16,0,m.RGBA,m.UNSIGNED_BYTE,null);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST);m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST);var B=(x=0<m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS))?{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility =        visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *=       visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
 fragmentShader:"uniform lowp int renderType;\nuniform sampler2D map;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * vVisibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"}:{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
 fragmentShader:"uniform lowp int renderType;\nuniform sampler2D map;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( 1.0, 0.0, 1.0, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * vVisibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"}:{vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif( renderType == 2 ) {\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
 fragmentShader:"precision mediump float;\nuniform lowp int renderType;\nuniform sampler2D map;\nuniform sampler2D occlusionMap;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( texture2D( map, vUV ).rgb, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nfloat visibility = texture2D( occlusionMap, vec2( 0.5, 0.1 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) ).a;\nvisibility = ( 1.0 - visibility / 4.0 );\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * visibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"},
 fragmentShader:"precision mediump float;\nuniform lowp int renderType;\nuniform sampler2D map;\nuniform sampler2D occlusionMap;\nuniform float opacity;\nuniform vec3 color;\nvarying vec2 vUV;\nvoid main() {\nif( renderType == 0 ) {\ngl_FragColor = vec4( texture2D( map, vUV ).rgb, 0.0 );\n} else if( renderType == 1 ) {\ngl_FragColor = texture2D( map, vUV );\n} else {\nfloat visibility = texture2D( occlusionMap, vec2( 0.5, 0.1 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) ).a;\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) ).a;\nvisibility = ( 1.0 - visibility / 4.0 );\nvec4 texture = texture2D( map, vUV );\ntexture.a *= opacity * visibility;\ngl_FragColor = texture;\ngl_FragColor.rgb *= color;\n}\n}"},
-A=m.createProgram(),H=m.createShader(m.FRAGMENT_SHADER),O=m.createShader(m.VERTEX_SHADER),R="precision "+a.getPrecision()+" float;\n";m.shaderSource(H,R+C.fragmentShader);m.shaderSource(O,R+C.vertexShader);m.compileShader(H);m.compileShader(O);m.attachShader(A,H);m.attachShader(A,O);m.linkProgram(A);u=A;n=m.getAttribLocation(u,"position");p=m.getAttribLocation(u,"uv");c=m.getUniformLocation(u,"renderType");d=m.getUniformLocation(u,"map");e=m.getUniformLocation(u,"occlusionMap");g=m.getUniformLocation(u,
-"opacity");f=m.getUniformLocation(u,"color");h=m.getUniformLocation(u,"scale");k=m.getUniformLocation(u,"rotation");l=m.getUniformLocation(u,"screenPosition")}m.useProgram(u);q.initAttributes();q.enableAttribute(n);q.enableAttribute(p);q.disableUnusedAttributes();m.uniform1i(e,0);m.uniform1i(d,1);m.bindBuffer(m.ARRAY_BUFFER,s);m.vertexAttribPointer(n,2,m.FLOAT,!1,16,0);m.vertexAttribPointer(p,2,m.FLOAT,!1,16,8);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,r);q.disable(m.CULL_FACE);m.depthMask(!1);A=0;for(H=
-b.length;A<H;A++)if(C=16/z,M.set(C*B,C),O=b[A],w.set(O.matrixWorld.elements[12],O.matrixWorld.elements[13],O.matrixWorld.elements[14]),w.applyMatrix4(E.matrixWorldInverse),w.applyProjection(E.projectionMatrix),I.copy(w),D.x=I.x*K+K,D.y=I.y*L+L,x||0<D.x&&D.x<F&&0<D.y&&D.y<z){q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,null);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,v);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGB,D.x-8,D.y-8,16,16,0);m.uniform1i(c,0);m.uniform2f(h,M.x,M.y);m.uniform3f(l,
-I.x,I.y,I.z);q.disable(m.BLEND);q.enable(m.DEPTH_TEST);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,y);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGBA,D.x-8,D.y-8,16,16,0);m.uniform1i(c,1);q.disable(m.DEPTH_TEST);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,v);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);O.positionScreen.copy(I);O.customUpdateCallback?O.customUpdateCallback(O):O.updateLensFlares();m.uniform1i(c,2);q.enable(m.BLEND);for(var R=
-0,T=O.lensFlares.length;R<T;R++){var Q=O.lensFlares[R];.001<Q.opacity&&.001<Q.scale&&(I.x=Q.x,I.y=Q.y,I.z=Q.z,C=Q.size*Q.scale/z,M.x=C*B,M.y=C,m.uniform3f(l,I.x,I.y,I.z),m.uniform2f(h,M.x,M.y),m.uniform1f(k,Q.rotation),m.uniform1f(g,Q.opacity),m.uniform3f(f,Q.color.r,Q.color.g,Q.color.b),q.setBlending(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst),a.setTexture(Q.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}q.enable(m.CULL_FACE);q.enable(m.DEPTH_TEST);m.depthMask(!0);a.resetGLState()}}};
-THREE.SpritePlugin=function(a,b){var c,d,e,g,f,h,k,l,n,p,m,q,s,r,u,x,v;function y(a,b){return a.z!==b.z?b.z-a.z:b.id-a.id}var w=a.context,E=a.state,F,z,B,K,L=new THREE.Vector3,C=new THREE.Quaternion,M=new THREE.Vector3;this.render=function(I,D){if(0!==b.length){if(void 0===B){var A=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),H=new Uint16Array([0,1,2,0,2,3]);F=w.createBuffer();z=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,F);w.bufferData(w.ARRAY_BUFFER,A,w.STATIC_DRAW);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,
-z);w.bufferData(w.ELEMENT_ARRAY_BUFFER,H,w.STATIC_DRAW);var A=w.createProgram(),H=w.createShader(w.VERTEX_SHADER),O=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(H,["precision "+a.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n"));
-w.shaderSource(O,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n"));
-w.compileShader(H);w.compileShader(O);w.attachShader(A,H);w.attachShader(A,O);w.linkProgram(A);B=A;x=w.getAttribLocation(B,"position");v=w.getAttribLocation(B,"uv");c=w.getUniformLocation(B,"uvOffset");d=w.getUniformLocation(B,"uvScale");e=w.getUniformLocation(B,"rotation");g=w.getUniformLocation(B,"scale");f=w.getUniformLocation(B,"color");h=w.getUniformLocation(B,"map");k=w.getUniformLocation(B,"opacity");l=w.getUniformLocation(B,"modelViewMatrix");n=w.getUniformLocation(B,"projectionMatrix");p=
-w.getUniformLocation(B,"fogType");m=w.getUniformLocation(B,"fogDensity");q=w.getUniformLocation(B,"fogNear");s=w.getUniformLocation(B,"fogFar");r=w.getUniformLocation(B,"fogColor");u=w.getUniformLocation(B,"alphaTest");A=document.createElement("canvas");A.width=8;A.height=8;H=A.getContext("2d");H.fillStyle="white";H.fillRect(0,0,8,8);K=new THREE.Texture(A);K.needsUpdate=!0}w.useProgram(B);E.initAttributes();E.enableAttribute(x);E.enableAttribute(v);E.disableUnusedAttributes();E.disable(w.CULL_FACE);
-E.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,F);w.vertexAttribPointer(x,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(v,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,z);w.uniformMatrix4fv(n,!1,D.projectionMatrix.elements);E.activeTexture(w.TEXTURE0);w.uniform1i(h,0);H=A=0;(O=I.fog)?(w.uniform3f(r,O.color.r,O.color.g,O.color.b),O instanceof THREE.Fog?(w.uniform1f(q,O.near),w.uniform1f(s,O.far),w.uniform1i(p,1),H=A=1):O instanceof THREE.FogExp2&&(w.uniform1f(m,O.density),w.uniform1i(p,2),H=A=2)):
-(w.uniform1i(p,0),H=A=0);for(var O=0,R=b.length;O<R;O++){var T=b[O];T.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,T.matrixWorld);T.z=-T.modelViewMatrix.elements[14]}b.sort(y);for(var Q=[],O=0,R=b.length;O<R;O++){var T=b[O],S=T.material;w.uniform1f(u,S.alphaTest);w.uniformMatrix4fv(l,!1,T.modelViewMatrix.elements);T.matrixWorld.decompose(L,C,M);Q[0]=M.x;Q[1]=M.y;T=0;I.fog&&S.fog&&(T=H);A!==T&&(w.uniform1i(p,T),A=T);null!==S.map?(w.uniform2f(c,S.map.offset.x,S.map.offset.y),w.uniform2f(d,
-S.map.repeat.x,S.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,S.opacity);w.uniform3f(f,S.color.r,S.color.g,S.color.b);w.uniform1f(e,S.rotation);w.uniform2fv(g,Q);E.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst);E.setDepthTest(S.depthTest);E.setDepthWrite(S.depthWrite);S.map&&S.map.image&&S.map.image.width?a.setTexture(S.map,0):a.setTexture(K,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}E.enable(w.CULL_FACE);a.resetGLState()}}};
+D=m.createProgram(),I=m.createShader(m.FRAGMENT_SHADER),P=m.createShader(m.VERTEX_SHADER),R="precision "+a.getPrecision()+" float;\n";m.shaderSource(I,R+B.fragmentShader);m.shaderSource(P,R+B.vertexShader);m.compileShader(I);m.compileShader(P);m.attachShader(D,I);m.attachShader(D,P);m.linkProgram(D);u=D;n=m.getAttribLocation(u,"position");p=m.getAttribLocation(u,"uv");c=m.getUniformLocation(u,"renderType");d=m.getUniformLocation(u,"map");e=m.getUniformLocation(u,"occlusionMap");g=m.getUniformLocation(u,
+"opacity");f=m.getUniformLocation(u,"color");h=m.getUniformLocation(u,"scale");k=m.getUniformLocation(u,"rotation");l=m.getUniformLocation(u,"screenPosition")}m.useProgram(u);q.initAttributes();q.enableAttribute(n);q.enableAttribute(p);q.disableUnusedAttributes();m.uniform1i(e,0);m.uniform1i(d,1);m.bindBuffer(m.ARRAY_BUFFER,s);m.vertexAttribPointer(n,2,m.FLOAT,!1,16,0);m.vertexAttribPointer(p,2,m.FLOAT,!1,16,8);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,r);q.disable(m.CULL_FACE);m.depthMask(!1);D=0;for(I=
+b.length;D<I;D++)if(B=16/z,L.set(B*C,B),P=b[D],w.set(P.matrixWorld.elements[12],P.matrixWorld.elements[13],P.matrixWorld.elements[14]),w.applyMatrix4(A.matrixWorldInverse),w.applyProjection(A.projectionMatrix),G.copy(w),K.x=G.x*H+H,K.y=G.y*N+N,x||0<K.x&&K.x<E&&0<K.y&&K.y<z){q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,null);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,v);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGB,K.x-8,K.y-8,16,16,0);m.uniform1i(c,0);m.uniform2f(h,L.x,L.y);m.uniform3f(l,
+G.x,G.y,G.z);q.disable(m.BLEND);q.enable(m.DEPTH_TEST);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,y);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGBA,K.x-8,K.y-8,16,16,0);m.uniform1i(c,1);q.disable(m.DEPTH_TEST);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,v);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);P.positionScreen.copy(G);P.customUpdateCallback?P.customUpdateCallback(P):P.updateLensFlares();m.uniform1i(c,2);q.enable(m.BLEND);for(var R=
+0,V=P.lensFlares.length;R<V;R++){var Q=P.lensFlares[R];.001<Q.opacity&&.001<Q.scale&&(G.x=Q.x,G.y=Q.y,G.z=Q.z,B=Q.size*Q.scale/z,L.x=B*C,L.y=B,m.uniform3f(l,G.x,G.y,G.z),m.uniform2f(h,L.x,L.y),m.uniform1f(k,Q.rotation),m.uniform1f(g,Q.opacity),m.uniform3f(f,Q.color.r,Q.color.g,Q.color.b),q.setBlending(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst),a.setTexture(Q.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}q.enable(m.CULL_FACE);q.enable(m.DEPTH_TEST);m.depthMask(!0);a.resetGLState()}}};
+THREE.SpritePlugin=function(a,b){var c,d,e,g,f,h,k,l,n,p,m,q,s,r,u,x,v;function y(a,b){return a.z!==b.z?b.z-a.z:b.id-a.id}var w=a.context,A=a.state,E,z,C,H,N=new THREE.Vector3,B=new THREE.Quaternion,L=new THREE.Vector3;this.render=function(G,K){if(0!==b.length){if(void 0===C){var D=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),I=new Uint16Array([0,1,2,0,2,3]);E=w.createBuffer();z=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,E);w.bufferData(w.ARRAY_BUFFER,D,w.STATIC_DRAW);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,
+z);w.bufferData(w.ELEMENT_ARRAY_BUFFER,I,w.STATIC_DRAW);var D=w.createProgram(),I=w.createShader(w.VERTEX_SHADER),P=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(I,["precision "+a.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n"));
+w.shaderSource(P,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n"));
+w.compileShader(I);w.compileShader(P);w.attachShader(D,I);w.attachShader(D,P);w.linkProgram(D);C=D;x=w.getAttribLocation(C,"position");v=w.getAttribLocation(C,"uv");c=w.getUniformLocation(C,"uvOffset");d=w.getUniformLocation(C,"uvScale");e=w.getUniformLocation(C,"rotation");g=w.getUniformLocation(C,"scale");f=w.getUniformLocation(C,"color");h=w.getUniformLocation(C,"map");k=w.getUniformLocation(C,"opacity");l=w.getUniformLocation(C,"modelViewMatrix");n=w.getUniformLocation(C,"projectionMatrix");p=
+w.getUniformLocation(C,"fogType");m=w.getUniformLocation(C,"fogDensity");q=w.getUniformLocation(C,"fogNear");s=w.getUniformLocation(C,"fogFar");r=w.getUniformLocation(C,"fogColor");u=w.getUniformLocation(C,"alphaTest");D=document.createElement("canvas");D.width=8;D.height=8;I=D.getContext("2d");I.fillStyle="white";I.fillRect(0,0,8,8);H=new THREE.Texture(D);H.needsUpdate=!0}w.useProgram(C);A.initAttributes();A.enableAttribute(x);A.enableAttribute(v);A.disableUnusedAttributes();A.disable(w.CULL_FACE);
+A.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,E);w.vertexAttribPointer(x,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(v,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,z);w.uniformMatrix4fv(n,!1,K.projectionMatrix.elements);A.activeTexture(w.TEXTURE0);w.uniform1i(h,0);I=D=0;(P=G.fog)?(w.uniform3f(r,P.color.r,P.color.g,P.color.b),P instanceof THREE.Fog?(w.uniform1f(q,P.near),w.uniform1f(s,P.far),w.uniform1i(p,1),I=D=1):P instanceof THREE.FogExp2&&(w.uniform1f(m,P.density),w.uniform1i(p,2),I=D=2)):
+(w.uniform1i(p,0),I=D=0);for(var P=0,R=b.length;P<R;P++){var V=b[P];V.modelViewMatrix.multiplyMatrices(K.matrixWorldInverse,V.matrixWorld);V.z=-V.modelViewMatrix.elements[14]}b.sort(y);for(var Q=[],P=0,R=b.length;P<R;P++){var V=b[P],S=V.material;w.uniform1f(u,S.alphaTest);w.uniformMatrix4fv(l,!1,V.modelViewMatrix.elements);V.matrixWorld.decompose(N,B,L);Q[0]=L.x;Q[1]=L.y;V=0;G.fog&&S.fog&&(V=I);D!==V&&(w.uniform1i(p,V),D=V);null!==S.map?(w.uniform2f(c,S.map.offset.x,S.map.offset.y),w.uniform2f(d,
+S.map.repeat.x,S.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,S.opacity);w.uniform3f(f,S.color.r,S.color.g,S.color.b);w.uniform1f(e,S.rotation);w.uniform2fv(g,Q);A.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst);A.setDepthTest(S.depthTest);A.setDepthWrite(S.depthWrite);S.map&&S.map.image&&S.map.image.width?a.setTexture(S.map,0):a.setTexture(H,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}A.enable(w.CULL_FACE);a.resetGLState()}}};
 THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
 THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
 THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){var e=new THREE.ImageLoader;e.crossOrigin=this.crossOrigin;var g=new THREE.Texture(void 0,b);e.load(a,function(a){g.image=a;g.needsUpdate=!0;c&&c(g)},void 0,function(a){d&&d(a)});g.sourceFile=a;return g},loadTextureCube:function(a,b,c,d){var e=new THREE.ImageLoader;e.crossOrigin=this.crossOrigin;var g=new THREE.CubeTexture([],b),f=0;b=function(b){e.load(a[b],function(a){g.images[b]=a;f+=1;6===f&&(g.needsUpdate=!0,c&&c(g))},void 0,
 THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){var e=new THREE.ImageLoader;e.crossOrigin=this.crossOrigin;var g=new THREE.Texture(void 0,b);e.load(a,function(a){g.image=a;g.needsUpdate=!0;c&&c(g)},void 0,function(a){d&&d(a)});g.sourceFile=a;return g},loadTextureCube:function(a,b,c,d){var e=new THREE.ImageLoader;e.crossOrigin=this.crossOrigin;var g=new THREE.CubeTexture([],b),f=0;b=function(b){e.load(a[b],function(a){g.images[b]=a;f+=1;6===f&&(g.needsUpdate=!0,c&&c(g))},void 0,
 d)};for(var h=0,k=a.length;h<k;++h)b(h);return g},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},getNormalMap:function(a,b){var c=function(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);return[a[0]/b,a[1]/b,a[2]/b]};b|=1;var d=a.width,e=a.height,g=document.createElement("canvas");
 d)};for(var h=0,k=a.length;h<k;++h)b(h);return g},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},getNormalMap:function(a,b){var c=function(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);return[a[0]/b,a[1]/b,a[2]/b]};b|=1;var d=a.width,e=a.height,g=document.createElement("canvas");
@@ -662,7 +662,7 @@ break;case "l":k=b[a++]*c+d;n=b[a++]*c;e.lineTo(k,n);break;case "q":k=b[a++]*c+d
 m,s,u,n)}return{offset:x.ha*c,path:e}}}};
 m,s,u,n)}return{offset:x.ha*c,path:e}}}};
 THREE.FontUtils.generateShapes=function(a,b){b=b||{};var c=void 0!==b.curveSegments?b.curveSegments:4,d=void 0!==b.font?b.font:"helvetiker",e=void 0!==b.weight?b.weight:"normal",g=void 0!==b.style?b.style:"normal";THREE.FontUtils.size=void 0!==b.size?b.size:100;THREE.FontUtils.divisions=c;THREE.FontUtils.face=d;THREE.FontUtils.weight=e;THREE.FontUtils.style=g;c=THREE.FontUtils.drawText(a).paths;d=[];e=0;for(g=c.length;e<g;e++)Array.prototype.push.apply(d,c[e].toShapes());return d};
 THREE.FontUtils.generateShapes=function(a,b){b=b||{};var c=void 0!==b.curveSegments?b.curveSegments:4,d=void 0!==b.font?b.font:"helvetiker",e=void 0!==b.weight?b.weight:"normal",g=void 0!==b.style?b.style:"normal";THREE.FontUtils.size=void 0!==b.size?b.size:100;THREE.FontUtils.divisions=c;THREE.FontUtils.face=d;THREE.FontUtils.weight=e;THREE.FontUtils.style=g;c=THREE.FontUtils.drawText(a).paths;d=[];e=0;for(g=c.length;e<g;e++)Array.prototype.push.apply(d,c[e].toShapes());return d};
 (function(a){var b=function(a){for(var b=a.length,e=0,g=b-1,f=0;f<b;g=f++)e+=a[g].x*a[f].y-a[f].x*a[g].y;return.5*e};a.Triangulate=function(a,d){var e=a.length;if(3>e)return null;var g=[],f=[],h=[],k,l,n;if(0<b(a))for(l=0;l<e;l++)f[l]=l;else for(l=0;l<e;l++)f[l]=e-1-l;var p=2*e;for(l=e-1;2<e;){if(0>=p--){console.warn("THREE.FontUtils: Warning, unable to triangulate polygon! in Triangulate.process()");break}k=l;e<=k&&(k=0);l=k+1;e<=l&&(l=0);n=l+1;e<=n&&(n=0);var m;a:{var q=m=void 0,s=void 0,r=void 0,
 (function(a){var b=function(a){for(var b=a.length,e=0,g=b-1,f=0;f<b;g=f++)e+=a[g].x*a[f].y-a[f].x*a[g].y;return.5*e};a.Triangulate=function(a,d){var e=a.length;if(3>e)return null;var g=[],f=[],h=[],k,l,n;if(0<b(a))for(l=0;l<e;l++)f[l]=l;else for(l=0;l<e;l++)f[l]=e-1-l;var p=2*e;for(l=e-1;2<e;){if(0>=p--){console.warn("THREE.FontUtils: Warning, unable to triangulate polygon! in Triangulate.process()");break}k=l;e<=k&&(k=0);l=k+1;e<=l&&(l=0);n=l+1;e<=n&&(n=0);var m;a:{var q=m=void 0,s=void 0,r=void 0,
-u=void 0,x=void 0,v=void 0,y=void 0,w=void 0,q=a[f[k]].x,s=a[f[k]].y,r=a[f[l]].x,u=a[f[l]].y,x=a[f[n]].x,v=a[f[n]].y;if(1E-10>(r-q)*(v-s)-(u-s)*(x-q))m=!1;else{var E=void 0,F=void 0,z=void 0,B=void 0,K=void 0,L=void 0,C=void 0,M=void 0,I=void 0,D=void 0,I=M=C=w=y=void 0,E=x-r,F=v-u,z=q-x,B=s-v,K=r-q,L=u-s;for(m=0;m<e;m++)if(y=a[f[m]].x,w=a[f[m]].y,!(y===q&&w===s||y===r&&w===u||y===x&&w===v)&&(C=y-q,M=w-s,I=y-r,D=w-u,y-=x,w-=v,I=E*D-F*I,C=K*M-L*C,M=z*w-B*y,-1E-10<=I&&-1E-10<=M&&-1E-10<=C)){m=!1;break a}m=
+u=void 0,x=void 0,v=void 0,y=void 0,w=void 0,q=a[f[k]].x,s=a[f[k]].y,r=a[f[l]].x,u=a[f[l]].y,x=a[f[n]].x,v=a[f[n]].y;if(1E-10>(r-q)*(v-s)-(u-s)*(x-q))m=!1;else{var A=void 0,E=void 0,z=void 0,C=void 0,H=void 0,N=void 0,B=void 0,L=void 0,G=void 0,K=void 0,G=L=B=w=y=void 0,A=x-r,E=v-u,z=q-x,C=s-v,H=r-q,N=u-s;for(m=0;m<e;m++)if(y=a[f[m]].x,w=a[f[m]].y,!(y===q&&w===s||y===r&&w===u||y===x&&w===v)&&(B=y-q,L=w-s,G=y-r,K=w-u,y-=x,w-=v,G=A*K-E*G,B=H*L-N*B,L=z*w-C*y,-1E-10<=G&&-1E-10<=L&&-1E-10<=B)){m=!1;break a}m=
 !0}}if(m){g.push([a[f[k]],a[f[l]],a[f[n]]]);h.push([f[k],f[l],f[n]]);k=l;for(n=l+1;n<e;k++,n++)f[k]=f[n];e--;p=2*e}}return d?h:g};a.Triangulate.area=b;return a})(THREE.FontUtils);THREE.typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};"undefined"!==typeof self&&(self._typeface_js=THREE.typeface_js);
 !0}}if(m){g.push([a[f[k]],a[f[l]],a[f[n]]]);h.push([f[k],f[l],f[n]]);k=l;for(n=l+1;n<e;k++,n++)f[k]=f[n];e--;p=2*e}}return d?h:g};a.Triangulate.area=b;return a})(THREE.FontUtils);THREE.typeface_js={faces:THREE.FontUtils.faces,loadFace:THREE.FontUtils.loadFace};"undefined"!==typeof self&&(self._typeface_js=THREE.typeface_js);
 THREE.Audio=function(a){THREE.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.source.onended=this.onEnded.bind(this);this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.panner=this.context.createPanner();this.panner.connect(this.gain);this.autoplay=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1};THREE.Audio.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Audio=function(a){THREE.Object3D.call(this);this.type="Audio";this.context=a.context;this.source=this.context.createBufferSource();this.source.onended=this.onEnded.bind(this);this.gain=this.context.createGain();this.gain.connect(this.context.destination);this.panner=this.context.createPanner();this.panner.connect(this.gain);this.autoplay=!1;this.startTime=0;this.playbackRate=1;this.isPlaying=!1};THREE.Audio.prototype=Object.create(THREE.Object3D.prototype);
 THREE.Audio.prototype.constructor=THREE.Audio;THREE.Audio.prototype.load=function(a){var b=this,c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onload=function(a){b.context.decodeAudioData(this.response,function(a){b.source.buffer=a;b.autoplay&&b.play()})};c.send();return this};
 THREE.Audio.prototype.constructor=THREE.Audio;THREE.Audio.prototype.load=function(a){var b=this,c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onload=function(a){b.context.decodeAudioData(this.response,function(a){b.source.buffer=a;b.autoplay&&b.play()})};c.send();return this};
@@ -702,11 +702,11 @@ l=a?!l:l;h=[];var n=[],p=[],m=0,q;n[m]=void 0;p[m]=[];var s,r;s=0;for(r=e.length
 tos:u,hole:l}),q?(q=!1,h[u].push(m)):s=!0);q&&h[f].push(m)}0<r.length&&(s||(p=h))}s=0;for(r=n.length;s<r;s++)for(h=n[s].s,k.push(h),f=p[s],e=0,g=f.length;e<g;e++)h.holes.push(f[e].h);return k};THREE.Shape=function(){THREE.Path.apply(this,arguments);this.holes=[]};THREE.Shape.prototype=Object.create(THREE.Path.prototype);THREE.Shape.prototype.constructor=THREE.Shape;THREE.Shape.prototype.extrude=function(a){return new THREE.ExtrudeGeometry(this,a)};
 tos:u,hole:l}),q?(q=!1,h[u].push(m)):s=!0);q&&h[f].push(m)}0<r.length&&(s||(p=h))}s=0;for(r=n.length;s<r;s++)for(h=n[s].s,k.push(h),f=p[s],e=0,g=f.length;e<g;e++)h.holes.push(f[e].h);return k};THREE.Shape=function(){THREE.Path.apply(this,arguments);this.holes=[]};THREE.Shape.prototype=Object.create(THREE.Path.prototype);THREE.Shape.prototype.constructor=THREE.Shape;THREE.Shape.prototype.extrude=function(a){return new THREE.ExtrudeGeometry(this,a)};
 THREE.Shape.prototype.makeGeometry=function(a){return new THREE.ShapeGeometry(this,a)};THREE.Shape.prototype.getPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedPoints(a,this.bends);return d};THREE.Shape.prototype.getSpacedPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedSpacedPoints(a,this.bends);return d};
 THREE.Shape.prototype.makeGeometry=function(a){return new THREE.ShapeGeometry(this,a)};THREE.Shape.prototype.getPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedPoints(a,this.bends);return d};THREE.Shape.prototype.getSpacedPointsHoles=function(a){var b,c=this.holes.length,d=[];for(b=0;b<c;b++)d[b]=this.holes[b].getTransformedSpacedPoints(a,this.bends);return d};
 THREE.Shape.prototype.extractAllPoints=function(a){return{shape:this.getTransformedPoints(a),holes:this.getPointsHoles(a)}};THREE.Shape.prototype.extractPoints=function(a){return this.useSpacedPoints?this.extractAllSpacedPoints(a):this.extractAllPoints(a)};THREE.Shape.prototype.extractAllSpacedPoints=function(a){return{shape:this.getTransformedSpacedPoints(a),holes:this.getSpacedPointsHoles(a)}};
 THREE.Shape.prototype.extractAllPoints=function(a){return{shape:this.getTransformedPoints(a),holes:this.getPointsHoles(a)}};THREE.Shape.prototype.extractPoints=function(a){return this.useSpacedPoints?this.extractAllSpacedPoints(a):this.extractAllPoints(a)};THREE.Shape.prototype.extractAllSpacedPoints=function(a){return{shape:this.getTransformedSpacedPoints(a),holes:this.getSpacedPointsHoles(a)}};
-THREE.Shape.Utils={triangulateShape:function(a,b){function c(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function d(a,b,d,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-d.x,l=e.y-d.y,n=a.x-d.x,p=a.y-d.y,z=h*k-g*l,B=h*n-g*p;if(1E-10<Math.abs(z)){if(0<z){if(0>B||B>z)return[];k=l*n-k*p;if(0>k||k>z)return[]}else{if(0<B||B<z)return[];k=l*n-k*p;if(0<k||k<z)return[]}if(0===k)return!f||0!==B&&B!==z?[a]:[];if(k===z)return!f||0!==B&&B!==z?[b]:[];if(0===
-B)return[d];if(B===z)return[e];f=k/z;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==B||l*n!==k*p)return[];h=0===g&&0===h;k=0===k&&0===l;if(h&&k)return a.x!==d.x||a.y!==d.y?[]:[a];if(h)return c(d,e,a)?[a]:[];if(k)return c(a,b,d)?[d]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),d.x<e.x?(b=d,z=d.x,l=e,d=e.x):(b=e,z=e.x,l=d,d=d.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),d.y<e.y?(b=d,z=d.y,l=e,d=e.y):(b=e,z=e.y,l=d,d=d.y));return k<=z?a<z?[]:a===z?f?[]:[b]:a<=d?[b,h]:[b,l]:k>d?[]:
+THREE.Shape.Utils={triangulateShape:function(a,b){function c(a,b,c){return a.x!==b.x?a.x<b.x?a.x<=c.x&&c.x<=b.x:b.x<=c.x&&c.x<=a.x:a.y<b.y?a.y<=c.y&&c.y<=b.y:b.y<=c.y&&c.y<=a.y}function d(a,b,d,e,f){var g=b.x-a.x,h=b.y-a.y,k=e.x-d.x,l=e.y-d.y,n=a.x-d.x,p=a.y-d.y,z=h*k-g*l,C=h*n-g*p;if(1E-10<Math.abs(z)){if(0<z){if(0>C||C>z)return[];k=l*n-k*p;if(0>k||k>z)return[]}else{if(0<C||C<z)return[];k=l*n-k*p;if(0<k||k<z)return[]}if(0===k)return!f||0!==C&&C!==z?[a]:[];if(k===z)return!f||0!==C&&C!==z?[b]:[];if(0===
+C)return[d];if(C===z)return[e];f=k/z;return[{x:a.x+f*g,y:a.y+f*h}]}if(0!==C||l*n!==k*p)return[];h=0===g&&0===h;k=0===k&&0===l;if(h&&k)return a.x!==d.x||a.y!==d.y?[]:[a];if(h)return c(d,e,a)?[a]:[];if(k)return c(a,b,d)?[d]:[];0!==g?(a.x<b.x?(g=a,k=a.x,h=b,a=b.x):(g=b,k=b.x,h=a,a=a.x),d.x<e.x?(b=d,z=d.x,l=e,d=e.x):(b=e,z=e.x,l=d,d=d.x)):(a.y<b.y?(g=a,k=a.y,h=b,a=b.y):(g=b,k=b.y,h=a,a=a.y),d.y<e.y?(b=d,z=d.y,l=e,d=e.y):(b=e,z=e.y,l=d,d=d.y));return k<=z?a<z?[]:a===z?f?[]:[b]:a<=d?[b,h]:[b,l]:k>d?[]:
 k===d?f?[]:[g]:a<=d?[g,h]:[g,l]}function e(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return 1E-10<Math.abs(a)?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}var g,f,h,k,l,n={};h=a.concat();g=0;for(f=b.length;g<f;g++)Array.prototype.push.apply(h,b[g]);g=0;for(f=h.length;g<f;g++)l=h[g].x+":"+h[g].y,void 0!==n[l]&&console.warn("THREE.Shape: Duplicate point",l),n[l]=g;g=function(a,b){function c(a,b){var d=h.length-1,f=a-1;0>f&&(f=d);var g=a+1;g>d&&(g=
 k===d?f?[]:[g]:a<=d?[g,h]:[g,l]}function e(a,b,c,d){var e=b.x-a.x,f=b.y-a.y;b=c.x-a.x;c=c.y-a.y;var g=d.x-a.x;d=d.y-a.y;a=e*c-f*b;e=e*d-f*g;return 1E-10<Math.abs(a)?(b=g*c-d*b,0<a?0<=e&&0<=b:0<=e||0<=b):0<e}var g,f,h,k,l,n={};h=a.concat();g=0;for(f=b.length;g<f;g++)Array.prototype.push.apply(h,b[g]);g=0;for(f=h.length;g<f;g++)l=h[g].x+":"+h[g].y,void 0!==n[l]&&console.warn("THREE.Shape: Duplicate point",l),n[l]=g;g=function(a,b){function c(a,b){var d=h.length-1,f=a-1;0>f&&(f=d);var g=a+1;g>d&&(g=
-0);d=e(h[a],h[f],h[g],k[b]);if(!d)return!1;d=k.length-1;f=b-1;0>f&&(f=d);g=b+1;g>d&&(g=0);return(d=e(k[b],k[f],k[g],h[a]))?!0:!1}function f(a,b){var c,e;for(c=0;c<h.length;c++)if(e=c+1,e%=h.length,e=d(a,b,h[c],h[e],!0),0<e.length)return!0;return!1}function g(a,c){var e,f,h,k;for(e=0;e<l.length;e++)for(f=b[l[e]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=d(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,l=[],n,p,F,z,B,K=[],L,C,M,I=0;for(n=b.length;I<n;I++)l.push(I);L=0;for(var D=2*
-l.length;0<l.length;){D--;if(0>D){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(p=L;p<h.length;p++){F=h[p];n=-1;for(I=0;I<l.length;I++)if(z=l[I],B=F.x+":"+F.y+":"+z,void 0===K[B]){k=b[z];for(C=0;C<k.length;C++)if(z=k[C],c(p,C)&&!f(F,z)&&!g(F,z)){n=C;l.splice(I,1);L=h.slice(0,p+1);z=h.slice(p);C=k.slice(n);M=k.slice(0,n+1);h=L.concat(C).concat(M).concat(z);L=p;break}if(0<=n)break;K[B]=!0}if(0<=n)break}}return h}(a,b);var p=THREE.FontUtils.Triangulate(g,
+0);d=e(h[a],h[f],h[g],k[b]);if(!d)return!1;d=k.length-1;f=b-1;0>f&&(f=d);g=b+1;g>d&&(g=0);return(d=e(k[b],k[f],k[g],h[a]))?!0:!1}function f(a,b){var c,e;for(c=0;c<h.length;c++)if(e=c+1,e%=h.length,e=d(a,b,h[c],h[e],!0),0<e.length)return!0;return!1}function g(a,c){var e,f,h,k;for(e=0;e<l.length;e++)for(f=b[l[e]],h=0;h<f.length;h++)if(k=h+1,k%=f.length,k=d(a,c,f[h],f[k],!0),0<k.length)return!0;return!1}var h=a.concat(),k,l=[],n,p,E,z,C,H=[],N,B,L,G=0;for(n=b.length;G<n;G++)l.push(G);N=0;for(var K=2*
+l.length;0<l.length;){K--;if(0>K){console.log("Infinite Loop! Holes left:"+l.length+", Probably Hole outside Shape!");break}for(p=N;p<h.length;p++){E=h[p];n=-1;for(G=0;G<l.length;G++)if(z=l[G],C=E.x+":"+E.y+":"+z,void 0===H[C]){k=b[z];for(B=0;B<k.length;B++)if(z=k[B],c(p,B)&&!f(E,z)&&!g(E,z)){n=B;l.splice(G,1);N=h.slice(0,p+1);z=h.slice(p);B=k.slice(n);L=k.slice(0,n+1);h=N.concat(B).concat(L).concat(z);N=p;break}if(0<=n)break;H[C]=!0}if(0<=n)break}}return h}(a,b);var p=THREE.FontUtils.Triangulate(g,
 !1);g=0;for(f=p.length;g<f;g++)for(k=p[g],h=0;3>h;h++)l=k[h].x+":"+k[h].y,l=n[l],void 0!==l&&(k[h]=l);return p.concat()},isClockWise:function(a){return 0>THREE.FontUtils.Triangulate.area(a)},b2p0:function(a,b){var c=1-a;return c*c*b},b2p1:function(a,b){return 2*(1-a)*a*b},b2p2:function(a,b){return a*a*b},b2:function(a,b,c,d){return this.b2p0(a,b)+this.b2p1(a,c)+this.b2p2(a,d)},b3p0:function(a,b){var c=1-a;return c*c*c*b},b3p1:function(a,b){var c=1-a;return 3*c*c*a*b},b3p2:function(a,b){return 3*(1-
 !1);g=0;for(f=p.length;g<f;g++)for(k=p[g],h=0;3>h;h++)l=k[h].x+":"+k[h].y,l=n[l],void 0!==l&&(k[h]=l);return p.concat()},isClockWise:function(a){return 0>THREE.FontUtils.Triangulate.area(a)},b2p0:function(a,b){var c=1-a;return c*c*b},b2p1:function(a,b){return 2*(1-a)*a*b},b2p2:function(a,b){return a*a*b},b2:function(a,b,c,d){return this.b2p0(a,b)+this.b2p1(a,c)+this.b2p2(a,d)},b3p0:function(a,b){var c=1-a;return c*c*c*b},b3p1:function(a,b){var c=1-a;return 3*c*c*a*b},b3p2:function(a,b){return 3*(1-
 a)*a*a*b},b3p3:function(a,b){return a*a*a*b},b3:function(a,b,c,d,e){return this.b3p0(a,b)+this.b3p1(a,c)+this.b3p2(a,d)+this.b3p3(a,e)}};THREE.LineCurve=function(a,b){this.v1=a;this.v2=b};THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.LineCurve.prototype.constructor=THREE.LineCurve;THREE.LineCurve.prototype.getPoint=function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};THREE.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};
 a)*a*a*b},b3p3:function(a,b){return a*a*a*b},b3:function(a,b,c,d,e){return this.b3p0(a,b)+this.b3p1(a,c)+this.b3p2(a,d)+this.b3p3(a,e)}};THREE.LineCurve=function(a,b){this.v1=a;this.v2=b};THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.LineCurve.prototype.constructor=THREE.LineCurve;THREE.LineCurve.prototype.getPoint=function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};THREE.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};
 THREE.LineCurve.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};THREE.QuadraticBezierCurve=function(a,b,c){this.v0=a;this.v1=b;this.v2=c};THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.QuadraticBezierCurve.prototype.constructor=THREE.QuadraticBezierCurve;
 THREE.LineCurve.prototype.getTangent=function(a){return this.v2.clone().sub(this.v1).normalize()};THREE.QuadraticBezierCurve=function(a,b,c){this.v0=a;this.v1=b;this.v2=c};THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.QuadraticBezierCurve.prototype.constructor=THREE.QuadraticBezierCurve;
@@ -748,8 +748,8 @@ g.interpolate(f,f.time);this.data.hierarchy[a].node.updateMatrix();c.matrixWorld
 THREE.MorphAnimation=function(a){this.mesh=a;this.frames=a.morphTargetInfluences.length;this.currentTime=0;this.duration=1E3;this.loop=!0;this.currentFrame=this.lastFrame=0;this.isPlaying=!1};
 THREE.MorphAnimation=function(a){this.mesh=a;this.frames=a.morphTargetInfluences.length;this.currentTime=0;this.duration=1E3;this.loop=!0;this.currentFrame=this.lastFrame=0;this.isPlaying=!1};
 THREE.MorphAnimation.prototype={constructor:THREE.MorphAnimation,play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},update:function(a){if(!1!==this.isPlaying){this.currentTime+=a;!0===this.loop&&this.currentTime>this.duration&&(this.currentTime%=this.duration);this.currentTime=Math.min(this.currentTime,this.duration);var b=this.duration/this.frames;a=Math.floor(this.currentTime/b);var c=this.mesh.morphTargetInfluences;a!==this.currentFrame&&(c[this.lastFrame]=0,c[this.currentFrame]=
 THREE.MorphAnimation.prototype={constructor:THREE.MorphAnimation,play:function(){this.isPlaying=!0},pause:function(){this.isPlaying=!1},update:function(a){if(!1!==this.isPlaying){this.currentTime+=a;!0===this.loop&&this.currentTime>this.duration&&(this.currentTime%=this.duration);this.currentTime=Math.min(this.currentTime,this.duration);var b=this.duration/this.frames;a=Math.floor(this.currentTime/b);var c=this.mesh.morphTargetInfluences;a!==this.currentFrame&&(c[this.lastFrame]=0,c[this.currentFrame]=
 1,c[a]=0,this.lastFrame=this.currentFrame,this.currentFrame=a);b=this.currentTime%b/b;c[a]=b;c[this.lastFrame]=1-b}}};
 1,c[a]=0,this.lastFrame=this.currentFrame,this.currentFrame=a);b=this.currentTime%b/b;c[a]=b;c[this.lastFrame]=1-b}}};
-THREE.BoxGeometry=function(a,b,c,d,e,g){function f(a,b,c,d,e,f,g,r){var u,x=h.widthSegments,v=h.heightSegments,y=e/2,w=f/2,E=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)u="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)u="y",v=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)u="x",x=h.depthSegments;var F=x+1,z=v+1,B=e/x,K=f/v,L=new THREE.Vector3;L[u]=0<g?1:-1;for(e=0;e<z;e++)for(f=0;f<F;f++){var C=new THREE.Vector3;C[a]=(f*B-y)*c;C[b]=(e*K-w)*d;C[u]=g;h.vertices.push(C)}for(e=
-0;e<v;e++)for(f=0;f<x;f++)w=f+F*e,a=f+F*(e+1),b=f+1+F*(e+1),c=f+1+F*e,d=new THREE.Vector2(f/x,1-e/v),g=new THREE.Vector2(f/x,1-(e+1)/v),u=new THREE.Vector2((f+1)/x,1-(e+1)/v),y=new THREE.Vector2((f+1)/x,1-e/v),w=new THREE.Face3(w+E,a+E,c+E),w.normal.copy(L),w.vertexNormals.push(L.clone(),L.clone(),L.clone()),w.materialIndex=r,h.faces.push(w),h.faceVertexUvs[0].push([d,g,y]),w=new THREE.Face3(a+E,b+E,c+E),w.normal.copy(L),w.vertexNormals.push(L.clone(),L.clone(),L.clone()),w.materialIndex=r,h.faces.push(w),
+THREE.BoxGeometry=function(a,b,c,d,e,g){function f(a,b,c,d,e,f,g,r){var u,x=h.widthSegments,v=h.heightSegments,y=e/2,w=f/2,A=h.vertices.length;if("x"===a&&"y"===b||"y"===a&&"x"===b)u="z";else if("x"===a&&"z"===b||"z"===a&&"x"===b)u="y",v=h.depthSegments;else if("z"===a&&"y"===b||"y"===a&&"z"===b)u="x",x=h.depthSegments;var E=x+1,z=v+1,C=e/x,H=f/v,N=new THREE.Vector3;N[u]=0<g?1:-1;for(e=0;e<z;e++)for(f=0;f<E;f++){var B=new THREE.Vector3;B[a]=(f*C-y)*c;B[b]=(e*H-w)*d;B[u]=g;h.vertices.push(B)}for(e=
+0;e<v;e++)for(f=0;f<x;f++)w=f+E*e,a=f+E*(e+1),b=f+1+E*(e+1),c=f+1+E*e,d=new THREE.Vector2(f/x,1-e/v),g=new THREE.Vector2(f/x,1-(e+1)/v),u=new THREE.Vector2((f+1)/x,1-(e+1)/v),y=new THREE.Vector2((f+1)/x,1-e/v),w=new THREE.Face3(w+A,a+A,c+A),w.normal.copy(N),w.vertexNormals.push(N.clone(),N.clone(),N.clone()),w.materialIndex=r,h.faces.push(w),h.faceVertexUvs[0].push([d,g,y]),w=new THREE.Face3(a+A,b+A,c+A),w.normal.copy(N),w.vertexNormals.push(N.clone(),N.clone(),N.clone()),w.materialIndex=r,h.faces.push(w),
 h.faceVertexUvs[0].push([g.clone(),u,y.clone()])}THREE.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:g};this.widthSegments=d||1;this.heightSegments=e||1;this.depthSegments=g||1;var h=this;d=a/2;e=b/2;g=c/2;f("z","y",-1,-1,c,b,d,0);f("z","y",1,-1,c,b,-d,1);f("x","z",1,1,a,c,e,2);f("x","z",1,-1,a,c,-e,3);f("x","y",1,-1,a,b,g,4);f("x","y",-1,-1,a,b,-g,5);this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);
 h.faceVertexUvs[0].push([g.clone(),u,y.clone()])}THREE.Geometry.call(this);this.type="BoxGeometry";this.parameters={width:a,height:b,depth:c,widthSegments:d,heightSegments:e,depthSegments:g};this.widthSegments=d||1;this.heightSegments=e||1;this.depthSegments=g||1;var h=this;d=a/2;e=b/2;g=c/2;f("z","y",-1,-1,c,b,d,0);f("z","y",1,-1,c,b,-d,1);f("x","z",1,1,a,c,e,2);f("x","z",1,-1,a,c,-e,3);f("x","y",1,-1,a,b,g,4);f("x","y",-1,-1,a,b,-g,5);this.mergeVertices()};THREE.BoxGeometry.prototype=Object.create(THREE.Geometry.prototype);
 THREE.BoxGeometry.prototype.constructor=THREE.BoxGeometry;THREE.BoxGeometry.prototype.clone=function(){return new THREE.BoxGeometry(this.parameters.width,this.parameters.height,this.parameters.depth,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.depthSegments)};THREE.CubeGeometry=THREE.BoxGeometry;
 THREE.BoxGeometry.prototype.constructor=THREE.BoxGeometry;THREE.BoxGeometry.prototype.clone=function(){return new THREE.BoxGeometry(this.parameters.width,this.parameters.height,this.parameters.depth,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.depthSegments)};THREE.CubeGeometry=THREE.BoxGeometry;
 THREE.CircleGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e,g=[];e=new THREE.Vector3;var f=new THREE.Vector2(.5,.5);this.vertices.push(e);g.push(f);for(e=0;e<=b;e++){var h=new THREE.Vector3,k=c+e/b*d;h.x=a*Math.cos(k);h.y=a*Math.sin(k);this.vertices.push(h);g.push(new THREE.Vector2((h.x/a+1)/2,(h.y/a+1)/2))}c=new THREE.Vector3(0,
 THREE.CircleGeometry=function(a,b,c,d){THREE.Geometry.call(this);this.type="CircleGeometry";this.parameters={radius:a,segments:b,thetaStart:c,thetaLength:d};a=a||50;b=void 0!==b?Math.max(3,b):8;c=void 0!==c?c:0;d=void 0!==d?d:2*Math.PI;var e,g=[];e=new THREE.Vector3;var f=new THREE.Vector2(.5,.5);this.vertices.push(e);g.push(f);for(e=0;e<=b;e++){var h=new THREE.Vector3,k=c+e/b*d;h.x=a*Math.cos(k);h.y=a*Math.sin(k);this.vertices.push(h);g.push(new THREE.Vector2((h.x/a+1)/2,(h.y/a+1)/2))}c=new THREE.Vector3(0,
@@ -760,20 +760,20 @@ THREE.CircleBufferGeometry=function(a,b,c,d){THREE.BufferGeometry.call(this);thi
 THREE.CircleBufferGeometry.prototype.clone=function(){var a=new THREE.CircleBufferGeometry(this.parameters.radius,this.parameters.segments,this.parameters.thetaStart,this.parameters.thetaLength);a.copy(this);return a};
 THREE.CircleBufferGeometry.prototype.clone=function(){var a=new THREE.CircleBufferGeometry(this.parameters.radius,this.parameters.segments,this.parameters.thetaStart,this.parameters.thetaLength);a.copy(this);return a};
 THREE.CylinderGeometry=function(a,b,c,d,e,g,f,h){THREE.Geometry.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:g,thetaStart:f,thetaLength:h};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=d||8;e=e||1;g=void 0!==g?g:!1;f=void 0!==f?f:0;h=void 0!==h?h:2*Math.PI;var k=c/2,l,n,p=[],m=[];for(n=0;n<=e;n++){var q=[],s=[],r=n/e,u=r*(b-a)+a;for(l=0;l<=d;l++){var x=l/d,v=new THREE.Vector3;v.x=u*Math.sin(x*h+
 THREE.CylinderGeometry=function(a,b,c,d,e,g,f,h){THREE.Geometry.call(this);this.type="CylinderGeometry";this.parameters={radiusTop:a,radiusBottom:b,height:c,radialSegments:d,heightSegments:e,openEnded:g,thetaStart:f,thetaLength:h};a=void 0!==a?a:20;b=void 0!==b?b:20;c=void 0!==c?c:100;d=d||8;e=e||1;g=void 0!==g?g:!1;f=void 0!==f?f:0;h=void 0!==h?h:2*Math.PI;var k=c/2,l,n,p=[],m=[];for(n=0;n<=e;n++){var q=[],s=[],r=n/e,u=r*(b-a)+a;for(l=0;l<=d;l++){var x=l/d,v=new THREE.Vector3;v.x=u*Math.sin(x*h+
 f);v.y=-r*c+k;v.z=u*Math.cos(x*h+f);this.vertices.push(v);q.push(this.vertices.length-1);s.push(new THREE.Vector2(x,1-r))}p.push(q);m.push(s)}c=(b-a)/c;for(l=0;l<d;l++)for(0!==a?(f=this.vertices[p[0][l]].clone(),h=this.vertices[p[0][l+1]].clone()):(f=this.vertices[p[1][l]].clone(),h=this.vertices[p[1][l+1]].clone()),f.setY(Math.sqrt(f.x*f.x+f.z*f.z)*c).normalize(),h.setY(Math.sqrt(h.x*h.x+h.z*h.z)*c).normalize(),n=0;n<e;n++){var q=p[n][l],s=p[n+1][l],r=p[n+1][l+1],u=p[n][l+1],x=f.clone(),v=f.clone(),
 f);v.y=-r*c+k;v.z=u*Math.cos(x*h+f);this.vertices.push(v);q.push(this.vertices.length-1);s.push(new THREE.Vector2(x,1-r))}p.push(q);m.push(s)}c=(b-a)/c;for(l=0;l<d;l++)for(0!==a?(f=this.vertices[p[0][l]].clone(),h=this.vertices[p[0][l+1]].clone()):(f=this.vertices[p[1][l]].clone(),h=this.vertices[p[1][l+1]].clone()),f.setY(Math.sqrt(f.x*f.x+f.z*f.z)*c).normalize(),h.setY(Math.sqrt(h.x*h.x+h.z*h.z)*c).normalize(),n=0;n<e;n++){var q=p[n][l],s=p[n+1][l],r=p[n+1][l+1],u=p[n][l+1],x=f.clone(),v=f.clone(),
-y=h.clone(),w=h.clone(),E=m[n][l].clone(),F=m[n+1][l].clone(),z=m[n+1][l+1].clone(),B=m[n][l+1].clone();this.faces.push(new THREE.Face3(q,s,u,[x,v,w]));this.faceVertexUvs[0].push([E,F,B]);this.faces.push(new THREE.Face3(s,r,u,[v.clone(),y,w.clone()]));this.faceVertexUvs[0].push([F.clone(),z,B.clone()])}if(!1===g&&0<a)for(this.vertices.push(new THREE.Vector3(0,k,0)),l=0;l<d;l++)q=p[0][l],s=p[0][l+1],r=this.vertices.length-1,x=new THREE.Vector3(0,1,0),v=new THREE.Vector3(0,1,0),y=new THREE.Vector3(0,
-1,0),E=m[0][l].clone(),F=m[0][l+1].clone(),z=new THREE.Vector2(F.x,0),this.faces.push(new THREE.Face3(q,s,r,[x,v,y],void 0,1)),this.faceVertexUvs[0].push([E,F,z]);if(!1===g&&0<b)for(this.vertices.push(new THREE.Vector3(0,-k,0)),l=0;l<d;l++)q=p[e][l+1],s=p[e][l],r=this.vertices.length-1,x=new THREE.Vector3(0,-1,0),v=new THREE.Vector3(0,-1,0),y=new THREE.Vector3(0,-1,0),E=m[e][l+1].clone(),F=m[e][l].clone(),z=new THREE.Vector2(F.x,1),this.faces.push(new THREE.Face3(q,s,r,[x,v,y],void 0,2)),this.faceVertexUvs[0].push([E,
-F,z]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CylinderGeometry.prototype.constructor=THREE.CylinderGeometry;THREE.CylinderGeometry.prototype.clone=function(){return new THREE.CylinderGeometry(this.parameters.radiusTop,this.parameters.radiusBottom,this.parameters.height,this.parameters.radialSegments,this.parameters.heightSegments,this.parameters.openEnded,this.parameters.thetaStart,this.parameters.thetaLength)};
+y=h.clone(),w=h.clone(),A=m[n][l].clone(),E=m[n+1][l].clone(),z=m[n+1][l+1].clone(),C=m[n][l+1].clone();this.faces.push(new THREE.Face3(q,s,u,[x,v,w]));this.faceVertexUvs[0].push([A,E,C]);this.faces.push(new THREE.Face3(s,r,u,[v.clone(),y,w.clone()]));this.faceVertexUvs[0].push([E.clone(),z,C.clone()])}if(!1===g&&0<a)for(this.vertices.push(new THREE.Vector3(0,k,0)),l=0;l<d;l++)q=p[0][l],s=p[0][l+1],r=this.vertices.length-1,x=new THREE.Vector3(0,1,0),v=new THREE.Vector3(0,1,0),y=new THREE.Vector3(0,
+1,0),A=m[0][l].clone(),E=m[0][l+1].clone(),z=new THREE.Vector2(E.x,0),this.faces.push(new THREE.Face3(q,s,r,[x,v,y],void 0,1)),this.faceVertexUvs[0].push([A,E,z]);if(!1===g&&0<b)for(this.vertices.push(new THREE.Vector3(0,-k,0)),l=0;l<d;l++)q=p[e][l+1],s=p[e][l],r=this.vertices.length-1,x=new THREE.Vector3(0,-1,0),v=new THREE.Vector3(0,-1,0),y=new THREE.Vector3(0,-1,0),A=m[e][l+1].clone(),E=m[e][l].clone(),z=new THREE.Vector2(E.x,1),this.faces.push(new THREE.Face3(q,s,r,[x,v,y],void 0,2)),this.faceVertexUvs[0].push([A,
+E,z]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.CylinderGeometry.prototype.constructor=THREE.CylinderGeometry;THREE.CylinderGeometry.prototype.clone=function(){return new THREE.CylinderGeometry(this.parameters.radiusTop,this.parameters.radiusBottom,this.parameters.height,this.parameters.radialSegments,this.parameters.heightSegments,this.parameters.openEnded,this.parameters.thetaStart,this.parameters.thetaLength)};
 THREE.EdgesGeometry=function(a,b){THREE.BufferGeometry.call(this);var c=Math.cos(THREE.Math.degToRad(void 0!==b?b:1)),d=[0,0],e={},g=function(a,b){return a-b},f=["a","b","c"],h;a instanceof THREE.BufferGeometry?(h=new THREE.Geometry,h.fromBufferGeometry(a)):h=a.clone();h.mergeVertices();h.computeFaceNormals();var k=h.vertices;h=h.faces;for(var l=0,n=h.length;l<n;l++)for(var p=h[l],m=0;3>m;m++){d[0]=p[f[m]];d[1]=p[f[(m+1)%3]];d.sort(g);var q=d.toString();void 0===e[q]?e[q]={vert1:d[0],vert2:d[1],face1:l,
 THREE.EdgesGeometry=function(a,b){THREE.BufferGeometry.call(this);var c=Math.cos(THREE.Math.degToRad(void 0!==b?b:1)),d=[0,0],e={},g=function(a,b){return a-b},f=["a","b","c"],h;a instanceof THREE.BufferGeometry?(h=new THREE.Geometry,h.fromBufferGeometry(a)):h=a.clone();h.mergeVertices();h.computeFaceNormals();var k=h.vertices;h=h.faces;for(var l=0,n=h.length;l<n;l++)for(var p=h[l],m=0;3>m;m++){d[0]=p[f[m]];d[1]=p[f[(m+1)%3]];d.sort(g);var q=d.toString();void 0===e[q]?e[q]={vert1:d[0],vert2:d[1],face1:l,
 face2:void 0}:e[q].face2=l}d=[];for(q in e)if(g=e[q],void 0===g.face2||h[g.face1].normal.dot(h[g.face2].normal)<=c)f=k[g.vert1],d.push(f.x),d.push(f.y),d.push(f.z),f=k[g.vert2],d.push(f.x),d.push(f.y),d.push(f.z);this.addAttribute("position",new THREE.BufferAttribute(new Float32Array(d),3))};THREE.EdgesGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.EdgesGeometry.prototype.constructor=THREE.EdgesGeometry;
 face2:void 0}:e[q].face2=l}d=[];for(q in e)if(g=e[q],void 0===g.face2||h[g.face1].normal.dot(h[g.face2].normal)<=c)f=k[g.vert1],d.push(f.x),d.push(f.y),d.push(f.z),f=k[g.vert2],d.push(f.x),d.push(f.y),d.push(f.z);this.addAttribute("position",new THREE.BufferAttribute(new Float32Array(d),3))};THREE.EdgesGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.EdgesGeometry.prototype.constructor=THREE.EdgesGeometry;
 THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
 THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
 THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*d+e*e;if(1E-10<Math.abs(d*g-e*f)){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,1E-10<d?1E-10<f&&(a=
 THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*d+e*e;if(1E-10<Math.abs(d*g-e*f)){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,1E-10<d?1E-10<f&&(a=
-!0):-1E-10>d?-1E-10>f&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(G=a.length;0<=--G;){c=G;d=G-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*n,e=0;e<f;e++){var g=T*e,h=T*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+L,g=g+L,l=l+L,h=h+L;K.faces.push(new THREE.Face3(k,g,h));K.faces.push(new THREE.Face3(g,l,h));k=x.generateSideWallUV(K,k,g,l,h);K.faceVertexUvs[0].push([k[0],k[1],k[3]]);K.faceVertexUvs[0].push([k[1],
-k[2],k[3]])}}}function g(a,b,c){K.vertices.push(new THREE.Vector3(a,b,c))}function f(a,b,c){a+=L;b+=L;c+=L;K.faces.push(new THREE.Face3(a,b,c));a=x.generateTopUV(K,a,b,c);K.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,l=void 0!==b.bevelSize?b.bevelSize:k-2,n=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,m=void 0!==b.curveSegments?b.curveSegments:12,q=void 0!==b.steps?b.steps:1,s=b.extrudePath,
-r,u=!1,x=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,v,y,w,E;s&&(r=s.getSpacedPoints(q),u=!0,p=!1,v=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,q,!1),y=new THREE.Vector3,w=new THREE.Vector3,E=new THREE.Vector3);p||(l=k=n=0);var F,z,B,K=this,L=this.vertices.length,s=a.extractPoints(m),m=s.shape,C=s.holes;if(s=!THREE.Shape.Utils.isClockWise(m)){m=m.reverse();z=0;for(B=C.length;z<B;z++)F=C[z],THREE.Shape.Utils.isClockWise(F)&&(C[z]=F.reverse());s=
-!1}var M=THREE.Shape.Utils.triangulateShape(m,C),I=m;z=0;for(B=C.length;z<B;z++)F=C[z],m=m.concat(F);var D,A,H,O,R,T=m.length,Q,S=M.length,s=[],G=0;H=I.length;D=H-1;for(A=G+1;G<H;G++,D++,A++)D===H&&(D=0),A===H&&(A=0),s[G]=d(I[G],I[D],I[A]);var ha=[],X,ia=s.concat();z=0;for(B=C.length;z<B;z++){F=C[z];X=[];G=0;H=F.length;D=H-1;for(A=G+1;G<H;G++,D++,A++)D===H&&(D=0),A===H&&(A=0),X[G]=d(F[G],F[D],F[A]);ha.push(X);ia=ia.concat(X)}for(D=0;D<n;D++){H=D/n;O=k*(1-H);A=l*Math.sin(H*Math.PI/2);G=0;for(H=I.length;G<
-H;G++)R=c(I[G],s[G],A),g(R.x,R.y,-O);z=0;for(B=C.length;z<B;z++)for(F=C[z],X=ha[z],G=0,H=F.length;G<H;G++)R=c(F[G],X[G],A),g(R.x,R.y,-O)}A=l;for(G=0;G<T;G++)R=p?c(m[G],ia[G],A):m[G],u?(w.copy(v.normals[0]).multiplyScalar(R.x),y.copy(v.binormals[0]).multiplyScalar(R.y),E.copy(r[0]).add(w).add(y),g(E.x,E.y,E.z)):g(R.x,R.y,0);for(H=1;H<=q;H++)for(G=0;G<T;G++)R=p?c(m[G],ia[G],A):m[G],u?(w.copy(v.normals[H]).multiplyScalar(R.x),y.copy(v.binormals[H]).multiplyScalar(R.y),E.copy(r[H]).add(w).add(y),g(E.x,
-E.y,E.z)):g(R.x,R.y,h/q*H);for(D=n-1;0<=D;D--){H=D/n;O=k*(1-H);A=l*Math.sin(H*Math.PI/2);G=0;for(H=I.length;G<H;G++)R=c(I[G],s[G],A),g(R.x,R.y,h+O);z=0;for(B=C.length;z<B;z++)for(F=C[z],X=ha[z],G=0,H=F.length;G<H;G++)R=c(F[G],X[G],A),u?g(R.x,R.y+r[q-1].y,r[q-1].x+O):g(R.x,R.y,h+O)}(function(){if(p){var a;a=0*T;for(G=0;G<S;G++)Q=M[G],f(Q[2]+a,Q[1]+a,Q[0]+a);a=q+2*n;a*=T;for(G=0;G<S;G++)Q=M[G],f(Q[0]+a,Q[1]+a,Q[2]+a)}else{for(G=0;G<S;G++)Q=M[G],f(Q[2],Q[1],Q[0]);for(G=0;G<S;G++)Q=M[G],f(Q[0]+T*q,Q[1]+
-T*q,Q[2]+T*q)}})();(function(){var a=0;e(I,a);a+=I.length;z=0;for(B=C.length;z<B;z++)F=C[z],e(F,a),a+=F.length})()};
+!0):-1E-10>d?-1E-10>f&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(F=a.length;0<=--F;){c=F;d=F-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*n,e=0;e<f;e++){var g=V*e,h=V*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+N,g=g+N,l=l+N,h=h+N;H.faces.push(new THREE.Face3(k,g,h));H.faces.push(new THREE.Face3(g,l,h));k=x.generateSideWallUV(H,k,g,l,h);H.faceVertexUvs[0].push([k[0],k[1],k[3]]);H.faceVertexUvs[0].push([k[1],
+k[2],k[3]])}}}function g(a,b,c){H.vertices.push(new THREE.Vector3(a,b,c))}function f(a,b,c){a+=N;b+=N;c+=N;H.faces.push(new THREE.Face3(a,b,c));a=x.generateTopUV(H,a,b,c);H.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,l=void 0!==b.bevelSize?b.bevelSize:k-2,n=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,m=void 0!==b.curveSegments?b.curveSegments:12,q=void 0!==b.steps?b.steps:1,s=b.extrudePath,
+r,u=!1,x=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,v,y,w,A;s&&(r=s.getSpacedPoints(q),u=!0,p=!1,v=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,q,!1),y=new THREE.Vector3,w=new THREE.Vector3,A=new THREE.Vector3);p||(l=k=n=0);var E,z,C,H=this,N=this.vertices.length,s=a.extractPoints(m),m=s.shape,B=s.holes;if(s=!THREE.Shape.Utils.isClockWise(m)){m=m.reverse();z=0;for(C=B.length;z<C;z++)E=B[z],THREE.Shape.Utils.isClockWise(E)&&(B[z]=E.reverse());s=
+!1}var L=THREE.Shape.Utils.triangulateShape(m,B),G=m;z=0;for(C=B.length;z<C;z++)E=B[z],m=m.concat(E);var K,D,I,P,R,V=m.length,Q,S=L.length,s=[],F=0;I=G.length;K=I-1;for(D=F+1;F<I;F++,K++,D++)K===I&&(K=0),D===I&&(D=0),s[F]=d(G[F],G[K],G[D]);var ja=[],Y,la=s.concat();z=0;for(C=B.length;z<C;z++){E=B[z];Y=[];F=0;I=E.length;K=I-1;for(D=F+1;F<I;F++,K++,D++)K===I&&(K=0),D===I&&(D=0),Y[F]=d(E[F],E[K],E[D]);ja.push(Y);la=la.concat(Y)}for(K=0;K<n;K++){I=K/n;P=k*(1-I);D=l*Math.sin(I*Math.PI/2);F=0;for(I=G.length;F<
+I;F++)R=c(G[F],s[F],D),g(R.x,R.y,-P);z=0;for(C=B.length;z<C;z++)for(E=B[z],Y=ja[z],F=0,I=E.length;F<I;F++)R=c(E[F],Y[F],D),g(R.x,R.y,-P)}D=l;for(F=0;F<V;F++)R=p?c(m[F],la[F],D):m[F],u?(w.copy(v.normals[0]).multiplyScalar(R.x),y.copy(v.binormals[0]).multiplyScalar(R.y),A.copy(r[0]).add(w).add(y),g(A.x,A.y,A.z)):g(R.x,R.y,0);for(I=1;I<=q;I++)for(F=0;F<V;F++)R=p?c(m[F],la[F],D):m[F],u?(w.copy(v.normals[I]).multiplyScalar(R.x),y.copy(v.binormals[I]).multiplyScalar(R.y),A.copy(r[I]).add(w).add(y),g(A.x,
+A.y,A.z)):g(R.x,R.y,h/q*I);for(K=n-1;0<=K;K--){I=K/n;P=k*(1-I);D=l*Math.sin(I*Math.PI/2);F=0;for(I=G.length;F<I;F++)R=c(G[F],s[F],D),g(R.x,R.y,h+P);z=0;for(C=B.length;z<C;z++)for(E=B[z],Y=ja[z],F=0,I=E.length;F<I;F++)R=c(E[F],Y[F],D),u?g(R.x,R.y+r[q-1].y,r[q-1].x+P):g(R.x,R.y,h+P)}(function(){if(p){var a;a=0*V;for(F=0;F<S;F++)Q=L[F],f(Q[2]+a,Q[1]+a,Q[0]+a);a=q+2*n;a*=V;for(F=0;F<S;F++)Q=L[F],f(Q[0]+a,Q[1]+a,Q[2]+a)}else{for(F=0;F<S;F++)Q=L[F],f(Q[2],Q[1],Q[0]);for(F=0;F<S;F++)Q=L[F],f(Q[0]+V*q,Q[1]+
+V*q,Q[2]+V*q)}})();(function(){var a=0;e(G,a);a+=G.length;z=0;for(C=B.length;z<C;z++)E=B[z],e(E,a),a+=E.length})()};
 THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new THREE.Vector2(b.x,b.y),new THREE.Vector2(c.x,c.y),new THREE.Vector2(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(e.x,1-e.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y,
 THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new THREE.Vector2(b.x,b.y),new THREE.Vector2(c.x,c.y),new THREE.Vector2(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(e.x,1-e.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y,
 1-d.z),new THREE.Vector2(e.y,1-e.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.constructor=THREE.ShapeGeometry;THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
 1-d.z),new THREE.Vector2(e.y,1-e.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.constructor=THREE.ShapeGeometry;THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
 THREE.ShapeGeometry.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:b.UVGenerator,e,g,f,h=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var k=e.shape,l=e.holes;if(!THREE.Shape.Utils.isClockWise(k))for(k=k.reverse(),e=0,g=l.length;e<g;e++)f=l[e],THREE.Shape.Utils.isClockWise(f)&&(l[e]=f.reverse());var n=THREE.Shape.Utils.triangulateShape(k,l);e=0;for(g=l.length;e<g;e++)f=l[e],
 THREE.ShapeGeometry.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:b.UVGenerator,e,g,f,h=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var k=e.shape,l=e.holes;if(!THREE.Shape.Utils.isClockWise(k))for(k=k.reverse(),e=0,g=l.length;e<g;e++)f=l[e],THREE.Shape.Utils.isClockWise(f)&&(l[e]=f.reverse());var n=THREE.Shape.Utils.triangulateShape(k,l);e=0;for(g=l.length;e<g;e++)f=l[e],
@@ -793,7 +793,7 @@ THREE.SphereGeometry=function(a,b,c,d,e,g,f){console.log("THREE.SphereGeometry:
 r=n[k][h+1].clone(),u=n[k][h].clone(),x=n[k+1][h].clone(),v=n[k+1][h+1].clone();Math.abs(this.vertices[d].y)===a?(r.x=(r.x+u.x)/2,this.faces.push(new THREE.Face3(d,g,f,[p,q,s])),this.faceVertexUvs[0].push([r,x,v])):Math.abs(this.vertices[g].y)===a?(x.x=(x.x+v.x)/2,this.faces.push(new THREE.Face3(d,e,g,[p,m,q])),this.faceVertexUvs[0].push([r,u,x])):(this.faces.push(new THREE.Face3(d,e,f,[p,m,s])),this.faceVertexUvs[0].push([r,u,v]),this.faces.push(new THREE.Face3(e,g,f,[m.clone(),q,s.clone()])),this.faceVertexUvs[0].push([u.clone(),
 r=n[k][h+1].clone(),u=n[k][h].clone(),x=n[k+1][h].clone(),v=n[k+1][h+1].clone();Math.abs(this.vertices[d].y)===a?(r.x=(r.x+u.x)/2,this.faces.push(new THREE.Face3(d,g,f,[p,q,s])),this.faceVertexUvs[0].push([r,x,v])):Math.abs(this.vertices[g].y)===a?(x.x=(x.x+v.x)/2,this.faces.push(new THREE.Face3(d,e,g,[p,m,q])),this.faceVertexUvs[0].push([r,u,x])):(this.faces.push(new THREE.Face3(d,e,f,[p,m,s])),this.faceVertexUvs[0].push([r,u,v]),this.faces.push(new THREE.Face3(e,g,f,[m.clone(),q,s.clone()])),this.faceVertexUvs[0].push([u.clone(),
 x,v.clone()]))}this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.SphereGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.SphereGeometry.prototype.constructor=THREE.SphereGeometry;THREE.SphereGeometry.prototype.clone=function(){return new THREE.SphereGeometry(this.parameters.radius,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.phiStart,this.parameters.phiLength,this.parameters.thetaStart,this.parameters.thetaLength)};
 x,v.clone()]))}this.computeFaceNormals();this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.SphereGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.SphereGeometry.prototype.constructor=THREE.SphereGeometry;THREE.SphereGeometry.prototype.clone=function(){return new THREE.SphereGeometry(this.parameters.radius,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.phiStart,this.parameters.phiLength,this.parameters.thetaStart,this.parameters.thetaLength)};
 THREE.SphereBufferGeometry=function(a,b,c,d,e,g,f){THREE.BufferGeometry.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:g,thetaLength:f};a=a||50;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;g=void 0!==g?g:0;f=void 0!==f?f:Math.PI;for(var h=g+f,k=(b+1)*(c+1),l=new THREE.BufferAttribute(new Float32Array(3*k),3),n=new THREE.BufferAttribute(new Float32Array(3*
 THREE.SphereBufferGeometry=function(a,b,c,d,e,g,f){THREE.BufferGeometry.call(this);this.type="SphereBufferGeometry";this.parameters={radius:a,widthSegments:b,heightSegments:c,phiStart:d,phiLength:e,thetaStart:g,thetaLength:f};a=a||50;b=Math.max(3,Math.floor(b)||8);c=Math.max(2,Math.floor(c)||6);d=void 0!==d?d:0;e=void 0!==e?e:2*Math.PI;g=void 0!==g?g:0;f=void 0!==f?f:Math.PI;for(var h=g+f,k=(b+1)*(c+1),l=new THREE.BufferAttribute(new Float32Array(3*k),3),n=new THREE.BufferAttribute(new Float32Array(3*
-k),3),k=new THREE.BufferAttribute(new Float32Array(2*k),2),p=0,m=[],q=new THREE.Vector3,s=0;s<=c;s++){for(var r=[],u=s/c,x=0;x<=b;x++){var v=x/b,y=-a*Math.cos(d+v*e)*Math.sin(g+u*f),w=a*Math.cos(g+u*f),E=a*Math.sin(d+v*e)*Math.sin(g+u*f);q.set(y,w,E).normalize();l.setXYZ(p,y,w,E);n.setXYZ(p,q.x,q.y,q.z);k.setXY(p,v,1-u);r.push(p);p++}m.push(r)}d=[];for(s=0;s<c;s++)for(x=0;x<b;x++)e=m[s][x+1],f=m[s][x],p=m[s+1][x],q=m[s+1][x+1],(0!==s||0<g)&&d.push(e,f,q),(s!==c-1||h<Math.PI)&&d.push(f,p,q);this.addIndex(new THREE.BufferAttribute(new Uint16Array(d),
+k),3),k=new THREE.BufferAttribute(new Float32Array(2*k),2),p=0,m=[],q=new THREE.Vector3,s=0;s<=c;s++){for(var r=[],u=s/c,x=0;x<=b;x++){var v=x/b,y=-a*Math.cos(d+v*e)*Math.sin(g+u*f),w=a*Math.cos(g+u*f),A=a*Math.sin(d+v*e)*Math.sin(g+u*f);q.set(y,w,A).normalize();l.setXYZ(p,y,w,A);n.setXYZ(p,q.x,q.y,q.z);k.setXY(p,v,1-u);r.push(p);p++}m.push(r)}d=[];for(s=0;s<c;s++)for(x=0;x<b;x++)e=m[s][x+1],f=m[s][x],p=m[s+1][x],q=m[s+1][x+1],(0!==s||0<g)&&d.push(e,f,q),(s!==c-1||h<Math.PI)&&d.push(f,p,q);this.addIndex(new THREE.BufferAttribute(new Uint16Array(d),
 1));this.addAttribute("position",l);this.addAttribute("normal",n);this.addAttribute("uv",k);this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.SphereBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.SphereBufferGeometry.prototype.constructor=THREE.SphereBufferGeometry;
 1));this.addAttribute("position",l);this.addAttribute("normal",n);this.addAttribute("uv",k);this.boundingSphere=new THREE.Sphere(new THREE.Vector3,a)};THREE.SphereBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.SphereBufferGeometry.prototype.constructor=THREE.SphereBufferGeometry;
 THREE.SphereBufferGeometry.prototype.clone=function(){var a=new THREE.SphereBufferGeometry(this.parameters.radius,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.phiStart,this.parameters.phiLength,this.parameters.thetaStart,this.parameters.thetaLength);a.copy(this);return a};
 THREE.SphereBufferGeometry.prototype.clone=function(){var a=new THREE.SphereBufferGeometry(this.parameters.radius,this.parameters.widthSegments,this.parameters.heightSegments,this.parameters.phiStart,this.parameters.phiLength,this.parameters.thetaStart,this.parameters.thetaLength);a.copy(this);return a};
 THREE.TextGeometry=function(a,b){b=b||{};var c=THREE.FontUtils.generateShapes(a,b);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);THREE.ExtrudeGeometry.call(this,c,b);this.type="TextGeometry"};THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype);THREE.TextGeometry.prototype.constructor=THREE.TextGeometry;
 THREE.TextGeometry=function(a,b){b=b||{};var c=THREE.FontUtils.generateShapes(a,b);b.amount=void 0!==b.height?b.height:50;void 0===b.bevelThickness&&(b.bevelThickness=10);void 0===b.bevelSize&&(b.bevelSize=8);void 0===b.bevelEnabled&&(b.bevelEnabled=!1);THREE.ExtrudeGeometry.call(this,c,b);this.type="TextGeometry"};THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype);THREE.TextGeometry.prototype.constructor=THREE.TextGeometry;