Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
d835087dff
2 changed files with 155 additions and 113 deletions
  1. 44 3
      build/three.js
  2. 111 110
      build/three.min.js

+ 44 - 3
build/three.js

@@ -82,6 +82,8 @@ THREE.CustomBlending = 5;
 THREE.AddEquation = 100;
 THREE.AddEquation = 100;
 THREE.SubtractEquation = 101;
 THREE.SubtractEquation = 101;
 THREE.ReverseSubtractEquation = 102;
 THREE.ReverseSubtractEquation = 102;
+THREE.MinEquation = 103;
+THREE.MaxEquation = 104;
 
 
 // custom blending destination factors
 // custom blending destination factors
 
 
@@ -17585,6 +17587,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 	var _glExtensionCompressedTexturePVRTC;
 	var _glExtensionCompressedTexturePVRTC;
 	var _glExtensionElementIndexUint;
 	var _glExtensionElementIndexUint;
 	var _glExtensionFragDepth;
 	var _glExtensionFragDepth;
+	var _glExtensionBlendMinMax;
 
 
 
 
 	initGL();
 	initGL();
@@ -17607,7 +17610,6 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 	// COMPRESSED_TEXTURE_FORMATS return IntArray
 	// COMPRESSED_TEXTURE_FORMATS return IntArray
 	// but we need Array.indexOf to test formats availabilities
 	// but we need Array.indexOf to test formats availabilities
-
 	var _compressedTextureFormats = [];
 	var _compressedTextureFormats = [];
 
 
 	if( _glExtensionCompressedTexturePVRTC || _glExtensionCompressedTextureS3TC ) {
 	if( _glExtensionCompressedTexturePVRTC || _glExtensionCompressedTextureS3TC ) {
@@ -17694,6 +17696,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 	};
 	};
 
 
+	this.supportsBlendMinMax = function () {
+
+		return _glExtensionBlendMinMax;
+
+	};
+
 	this.getMaxAnisotropy  = function () {
 	this.getMaxAnisotropy  = function () {
 
 
 		return _maxAnisotropy;
 		return _maxAnisotropy;
@@ -22991,14 +22999,23 @@ THREE.WebGLRenderer = function ( parameters ) {
 			for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
 			for ( var i = 0, il = mipmaps.length; i < il; i ++ ) {
 
 
 				mipmap = mipmaps[ i ];
 				mipmap = mipmaps[ i ];
-				if ( texture.format !== THREE.RGBAFormat ) {
+
+				if ( texture.format !== THREE.RGBAFormat && texture.format !== THREE.RGBFormat ) {
+
 					if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
 					if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
+
 						_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
 						_gl.compressedTexImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
+
 					} else {
 					} else {
+
 						console.warn( "Attempt to load unsupported compressed texture format" );
 						console.warn( "Attempt to load unsupported compressed texture format" );
+
 					}
 					}
+
 				} else {
 				} else {
+
 					_gl.texImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
 					_gl.texImage2D( _gl.TEXTURE_2D, i, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
+
 				}
 				}
 
 
 			}
 			}
@@ -23137,20 +23154,29 @@ THREE.WebGLRenderer = function ( parameters ) {
 						for ( var j = 0, jl = mipmaps.length; j < jl; j ++ ) {
 						for ( var j = 0, jl = mipmaps.length; j < jl; j ++ ) {
 
 
 							mipmap = mipmaps[ j ];
 							mipmap = mipmaps[ j ];
-							if ( texture.format !== THREE.RGBAFormat ) {
+
+							if ( texture.format !== THREE.RGBAFormat && texture.format !== THREE.RGBFormat ) {
 
 
 								if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
 								if ( _compressedTextureFormats.indexOf( glFormat ) > -1 ) {
+
 									_gl.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
 									_gl.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, mipmap.data );
+
 								} else {
 								} else {
+
 									console.warn( "Attempt to load unsupported compressed texture format" );
 									console.warn( "Attempt to load unsupported compressed texture format" );
+
 								}
 								}
 
 
 							} else {
 							} else {
+
 								_gl.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
 								_gl.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );
+
 							}
 							}
 
 
 						}
 						}
+
 					}
 					}
+
 				}
 				}
 
 
 				if ( texture.generateMipmaps && isImagePowerOfTwo ) {
 				if ( texture.generateMipmaps && isImagePowerOfTwo ) {
@@ -23468,6 +23494,13 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		}
 		}
 
 
+		if ( _glExtensionBlendMinMax !== undefined ) {
+
+			if ( p === THREE.MinEquation ) return _glExtensionBlendMinMax.MIN_EXT;
+			if ( p === THREE.MaxEquation ) return _glExtensionBlendMinMax.MAX_EXT;
+
+		}
+
 		return 0;
 		return 0;
 
 
 	};
 	};
@@ -23596,6 +23629,8 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		_glExtensionElementIndexUint = _gl.getExtension( 'OES_element_index_uint' );
 		_glExtensionElementIndexUint = _gl.getExtension( 'OES_element_index_uint' );
 
 
+		_glExtensionBlendMinMax = _gl.getExtension( 'EXT_blend_minmax' );
+
 
 
 		if ( _glExtensionTextureFloat === null ) {
 		if ( _glExtensionTextureFloat === null ) {
 
 
@@ -23633,6 +23668,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 		}
 		}
 
 
+		if ( _glExtensionBlendMinMax === null ) {
+
+			console.log( 'THREE.WebGLRenderer: min max blend equations not supported.' );
+
+		}
+
 		if ( _gl.getShaderPrecisionFormat === undefined ) {
 		if ( _gl.getShaderPrecisionFormat === undefined ) {
 
 
 			_gl.getShaderPrecisionFormat = function () {
 			_gl.getShaderPrecisionFormat = function () {

+ 111 - 110
build/three.min.js

@@ -1,9 +1,9 @@
 // threejs.org/license
 // threejs.org/license
 'use strict';var THREE={REVISION:"69dev"};"object"===typeof module&&(module.exports=THREE);void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:0});THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};THREE.CullFaceNone=0;THREE.CullFaceBack=1;THREE.CullFaceFront=2;THREE.CullFaceFrontBack=3;THREE.FrontFaceDirectionCW=0;THREE.FrontFaceDirectionCCW=1;THREE.BasicShadowMap=0;THREE.PCFShadowMap=1;THREE.PCFSoftShadowMap=2;THREE.FrontSide=0;THREE.BackSide=1;THREE.DoubleSide=2;THREE.NoShading=0;
 'use strict';var THREE={REVISION:"69dev"};"object"===typeof module&&(module.exports=THREE);void 0===Math.sign&&(Math.sign=function(a){return 0>a?-1:0<a?1:0});THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2};THREE.CullFaceNone=0;THREE.CullFaceBack=1;THREE.CullFaceFront=2;THREE.CullFaceFrontBack=3;THREE.FrontFaceDirectionCW=0;THREE.FrontFaceDirectionCCW=1;THREE.BasicShadowMap=0;THREE.PCFShadowMap=1;THREE.PCFSoftShadowMap=2;THREE.FrontSide=0;THREE.BackSide=1;THREE.DoubleSide=2;THREE.NoShading=0;
-THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NoBlending=0;THREE.NormalBlending=1;THREE.AdditiveBlending=2;THREE.SubtractiveBlending=3;THREE.MultiplyBlending=4;THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.ReverseSubtractEquation=102;THREE.ZeroFactor=200;THREE.OneFactor=201;THREE.SrcColorFactor=202;THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;THREE.OneMinusSrcAlphaFactor=205;
-THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;THREE.SrcAlphaSaturateFactor=210;THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.AddOperation=2;THREE.UVMapping=function(){};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.RepeatWrapping=1E3;THREE.ClampToEdgeWrapping=1001;
-THREE.MirroredRepeatWrapping=1002;THREE.NearestFilter=1003;THREE.NearestMipMapNearestFilter=1004;THREE.NearestMipMapLinearFilter=1005;THREE.LinearFilter=1006;THREE.LinearMipMapNearestFilter=1007;THREE.LinearMipMapLinearFilter=1008;THREE.UnsignedByteType=1009;THREE.ByteType=1010;THREE.ShortType=1011;THREE.UnsignedShortType=1012;THREE.IntType=1013;THREE.UnsignedIntType=1014;THREE.FloatType=1015;THREE.UnsignedShort4444Type=1016;THREE.UnsignedShort5551Type=1017;THREE.UnsignedShort565Type=1018;
-THREE.AlphaFormat=1019;THREE.RGBFormat=1020;THREE.RGBAFormat=1021;THREE.LuminanceFormat=1022;THREE.LuminanceAlphaFormat=1023;THREE.RGB_S3TC_DXT1_Format=2001;THREE.RGBA_S3TC_DXT1_Format=2002;THREE.RGBA_S3TC_DXT3_Format=2003;THREE.RGBA_S3TC_DXT5_Format=2004;THREE.RGB_PVRTC_4BPPV1_Format=2100;THREE.RGB_PVRTC_2BPPV1_Format=2101;THREE.RGBA_PVRTC_4BPPV1_Format=2102;THREE.RGBA_PVRTC_2BPPV1_Format=2103;
+THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NoBlending=0;THREE.NormalBlending=1;THREE.AdditiveBlending=2;THREE.SubtractiveBlending=3;THREE.MultiplyBlending=4;THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.ReverseSubtractEquation=102;THREE.MinEquation=103;THREE.MaxEquation=104;THREE.ZeroFactor=200;THREE.OneFactor=201;THREE.SrcColorFactor=202;THREE.OneMinusSrcColorFactor=203;THREE.SrcAlphaFactor=204;
+THREE.OneMinusSrcAlphaFactor=205;THREE.DstAlphaFactor=206;THREE.OneMinusDstAlphaFactor=207;THREE.DstColorFactor=208;THREE.OneMinusDstColorFactor=209;THREE.SrcAlphaSaturateFactor=210;THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.AddOperation=2;THREE.UVMapping=function(){};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.RepeatWrapping=1E3;
+THREE.ClampToEdgeWrapping=1001;THREE.MirroredRepeatWrapping=1002;THREE.NearestFilter=1003;THREE.NearestMipMapNearestFilter=1004;THREE.NearestMipMapLinearFilter=1005;THREE.LinearFilter=1006;THREE.LinearMipMapNearestFilter=1007;THREE.LinearMipMapLinearFilter=1008;THREE.UnsignedByteType=1009;THREE.ByteType=1010;THREE.ShortType=1011;THREE.UnsignedShortType=1012;THREE.IntType=1013;THREE.UnsignedIntType=1014;THREE.FloatType=1015;THREE.UnsignedShort4444Type=1016;THREE.UnsignedShort5551Type=1017;
+THREE.UnsignedShort565Type=1018;THREE.AlphaFormat=1019;THREE.RGBFormat=1020;THREE.RGBAFormat=1021;THREE.LuminanceFormat=1022;THREE.LuminanceAlphaFormat=1023;THREE.RGB_S3TC_DXT1_Format=2001;THREE.RGBA_S3TC_DXT1_Format=2002;THREE.RGBA_S3TC_DXT3_Format=2003;THREE.RGBA_S3TC_DXT5_Format=2004;THREE.RGB_PVRTC_4BPPV1_Format=2100;THREE.RGB_PVRTC_2BPPV1_Format=2101;THREE.RGBA_PVRTC_4BPPV1_Format=2102;THREE.RGBA_PVRTC_2BPPV1_Format=2103;
 THREE.Color=function(a){return 3===arguments.length?this.setRGB(arguments[0],arguments[1],arguments[2]):this.set(a)};
 THREE.Color=function(a){return 3===arguments.length?this.setRGB(arguments[0],arguments[1],arguments[2]):this.set(a)};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(a){a instanceof THREE.Color?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){if(0===b)this.r=this.g=this.b=c;else{var d=function(a,b,c){0>c&&(c+=1);1<c&&(c-=1);return c<1/6?a+6*(b-a)*
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(a){a instanceof THREE.Color?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){if(0===b)this.r=this.g=this.b=c;else{var d=function(a,b,c){0>c&&(c+=1);1<c&&(c-=1);return c<1/6?a+6*(b-a)*
 c:0.5>c?b:c<2/3?a+6*(b-a)*(2/3-c):a};b=0.5>=c?c*(1+b):c+b-c*b;c=2*c-b;this.r=d(c,b,a+1/3);this.g=d(c,b,a);this.b=d(c,b,a-1/3)}return this},setStyle:function(a){if(/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.test(a))return a=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.exec(a),this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,this;if(/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.test(a))return a=/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.exec(a),this.r=
 c:0.5>c?b:c<2/3?a+6*(b-a)*(2/3-c):a};b=0.5>=c?c*(1+b):c+b-c*b;c=2*c-b;this.r=d(c,b,a+1/3);this.g=d(c,b,a);this.b=d(c,b,a-1/3)}return this},setStyle:function(a){if(/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.test(a))return a=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/i.exec(a),this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,this;if(/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.test(a))return a=/^rgb\((\d+)\%, ?(\d+)\%, ?(\d+)\%\)$/i.exec(a),this.r=
@@ -187,10 +187,10 @@ b.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0);(isNaN(
 if(c){a.makeEmpty();for(var d=this.boundingSphere.center,e=0,g=c.length;e<g;e+=3)b.set(c[e],c[e+1],c[e+2]),a.expandByPoint(b);a.center(d);for(var f=0,e=0,g=c.length;e<g;e+=3)b.set(c[e],c[e+1],c[e+2]),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.')}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=
 if(c){a.makeEmpty();for(var d=this.boundingSphere.center,e=0,g=c.length;e<g;e+=3)b.set(c[e],c[e+1],c[e+2]),a.expandByPoint(b);a.center(d);for(var f=0,e=0,g=c.length;e<g;e+=3)b.set(c[e],c[e+1],c[e+2]),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.')}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var a=
 this.attributes;if(a.position){var b=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(b.length),3));else for(var c=a.normal.array,d=0,e=c.length;d<e;d++)c[d]=0;var c=a.normal.array,g,f,h,k,m,n,q=new THREE.Vector3,r=new THREE.Vector3,t=new THREE.Vector3,s=new THREE.Vector3,p=new THREE.Vector3;if(a.index)for(var v=a.index.array,w=0<this.offsets.length?this.offsets:[{start:0,count:v.length,index:0}],u=0,A=w.length;u<A;++u){e=w[u].start;g=w[u].count;
 this.attributes;if(a.position){var b=a.position.array;if(void 0===a.normal)this.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(b.length),3));else for(var c=a.normal.array,d=0,e=c.length;d<e;d++)c[d]=0;var c=a.normal.array,g,f,h,k,m,n,q=new THREE.Vector3,r=new THREE.Vector3,t=new THREE.Vector3,s=new THREE.Vector3,p=new THREE.Vector3;if(a.index)for(var v=a.index.array,w=0<this.offsets.length?this.offsets:[{start:0,count:v.length,index:0}],u=0,A=w.length;u<A;++u){e=w[u].start;g=w[u].count;
 for(var x=w[u].index,d=e,e=e+g;d<e;d+=3)g=x+v[d],f=x+v[d+1],h=x+v[d+2],k=b[3*g],m=b[3*g+1],n=b[3*g+2],q.set(k,m,n),k=b[3*f],m=b[3*f+1],n=b[3*f+2],r.set(k,m,n),k=b[3*h],m=b[3*h+1],n=b[3*h+2],t.set(k,m,n),s.subVectors(t,r),p.subVectors(q,r),s.cross(p),c[3*g]+=s.x,c[3*g+1]+=s.y,c[3*g+2]+=s.z,c[3*f]+=s.x,c[3*f+1]+=s.y,c[3*f+2]+=s.z,c[3*h]+=s.x,c[3*h+1]+=s.y,c[3*h+2]+=s.z}else for(d=0,e=b.length;d<e;d+=9)k=b[d],m=b[d+1],n=b[d+2],q.set(k,m,n),k=b[d+3],m=b[d+4],n=b[d+5],r.set(k,m,n),k=b[d+6],m=b[d+7],n=
 for(var x=w[u].index,d=e,e=e+g;d<e;d+=3)g=x+v[d],f=x+v[d+1],h=x+v[d+2],k=b[3*g],m=b[3*g+1],n=b[3*g+2],q.set(k,m,n),k=b[3*f],m=b[3*f+1],n=b[3*f+2],r.set(k,m,n),k=b[3*h],m=b[3*h+1],n=b[3*h+2],t.set(k,m,n),s.subVectors(t,r),p.subVectors(q,r),s.cross(p),c[3*g]+=s.x,c[3*g+1]+=s.y,c[3*g+2]+=s.z,c[3*f]+=s.x,c[3*f+1]+=s.y,c[3*f+2]+=s.z,c[3*h]+=s.x,c[3*h+1]+=s.y,c[3*h+2]+=s.z}else for(d=0,e=b.length;d<e;d+=9)k=b[d],m=b[d+1],n=b[d+2],q.set(k,m,n),k=b[d+3],m=b[d+4],n=b[d+5],r.set(k,m,n),k=b[d+6],m=b[d+7],n=
-b[d+8],t.set(k,m,n),s.subVectors(t,r),p.subVectors(q,r),s.cross(p),c[d]=s.x,c[d+1]=s.y,c[d+2]=s.z,c[d+3]=s.x,c[d+4]=s.y,c[d+5]=s.z,c[d+6]=s.x,c[d+7]=s.y,c[d+8]=s.z;this.normalizeNormals();a.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){q=d[3*a];r=d[3*a+1];t=d[3*a+2];s=d[3*b];p=d[3*b+1];v=d[3*b+2];w=d[3*c];u=d[3*c+1];A=d[3*c+2];x=g[2*a];G=g[2*a+1];C=g[2*b];B=g[2*b+1];y=g[2*c];D=g[2*c+1];J=s-q;N=w-q;Q=p-r;E=u-r;da=v-t;V=A-t;R=C-x;S=y-x;L=B-G;wa=D-G;P=1/(R*wa-S*L);xa.set((wa*J-
-L*N)*P,(wa*Q-L*E)*P,(wa*da-L*V)*P);la.set((R*N-S*J)*P,(R*E-S*Q)*P,(R*V-S*da)*P);k[a].add(xa);k[b].add(xa);k[c].add(xa);m[a].add(la);m[b].add(la);m[c].add(la)}function b(a){Ca.x=e[3*a];Ca.y=e[3*a+1];Ca.z=e[3*a+2];fb.copy(Ca);I=k[a];Ga.copy(I);Ga.sub(Ca.multiplyScalar(Ca.dot(I))).normalize();Ta.crossVectors(fb,I);Na=Ta.dot(m[a]);Ra=0>Na?-1:1;h[4*a]=Ga.x;h[4*a+1]=Ga.y;h[4*a+2]=Ga.z;h[4*a+3]=Ra}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===
+b[d+8],t.set(k,m,n),s.subVectors(t,r),p.subVectors(q,r),s.cross(p),c[d]=s.x,c[d+1]=s.y,c[d+2]=s.z,c[d+3]=s.x,c[d+4]=s.y,c[d+5]=s.z,c[d+6]=s.x,c[d+7]=s.y,c[d+8]=s.z;this.normalizeNormals();a.normal.needsUpdate=!0}},computeTangents:function(){function a(a,b,c){q=d[3*a];r=d[3*a+1];t=d[3*a+2];s=d[3*b];p=d[3*b+1];v=d[3*b+2];w=d[3*c];u=d[3*c+1];A=d[3*c+2];x=g[2*a];G=g[2*a+1];C=g[2*b];B=g[2*b+1];y=g[2*c];D=g[2*c+1];J=s-q;N=w-q;Q=p-r;E=u-r;da=v-t;V=A-t;R=C-x;S=y-x;L=B-G;xa=D-G;P=1/(R*xa-S*L);ya.set((xa*J-
+L*N)*P,(xa*Q-L*E)*P,(xa*da-L*V)*P);la.set((R*N-S*J)*P,(R*E-S*Q)*P,(R*V-S*da)*P);k[a].add(ya);k[b].add(ya);k[c].add(ya);m[a].add(la);m[b].add(la);m[c].add(la)}function b(a){Ca.x=e[3*a];Ca.y=e[3*a+1];Ca.z=e[3*a+2];hb.copy(Ca);I=k[a];Ga.copy(I);Ga.sub(Ca.multiplyScalar(Ca.dot(I))).normalize();Ta.crossVectors(hb,I);Na=Ta.dot(m[a]);Ra=0>Na?-1:1;h[4*a]=Ga.x;h[4*a+1]=Ga.y;h[4*a+2]=Ga.z;h[4*a+3]=Ra}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===
 this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=this.attributes.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=[],m=[],n=0;n<f;n++)k[n]=new THREE.Vector3,m[n]=new THREE.Vector3;var q,
 this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var c=this.attributes.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=[],m=[],n=0;n<f;n++)k[n]=new THREE.Vector3,m[n]=new THREE.Vector3;var q,
-r,t,s,p,v,w,u,A,x,G,C,B,y,D,J,N,Q,E,da,V,R,S,L,wa,P,xa=new THREE.Vector3,la=new THREE.Vector3,sa,K,ha,ra,Ia;0===this.drawcalls.length&&this.addDrawCall(0,c.length,0);var ta=this.drawcalls,n=0;for(K=ta.length;n<K;++n){sa=ta[n].start;ha=ta[n].count;var Ja=ta[n].index,f=sa;for(sa+=ha;f<sa;f+=3)ha=Ja+c[f],ra=Ja+c[f+1],Ia=Ja+c[f+2],a(ha,ra,Ia)}var Ga=new THREE.Vector3,Ta=new THREE.Vector3,Ca=new THREE.Vector3,fb=new THREE.Vector3,Ra,I,Na,n=0;for(K=ta.length;n<K;++n)for(sa=ta[n].start,ha=ta[n].count,Ja=
+r,t,s,p,v,w,u,A,x,G,C,B,y,D,J,N,Q,E,da,V,R,S,L,xa,P,ya=new THREE.Vector3,la=new THREE.Vector3,sa,K,ha,ra,Ia;0===this.drawcalls.length&&this.addDrawCall(0,c.length,0);var ta=this.drawcalls,n=0;for(K=ta.length;n<K;++n){sa=ta[n].start;ha=ta[n].count;var Ja=ta[n].index,f=sa;for(sa+=ha;f<sa;f+=3)ha=Ja+c[f],ra=Ja+c[f+1],Ia=Ja+c[f+2],a(ha,ra,Ia)}var Ga=new THREE.Vector3,Ta=new THREE.Vector3,Ca=new THREE.Vector3,hb=new THREE.Vector3,Ra,I,Na,n=0;for(K=ta.length;n<K;++n)for(sa=ta[n].start,ha=ta[n].count,Ja=
 ta[n].index,f=sa,sa+=ha;f<sa;f+=3)ha=Ja+c[f],ra=Ja+c[f+1],Ia=Ja+c[f+2],b(ha),b(ra),b(Ia)}},computeOffsets:function(a){var b=a;void 0===a&&(b=65535);Date.now();a=this.attributes.index.array;for(var c=this.attributes.position.array,d=a.length/3,e=new Uint16Array(a.length),g=0,f=0,h=[{start:0,count:0,index:0}],k=h[0],m=0,n=0,q=new Int32Array(6),r=new Int32Array(c.length),t=new Int32Array(c.length),s=0;s<c.length;s++)r[s]=-1,t[s]=-1;for(c=0;c<d;c++){for(var p=n=0;3>p;p++)s=a[3*c+p],-1==r[s]?(q[2*p]=s,
 ta[n].index,f=sa,sa+=ha;f<sa;f+=3)ha=Ja+c[f],ra=Ja+c[f+1],Ia=Ja+c[f+2],b(ha),b(ra),b(Ia)}},computeOffsets:function(a){var b=a;void 0===a&&(b=65535);Date.now();a=this.attributes.index.array;for(var c=this.attributes.position.array,d=a.length/3,e=new Uint16Array(a.length),g=0,f=0,h=[{start:0,count:0,index:0}],k=h[0],m=0,n=0,q=new Int32Array(6),r=new Int32Array(c.length),t=new Int32Array(c.length),s=0;s<c.length;s++)r[s]=-1,t[s]=-1;for(c=0;c<d;c++){for(var p=n=0;3>p;p++)s=a[3*c+p],-1==r[s]?(q[2*p]=s,
 q[2*p+1]=-1,n++):r[s]<k.index?(q[2*p]=s,q[2*p+1]=-1,m++):(q[2*p]=s,q[2*p+1]=r[s]);if(f+n>k.index+b)for(k={start:g,count:0,index:f},h.push(k),n=0;6>n;n+=2)p=q[n+1],-1<p&&p<k.index&&(q[n+1]=-1);for(n=0;6>n;n+=2)s=q[n],p=q[n+1],-1===p&&(p=f++),r[s]=p,t[p]=s,e[g++]=p-k.index,k.count++}this.reorderBuffers(e,t,f);return this.offsets=h},merge:function(){console.log("BufferGeometry.merge(): TODO")},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+
 q[2*p+1]=-1,n++):r[s]<k.index?(q[2*p]=s,q[2*p+1]=-1,m++):(q[2*p]=s,q[2*p+1]=r[s]);if(f+n>k.index+b)for(k={start:g,count:0,index:f},h.push(k),n=0;6>n;n+=2)p=q[n+1],-1<p&&p<k.index&&(q[n+1]=-1);for(n=0;6>n;n+=2)s=q[n],p=q[n+1],-1===p&&(p=f++),r[s]=p,t[p]=s,e[g++]=p-k.index,k.count++}this.reorderBuffers(e,t,f);return this.offsets=h},merge:function(){console.log("BufferGeometry.merge(): TODO")},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},reorderBuffers:function(a,b,c){var d={},e;for(e in this.attributes)"index"!=e&&(d[e]=new this.attributes[e].array.constructor(this.attributes[e].itemSize*c));for(var g=0;g<c;g++){var f=b[g];for(e in this.attributes)if("index"!=e)for(var h=this.attributes[e].array,k=this.attributes[e].itemSize,m=d[e],n=0;n<k;n++)m[g*k+n]=h[f*k+n]}this.attributes.index.array=a;for(e in this.attributes)"index"!=e&&(this.attributes[e].array=d[e],this.attributes[e].numItems=
 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},reorderBuffers:function(a,b,c){var d={},e;for(e in this.attributes)"index"!=e&&(d[e]=new this.attributes[e].array.constructor(this.attributes[e].itemSize*c));for(var g=0;g<c;g++){var f=b[g];for(e in this.attributes)if("index"!=e)for(var h=this.attributes[e].array,k=this.attributes[e].itemSize,m=d[e],n=0;n<k;n++)m[g*k+n]=h[f*k+n]}this.attributes.index.array=a;for(e in this.attributes)"index"!=e&&(this.attributes[e].array=d[e],this.attributes[e].numItems=
@@ -430,38 +430,38 @@ function c(a,b){var c=b.geometry,e=a.faces3,f=3*e.length,g=1*e.length,h=3*e.leng
 f));c=null!==Fb&&21845<g?Uint32Array:Uint16Array;a.__typeArray=c;a.__faceArray=new c(3*g);a.__lineArray=new c(2*h);var k;if(a.numMorphTargets)for(a.__morphTargetsArrays=[],c=0,k=a.numMorphTargets;c<k;c++)a.__morphTargetsArrays.push(new Float32Array(3*f));if(a.numMorphNormals)for(a.__morphNormalsArrays=[],c=0,k=a.numMorphNormals;c<k;c++)a.__morphNormalsArrays.push(new Float32Array(3*f));a.__webglFaceCount=3*g;a.__webglLineCount=2*h;if(e.attributes){void 0===a.__webglCustomAttributesList&&(a.__webglCustomAttributesList=
 f));c=null!==Fb&&21845<g?Uint32Array:Uint16Array;a.__typeArray=c;a.__faceArray=new c(3*g);a.__lineArray=new c(2*h);var k;if(a.numMorphTargets)for(a.__morphTargetsArrays=[],c=0,k=a.numMorphTargets;c<k;c++)a.__morphTargetsArrays.push(new Float32Array(3*f));if(a.numMorphNormals)for(a.__morphNormalsArrays=[],c=0,k=a.numMorphNormals;c<k;c++)a.__morphNormalsArrays.push(new Float32Array(3*f));a.__webglFaceCount=3*g;a.__webglLineCount=2*h;if(e.attributes){void 0===a.__webglCustomAttributesList&&(a.__webglCustomAttributesList=
 []);for(var m in e.attributes){var g=e.attributes[m],h={},n;for(n in g)h[n]=g[n];if(!h.__webglInitialized||h.createUniqueBuffers)h.__webglInitialized=!0,c=1,"v2"===h.type?c=2:"v3"===h.type?c=3:"v4"===h.type?c=4:"c"===h.type&&(c=3),h.size=c,h.array=new Float32Array(f*c),h.buffer=l.createBuffer(),h.buffer.belongsToAttribute=m,g.needsUpdate=!0,h.__original=g;a.__webglCustomAttributesList.push(h)}}a.__inittedArrays=!0}function d(a,b){return a.material instanceof THREE.MeshFaceMaterial?a.material.materials[b.materialIndex]:
 []);for(var m in e.attributes){var g=e.attributes[m],h={},n;for(n in g)h[n]=g[n];if(!h.__webglInitialized||h.createUniqueBuffers)h.__webglInitialized=!0,c=1,"v2"===h.type?c=2:"v3"===h.type?c=3:"v4"===h.type?c=4:"c"===h.type&&(c=3),h.size=c,h.array=new Float32Array(f*c),h.buffer=l.createBuffer(),h.buffer.belongsToAttribute=m,g.needsUpdate=!0,h.__original=g;a.__webglCustomAttributesList.push(h)}}a.__inittedArrays=!0}function d(a,b){return a.material instanceof THREE.MeshFaceMaterial?a.material.materials[b.materialIndex]:
 a.material}function e(a,b,c,d){c=c.attributes;var e=b.attributes;b=b.attributesKeys;for(var g=0,k=b.length;g<k;g++){var m=b[g],n=e[m];if(0<=n){var r=c[m];void 0!==r?(m=r.itemSize,l.bindBuffer(l.ARRAY_BUFFER,r.buffer),f(n),l.vertexAttribPointer(n,m,l.FLOAT,!1,0,d*m*4)):void 0!==a.defaultAttributeValues&&(2===a.defaultAttributeValues[m].length?l.vertexAttrib2fv(n,a.defaultAttributeValues[m]):3===a.defaultAttributeValues[m].length&&l.vertexAttrib3fv(n,a.defaultAttributeValues[m]))}}h()}function g(){for(var a=
 a.material}function e(a,b,c,d){c=c.attributes;var e=b.attributes;b=b.attributesKeys;for(var g=0,k=b.length;g<k;g++){var m=b[g],n=e[m];if(0<=n){var r=c[m];void 0!==r?(m=r.itemSize,l.bindBuffer(l.ARRAY_BUFFER,r.buffer),f(n),l.vertexAttribPointer(n,m,l.FLOAT,!1,0,d*m*4)):void 0!==a.defaultAttributeValues&&(2===a.defaultAttributeValues[m].length?l.vertexAttrib2fv(n,a.defaultAttributeValues[m]):3===a.defaultAttributeValues[m].length&&l.vertexAttrib3fv(n,a.defaultAttributeValues[m]))}}h()}function g(){for(var a=
-0,b=sb.length;a<b;a++)sb[a]=0}function f(a){sb[a]=1;0===Gb[a]&&(l.enableVertexAttribArray(a),Gb[a]=1)}function h(){for(var a=0,b=Gb.length;a<b;a++)Gb[a]!==sb[a]&&(l.disableVertexAttribArray(a),Gb[a]=0)}function k(a,b){return a.material.id!==b.material.id?b.material.id-a.material.id:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a,b){return a.z!==b.z?a.z-b.z:a.id-b.id}function n(a,b){return b[0]-a[0]}function q(a,e,f){if(!1!==e.visible){e instanceof THREE.Light&&Ga.push(e);if(!(e instanceof THREE.Scene)){void 0===
+0,b=Lb.length;a<b;a++)Lb[a]=0}function f(a){Lb[a]=1;0===vb[a]&&(l.enableVertexAttribArray(a),vb[a]=1)}function h(){for(var a=0,b=vb.length;a<b;a++)vb[a]!==Lb[a]&&(l.disableVertexAttribArray(a),vb[a]=0)}function k(a,b){return a.material.id!==b.material.id?b.material.id-a.material.id:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a,b){return a.z!==b.z?a.z-b.z:a.id-b.id}function n(a,b){return b[0]-a[0]}function q(a,e,f){if(!1!==e.visible){e instanceof THREE.Light&&Ga.push(e);if(!(e instanceof THREE.Scene)){void 0===
 e.__webglInit&&(e.__webglInit=!0,e._modelViewMatrix=new THREE.Matrix4,e._normalMatrix=new THREE.Matrix3,e.addEventListener("removed",Ec));var g=e.geometry;if(void 0!==g&&void 0===g.__webglInit&&(g.__webglInit=!0,g.addEventListener("dispose",Fc),!(g instanceof THREE.BufferGeometry)))if(e instanceof THREE.Mesh)v(a,e,g);else if(e instanceof THREE.Line){if(!g.__webglVertexBuffer){g.__webglVertexBuffer=l.createBuffer();g.__webglColorBuffer=l.createBuffer();g.__webglLineDistanceBuffer=l.createBuffer();
 e.__webglInit&&(e.__webglInit=!0,e._modelViewMatrix=new THREE.Matrix4,e._normalMatrix=new THREE.Matrix3,e.addEventListener("removed",Ec));var g=e.geometry;if(void 0!==g&&void 0===g.__webglInit&&(g.__webglInit=!0,g.addEventListener("dispose",Fc),!(g instanceof THREE.BufferGeometry)))if(e instanceof THREE.Mesh)v(a,e,g);else if(e instanceof THREE.Line){if(!g.__webglVertexBuffer){g.__webglVertexBuffer=l.createBuffer();g.__webglColorBuffer=l.createBuffer();g.__webglLineDistanceBuffer=l.createBuffer();
 I.info.memory.geometries++;var h=g.vertices.length;g.__vertexArray=new Float32Array(3*h);g.__colorArray=new Float32Array(3*h);g.__lineDistanceArray=new Float32Array(1*h);g.__webglLineCount=h;b(g,e);g.verticesNeedUpdate=!0;g.colorsNeedUpdate=!0;g.lineDistancesNeedUpdate=!0}}else if(e instanceof THREE.PointCloud&&!g.__webglVertexBuffer){g.__webglVertexBuffer=l.createBuffer();g.__webglColorBuffer=l.createBuffer();I.info.memory.geometries++;var k=g.vertices.length;g.__vertexArray=new Float32Array(3*k);
 I.info.memory.geometries++;var h=g.vertices.length;g.__vertexArray=new Float32Array(3*h);g.__colorArray=new Float32Array(3*h);g.__lineDistanceArray=new Float32Array(1*h);g.__webglLineCount=h;b(g,e);g.verticesNeedUpdate=!0;g.colorsNeedUpdate=!0;g.lineDistancesNeedUpdate=!0}}else if(e instanceof THREE.PointCloud&&!g.__webglVertexBuffer){g.__webglVertexBuffer=l.createBuffer();g.__webglColorBuffer=l.createBuffer();I.info.memory.geometries++;var k=g.vertices.length;g.__vertexArray=new Float32Array(3*k);
 g.__colorArray=new Float32Array(3*k);g.__sortArray=[];g.__webglParticleCount=k;b(g,e);g.verticesNeedUpdate=!0;g.colorsNeedUpdate=!0}if(void 0===e.__webglActive){if(e instanceof THREE.Mesh)if(g instanceof THREE.BufferGeometry)w(Ta,g,e);else{if(g instanceof THREE.Geometry)for(var m=0,r=g.geometryGroupsList.length;m<r;m++)w(Ta,g.geometryGroupsList[m],e)}else e instanceof THREE.Line||e instanceof THREE.PointCloud?w(Ta,g,e):(e instanceof THREE.ImmediateRenderObject||e.immediateRenderCallback)&&Ca.push({id:null,
 g.__colorArray=new Float32Array(3*k);g.__sortArray=[];g.__webglParticleCount=k;b(g,e);g.verticesNeedUpdate=!0;g.colorsNeedUpdate=!0}if(void 0===e.__webglActive){if(e instanceof THREE.Mesh)if(g instanceof THREE.BufferGeometry)w(Ta,g,e);else{if(g instanceof THREE.Geometry)for(var m=0,r=g.geometryGroupsList.length;m<r;m++)w(Ta,g.geometryGroupsList[m],e)}else e instanceof THREE.Line||e instanceof THREE.PointCloud?w(Ta,g,e):(e instanceof THREE.ImmediateRenderObject||e.immediateRenderCallback)&&Ca.push({id:null,
 object:e,opaque:null,transparent:null,z:0});e.__webglActive=!0}var s=Ta[e.id];if(s&&(!1===e.frustumCulled||!0===Ac.intersectsObject(e))){var p=e.geometry,t,x,y;if(p instanceof THREE.BufferGeometry)for(var B=p.attributes,C=p.attributesKeys,G=0,D=C.length;G<D;G++){var N=C[G],L=B[N];void 0===L.buffer&&(L.buffer=l.createBuffer(),L.needsUpdate=!0);if(!0===L.needsUpdate){var J="index"===N?l.ELEMENT_ARRAY_BUFFER:l.ARRAY_BUFFER;l.bindBuffer(J,L.buffer);l.bufferData(J,L.array,l.STATIC_DRAW);L.needsUpdate=
 object:e,opaque:null,transparent:null,z:0});e.__webglActive=!0}var s=Ta[e.id];if(s&&(!1===e.frustumCulled||!0===Ac.intersectsObject(e))){var p=e.geometry,t,x,y;if(p instanceof THREE.BufferGeometry)for(var B=p.attributes,C=p.attributesKeys,G=0,D=C.length;G<D;G++){var N=C[G],L=B[N];void 0===L.buffer&&(L.buffer=l.createBuffer(),L.needsUpdate=!0);if(!0===L.needsUpdate){var J="index"===N?l.ELEMENT_ARRAY_BUFFER:l.ARRAY_BUFFER;l.bindBuffer(J,L.buffer);l.bufferData(J,L.array,l.STATIC_DRAW);L.needsUpdate=
 !1}}else if(e instanceof THREE.Mesh){(p.buffersNeedUpdate||p.groupsNeedUpdate)&&v(a,e,p);for(var Q=0,S=p.geometryGroupsList.length;Q<S;Q++)if(t=p.geometryGroupsList[Q],y=d(e,t),(p.buffersNeedUpdate||p.groupsNeedUpdate)&&c(t,e),x=y.attributes&&u(y),p.verticesNeedUpdate||p.morphTargetsNeedUpdate||p.elementsNeedUpdate||p.uvsNeedUpdate||p.normalsNeedUpdate||p.colorsNeedUpdate||p.tangentsNeedUpdate||x){var E=t,K=l.DYNAMIC_DRAW,ta=!p.dynamic,R=y;if(E.__inittedArrays){var V=R&&void 0!==R.shading&&R.shading===
 !1}}else if(e instanceof THREE.Mesh){(p.buffersNeedUpdate||p.groupsNeedUpdate)&&v(a,e,p);for(var Q=0,S=p.geometryGroupsList.length;Q<S;Q++)if(t=p.geometryGroupsList[Q],y=d(e,t),(p.buffersNeedUpdate||p.groupsNeedUpdate)&&c(t,e),x=y.attributes&&u(y),p.verticesNeedUpdate||p.morphTargetsNeedUpdate||p.elementsNeedUpdate||p.uvsNeedUpdate||p.normalsNeedUpdate||p.colorsNeedUpdate||p.tangentsNeedUpdate||x){var E=t,K=l.DYNAMIC_DRAW,ta=!p.dynamic,R=y;if(E.__inittedArrays){var V=R&&void 0!==R.shading&&R.shading===
-THREE.SmoothShading,M=void 0,P=void 0,Ja=void 0,W=void 0,da=void 0,wa=void 0,Na=void 0,la=void 0,va=void 0,sa=void 0,xa=void 0,X=void 0,Y=void 0,Z=void 0,ra=void 0,ha=void 0,Ia=void 0,oa=void 0,O=void 0,tb=void 0,ma=void 0,oc=void 0,ka=void 0,pc=void 0,qc=void 0,rc=void 0,Aa=void 0,Ea=void 0,Fa=void 0,ga=void 0,Xa=void 0,rb=void 0,ua=void 0,Bc=void 0,Oa=void 0,Tb=void 0,$a=void 0,mb=void 0,Hb=void 0,Mb=void 0,gb=0,Ya=0,sc=0,tc=0,vb=0,Za=0,Pa=0,ab=0,Ka=0,fa=0,qa=0,F=0,La=void 0,bb=E.__vertexArray,
-Nb=E.__uvArray,wb=E.__uv2Array,cb=E.__normalArray,ya=E.__tangentArray,Ma=E.__colorArray,pa=E.__skinIndexArray,Ba=E.__skinWeightArray,ec=E.__morphTargetsArrays,hb=E.__morphNormalsArrays,xb=E.__webglCustomAttributesList,z=void 0,vc=E.__faceArray,Sa=E.__lineArray,Ha=e.geometry,db=Ha.elementsNeedUpdate,yb=Ha.uvsNeedUpdate,eb=Ha.normalsNeedUpdate,Uc=Ha.tangentsNeedUpdate,Gb=Ha.colorsNeedUpdate,ea=Ha.morphTargetsNeedUpdate,Cc=Ha.vertices,H=E.faces3,$=Ha.faces,aa=Ha.faceVertexUvs[0],Ua=Ha.faceVertexUvs[1],
-za=Ha.skinIndices,Yb=Ha.skinWeights,Zb=Ha.morphTargets,$b=Ha.morphNormals;if(Ha.verticesNeedUpdate){M=0;for(P=H.length;M<P;M++)W=$[H[M]],X=Cc[W.a],Y=Cc[W.b],Z=Cc[W.c],bb[Ya]=X.x,bb[Ya+1]=X.y,bb[Ya+2]=X.z,bb[Ya+3]=Y.x,bb[Ya+4]=Y.y,bb[Ya+5]=Y.z,bb[Ya+6]=Z.x,bb[Ya+7]=Z.y,bb[Ya+8]=Z.z,Ya+=9;l.bindBuffer(l.ARRAY_BUFFER,E.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,bb,K)}if(ea)for(Oa=0,Tb=Zb.length;Oa<Tb;Oa++){M=qa=0;for(P=H.length;M<P;M++)Hb=H[M],W=$[Hb],X=Zb[Oa].vertices[W.a],Y=Zb[Oa].vertices[W.b],
-Z=Zb[Oa].vertices[W.c],$a=ec[Oa],$a[qa]=X.x,$a[qa+1]=X.y,$a[qa+2]=X.z,$a[qa+3]=Y.x,$a[qa+4]=Y.y,$a[qa+5]=Y.z,$a[qa+6]=Z.x,$a[qa+7]=Z.y,$a[qa+8]=Z.z,R.morphNormals&&(V?(Mb=$b[Oa].vertexNormals[Hb],oa=Mb.a,O=Mb.b,tb=Mb.c):tb=O=oa=$b[Oa].faceNormals[Hb],mb=hb[Oa],mb[qa]=oa.x,mb[qa+1]=oa.y,mb[qa+2]=oa.z,mb[qa+3]=O.x,mb[qa+4]=O.y,mb[qa+5]=O.z,mb[qa+6]=tb.x,mb[qa+7]=tb.y,mb[qa+8]=tb.z),qa+=9;l.bindBuffer(l.ARRAY_BUFFER,E.__webglMorphTargetsBuffers[Oa]);l.bufferData(l.ARRAY_BUFFER,ec[Oa],K);R.morphNormals&&
-(l.bindBuffer(l.ARRAY_BUFFER,E.__webglMorphNormalsBuffers[Oa]),l.bufferData(l.ARRAY_BUFFER,hb[Oa],K))}if(Yb.length){M=0;for(P=H.length;M<P;M++)W=$[H[M]],pc=Yb[W.a],qc=Yb[W.b],rc=Yb[W.c],Ba[fa]=pc.x,Ba[fa+1]=pc.y,Ba[fa+2]=pc.z,Ba[fa+3]=pc.w,Ba[fa+4]=qc.x,Ba[fa+5]=qc.y,Ba[fa+6]=qc.z,Ba[fa+7]=qc.w,Ba[fa+8]=rc.x,Ba[fa+9]=rc.y,Ba[fa+10]=rc.z,Ba[fa+11]=rc.w,Aa=za[W.a],Ea=za[W.b],Fa=za[W.c],pa[fa]=Aa.x,pa[fa+1]=Aa.y,pa[fa+2]=Aa.z,pa[fa+3]=Aa.w,pa[fa+4]=Ea.x,pa[fa+5]=Ea.y,pa[fa+6]=Ea.z,pa[fa+7]=Ea.w,pa[fa+
-8]=Fa.x,pa[fa+9]=Fa.y,pa[fa+10]=Fa.z,pa[fa+11]=Fa.w,fa+=12;0<fa&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglSkinIndicesBuffer),l.bufferData(l.ARRAY_BUFFER,pa,K),l.bindBuffer(l.ARRAY_BUFFER,E.__webglSkinWeightsBuffer),l.bufferData(l.ARRAY_BUFFER,Ba,K))}if(Gb){M=0;for(P=H.length;M<P;M++)W=$[H[M]],Na=W.vertexColors,la=W.color,3===Na.length&&R.vertexColors===THREE.VertexColors?(ma=Na[0],oc=Na[1],ka=Na[2]):ka=oc=ma=la,Ma[Ka]=ma.r,Ma[Ka+1]=ma.g,Ma[Ka+2]=ma.b,Ma[Ka+3]=oc.r,Ma[Ka+4]=oc.g,Ma[Ka+5]=oc.b,Ma[Ka+6]=
-ka.r,Ma[Ka+7]=ka.g,Ma[Ka+8]=ka.b,Ka+=9;0<Ka&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,Ma,K))}if(Uc&&Ha.hasTangents){M=0;for(P=H.length;M<P;M++)W=$[H[M]],va=W.vertexTangents,ra=va[0],ha=va[1],Ia=va[2],ya[Pa]=ra.x,ya[Pa+1]=ra.y,ya[Pa+2]=ra.z,ya[Pa+3]=ra.w,ya[Pa+4]=ha.x,ya[Pa+5]=ha.y,ya[Pa+6]=ha.z,ya[Pa+7]=ha.w,ya[Pa+8]=Ia.x,ya[Pa+9]=Ia.y,ya[Pa+10]=Ia.z,ya[Pa+11]=Ia.w,Pa+=12;l.bindBuffer(l.ARRAY_BUFFER,E.__webglTangentBuffer);l.bufferData(l.ARRAY_BUFFER,ya,K)}if(eb){M=
-0;for(P=H.length;M<P;M++)if(W=$[H[M]],da=W.vertexNormals,wa=W.normal,3===da.length&&V)for(ga=0;3>ga;ga++)rb=da[ga],cb[Za]=rb.x,cb[Za+1]=rb.y,cb[Za+2]=rb.z,Za+=3;else for(ga=0;3>ga;ga++)cb[Za]=wa.x,cb[Za+1]=wa.y,cb[Za+2]=wa.z,Za+=3;l.bindBuffer(l.ARRAY_BUFFER,E.__webglNormalBuffer);l.bufferData(l.ARRAY_BUFFER,cb,K)}if(yb&&aa){M=0;for(P=H.length;M<P;M++)if(Ja=H[M],sa=aa[Ja],void 0!==sa)for(ga=0;3>ga;ga++)ua=sa[ga],Nb[sc]=ua.x,Nb[sc+1]=ua.y,sc+=2;0<sc&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglUVBuffer),
-l.bufferData(l.ARRAY_BUFFER,Nb,K))}if(yb&&Ua){M=0;for(P=H.length;M<P;M++)if(Ja=H[M],xa=Ua[Ja],void 0!==xa)for(ga=0;3>ga;ga++)Bc=xa[ga],wb[tc]=Bc.x,wb[tc+1]=Bc.y,tc+=2;0<tc&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglUV2Buffer),l.bufferData(l.ARRAY_BUFFER,wb,K))}if(db){M=0;for(P=H.length;M<P;M++)vc[vb]=gb,vc[vb+1]=gb+1,vc[vb+2]=gb+2,vb+=3,Sa[ab]=gb,Sa[ab+1]=gb+1,Sa[ab+2]=gb,Sa[ab+3]=gb+2,Sa[ab+4]=gb+1,Sa[ab+5]=gb+2,ab+=6,gb+=3;l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,E.__webglFaceBuffer);l.bufferData(l.ELEMENT_ARRAY_BUFFER,
-vc,K);l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,E.__webglLineBuffer);l.bufferData(l.ELEMENT_ARRAY_BUFFER,Sa,K)}if(xb)for(ga=0,Xa=xb.length;ga<Xa;ga++)if(z=xb[ga],z.__original.needsUpdate){F=0;if(1===z.size)if(void 0===z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],z.array[F]=z.value[W.a],z.array[F+1]=z.value[W.b],z.array[F+2]=z.value[W.c],F+=3;else{if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],z.array[F]=La,z.array[F+1]=La,z.array[F+2]=La,F+=3}else if(2===z.size)if(void 0===
+THREE.SmoothShading,M=void 0,P=void 0,Ja=void 0,W=void 0,da=void 0,xa=void 0,Na=void 0,la=void 0,va=void 0,sa=void 0,ya=void 0,X=void 0,Y=void 0,Z=void 0,ra=void 0,ha=void 0,Ia=void 0,oa=void 0,O=void 0,ub=void 0,ma=void 0,pc=void 0,ka=void 0,qc=void 0,rc=void 0,sc=void 0,Aa=void 0,Ea=void 0,Fa=void 0,ga=void 0,Xa=void 0,tb=void 0,ua=void 0,Bc=void 0,Oa=void 0,Tb=void 0,ab=void 0,nb=void 0,Gb=void 0,Mb=void 0,ib=0,Ya=0,tc=0,uc=0,wb=0,Za=0,Pa=0,bb=0,Ka=0,fa=0,qa=0,F=0,La=void 0,cb=E.__vertexArray,
+Nb=E.__uvArray,xb=E.__uv2Array,db=E.__normalArray,za=E.__tangentArray,Ma=E.__colorArray,pa=E.__skinIndexArray,Ba=E.__skinWeightArray,ec=E.__morphTargetsArrays,jb=E.__morphNormalsArrays,yb=E.__webglCustomAttributesList,z=void 0,$a=E.__faceArray,Sa=E.__lineArray,Ha=e.geometry,eb=Ha.elementsNeedUpdate,zb=Ha.uvsNeedUpdate,fb=Ha.normalsNeedUpdate,Uc=Ha.tangentsNeedUpdate,vb=Ha.colorsNeedUpdate,ea=Ha.morphTargetsNeedUpdate,Cc=Ha.vertices,H=E.faces3,$=Ha.faces,aa=Ha.faceVertexUvs[0],Ua=Ha.faceVertexUvs[1],
+wa=Ha.skinIndices,Yb=Ha.skinWeights,Zb=Ha.morphTargets,$b=Ha.morphNormals;if(Ha.verticesNeedUpdate){M=0;for(P=H.length;M<P;M++)W=$[H[M]],X=Cc[W.a],Y=Cc[W.b],Z=Cc[W.c],cb[Ya]=X.x,cb[Ya+1]=X.y,cb[Ya+2]=X.z,cb[Ya+3]=Y.x,cb[Ya+4]=Y.y,cb[Ya+5]=Y.z,cb[Ya+6]=Z.x,cb[Ya+7]=Z.y,cb[Ya+8]=Z.z,Ya+=9;l.bindBuffer(l.ARRAY_BUFFER,E.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,cb,K)}if(ea)for(Oa=0,Tb=Zb.length;Oa<Tb;Oa++){M=qa=0;for(P=H.length;M<P;M++)Gb=H[M],W=$[Gb],X=Zb[Oa].vertices[W.a],Y=Zb[Oa].vertices[W.b],
+Z=Zb[Oa].vertices[W.c],ab=ec[Oa],ab[qa]=X.x,ab[qa+1]=X.y,ab[qa+2]=X.z,ab[qa+3]=Y.x,ab[qa+4]=Y.y,ab[qa+5]=Y.z,ab[qa+6]=Z.x,ab[qa+7]=Z.y,ab[qa+8]=Z.z,R.morphNormals&&(V?(Mb=$b[Oa].vertexNormals[Gb],oa=Mb.a,O=Mb.b,ub=Mb.c):ub=O=oa=$b[Oa].faceNormals[Gb],nb=jb[Oa],nb[qa]=oa.x,nb[qa+1]=oa.y,nb[qa+2]=oa.z,nb[qa+3]=O.x,nb[qa+4]=O.y,nb[qa+5]=O.z,nb[qa+6]=ub.x,nb[qa+7]=ub.y,nb[qa+8]=ub.z),qa+=9;l.bindBuffer(l.ARRAY_BUFFER,E.__webglMorphTargetsBuffers[Oa]);l.bufferData(l.ARRAY_BUFFER,ec[Oa],K);R.morphNormals&&
+(l.bindBuffer(l.ARRAY_BUFFER,E.__webglMorphNormalsBuffers[Oa]),l.bufferData(l.ARRAY_BUFFER,jb[Oa],K))}if(Yb.length){M=0;for(P=H.length;M<P;M++)W=$[H[M]],qc=Yb[W.a],rc=Yb[W.b],sc=Yb[W.c],Ba[fa]=qc.x,Ba[fa+1]=qc.y,Ba[fa+2]=qc.z,Ba[fa+3]=qc.w,Ba[fa+4]=rc.x,Ba[fa+5]=rc.y,Ba[fa+6]=rc.z,Ba[fa+7]=rc.w,Ba[fa+8]=sc.x,Ba[fa+9]=sc.y,Ba[fa+10]=sc.z,Ba[fa+11]=sc.w,Aa=wa[W.a],Ea=wa[W.b],Fa=wa[W.c],pa[fa]=Aa.x,pa[fa+1]=Aa.y,pa[fa+2]=Aa.z,pa[fa+3]=Aa.w,pa[fa+4]=Ea.x,pa[fa+5]=Ea.y,pa[fa+6]=Ea.z,pa[fa+7]=Ea.w,pa[fa+
+8]=Fa.x,pa[fa+9]=Fa.y,pa[fa+10]=Fa.z,pa[fa+11]=Fa.w,fa+=12;0<fa&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglSkinIndicesBuffer),l.bufferData(l.ARRAY_BUFFER,pa,K),l.bindBuffer(l.ARRAY_BUFFER,E.__webglSkinWeightsBuffer),l.bufferData(l.ARRAY_BUFFER,Ba,K))}if(vb){M=0;for(P=H.length;M<P;M++)W=$[H[M]],Na=W.vertexColors,la=W.color,3===Na.length&&R.vertexColors===THREE.VertexColors?(ma=Na[0],pc=Na[1],ka=Na[2]):ka=pc=ma=la,Ma[Ka]=ma.r,Ma[Ka+1]=ma.g,Ma[Ka+2]=ma.b,Ma[Ka+3]=pc.r,Ma[Ka+4]=pc.g,Ma[Ka+5]=pc.b,Ma[Ka+6]=
+ka.r,Ma[Ka+7]=ka.g,Ma[Ka+8]=ka.b,Ka+=9;0<Ka&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,Ma,K))}if(Uc&&Ha.hasTangents){M=0;for(P=H.length;M<P;M++)W=$[H[M]],va=W.vertexTangents,ra=va[0],ha=va[1],Ia=va[2],za[Pa]=ra.x,za[Pa+1]=ra.y,za[Pa+2]=ra.z,za[Pa+3]=ra.w,za[Pa+4]=ha.x,za[Pa+5]=ha.y,za[Pa+6]=ha.z,za[Pa+7]=ha.w,za[Pa+8]=Ia.x,za[Pa+9]=Ia.y,za[Pa+10]=Ia.z,za[Pa+11]=Ia.w,Pa+=12;l.bindBuffer(l.ARRAY_BUFFER,E.__webglTangentBuffer);l.bufferData(l.ARRAY_BUFFER,za,K)}if(fb){M=
+0;for(P=H.length;M<P;M++)if(W=$[H[M]],da=W.vertexNormals,xa=W.normal,3===da.length&&V)for(ga=0;3>ga;ga++)tb=da[ga],db[Za]=tb.x,db[Za+1]=tb.y,db[Za+2]=tb.z,Za+=3;else for(ga=0;3>ga;ga++)db[Za]=xa.x,db[Za+1]=xa.y,db[Za+2]=xa.z,Za+=3;l.bindBuffer(l.ARRAY_BUFFER,E.__webglNormalBuffer);l.bufferData(l.ARRAY_BUFFER,db,K)}if(zb&&aa){M=0;for(P=H.length;M<P;M++)if(Ja=H[M],sa=aa[Ja],void 0!==sa)for(ga=0;3>ga;ga++)ua=sa[ga],Nb[tc]=ua.x,Nb[tc+1]=ua.y,tc+=2;0<tc&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglUVBuffer),
+l.bufferData(l.ARRAY_BUFFER,Nb,K))}if(zb&&Ua){M=0;for(P=H.length;M<P;M++)if(Ja=H[M],ya=Ua[Ja],void 0!==ya)for(ga=0;3>ga;ga++)Bc=ya[ga],xb[uc]=Bc.x,xb[uc+1]=Bc.y,uc+=2;0<uc&&(l.bindBuffer(l.ARRAY_BUFFER,E.__webglUV2Buffer),l.bufferData(l.ARRAY_BUFFER,xb,K))}if(eb){M=0;for(P=H.length;M<P;M++)$a[wb]=ib,$a[wb+1]=ib+1,$a[wb+2]=ib+2,wb+=3,Sa[bb]=ib,Sa[bb+1]=ib+1,Sa[bb+2]=ib,Sa[bb+3]=ib+2,Sa[bb+4]=ib+1,Sa[bb+5]=ib+2,bb+=6,ib+=3;l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,E.__webglFaceBuffer);l.bufferData(l.ELEMENT_ARRAY_BUFFER,
+$a,K);l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,E.__webglLineBuffer);l.bufferData(l.ELEMENT_ARRAY_BUFFER,Sa,K)}if(yb)for(ga=0,Xa=yb.length;ga<Xa;ga++)if(z=yb[ga],z.__original.needsUpdate){F=0;if(1===z.size)if(void 0===z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],z.array[F]=z.value[W.a],z.array[F+1]=z.value[W.b],z.array[F+2]=z.value[W.c],F+=3;else{if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],z.array[F]=La,z.array[F+1]=La,z.array[F+2]=La,F+=3}else if(2===z.size)if(void 0===
 z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],Z=z.value[W.c],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=Y.x,z.array[F+3]=Y.y,z.array[F+4]=Z.x,z.array[F+5]=Z.y,F+=6;else{if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=Y.x,z.array[F+3]=Y.y,z.array[F+4]=Z.x,z.array[F+5]=Z.y,F+=6}else if(3===z.size){var ba;ba="c"===z.type?["r","g","b"]:["x","y","z"];if(void 0===z.boundTo||"vertices"===
 z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],Z=z.value[W.c],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=Y.x,z.array[F+3]=Y.y,z.array[F+4]=Z.x,z.array[F+5]=Z.y,F+=6;else{if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=Y.x,z.array[F+3]=Y.y,z.array[F+4]=Z.x,z.array[F+5]=Z.y,F+=6}else if(3===z.size){var ba;ba="c"===z.type?["r","g","b"]:["x","y","z"];if(void 0===z.boundTo||"vertices"===
 z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],Z=z.value[W.c],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9;else if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],
 z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],Z=z.value[W.c],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9;else if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],
 z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9;else if("faceVertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],X=La[0],Y=La[1],Z=La[2],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9}else if(4===z.size)if(void 0===z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],
 z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9;else if("faceVertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],X=La[0],Y=La[1],Z=La[2],z.array[F]=X[ba[0]],z.array[F+1]=X[ba[1]],z.array[F+2]=X[ba[2]],z.array[F+3]=Y[ba[0]],z.array[F+4]=Y[ba[1]],z.array[F+5]=Y[ba[2]],z.array[F+6]=Z[ba[0]],z.array[F+7]=Z[ba[1]],z.array[F+8]=Z[ba[2]],F+=9}else if(4===z.size)if(void 0===z.boundTo||"vertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)W=$[H[M]],X=z.value[W.a],Y=z.value[W.b],
 Z=z.value[W.c],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=Z.w,F+=12;else if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=
 Z=z.value[W.c],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=Z.w,F+=12;else if("faces"===z.boundTo)for(M=0,P=H.length;M<P;M++)Z=Y=X=La=z.value[H[M]],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=
 Z.w,F+=12;else if("faceVertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],X=La[0],Y=La[1],Z=La[2],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=Z.w,F+=12;l.bindBuffer(l.ARRAY_BUFFER,z.buffer);l.bufferData(l.ARRAY_BUFFER,z.array,K)}ta&&(delete E.__inittedArrays,delete E.__colorArray,delete E.__normalArray,delete E.__tangentArray,delete E.__uvArray,
 Z.w,F+=12;else if("faceVertices"===z.boundTo)for(M=0,P=H.length;M<P;M++)La=z.value[H[M]],X=La[0],Y=La[1],Z=La[2],z.array[F]=X.x,z.array[F+1]=X.y,z.array[F+2]=X.z,z.array[F+3]=X.w,z.array[F+4]=Y.x,z.array[F+5]=Y.y,z.array[F+6]=Y.z,z.array[F+7]=Y.w,z.array[F+8]=Z.x,z.array[F+9]=Z.y,z.array[F+10]=Z.z,z.array[F+11]=Z.w,F+=12;l.bindBuffer(l.ARRAY_BUFFER,z.buffer);l.bufferData(l.ARRAY_BUFFER,z.array,K)}ta&&(delete E.__inittedArrays,delete E.__colorArray,delete E.__normalArray,delete E.__tangentArray,delete E.__uvArray,
 delete E.__uv2Array,delete E.__faceArray,delete E.__vertexArray,delete E.__lineArray,delete E.__skinIndexArray,delete E.__skinWeightArray)}}p.verticesNeedUpdate=!1;p.morphTargetsNeedUpdate=!1;p.elementsNeedUpdate=!1;p.uvsNeedUpdate=!1;p.normalsNeedUpdate=!1;p.colorsNeedUpdate=!1;p.tangentsNeedUpdate=!1;p.buffersNeedUpdate=!1;y.attributes&&A(y)}else if(e instanceof THREE.Line){y=d(e,p);x=y.attributes&&u(y);if(p.verticesNeedUpdate||p.colorsNeedUpdate||p.lineDistancesNeedUpdate||x){var ac=l.DYNAMIC_DRAW,
 delete E.__uv2Array,delete E.__faceArray,delete E.__vertexArray,delete E.__lineArray,delete E.__skinIndexArray,delete E.__skinWeightArray)}}p.verticesNeedUpdate=!1;p.morphTargetsNeedUpdate=!1;p.elementsNeedUpdate=!1;p.uvsNeedUpdate=!1;p.normalsNeedUpdate=!1;p.colorsNeedUpdate=!1;p.tangentsNeedUpdate=!1;p.buffersNeedUpdate=!1;y.attributes&&A(y)}else if(e instanceof THREE.Line){y=d(e,p);x=y.attributes&&u(y);if(p.verticesNeedUpdate||p.colorsNeedUpdate||p.lineDistancesNeedUpdate||x){var ac=l.DYNAMIC_DRAW,
-Ob,nb,Pb,ob,ia,zb,Ub=p.vertices,ub=p.colors,Fb=p.lineDistances,sb=Ub.length,Vb=ub.length,Kb=Fb.length,ib=p.__vertexArray,jb=p.__colorArray,Eb=p.__lineDistanceArray,lc=p.colorsNeedUpdate,mc=p.lineDistancesNeedUpdate,kb=p.__webglCustomAttributesList,lb,Lb,Da,ic,Va,na;if(p.verticesNeedUpdate){for(Ob=0;Ob<sb;Ob++)ob=Ub[Ob],ia=3*Ob,ib[ia]=ob.x,ib[ia+1]=ob.y,ib[ia+2]=ob.z;l.bindBuffer(l.ARRAY_BUFFER,p.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,ib,ac)}if(lc){for(nb=0;nb<Vb;nb++)zb=ub[nb],ia=3*nb,jb[ia]=
-zb.r,jb[ia+1]=zb.g,jb[ia+2]=zb.b;l.bindBuffer(l.ARRAY_BUFFER,p.__webglColorBuffer);l.bufferData(l.ARRAY_BUFFER,jb,ac)}if(mc){for(Pb=0;Pb<Kb;Pb++)Eb[Pb]=Fb[Pb];l.bindBuffer(l.ARRAY_BUFFER,p.__webglLineDistanceBuffer);l.bufferData(l.ARRAY_BUFFER,Eb,ac)}if(kb)for(lb=0,Lb=kb.length;lb<Lb;lb++)if(na=kb[lb],na.needsUpdate&&(void 0===na.boundTo||"vertices"===na.boundTo)){ia=0;ic=na.value.length;if(1===na.size)for(Da=0;Da<ic;Da++)na.array[Da]=na.value[Da];else if(2===na.size)for(Da=0;Da<ic;Da++)Va=na.value[Da],
+Ob,ob,Pb,pb,ia,Ab,Ub=p.vertices,Xb=p.colors,Fb=p.lineDistances,Lb=Ub.length,Jb=Xb.length,Vb=Fb.length,kb=p.__vertexArray,lb=p.__colorArray,Kb=p.__lineDistanceArray,mc=p.colorsNeedUpdate,nc=p.lineDistancesNeedUpdate,mb=p.__webglCustomAttributesList,gb,sb,Da,ic,Va,na;if(p.verticesNeedUpdate){for(Ob=0;Ob<Lb;Ob++)pb=Ub[Ob],ia=3*Ob,kb[ia]=pb.x,kb[ia+1]=pb.y,kb[ia+2]=pb.z;l.bindBuffer(l.ARRAY_BUFFER,p.__webglVertexBuffer);l.bufferData(l.ARRAY_BUFFER,kb,ac)}if(mc){for(ob=0;ob<Jb;ob++)Ab=Xb[ob],ia=3*ob,lb[ia]=
+Ab.r,lb[ia+1]=Ab.g,lb[ia+2]=Ab.b;l.bindBuffer(l.ARRAY_BUFFER,p.__webglColorBuffer);l.bufferData(l.ARRAY_BUFFER,lb,ac)}if(nc){for(Pb=0;Pb<Vb;Pb++)Kb[Pb]=Fb[Pb];l.bindBuffer(l.ARRAY_BUFFER,p.__webglLineDistanceBuffer);l.bufferData(l.ARRAY_BUFFER,Kb,ac)}if(mb)for(gb=0,sb=mb.length;gb<sb;gb++)if(na=mb[gb],na.needsUpdate&&(void 0===na.boundTo||"vertices"===na.boundTo)){ia=0;ic=na.value.length;if(1===na.size)for(Da=0;Da<ic;Da++)na.array[Da]=na.value[Da];else if(2===na.size)for(Da=0;Da<ic;Da++)Va=na.value[Da],
 na.array[ia]=Va.x,na.array[ia+1]=Va.y,ia+=2;else if(3===na.size)if("c"===na.type)for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.r,na.array[ia+1]=Va.g,na.array[ia+2]=Va.b,ia+=3;else for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.x,na.array[ia+1]=Va.y,na.array[ia+2]=Va.z,ia+=3;else if(4===na.size)for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.x,na.array[ia+1]=Va.y,na.array[ia+2]=Va.z,na.array[ia+3]=Va.w,ia+=4;l.bindBuffer(l.ARRAY_BUFFER,na.buffer);l.bufferData(l.ARRAY_BUFFER,na.array,
 na.array[ia]=Va.x,na.array[ia+1]=Va.y,ia+=2;else if(3===na.size)if("c"===na.type)for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.r,na.array[ia+1]=Va.g,na.array[ia+2]=Va.b,ia+=3;else for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.x,na.array[ia+1]=Va.y,na.array[ia+2]=Va.z,ia+=3;else if(4===na.size)for(Da=0;Da<ic;Da++)Va=na.value[Da],na.array[ia]=Va.x,na.array[ia+1]=Va.y,na.array[ia+2]=Va.z,na.array[ia+3]=Va.w,ia+=4;l.bindBuffer(l.ARRAY_BUFFER,na.buffer);l.bufferData(l.ARRAY_BUFFER,na.array,
-ac)}}p.verticesNeedUpdate=!1;p.colorsNeedUpdate=!1;p.lineDistancesNeedUpdate=!1;y.attributes&&A(y)}else if(e instanceof THREE.PointCloud){y=d(e,p);x=y.attributes&&u(y);if(p.verticesNeedUpdate||p.colorsNeedUpdate||e.sortParticles||x){var fc=l.DYNAMIC_DRAW,Wa,Ab,Bb,U,Cb,Qb,wc=p.vertices,gc=wc.length,hc=p.colors,kc=hc.length,bc=p.__vertexArray,cc=p.__colorArray,Ib=p.__sortArray,Wb=p.verticesNeedUpdate,Xb=p.colorsNeedUpdate,Jb=p.__webglCustomAttributesList,pb,jc,ca,qb,ja,T;if(e.sortParticles){Dc.copy(xc);
-Dc.multiply(e.matrixWorld);for(Wa=0;Wa<gc;Wa++)Bb=wc[Wa],Qa.copy(Bb),Qa.applyProjection(Dc),Ib[Wa]=[Qa.z,Wa];Ib.sort(n);for(Wa=0;Wa<gc;Wa++)Bb=wc[Ib[Wa][1]],U=3*Wa,bc[U]=Bb.x,bc[U+1]=Bb.y,bc[U+2]=Bb.z;for(Ab=0;Ab<kc;Ab++)U=3*Ab,Qb=hc[Ib[Ab][1]],cc[U]=Qb.r,cc[U+1]=Qb.g,cc[U+2]=Qb.b;if(Jb)for(pb=0,jc=Jb.length;pb<jc;pb++)if(T=Jb[pb],void 0===T.boundTo||"vertices"===T.boundTo)if(U=0,qb=T.value.length,1===T.size)for(ca=0;ca<qb;ca++)Cb=Ib[ca][1],T.array[ca]=T.value[Cb];else if(2===T.size)for(ca=0;ca<qb;ca++)Cb=
-Ib[ca][1],ja=T.value[Cb],T.array[U]=ja.x,T.array[U+1]=ja.y,U+=2;else if(3===T.size)if("c"===T.type)for(ca=0;ca<qb;ca++)Cb=Ib[ca][1],ja=T.value[Cb],T.array[U]=ja.r,T.array[U+1]=ja.g,T.array[U+2]=ja.b,U+=3;else for(ca=0;ca<qb;ca++)Cb=Ib[ca][1],ja=T.value[Cb],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,U+=3;else if(4===T.size)for(ca=0;ca<qb;ca++)Cb=Ib[ca][1],ja=T.value[Cb],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,T.array[U+3]=ja.w,U+=4}else{if(Wb)for(Wa=0;Wa<gc;Wa++)Bb=wc[Wa],U=3*
-Wa,bc[U]=Bb.x,bc[U+1]=Bb.y,bc[U+2]=Bb.z;if(Xb)for(Ab=0;Ab<kc;Ab++)Qb=hc[Ab],U=3*Ab,cc[U]=Qb.r,cc[U+1]=Qb.g,cc[U+2]=Qb.b;if(Jb)for(pb=0,jc=Jb.length;pb<jc;pb++)if(T=Jb[pb],T.needsUpdate&&(void 0===T.boundTo||"vertices"===T.boundTo))if(qb=T.value.length,U=0,1===T.size)for(ca=0;ca<qb;ca++)T.array[ca]=T.value[ca];else if(2===T.size)for(ca=0;ca<qb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,U+=2;else if(3===T.size)if("c"===T.type)for(ca=0;ca<qb;ca++)ja=T.value[ca],T.array[U]=ja.r,T.array[U+1]=
-ja.g,T.array[U+2]=ja.b,U+=3;else for(ca=0;ca<qb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,U+=3;else if(4===T.size)for(ca=0;ca<qb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,T.array[U+3]=ja.w,U+=4}if(Wb||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,p.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,bc,fc);if(Xb||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,p.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,cc,fc);if(Jb)for(pb=0,jc=Jb.length;pb<
-jc;pb++)if(T=Jb[pb],T.needsUpdate||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,T.buffer),l.bufferData(l.ARRAY_BUFFER,T.array,fc)}p.verticesNeedUpdate=!1;p.colorsNeedUpdate=!1;y.attributes&&A(y)}for(var dc=0,Db=s.length;dc<Db;dc++){var yc=s[dc],Rb=yc,nc=Rb.object,uc=Rb.buffer,zc=nc.geometry,Sb=nc.material;Sb instanceof THREE.MeshFaceMaterial?(Sb=Sb.materials[zc instanceof THREE.BufferGeometry?0:uc.materialIndex],Rb.material=Sb,Sb.transparent?Ra.push(Rb):fb.push(Rb)):Sb&&(Rb.material=Sb,Sb.transparent?
-Ra.push(Rb):fb.push(Rb));yc.render=!0;!0===I.sortObjects&&(null!==e.renderDepth?yc.z=e.renderDepth:(Qa.setFromMatrixPosition(e.matrixWorld),Qa.applyProjection(xc),yc.z=Qa.z))}}}dc=0;for(Db=e.children.length;dc<Db;dc++)q(a,e.children[dc],f)}}function r(a,b,c){if(0!==a.length)for(var d=0,e=a.length;d<e;d++)a[d].render(b,c,zc,Gc)}function t(a,b,c,d,e,g){for(var f,h,k,l=a.length-1;-1!==l;l--){f=a[l];h=f.object;k=f.buffer;B(h,b);if(g)f=g;else{f=f.material;if(!f)continue;e&&I.setBlending(f.blending,f.blendEquation,
+ac)}}p.verticesNeedUpdate=!1;p.colorsNeedUpdate=!1;p.lineDistancesNeedUpdate=!1;y.attributes&&A(y)}else if(e instanceof THREE.PointCloud){y=d(e,p);x=y.attributes&&u(y);if(p.verticesNeedUpdate||p.colorsNeedUpdate||e.sortParticles||x){var fc=l.DYNAMIC_DRAW,Wa,Bb,Cb,U,Db,Qb,wc=p.vertices,gc=wc.length,hc=p.colors,kc=hc.length,bc=p.__vertexArray,cc=p.__colorArray,Hb=p.__sortArray,Wb=p.verticesNeedUpdate,lc=p.colorsNeedUpdate,Ib=p.__webglCustomAttributesList,qb,jc,ca,rb,ja,T;if(e.sortParticles){Dc.copy(xc);
+Dc.multiply(e.matrixWorld);for(Wa=0;Wa<gc;Wa++)Cb=wc[Wa],Qa.copy(Cb),Qa.applyProjection(Dc),Hb[Wa]=[Qa.z,Wa];Hb.sort(n);for(Wa=0;Wa<gc;Wa++)Cb=wc[Hb[Wa][1]],U=3*Wa,bc[U]=Cb.x,bc[U+1]=Cb.y,bc[U+2]=Cb.z;for(Bb=0;Bb<kc;Bb++)U=3*Bb,Qb=hc[Hb[Bb][1]],cc[U]=Qb.r,cc[U+1]=Qb.g,cc[U+2]=Qb.b;if(Ib)for(qb=0,jc=Ib.length;qb<jc;qb++)if(T=Ib[qb],void 0===T.boundTo||"vertices"===T.boundTo)if(U=0,rb=T.value.length,1===T.size)for(ca=0;ca<rb;ca++)Db=Hb[ca][1],T.array[ca]=T.value[Db];else if(2===T.size)for(ca=0;ca<rb;ca++)Db=
+Hb[ca][1],ja=T.value[Db],T.array[U]=ja.x,T.array[U+1]=ja.y,U+=2;else if(3===T.size)if("c"===T.type)for(ca=0;ca<rb;ca++)Db=Hb[ca][1],ja=T.value[Db],T.array[U]=ja.r,T.array[U+1]=ja.g,T.array[U+2]=ja.b,U+=3;else for(ca=0;ca<rb;ca++)Db=Hb[ca][1],ja=T.value[Db],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,U+=3;else if(4===T.size)for(ca=0;ca<rb;ca++)Db=Hb[ca][1],ja=T.value[Db],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,T.array[U+3]=ja.w,U+=4}else{if(Wb)for(Wa=0;Wa<gc;Wa++)Cb=wc[Wa],U=3*
+Wa,bc[U]=Cb.x,bc[U+1]=Cb.y,bc[U+2]=Cb.z;if(lc)for(Bb=0;Bb<kc;Bb++)Qb=hc[Bb],U=3*Bb,cc[U]=Qb.r,cc[U+1]=Qb.g,cc[U+2]=Qb.b;if(Ib)for(qb=0,jc=Ib.length;qb<jc;qb++)if(T=Ib[qb],T.needsUpdate&&(void 0===T.boundTo||"vertices"===T.boundTo))if(rb=T.value.length,U=0,1===T.size)for(ca=0;ca<rb;ca++)T.array[ca]=T.value[ca];else if(2===T.size)for(ca=0;ca<rb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,U+=2;else if(3===T.size)if("c"===T.type)for(ca=0;ca<rb;ca++)ja=T.value[ca],T.array[U]=ja.r,T.array[U+1]=
+ja.g,T.array[U+2]=ja.b,U+=3;else for(ca=0;ca<rb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,U+=3;else if(4===T.size)for(ca=0;ca<rb;ca++)ja=T.value[ca],T.array[U]=ja.x,T.array[U+1]=ja.y,T.array[U+2]=ja.z,T.array[U+3]=ja.w,U+=4}if(Wb||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,p.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,bc,fc);if(lc||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,p.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,cc,fc);if(Ib)for(qb=0,jc=Ib.length;qb<
+jc;qb++)if(T=Ib[qb],T.needsUpdate||e.sortParticles)l.bindBuffer(l.ARRAY_BUFFER,T.buffer),l.bufferData(l.ARRAY_BUFFER,T.array,fc)}p.verticesNeedUpdate=!1;p.colorsNeedUpdate=!1;y.attributes&&A(y)}for(var dc=0,Eb=s.length;dc<Eb;dc++){var yc=s[dc],Rb=yc,oc=Rb.object,vc=Rb.buffer,zc=oc.geometry,Sb=oc.material;Sb instanceof THREE.MeshFaceMaterial?(Sb=Sb.materials[zc instanceof THREE.BufferGeometry?0:vc.materialIndex],Rb.material=Sb,Sb.transparent?Ra.push(Rb):hb.push(Rb)):Sb&&(Rb.material=Sb,Sb.transparent?
+Ra.push(Rb):hb.push(Rb));yc.render=!0;!0===I.sortObjects&&(null!==e.renderDepth?yc.z=e.renderDepth:(Qa.setFromMatrixPosition(e.matrixWorld),Qa.applyProjection(xc),yc.z=Qa.z))}}}dc=0;for(Eb=e.children.length;dc<Eb;dc++)q(a,e.children[dc],f)}}function r(a,b,c){if(0!==a.length)for(var d=0,e=a.length;d<e;d++)a[d].render(b,c,zc,Gc)}function t(a,b,c,d,e,g){for(var f,h,k,l=a.length-1;-1!==l;l--){f=a[l];h=f.object;k=f.buffer;B(h,b);if(g)f=g;else{f=f.material;if(!f)continue;e&&I.setBlending(f.blending,f.blendEquation,
 f.blendSrc,f.blendDst);I.setDepthTest(f.depthTest);I.setDepthWrite(f.depthWrite);N(f.polygonOffset,f.polygonOffsetFactor,f.polygonOffsetUnits)}I.setMaterialFaces(f);k instanceof THREE.BufferGeometry?I.renderBufferDirect(b,c,d,f,k,h):I.renderBuffer(b,c,d,f,k,h)}}function s(a,b,c,d,e,f,g){for(var h,k,l=0,m=a.length;l<m;l++)if(h=a[l],k=h.object,k.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&I.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);I.setDepthTest(h.depthTest);I.setDepthWrite(h.depthWrite);
 f.blendSrc,f.blendDst);I.setDepthTest(f.depthTest);I.setDepthWrite(f.depthWrite);N(f.polygonOffset,f.polygonOffsetFactor,f.polygonOffsetUnits)}I.setMaterialFaces(f);k instanceof THREE.BufferGeometry?I.renderBufferDirect(b,c,d,f,k,h):I.renderBuffer(b,c,d,f,k,h)}}function s(a,b,c,d,e,f,g){for(var h,k,l=0,m=a.length;l<m;l++)if(h=a[l],k=h.object,k.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&I.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);I.setDepthTest(h.depthTest);I.setDepthWrite(h.depthWrite);
 N(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits)}I.renderImmediateObject(c,d,e,h,k)}}function p(a){var b=a.object.material;b.transparent?(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function v(a,b,d){var e=!1;a=b.material;if(void 0===d.geometryGroups||d.groupsNeedUpdate)delete Ta[b.id],d.makeGroups(a instanceof THREE.MeshFaceMaterial,Fb?4294967296:65535),d.groupsNeedUpdate=!1;for(var f=0,g=d.geometryGroupsList.length;f<g;f++){a=d.geometryGroupsList[f];if(a.__webglVertexBuffer)e=
 N(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits)}I.renderImmediateObject(c,d,e,h,k)}}function p(a){var b=a.object.material;b.transparent?(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function v(a,b,d){var e=!1;a=b.material;if(void 0===d.geometryGroups||d.groupsNeedUpdate)delete Ta[b.id],d.makeGroups(a instanceof THREE.MeshFaceMaterial,Fb?4294967296:65535),d.groupsNeedUpdate=!1;for(var f=0,g=d.geometryGroupsList.length;f<g;f++){a=d.geometryGroupsList[f];if(a.__webglVertexBuffer)e=
 !1;else{e=a;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();var h=void 0,k=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=[],h=0,k=e.numMorphTargets;h<
 !1;else{e=a;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();var h=void 0,k=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=[],h=0,k=e.numMorphTargets;h<
@@ -472,90 +472,91 @@ u=b.length;q<u;q++){var v=b[q];v.onlyShadow||!1===v.visible||(v instanceof THREE
 ta=Math.floor((K-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(ta=Math.min(e.skeleton.bones.length,ta),ta<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+ta+" (try OpenGL instead of ANGLE)"));J=ta}var R={precision:P,supportsVertexTextures:gc,map:!!d.map,envMap:!!d.envMap,lightMap:!!d.lightMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,vertexColors:d.vertexColors,fog:c,
 ta=Math.floor((K-20)/4);void 0!==e&&e instanceof THREE.SkinnedMesh&&(ta=Math.min(e.skeleton.bones.length,ta),ta<e.skeleton.bones.length&&console.warn("WebGLRenderer: too many bones - "+e.skeleton.bones.length+", this GPU supports just "+ta+" (try OpenGL instead of ANGLE)"));J=ta}var R={precision:P,supportsVertexTextures:gc,map:!!d.map,envMap:!!d.envMap,lightMap:!!d.lightMap,bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,vertexColors:d.vertexColors,fog:c,
 useFog:d.fog,fogExp:c instanceof THREE.FogExp2,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:Ia,skinning:d.skinning,maxBones:J,useVertexTexture:fc&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:I.maxMorphTargets,maxMorphNormals:I.maxMorphNormals,maxDirLights:f,maxPointLights:g,maxSpotLights:h,maxHemiLights:k,maxShadows:w,shadowMapEnabled:I.shadowMapEnabled&&e.receiveShadow&&0<w,shadowMapType:I.shadowMapType,shadowMapDebug:I.shadowMapDebug,
 useFog:d.fog,fogExp:c instanceof THREE.FogExp2,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:Ia,skinning:d.skinning,maxBones:J,useVertexTexture:fc&&e&&e.skeleton&&e.skeleton.useVertexTexture,morphTargets:d.morphTargets,morphNormals:d.morphNormals,maxMorphTargets:I.maxMorphTargets,maxMorphNormals:I.maxMorphNormals,maxDirLights:f,maxPointLights:g,maxSpotLights:h,maxHemiLights:k,maxShadows:w,shadowMapEnabled:I.shadowMapEnabled&&e.receiveShadow&&0<w,shadowMapType:I.shadowMapType,shadowMapDebug:I.shadowMapDebug,
 shadowMapCascade:I.shadowMapCascade,alphaTest:d.alphaTest,metal:d.metal,wrapAround:d.wrapAround,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},M=[];m?M.push(m):(M.push(d.fragmentShader),M.push(d.vertexShader));if(void 0!==d.defines)for(var V in d.defines)M.push(V),M.push(d.defines[V]);for(V in R)M.push(V),M.push(R[V]);for(var Ga=M.join(),W,Ta=0,Ja=Na.length;Ta<Ja;Ta++){var da=Na[Ta];if(da.code===Ga){W=da;W.usedTimes++;break}}void 0===W&&(W=new THREE.WebGLProgram(I,Ga,d,R),
 shadowMapCascade:I.shadowMapCascade,alphaTest:d.alphaTest,metal:d.metal,wrapAround:d.wrapAround,doubleSided:d.side===THREE.DoubleSide,flipSided:d.side===THREE.BackSide},M=[];m?M.push(m):(M.push(d.fragmentShader),M.push(d.vertexShader));if(void 0!==d.defines)for(var V in d.defines)M.push(V),M.push(d.defines[V]);for(V in R)M.push(V),M.push(R[V]);for(var Ga=M.join(),W,Ta=0,Ja=Na.length;Ta<Ja;Ta++){var da=Na[Ta];if(da.code===Ga){W=da;W.usedTimes++;break}}void 0===W&&(W=new THREE.WebGLProgram(I,Ga,d,R),
-Na.push(W),I.info.memory.programs=Na.length);d.program=W;var wa=W.attributes;if(d.morphTargets){d.numSupportedMorphTargets=0;for(var Ca,la="morphTarget",Ra=0;Ra<I.maxMorphTargets;Ra++)Ca=la+Ra,0<=wa[Ca]&&d.numSupportedMorphTargets++}if(d.morphNormals)for(d.numSupportedMorphNormals=0,la="morphNormal",Ra=0;Ra<I.maxMorphNormals;Ra++)Ca=la+Ra,0<=wa[Ca]&&d.numSupportedMorphNormals++;d.uniformsList=[];for(var X in d.__webglShader.uniforms){var Y=d.program.uniforms[X];Y&&d.uniformsList.push([d.__webglShader.uniforms[X],
-Y])}d.needsUpdate=!1}d.morphTargets&&!e.__webglMorphTargetInfluences&&(e.__webglMorphTargetInfluences=new Float32Array(I.maxMorphTargets));var Z=!1,fb=!1,sa=!1,ra=d.program,oa=ra.uniforms,O=d.__webglShader.uniforms;ra.id!==tb&&(l.useProgram(ra.program),tb=ra.id,sa=fb=Z=!0);d.id!==rb&&(-1===rb&&(sa=!0),rb=d.id,fb=!0);if(Z||a!==Tb)l.uniformMatrix4fv(oa.projectionMatrix,!1,a.projectionMatrix.elements),Ia&&l.uniform1f(oa.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==Tb&&(Tb=a),(d instanceof THREE.ShaderMaterial||
+Na.push(W),I.info.memory.programs=Na.length);d.program=W;var xa=W.attributes;if(d.morphTargets){d.numSupportedMorphTargets=0;for(var Ca,la="morphTarget",Ra=0;Ra<I.maxMorphTargets;Ra++)Ca=la+Ra,0<=xa[Ca]&&d.numSupportedMorphTargets++}if(d.morphNormals)for(d.numSupportedMorphNormals=0,la="morphNormal",Ra=0;Ra<I.maxMorphNormals;Ra++)Ca=la+Ra,0<=xa[Ca]&&d.numSupportedMorphNormals++;d.uniformsList=[];for(var X in d.__webglShader.uniforms){var Y=d.program.uniforms[X];Y&&d.uniformsList.push([d.__webglShader.uniforms[X],
+Y])}d.needsUpdate=!1}d.morphTargets&&!e.__webglMorphTargetInfluences&&(e.__webglMorphTargetInfluences=new Float32Array(I.maxMorphTargets));var Z=!1,hb=!1,sa=!1,ra=d.program,oa=ra.uniforms,O=d.__webglShader.uniforms;ra.id!==ub&&(l.useProgram(ra.program),ub=ra.id,sa=hb=Z=!0);d.id!==tb&&(-1===tb&&(sa=!0),tb=d.id,hb=!0);if(Z||a!==Tb)l.uniformMatrix4fv(oa.projectionMatrix,!1,a.projectionMatrix.elements),Ia&&l.uniform1f(oa.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==Tb&&(Tb=a),(d instanceof THREE.ShaderMaterial||
 d instanceof THREE.MeshPhongMaterial||d.envMap)&&null!==oa.cameraPosition&&(Qa.setFromMatrixPosition(a.matrixWorld),l.uniform3f(oa.cameraPosition,Qa.x,Qa.y,Qa.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&null!==oa.viewMatrix&&l.uniformMatrix4fv(oa.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(e.bindMatrix&&null!==oa.bindMatrix&&l.uniformMatrix4fv(oa.bindMatrix,!1,e.bindMatrix.elements),e.bindMatrixInverse&&
 d instanceof THREE.MeshPhongMaterial||d.envMap)&&null!==oa.cameraPosition&&(Qa.setFromMatrixPosition(a.matrixWorld),l.uniform3f(oa.cameraPosition,Qa.x,Qa.y,Qa.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&null!==oa.viewMatrix&&l.uniformMatrix4fv(oa.viewMatrix,!1,a.matrixWorldInverse.elements);if(d.skinning)if(e.bindMatrix&&null!==oa.bindMatrix&&l.uniformMatrix4fv(oa.bindMatrix,!1,e.bindMatrix.elements),e.bindMatrixInverse&&
-null!==oa.bindMatrixInverse&&l.uniformMatrix4fv(oa.bindMatrixInverse,!1,e.bindMatrixInverse.elements),fc&&e.skeleton&&e.skeleton.useVertexTexture){if(null!==oa.boneTexture){var xa=C();l.uniform1i(oa.boneTexture,xa);I.setTexture(e.skeleton.boneTexture,xa)}null!==oa.boneTextureWidth&&l.uniform1i(oa.boneTextureWidth,e.skeleton.boneTextureWidth);null!==oa.boneTextureHeight&&l.uniform1i(oa.boneTextureHeight,e.skeleton.boneTextureHeight)}else e.skeleton&&e.skeleton.boneMatrices&&null!==oa.boneGlobalMatrices&&
-l.uniformMatrix4fv(oa.boneGlobalMatrices,!1,e.skeleton.boneMatrices);if(fb){c&&d.fog&&(O.fogColor.value=c.color,c instanceof THREE.Fog?(O.fogNear.value=c.near,O.fogFar.value=c.far):c instanceof THREE.FogExp2&&(O.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(Ub){var sa=!0,ma,ha,ka,Ea=0,Fa=0,Xa=0,Aa,hb,ib,ga,jb,lb,ua=Jc,kb=ua.directional.colors,Oa=ua.directional.positions,ub=ua.point.colors,$a=ua.point.positions,mb=ua.point.distances,
-Hb=ua.spot.colors,Mb=ua.spot.positions,gb=ua.spot.distances,Ya=ua.spot.directions,Fb=ua.spot.anglesCos,Gb=ua.spot.exponents,vb=ua.hemi.skyColors,Za=ua.hemi.groundColors,Pa=ua.hemi.positions,ab=0,Ka=0,fa=0,qa=0,F=0,La=0,bb=0,Nb=0,wb=0,cb=0,ya=0,Ma=0;ma=0;for(ha=b.length;ma<ha;ma++)ka=b[ma],ka.onlyShadow||(Aa=ka.color,ga=ka.intensity,lb=ka.distance,ka instanceof THREE.AmbientLight?ka.visible&&(I.gammaInput?(Ea+=Aa.r*Aa.r,Fa+=Aa.g*Aa.g,Xa+=Aa.b*Aa.b):(Ea+=Aa.r,Fa+=Aa.g,Xa+=Aa.b)):ka instanceof THREE.DirectionalLight?
-(F+=1,ka.visible&&(va.setFromMatrixPosition(ka.matrixWorld),Qa.setFromMatrixPosition(ka.target.matrixWorld),va.sub(Qa),va.normalize(),wb=3*ab,Oa[wb]=va.x,Oa[wb+1]=va.y,Oa[wb+2]=va.z,I.gammaInput?y(kb,wb,Aa,ga*ga):D(kb,wb,Aa,ga),ab+=1)):ka instanceof THREE.PointLight?(La+=1,ka.visible&&(cb=3*Ka,I.gammaInput?y(ub,cb,Aa,ga*ga):D(ub,cb,Aa,ga),Qa.setFromMatrixPosition(ka.matrixWorld),$a[cb]=Qa.x,$a[cb+1]=Qa.y,$a[cb+2]=Qa.z,mb[Ka]=lb,Ka+=1)):ka instanceof THREE.SpotLight?(bb+=1,ka.visible&&(ya=3*fa,I.gammaInput?
-y(Hb,ya,Aa,ga*ga):D(Hb,ya,Aa,ga),va.setFromMatrixPosition(ka.matrixWorld),Mb[ya]=va.x,Mb[ya+1]=va.y,Mb[ya+2]=va.z,gb[fa]=lb,Qa.setFromMatrixPosition(ka.target.matrixWorld),va.sub(Qa),va.normalize(),Ya[ya]=va.x,Ya[ya+1]=va.y,Ya[ya+2]=va.z,Fb[fa]=Math.cos(ka.angle),Gb[fa]=ka.exponent,fa+=1)):ka instanceof THREE.HemisphereLight&&(Nb+=1,ka.visible&&(va.setFromMatrixPosition(ka.matrixWorld),va.normalize(),Ma=3*qa,Pa[Ma]=va.x,Pa[Ma+1]=va.y,Pa[Ma+2]=va.z,hb=ka.color,ib=ka.groundColor,I.gammaInput?(jb=ga*
-ga,y(vb,Ma,hb,jb),y(Za,Ma,ib,jb)):(D(vb,Ma,hb,ga),D(Za,Ma,ib,ga)),qa+=1)));ma=3*ab;for(ha=Math.max(kb.length,3*F);ma<ha;ma++)kb[ma]=0;ma=3*Ka;for(ha=Math.max(ub.length,3*La);ma<ha;ma++)ub[ma]=0;ma=3*fa;for(ha=Math.max(Hb.length,3*bb);ma<ha;ma++)Hb[ma]=0;ma=3*qa;for(ha=Math.max(vb.length,3*Nb);ma<ha;ma++)vb[ma]=0;ma=3*qa;for(ha=Math.max(Za.length,3*Nb);ma<ha;ma++)Za[ma]=0;ua.directional.length=ab;ua.point.length=Ka;ua.spot.length=fa;ua.hemi.length=qa;ua.ambient[0]=Ea;ua.ambient[1]=Fa;ua.ambient[2]=
+null!==oa.bindMatrixInverse&&l.uniformMatrix4fv(oa.bindMatrixInverse,!1,e.bindMatrixInverse.elements),fc&&e.skeleton&&e.skeleton.useVertexTexture){if(null!==oa.boneTexture){var ya=C();l.uniform1i(oa.boneTexture,ya);I.setTexture(e.skeleton.boneTexture,ya)}null!==oa.boneTextureWidth&&l.uniform1i(oa.boneTextureWidth,e.skeleton.boneTextureWidth);null!==oa.boneTextureHeight&&l.uniform1i(oa.boneTextureHeight,e.skeleton.boneTextureHeight)}else e.skeleton&&e.skeleton.boneMatrices&&null!==oa.boneGlobalMatrices&&
+l.uniformMatrix4fv(oa.boneGlobalMatrices,!1,e.skeleton.boneMatrices);if(hb){c&&d.fog&&(O.fogColor.value=c.color,c instanceof THREE.Fog?(O.fogNear.value=c.near,O.fogFar.value=c.far):c instanceof THREE.FogExp2&&(O.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d.lights){if(Ub){var sa=!0,ma,ha,ka,Ea=0,Fa=0,Xa=0,Aa,$a,jb,ga,kb,lb,ua=Jc,gb=ua.directional.colors,Oa=ua.directional.positions,mb=ua.point.colors,ab=ua.point.positions,nb=ua.point.distances,
+Gb=ua.spot.colors,Mb=ua.spot.positions,ib=ua.spot.distances,Ya=ua.spot.directions,Xb=ua.spot.anglesCos,Fb=ua.spot.exponents,wb=ua.hemi.skyColors,Za=ua.hemi.groundColors,Pa=ua.hemi.positions,bb=0,Ka=0,fa=0,qa=0,F=0,La=0,cb=0,Nb=0,xb=0,db=0,za=0,Ma=0;ma=0;for(ha=b.length;ma<ha;ma++)ka=b[ma],ka.onlyShadow||(Aa=ka.color,ga=ka.intensity,lb=ka.distance,ka instanceof THREE.AmbientLight?ka.visible&&(I.gammaInput?(Ea+=Aa.r*Aa.r,Fa+=Aa.g*Aa.g,Xa+=Aa.b*Aa.b):(Ea+=Aa.r,Fa+=Aa.g,Xa+=Aa.b)):ka instanceof THREE.DirectionalLight?
+(F+=1,ka.visible&&(va.setFromMatrixPosition(ka.matrixWorld),Qa.setFromMatrixPosition(ka.target.matrixWorld),va.sub(Qa),va.normalize(),xb=3*bb,Oa[xb]=va.x,Oa[xb+1]=va.y,Oa[xb+2]=va.z,I.gammaInput?y(gb,xb,Aa,ga*ga):D(gb,xb,Aa,ga),bb+=1)):ka instanceof THREE.PointLight?(La+=1,ka.visible&&(db=3*Ka,I.gammaInput?y(mb,db,Aa,ga*ga):D(mb,db,Aa,ga),Qa.setFromMatrixPosition(ka.matrixWorld),ab[db]=Qa.x,ab[db+1]=Qa.y,ab[db+2]=Qa.z,nb[Ka]=lb,Ka+=1)):ka instanceof THREE.SpotLight?(cb+=1,ka.visible&&(za=3*fa,I.gammaInput?
+y(Gb,za,Aa,ga*ga):D(Gb,za,Aa,ga),va.setFromMatrixPosition(ka.matrixWorld),Mb[za]=va.x,Mb[za+1]=va.y,Mb[za+2]=va.z,ib[fa]=lb,Qa.setFromMatrixPosition(ka.target.matrixWorld),va.sub(Qa),va.normalize(),Ya[za]=va.x,Ya[za+1]=va.y,Ya[za+2]=va.z,Xb[fa]=Math.cos(ka.angle),Fb[fa]=ka.exponent,fa+=1)):ka instanceof THREE.HemisphereLight&&(Nb+=1,ka.visible&&(va.setFromMatrixPosition(ka.matrixWorld),va.normalize(),Ma=3*qa,Pa[Ma]=va.x,Pa[Ma+1]=va.y,Pa[Ma+2]=va.z,$a=ka.color,jb=ka.groundColor,I.gammaInput?(kb=ga*
+ga,y(wb,Ma,$a,kb),y(Za,Ma,jb,kb)):(D(wb,Ma,$a,ga),D(Za,Ma,jb,ga)),qa+=1)));ma=3*bb;for(ha=Math.max(gb.length,3*F);ma<ha;ma++)gb[ma]=0;ma=3*Ka;for(ha=Math.max(mb.length,3*La);ma<ha;ma++)mb[ma]=0;ma=3*fa;for(ha=Math.max(Gb.length,3*cb);ma<ha;ma++)Gb[ma]=0;ma=3*qa;for(ha=Math.max(wb.length,3*Nb);ma<ha;ma++)wb[ma]=0;ma=3*qa;for(ha=Math.max(Za.length,3*Nb);ma<ha;ma++)Za[ma]=0;ua.directional.length=bb;ua.point.length=Ka;ua.spot.length=fa;ua.hemi.length=qa;ua.ambient[0]=Ea;ua.ambient[1]=Fa;ua.ambient[2]=
 Xa;Ub=!1}if(sa){var pa=Jc;O.ambientLightColor.value=pa.ambient;O.directionalLightColor.value=pa.directional.colors;O.directionalLightDirection.value=pa.directional.positions;O.pointLightColor.value=pa.point.colors;O.pointLightPosition.value=pa.point.positions;O.pointLightDistance.value=pa.point.distances;O.spotLightColor.value=pa.spot.colors;O.spotLightPosition.value=pa.spot.positions;O.spotLightDistance.value=pa.spot.distances;O.spotLightDirection.value=pa.spot.directions;O.spotLightAngleCos.value=
 Xa;Ub=!1}if(sa){var pa=Jc;O.ambientLightColor.value=pa.ambient;O.directionalLightColor.value=pa.directional.colors;O.directionalLightDirection.value=pa.directional.positions;O.pointLightColor.value=pa.point.colors;O.pointLightPosition.value=pa.point.positions;O.pointLightDistance.value=pa.point.distances;O.spotLightColor.value=pa.spot.colors;O.spotLightPosition.value=pa.spot.positions;O.spotLightDistance.value=pa.spot.distances;O.spotLightDirection.value=pa.spot.directions;O.spotLightAngleCos.value=
 pa.spot.anglesCos;O.spotLightExponent.value=pa.spot.exponents;O.hemisphereLightSkyColor.value=pa.hemi.skyColors;O.hemisphereLightGroundColor.value=pa.hemi.groundColors;O.hemisphereLightDirection.value=pa.hemi.positions;G(O,!0)}else G(O,!1)}if(d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial){O.opacity.value=d.opacity;I.gammaInput?O.diffuse.value.copyGammaToLinear(d.color):O.diffuse.value=d.color;O.map.value=d.map;O.lightMap.value=d.lightMap;
 pa.spot.anglesCos;O.spotLightExponent.value=pa.spot.exponents;O.hemisphereLightSkyColor.value=pa.hemi.skyColors;O.hemisphereLightGroundColor.value=pa.hemi.groundColors;O.hemisphereLightDirection.value=pa.hemi.positions;G(O,!0)}else G(O,!1)}if(d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial){O.opacity.value=d.opacity;I.gammaInput?O.diffuse.value.copyGammaToLinear(d.color):O.diffuse.value=d.color;O.map.value=d.map;O.lightMap.value=d.lightMap;
-O.specularMap.value=d.specularMap;O.alphaMap.value=d.alphaMap;d.bumpMap&&(O.bumpMap.value=d.bumpMap,O.bumpScale.value=d.bumpScale);d.normalMap&&(O.normalMap.value=d.normalMap,O.normalScale.value.copy(d.normalScale));var Ba;d.map?Ba=d.map:d.specularMap?Ba=d.specularMap:d.normalMap?Ba=d.normalMap:d.bumpMap?Ba=d.bumpMap:d.alphaMap&&(Ba=d.alphaMap);if(void 0!==Ba){var Db=Ba.offset,Eb=Ba.repeat;O.offsetRepeat.value.set(Db.x,Db.y,Eb.x,Eb.y)}O.envMap.value=d.envMap;O.flipEnvMap.value=d.envMap instanceof
+O.specularMap.value=d.specularMap;O.alphaMap.value=d.alphaMap;d.bumpMap&&(O.bumpMap.value=d.bumpMap,O.bumpScale.value=d.bumpScale);d.normalMap&&(O.normalMap.value=d.normalMap,O.normalScale.value.copy(d.normalScale));var Ba;d.map?Ba=d.map:d.specularMap?Ba=d.specularMap:d.normalMap?Ba=d.normalMap:d.bumpMap?Ba=d.bumpMap:d.alphaMap&&(Ba=d.alphaMap);if(void 0!==Ba){var vb=Ba.offset,Eb=Ba.repeat;O.offsetRepeat.value.set(vb.x,vb.y,Eb.x,Eb.y)}O.envMap.value=d.envMap;O.flipEnvMap.value=d.envMap instanceof
 THREE.WebGLRenderTargetCube?1:-1;O.reflectivity.value=d.reflectivity;O.refractionRatio.value=d.refractionRatio;O.combine.value=d.combine;O.useRefract.value=d.envMap&&d.envMap.mapping instanceof THREE.CubeRefractionMapping}d instanceof THREE.LineBasicMaterial?(O.diffuse.value=d.color,O.opacity.value=d.opacity):d instanceof THREE.LineDashedMaterial?(O.diffuse.value=d.color,O.opacity.value=d.opacity,O.dashSize.value=d.dashSize,O.totalSize.value=d.dashSize+d.gapSize,O.scale.value=d.scale):d instanceof
 THREE.WebGLRenderTargetCube?1:-1;O.reflectivity.value=d.reflectivity;O.refractionRatio.value=d.refractionRatio;O.combine.value=d.combine;O.useRefract.value=d.envMap&&d.envMap.mapping instanceof THREE.CubeRefractionMapping}d instanceof THREE.LineBasicMaterial?(O.diffuse.value=d.color,O.opacity.value=d.opacity):d instanceof THREE.LineDashedMaterial?(O.diffuse.value=d.color,O.opacity.value=d.opacity,O.dashSize.value=d.dashSize,O.totalSize.value=d.dashSize+d.gapSize,O.scale.value=d.scale):d instanceof
 THREE.PointCloudMaterial?(O.psColor.value=d.color,O.opacity.value=d.opacity,O.size.value=d.size,O.scale.value=L.height/2,O.map.value=d.map):d instanceof THREE.MeshPhongMaterial?(O.shininess.value=d.shininess,I.gammaInput?(O.ambient.value.copyGammaToLinear(d.ambient),O.emissive.value.copyGammaToLinear(d.emissive),O.specular.value.copyGammaToLinear(d.specular)):(O.ambient.value=d.ambient,O.emissive.value=d.emissive,O.specular.value=d.specular),d.wrapAround&&O.wrapRGB.value.copy(d.wrapRGB)):d instanceof
 THREE.PointCloudMaterial?(O.psColor.value=d.color,O.opacity.value=d.opacity,O.size.value=d.size,O.scale.value=L.height/2,O.map.value=d.map):d instanceof THREE.MeshPhongMaterial?(O.shininess.value=d.shininess,I.gammaInput?(O.ambient.value.copyGammaToLinear(d.ambient),O.emissive.value.copyGammaToLinear(d.emissive),O.specular.value.copyGammaToLinear(d.specular)):(O.ambient.value=d.ambient,O.emissive.value=d.emissive,O.specular.value=d.specular),d.wrapAround&&O.wrapRGB.value.copy(d.wrapRGB)):d instanceof
-THREE.MeshLambertMaterial?(I.gammaInput?(O.ambient.value.copyGammaToLinear(d.ambient),O.emissive.value.copyGammaToLinear(d.emissive)):(O.ambient.value=d.ambient,O.emissive.value=d.emissive),d.wrapAround&&O.wrapRGB.value.copy(d.wrapRGB)):d instanceof THREE.MeshDepthMaterial?(O.mNear.value=a.near,O.mFar.value=a.far,O.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(O.opacity.value=d.opacity);if(e.receiveShadow&&!d._shadowPass&&O.shadowMatrix)for(var xb=0,z=0,Lb=b.length;z<Lb;z++){var Sa=
-b[z];Sa.castShadow&&(Sa instanceof THREE.SpotLight||Sa instanceof THREE.DirectionalLight&&!Sa.shadowCascade)&&(O.shadowMap.value[xb]=Sa.shadowMap,O.shadowMapSize.value[xb]=Sa.shadowMapSize,O.shadowMatrix.value[xb]=Sa.shadowMatrix,O.shadowDarkness.value[xb]=Sa.shadowDarkness,O.shadowBias.value[xb]=Sa.shadowBias,xb++)}for(var Ha=d.uniformsList,db,yb,eb,sb=0,Vb=Ha.length;sb<Vb;sb++){var ea=Ha[sb][0];if(!1!==ea.needsUpdate){var Kb=ea.type,H=ea.value,$=Ha[sb][1];switch(Kb){case "1i":l.uniform1i($,H);break;
+THREE.MeshLambertMaterial?(I.gammaInput?(O.ambient.value.copyGammaToLinear(d.ambient),O.emissive.value.copyGammaToLinear(d.emissive)):(O.ambient.value=d.ambient,O.emissive.value=d.emissive),d.wrapAround&&O.wrapRGB.value.copy(d.wrapRGB)):d instanceof THREE.MeshDepthMaterial?(O.mNear.value=a.near,O.mFar.value=a.far,O.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(O.opacity.value=d.opacity);if(e.receiveShadow&&!d._shadowPass&&O.shadowMatrix)for(var yb=0,z=0,Kb=b.length;z<Kb;z++){var Sa=
+b[z];Sa.castShadow&&(Sa instanceof THREE.SpotLight||Sa instanceof THREE.DirectionalLight&&!Sa.shadowCascade)&&(O.shadowMap.value[yb]=Sa.shadowMap,O.shadowMapSize.value[yb]=Sa.shadowMapSize,O.shadowMatrix.value[yb]=Sa.shadowMatrix,O.shadowDarkness.value[yb]=Sa.shadowDarkness,O.shadowBias.value[yb]=Sa.shadowBias,yb++)}for(var Ha=d.uniformsList,eb,zb,fb,sb=0,Lb=Ha.length;sb<Lb;sb++){var ea=Ha[sb][0];if(!1!==ea.needsUpdate){var Jb=ea.type,H=ea.value,$=Ha[sb][1];switch(Jb){case "1i":l.uniform1i($,H);break;
 case "1f":l.uniform1f($,H);break;case "2f":l.uniform2f($,H[0],H[1]);break;case "3f":l.uniform3f($,H[0],H[1],H[2]);break;case "4f":l.uniform4f($,H[0],H[1],H[2],H[3]);break;case "1iv":l.uniform1iv($,H);break;case "3iv":l.uniform3iv($,H);break;case "1fv":l.uniform1fv($,H);break;case "2fv":l.uniform2fv($,H);break;case "3fv":l.uniform3fv($,H);break;case "4fv":l.uniform4fv($,H);break;case "Matrix3fv":l.uniformMatrix3fv($,!1,H);break;case "Matrix4fv":l.uniformMatrix4fv($,!1,H);break;case "i":l.uniform1i($,
 case "1f":l.uniform1f($,H);break;case "2f":l.uniform2f($,H[0],H[1]);break;case "3f":l.uniform3f($,H[0],H[1],H[2]);break;case "4f":l.uniform4f($,H[0],H[1],H[2],H[3]);break;case "1iv":l.uniform1iv($,H);break;case "3iv":l.uniform3iv($,H);break;case "1fv":l.uniform1fv($,H);break;case "2fv":l.uniform2fv($,H);break;case "3fv":l.uniform3fv($,H);break;case "4fv":l.uniform4fv($,H);break;case "Matrix3fv":l.uniformMatrix3fv($,!1,H);break;case "Matrix4fv":l.uniformMatrix4fv($,!1,H);break;case "i":l.uniform1i($,
-H);break;case "f":l.uniform1f($,H);break;case "v2":l.uniform2f($,H.x,H.y);break;case "v3":l.uniform3f($,H.x,H.y,H.z);break;case "v4":l.uniform4f($,H.x,H.y,H.z,H.w);break;case "c":l.uniform3f($,H.r,H.g,H.b);break;case "iv1":l.uniform1iv($,H);break;case "iv":l.uniform3iv($,H);break;case "fv1":l.uniform1fv($,H);break;case "fv":l.uniform3fv($,H);break;case "v2v":void 0===ea._array&&(ea._array=new Float32Array(2*H.length));for(var aa=0,Ua=H.length;aa<Ua;aa++)eb=2*aa,ea._array[eb]=H[aa].x,ea._array[eb+
-1]=H[aa].y;l.uniform2fv($,ea._array);break;case "v3v":void 0===ea._array&&(ea._array=new Float32Array(3*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)eb=3*aa,ea._array[eb]=H[aa].x,ea._array[eb+1]=H[aa].y,ea._array[eb+2]=H[aa].z;l.uniform3fv($,ea._array);break;case "v4v":void 0===ea._array&&(ea._array=new Float32Array(4*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)eb=4*aa,ea._array[eb]=H[aa].x,ea._array[eb+1]=H[aa].y,ea._array[eb+2]=H[aa].z,ea._array[eb+3]=H[aa].w;l.uniform4fv($,ea._array);break;case "m3":l.uniformMatrix3fv($,
-!1,H.elements);break;case "m3v":void 0===ea._array&&(ea._array=new Float32Array(9*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)H[aa].flattenToArrayOffset(ea._array,9*aa);l.uniformMatrix3fv($,!1,ea._array);break;case "m4":l.uniformMatrix4fv($,!1,H.elements);break;case "m4v":void 0===ea._array&&(ea._array=new Float32Array(16*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)H[aa].flattenToArrayOffset(ea._array,16*aa);l.uniformMatrix4fv($,!1,ea._array);break;case "t":db=H;yb=C();l.uniform1i($,yb);if(!db)continue;
-if(db instanceof THREE.CubeTexture||db.image instanceof Array&&6===db.image.length){var za=db,Yb=yb;if(6===za.image.length)if(za.needsUpdate){za.image.__webglTextureCube||(za.addEventListener("dispose",hc),za.image.__webglTextureCube=l.createTexture(),I.info.memory.textures++);l.activeTexture(l.TEXTURE0+Yb);l.bindTexture(l.TEXTURE_CUBE_MAP,za.image.__webglTextureCube);l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,za.flipY);for(var Zb=za instanceof THREE.CompressedTexture,$b=[],ba=0;6>ba;ba++)$b[ba]=I.autoScaleCubemaps&&
-!Zb?E(za.image[ba],Vc):za.image[ba];var ac=$b[0],Ob=THREE.Math.isPowerOfTwo(ac.width)&&THREE.Math.isPowerOfTwo(ac.height),nb=S(za.format),Pb=S(za.type);Q(l.TEXTURE_CUBE_MAP,za,Ob);for(ba=0;6>ba;ba++)if(Zb)for(var ob,ia=$b[ba].mipmaps,zb=0,Wb=ia.length;zb<Wb;zb++)ob=ia[zb],za.format!==THREE.RGBAFormat?-1<kc.indexOf(nb)?l.compressedTexImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+ba,zb,nb,ob.width,ob.height,0,ob.data):console.warn("Attempt to load unsupported compressed texture format"):l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+
-ba,zb,nb,ob.width,ob.height,0,nb,Pb,ob.data);else l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+ba,0,nb,nb,Pb,$b[ba]);za.generateMipmaps&&Ob&&l.generateMipmap(l.TEXTURE_CUBE_MAP);za.needsUpdate=!1;if(za.onUpdate)za.onUpdate()}else l.activeTexture(l.TEXTURE0+Yb),l.bindTexture(l.TEXTURE_CUBE_MAP,za.image.__webglTextureCube)}else if(db instanceof THREE.WebGLRenderTargetCube){var Xb=db;l.activeTexture(l.TEXTURE0+yb);l.bindTexture(l.TEXTURE_CUBE_MAP,Xb.__webglTexture)}else I.setTexture(db,yb);break;case "tv":void 0===
-ea._array&&(ea._array=[]);aa=0;for(Ua=ea.value.length;aa<Ua;aa++)ea._array[aa]=C();l.uniform1iv($,ea._array);aa=0;for(Ua=ea.value.length;aa<Ua;aa++)db=ea.value[aa],yb=ea._array[aa],db&&I.setTexture(db,yb);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Kb)}}}}l.uniformMatrix4fv(oa.modelViewMatrix,!1,e._modelViewMatrix.elements);oa.normalMatrix&&l.uniformMatrix3fv(oa.normalMatrix,!1,e._normalMatrix.elements);null!==oa.modelMatrix&&l.uniformMatrix4fv(oa.modelMatrix,!1,e.matrixWorld.elements);
-return ra}function G(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.spotLightColor.needsUpdate=b;a.spotLightPosition.needsUpdate=b;a.spotLightDistance.needsUpdate=b;a.spotLightDirection.needsUpdate=b;a.spotLightAngleCos.needsUpdate=b;a.spotLightExponent.needsUpdate=b;a.hemisphereLightSkyColor.needsUpdate=b;a.hemisphereLightGroundColor.needsUpdate=
-b;a.hemisphereLightDirection.needsUpdate=b}function C(){var a=ec;a>=Kc&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+Kc);ec+=1;return a}function B(a,b){a._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,a.matrixWorld);a._normalMatrix.getNormalMatrix(a._modelViewMatrix)}function y(a,b,c,d){a[b]=c.r*c.r*d;a[b+1]=c.g*c.g*d;a[b+2]=c.b*c.b*d}function D(a,b,c,d){a[b]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function J(a){a!==Lc&&(l.lineWidth(a),Lc=a)}function N(a,
-b,c){Mc!==a&&(a?l.enable(l.POLYGON_OFFSET_FILL):l.disable(l.POLYGON_OFFSET_FILL),Mc=a);!a||Nc===b&&Oc===c||(l.polygonOffset(b,c),Nc=b,Oc=c)}function Q(a,b,c){c?(l.texParameteri(a,l.TEXTURE_WRAP_S,S(b.wrapS)),l.texParameteri(a,l.TEXTURE_WRAP_T,S(b.wrapT)),l.texParameteri(a,l.TEXTURE_MAG_FILTER,S(b.magFilter)),l.texParameteri(a,l.TEXTURE_MIN_FILTER,S(b.minFilter))):(l.texParameteri(a,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(a,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texParameteri(a,l.TEXTURE_MAG_FILTER,
-R(b.magFilter)),l.texParameteri(a,l.TEXTURE_MIN_FILTER,R(b.minFilter)));hb&&b.type!==THREE.FloatType&&(1<b.anisotropy||b.__oldAnisotropy)&&(l.texParameterf(a,hb.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,Pc)),b.__oldAnisotropy=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.log("THREE.WebGLRenderer:",
-a,"is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height+".");return d}return a}function da(a,b){l.bindRenderbuffer(l.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(l.renderbufferStorage(l.RENDERBUFFER,l.DEPTH_COMPONENT16,b.width,b.height),l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(l.renderbufferStorage(l.RENDERBUFFER,l.DEPTH_STENCIL,b.width,b.height),l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,
-l.RENDERBUFFER,a)):l.renderbufferStorage(l.RENDERBUFFER,l.RGBA4,b.width,b.height)}function V(a){a instanceof THREE.WebGLRenderTargetCube?(l.bindTexture(l.TEXTURE_CUBE_MAP,a.__webglTexture),l.generateMipmap(l.TEXTURE_CUBE_MAP),l.bindTexture(l.TEXTURE_CUBE_MAP,null)):(l.bindTexture(l.TEXTURE_2D,a.__webglTexture),l.generateMipmap(l.TEXTURE_2D),l.bindTexture(l.TEXTURE_2D,null))}function R(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?l.NEAREST:
-l.LINEAR}function S(a){if(a===THREE.RepeatWrapping)return l.REPEAT;if(a===THREE.ClampToEdgeWrapping)return l.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return l.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return l.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return l.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return l.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return l.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return l.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return l.LINEAR_MIPMAP_LINEAR;
-if(a===THREE.UnsignedByteType)return l.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return l.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return l.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return l.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return l.BYTE;if(a===THREE.ShortType)return l.SHORT;if(a===THREE.UnsignedShortType)return l.UNSIGNED_SHORT;if(a===THREE.IntType)return l.INT;if(a===THREE.UnsignedIntType)return l.UNSIGNED_INT;if(a===THREE.FloatType)return l.FLOAT;
-if(a===THREE.AlphaFormat)return l.ALPHA;if(a===THREE.RGBFormat)return l.RGB;if(a===THREE.RGBAFormat)return l.RGBA;if(a===THREE.LuminanceFormat)return l.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return l.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return l.FUNC_ADD;if(a===THREE.SubtractEquation)return l.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return l.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return l.ZERO;if(a===THREE.OneFactor)return l.ONE;if(a===THREE.SrcColorFactor)return l.SRC_COLOR;
-if(a===THREE.OneMinusSrcColorFactor)return l.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return l.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return l.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return l.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return l.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return l.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return l.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return l.SRC_ALPHA_SATURATE;if(null!==Ea){if(a===THREE.RGB_S3TC_DXT1_Format)return Ea.COMPRESSED_RGB_S3TC_DXT1_EXT;
-if(a===THREE.RGBA_S3TC_DXT1_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===THREE.RGBA_S3TC_DXT5_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(null!==Fa){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return Fa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return Fa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return Fa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return Fa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}return 0}
-console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var L=void 0!==a.canvas?a.canvas:document.createElement("canvas"),wa=void 0!==a.context?a.context:null,P=void 0!==a.precision?a.precision:"highp",xa=void 0!==a.alpha?a.alpha:!1,la=void 0!==a.depth?a.depth:!0,sa=void 0!==a.stencil?a.stencil:!0,K=void 0!==a.antialias?a.antialias:!1,ha=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ra=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,Ia=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:
-!1,ta=new THREE.Color(0),Ja=0,Ga=[],Ta={},Ca=[],fb=[],Ra=[];this.domElement=L;this.context=null;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.shadowMapEnabled=this.gammaOutput=this.gammaInput=!1;this.shadowMapAutoUpdate=!0;this.shadowMapType=THREE.PCFShadowMap;this.shadowMapCullFace=THREE.CullFaceFront;this.shadowMapCascade=
-this.shadowMapDebug=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;this.renderPluginsPre=[];this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var I=this,Na=[],tb=null,ub=null,rb=-1,Xa=null,Tb=null,ec=0,Vb=-1,Kb=-1,ib=-1,Wb=-1,Xb=-1,Db=-1,jb=-1,Eb=-1,Mc=null,Nc=null,Oc=null,Lc=null,lc=0,mc=0,kb=L.width,lb=L.height,zc=0,Gc=0,sb=new Uint8Array(16),Gb=new Uint8Array(16),Ac=new THREE.Frustum,xc=new THREE.Matrix4,
-Dc=new THREE.Matrix4,Qa=new THREE.Vector3,va=new THREE.Vector3,Ub=!0,Jc={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},l,Lb,nc,hb,Ea,Fa,Fb;(function(){try{var a={alpha:xa,depth:la,stencil:sa,antialias:K,premultipliedAlpha:ha,preserveDrawingBuffer:ra};l=wa||L.getContext("webgl",a)||
-L.getContext("experimental-webgl",a);if(null===l)throw"Error creating WebGL context.";}catch(b){console.error(b)}Lb=l.getExtension("OES_texture_float");l.getExtension("OES_texture_float_linear");nc=l.getExtension("OES_standard_derivatives");hb=l.getExtension("EXT_texture_filter_anisotropic")||l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic");Ea=l.getExtension("WEBGL_compressed_texture_s3tc")||l.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||
-l.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");Fa=l.getExtension("WEBGL_compressed_texture_pvrtc")||l.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");Fb=l.getExtension("OES_element_index_uint");null===Lb&&console.log("THREE.WebGLRenderer: Float textures not supported.");null===nc&&console.log("THREE.WebGLRenderer: Standard derivatives not supported.");null===hb&&console.log("THREE.WebGLRenderer: Anisotropic texture filtering not supported.");null===Ea&&console.log("THREE.WebGLRenderer: S3TC compressed textures not supported.");
-null===Fa&&console.log("THREE.WebGLRenderer: PVRTC compressed textures not supported.");null===Fb&&console.log("THREE.WebGLRenderer: elementindex as unsigned integer not supported.");void 0===l.getShaderPrecisionFormat&&(l.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});Ia&&l.getExtension("EXT_frag_depth")})();l.clearColor(0,0,0,1);l.clearDepth(1);l.clearStencil(0);l.enable(l.DEPTH_TEST);l.depthFunc(l.LEQUAL);l.frontFace(l.CCW);l.cullFace(l.BACK);l.enable(l.CULL_FACE);
-l.enable(l.BLEND);l.blendEquation(l.FUNC_ADD);l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA);l.viewport(lc,mc,kb,lb);l.clearColor(ta.r,ta.g,ta.b,Ja);this.context=l;var Kc=l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS),Wc=l.getParameter(l.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Xc=l.getParameter(l.MAX_TEXTURE_SIZE),Vc=l.getParameter(l.MAX_CUBE_MAP_TEXTURE_SIZE),Pc=hb?l.getParameter(hb.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,gc=0<Wc,fc=gc&&Lb,kc=[];if(Fa||Ea)for(var Qc=l.getParameter(l.COMPRESSED_TEXTURE_FORMATS),uc=
-0;uc<Qc.length;uc++)kc.push(Qc[uc]);var Yc=l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.HIGH_FLOAT),Zc=l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.MEDIUM_FLOAT);l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.LOW_FLOAT);var $c=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.HIGH_FLOAT),ad=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.MEDIUM_FLOAT);l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.LOW_FLOAT);var bd=0<Yc.precision&&0<$c.precision,Rc=0<Zc.precision&&0<ad.precision;"highp"!==P||bd||(Rc?(P=
-"mediump",console.warn("THREE.WebGLRenderer: highp not supported, using mediump.")):(P="lowp",console.warn("THREE.WebGLRenderer: highp and mediump not supported, using lowp.")));"mediump"!==P||Rc||(P="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));this.getContext=function(){return l};this.supportsVertexTextures=function(){return gc};this.supportsFloatTextures=function(){return Lb};this.supportsStandardDerivatives=function(){return nc};this.supportsCompressedTextureS3TC=
-function(){return Ea};this.supportsCompressedTexturePVRTC=function(){return Fa};this.getMaxAnisotropy=function(){return Pc};this.getPrecision=function(){return P};this.setSize=function(a,b,c){L.width=a*this.devicePixelRatio;L.height=b*this.devicePixelRatio;!1!==c&&(L.style.width=a+"px",L.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){lc=a*this.devicePixelRatio;mc=b*this.devicePixelRatio;kb=c*this.devicePixelRatio;lb=d*this.devicePixelRatio;l.viewport(lc,mc,kb,lb)};
-this.setScissor=function(a,b,c,d){l.scissor(a*this.devicePixelRatio,b*this.devicePixelRatio,c*this.devicePixelRatio,d*this.devicePixelRatio)};this.enableScissorTest=function(a){a?l.enable(l.SCISSOR_TEST):l.disable(l.SCISSOR_TEST)};this.setClearColor=function(a,b){ta.set(a);Ja=void 0!==b?b:1;l.clearColor(ta.r,ta.g,ta.b,Ja)};this.setClearColorHex=function(a,b){console.warn("THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.");this.setClearColor(a,b)};this.getClearColor=
-function(){return ta};this.getClearAlpha=function(){return Ja};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=l.COLOR_BUFFER_BIT;if(void 0===b||b)d|=l.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=l.STENCIL_BUFFER_BIT;l.clear(d)};this.clearColor=function(){l.clear(l.COLOR_BUFFER_BIT)};this.clearDepth=function(){l.clear(l.DEPTH_BUFFER_BIT)};this.clearStencil=function(){l.clear(l.STENCIL_BUFFER_BIT)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.addPostPlugin=function(a){a.init(this,
-Ga,Ta,Ca);this.renderPluginsPost.push(a)};this.addPrePlugin=function(a){a.init(this,Ga,Ta,Ca);this.renderPluginsPre.push(a)};this.updateShadowMap=function(a,b){tb=null;rb=Xa=Eb=jb=ib=-1;Ub=!0;Kb=Vb=-1;this.shadowMapPlugin.update(a,b)};var Ec=function(a){a.target.traverse(function(a){a.removeEventListener("remove",Ec);if(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)delete Ta[a.id];else if(a instanceof THREE.ImmediateRenderObject||a.immediateRenderCallback)for(var b=
-Ca,c=b.length-1;0<=c;c--)b[c].object===a&&b.splice(c,1);delete a.__webglInit;delete a._modelViewMatrix;delete a._normalMatrix;delete a.__webglActive})},Fc=function(a){a=a.target;a.removeEventListener("dispose",Fc);a.__webglInit=void 0;if(a instanceof THREE.BufferGeometry){for(var b in a.attributes)void 0!==a.attributes[b].buffer&&l.deleteBuffer(a.attributes[b].buffer);I.info.memory.geometries--}else if(void 0!==a.geometryGroups){b=0;for(var c=a.geometryGroupsList.length;b<c;b++){var d=a.geometryGroupsList[b];
-if(void 0!==d.numMorphTargets)for(var e=0,f=d.numMorphTargets;e<f;e++)l.deleteBuffer(d.__webglMorphTargetsBuffers[e]);if(void 0!==d.numMorphNormals)for(e=0,f=d.numMorphNormals;e<f;e++)l.deleteBuffer(d.__webglMorphNormalsBuffers[e]);Sc(d)}}else Sc(a)},hc=function(a){a=a.target;a.removeEventListener("dispose",hc);a.image&&a.image.__webglTextureCube?l.deleteTexture(a.image.__webglTextureCube):a.__webglInit&&(a.__webglInit=!1,l.deleteTexture(a.__webglTexture));I.info.memory.textures--},Tc=function(a){a=
-a.target;a.removeEventListener("dispose",Tc);if(a&&a.__webglTexture)if(l.deleteTexture(a.__webglTexture),a instanceof THREE.WebGLRenderTargetCube)for(var b=0;6>b;b++)l.deleteFramebuffer(a.__webglFramebuffer[b]),l.deleteRenderbuffer(a.__webglRenderbuffer[b]);else l.deleteFramebuffer(a.__webglFramebuffer),l.deleteRenderbuffer(a.__webglRenderbuffer);I.info.memory.textures--},Ic=function(a){a=a.target;a.removeEventListener("dispose",Ic);Hc(a)},Sc=function(a){void 0!==a.__webglVertexBuffer&&l.deleteBuffer(a.__webglVertexBuffer);
-void 0!==a.__webglNormalBuffer&&l.deleteBuffer(a.__webglNormalBuffer);void 0!==a.__webglTangentBuffer&&l.deleteBuffer(a.__webglTangentBuffer);void 0!==a.__webglColorBuffer&&l.deleteBuffer(a.__webglColorBuffer);void 0!==a.__webglUVBuffer&&l.deleteBuffer(a.__webglUVBuffer);void 0!==a.__webglUV2Buffer&&l.deleteBuffer(a.__webglUV2Buffer);void 0!==a.__webglSkinIndicesBuffer&&l.deleteBuffer(a.__webglSkinIndicesBuffer);void 0!==a.__webglSkinWeightsBuffer&&l.deleteBuffer(a.__webglSkinWeightsBuffer);void 0!==
-a.__webglFaceBuffer&&l.deleteBuffer(a.__webglFaceBuffer);void 0!==a.__webglLineBuffer&&l.deleteBuffer(a.__webglLineBuffer);void 0!==a.__webglLineDistanceBuffer&&l.deleteBuffer(a.__webglLineDistanceBuffer);if(void 0!==a.__webglCustomAttributesList)for(var b in a.__webglCustomAttributesList)l.deleteBuffer(a.__webglCustomAttributesList[b].buffer);I.info.memory.geometries--},Hc=function(a){var b=a.program.program;if(void 0!==b){a.program=void 0;var c,d,e=!1;a=0;for(c=Na.length;a<c;a++)if(d=Na[a],d.program===
-b){d.usedTimes--;0===d.usedTimes&&(e=!0);break}if(!0===e){e=[];a=0;for(c=Na.length;a<c;a++)d=Na[a],d.program!==b&&e.push(d);Na=e;l.deleteProgram(b);I.info.memory.programs--}}};this.renderBufferImmediate=function(a,b,c){g();a.hasPositions&&!a.__webglVertexBuffer&&(a.__webglVertexBuffer=l.createBuffer());a.hasNormals&&!a.__webglNormalBuffer&&(a.__webglNormalBuffer=l.createBuffer());a.hasUvs&&!a.__webglUvBuffer&&(a.__webglUvBuffer=l.createBuffer());a.hasColors&&!a.__webglColorBuffer&&(a.__webglColorBuffer=
-l.createBuffer());a.hasPositions&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,a.positionArray,l.DYNAMIC_DRAW),f(b.attributes.position),l.vertexAttribPointer(b.attributes.position,3,l.FLOAT,!1,0,0));if(a.hasNormals){l.bindBuffer(l.ARRAY_BUFFER,a.__webglNormalBuffer);if(c.shading===THREE.FlatShading){var d,e,k,m,n,p,r,s,t,q,u,v=3*a.count;for(u=0;u<v;u+=9)q=a.normalArray,d=q[u],e=q[u+1],k=q[u+2],m=q[u+3],p=q[u+4],s=q[u+5],n=q[u+6],r=q[u+7],t=q[u+8],d=(d+m+n)/3,e=(e+
-p+r)/3,k=(k+s+t)/3,q[u]=d,q[u+1]=e,q[u+2]=k,q[u+3]=d,q[u+4]=e,q[u+5]=k,q[u+6]=d,q[u+7]=e,q[u+8]=k}l.bufferData(l.ARRAY_BUFFER,a.normalArray,l.DYNAMIC_DRAW);f(b.attributes.normal);l.vertexAttribPointer(b.attributes.normal,3,l.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglUvBuffer),l.bufferData(l.ARRAY_BUFFER,a.uvArray,l.DYNAMIC_DRAW),f(b.attributes.uv),l.vertexAttribPointer(b.attributes.uv,2,l.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(l.bindBuffer(l.ARRAY_BUFFER,
-a.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,a.colorArray,l.DYNAMIC_DRAW),f(b.attributes.color),l.vertexAttribPointer(b.attributes.color,3,l.FLOAT,!1,0,0));h();l.drawArrays(l.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,f,h){if(!1!==d.visible)if(a=x(a,b,c,d,h),b=!1,c=16777215*f.id+2*a.id+(d.wireframe?1:0),c!==Xa&&(Xa=c,b=!0),b&&g(),h instanceof THREE.Mesh)if(h=!0===d.wireframe?l.LINES:l.TRIANGLES,c=f.attributes.index){var k,m;c.array instanceof Uint32Array?(k=l.UNSIGNED_INT,
-m=4):(k=l.UNSIGNED_SHORT,m=2);var n=f.offsets;if(0===n.length)b&&(e(d,a,f,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,c.array.length,k,0),I.info.render.calls++,I.info.render.vertices+=c.array.length,I.info.render.faces+=c.array.length/3;else{b=!0;for(var p=0,r=n.length;p<r;p++){var s=n[p].index;b&&(e(d,a,f,s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer));l.drawElements(h,n[p].count,k,n[p].start*m);I.info.render.calls++;I.info.render.vertices+=n[p].count;I.info.render.faces+=
-n[p].count/3}}}else b&&e(d,a,f,0),d=f.attributes.position,l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.vertices+=d.array.length/3,I.info.render.faces+=d.array.length/9;else if(h instanceof THREE.PointCloud)b&&e(d,a,f,0),d=f.attributes.position,l.drawArrays(l.POINTS,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/3;else if(h instanceof THREE.Line)if(h=h.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,J(d.linewidth),c=f.attributes.index)if(c.array instanceof
-Uint32Array?(k=l.UNSIGNED_INT,m=4):(k=l.UNSIGNED_SHORT,m=2),n=f.offsets,0===n.length)b&&(e(d,a,f,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,c.array.length,k,0),I.info.render.calls++,I.info.render.vertices+=c.array.length;else for(1<n.length&&(b=!0),p=0,r=n.length;p<r;p++)s=n[p].index,b&&(e(d,a,f,s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,n[p].count,k,n[p].start*m),I.info.render.calls++,I.info.render.vertices+=n[p].count;else b&&e(d,a,f,0),d=f.attributes.position,
-l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/3};this.renderBuffer=function(a,b,c,d,e,k){if(!1!==d.visible){var m,p;c=x(a,b,c,d,k);b=c.attributes;a=!1;c=16777215*e.id+2*c.id+(d.wireframe?1:0);c!==Xa&&(Xa=c,a=!0);a&&g();if(!d.morphTargets&&0<=b.position)a&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),f(b.position),l.vertexAttribPointer(b.position,3,l.FLOAT,!1,0,0));else if(k.morphTargetBase){c=d.program.attributes;-1!==k.morphTargetBase&&0<=c.position?
-(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[k.morphTargetBase]),f(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0)):0<=c.position&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),f(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0));if(k.morphTargetForcedOrder.length){var r=0;p=k.morphTargetForcedOrder;for(m=k.morphTargetInfluences;r<d.numSupportedMorphTargets&&r<p.length;)0<=c["morphTarget"+r]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[p[r]]),
-f(c["morphTarget"+r]),l.vertexAttribPointer(c["morphTarget"+r],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+r]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[p[r]]),f(c["morphNormal"+r]),l.vertexAttribPointer(c["morphNormal"+r],3,l.FLOAT,!1,0,0)),k.__webglMorphTargetInfluences[r]=m[p[r]],r++}else{p=[];m=k.morphTargetInfluences;var s,q=m.length;for(s=0;s<q;s++)r=m[s],0<r&&p.push([r,s]);p.length>d.numSupportedMorphTargets?(p.sort(n),p.length=d.numSupportedMorphTargets):p.length>
-d.numSupportedMorphNormals?p.sort(n):0===p.length&&p.push([0,0]);for(r=0;r<d.numSupportedMorphTargets;)p[r]?(s=p[r][1],0<=c["morphTarget"+r]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[s]),f(c["morphTarget"+r]),l.vertexAttribPointer(c["morphTarget"+r],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+r]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[s]),f(c["morphNormal"+r]),l.vertexAttribPointer(c["morphNormal"+r],3,l.FLOAT,!1,0,0)),k.__webglMorphTargetInfluences[r]=
-m[s]):k.__webglMorphTargetInfluences[r]=0,r++}null!==d.program.uniforms.morphTargetInfluences&&l.uniform1fv(d.program.uniforms.morphTargetInfluences,k.__webglMorphTargetInfluences)}if(a){if(e.__webglCustomAttributesList)for(m=0,p=e.__webglCustomAttributesList.length;m<p;m++)c=e.__webglCustomAttributesList[m],0<=b[c.buffer.belongsToAttribute]&&(l.bindBuffer(l.ARRAY_BUFFER,c.buffer),f(b[c.buffer.belongsToAttribute]),l.vertexAttribPointer(b[c.buffer.belongsToAttribute],c.size,l.FLOAT,!1,0,0));0<=b.color&&
-(0<k.geometry.colors.length||0<k.geometry.faces.length?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglColorBuffer),f(b.color),l.vertexAttribPointer(b.color,3,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib3fv(b.color,d.defaultAttributeValues.color));0<=b.normal&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglNormalBuffer),f(b.normal),l.vertexAttribPointer(b.normal,3,l.FLOAT,!1,0,0));0<=b.tangent&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglTangentBuffer),f(b.tangent),l.vertexAttribPointer(b.tangent,4,
-l.FLOAT,!1,0,0));0<=b.uv&&(k.geometry.faceVertexUvs[0]?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUVBuffer),f(b.uv),l.vertexAttribPointer(b.uv,2,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib2fv(b.uv,d.defaultAttributeValues.uv));0<=b.uv2&&(k.geometry.faceVertexUvs[1]?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUV2Buffer),f(b.uv2),l.vertexAttribPointer(b.uv2,2,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib2fv(b.uv2,d.defaultAttributeValues.uv2));d.skinning&&0<=b.skinIndex&&
-0<=b.skinWeight&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinIndicesBuffer),f(b.skinIndex),l.vertexAttribPointer(b.skinIndex,4,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinWeightsBuffer),f(b.skinWeight),l.vertexAttribPointer(b.skinWeight,4,l.FLOAT,!1,0,0));0<=b.lineDistance&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglLineDistanceBuffer),f(b.lineDistance),l.vertexAttribPointer(b.lineDistance,1,l.FLOAT,!1,0,0))}h();k instanceof THREE.Mesh?(k=e.__typeArray===Uint32Array?l.UNSIGNED_INT:l.UNSIGNED_SHORT,
-d.wireframe?(J(d.wireframeLinewidth),a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),l.drawElements(l.LINES,e.__webglLineCount,k,0)):(a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),l.drawElements(l.TRIANGLES,e.__webglFaceCount,k,0)),I.info.render.calls++,I.info.render.vertices+=e.__webglFaceCount,I.info.render.faces+=e.__webglFaceCount/3):k instanceof THREE.Line?(k=k.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,J(d.linewidth),l.drawArrays(k,0,e.__webglLineCount),I.info.render.calls++):
-k instanceof THREE.PointCloud&&(l.drawArrays(l.POINTS,0,e.__webglParticleCount),I.info.render.calls++,I.info.render.points+=e.__webglParticleCount)}};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,f,g,h=a.fog;rb=-1;Tb=null;Ub=!0;!0===a.autoUpdate&&a.updateMatrixWorld();void 0===b.parent&&b.updateMatrixWorld();a.traverse(function(a){a instanceof THREE.SkinnedMesh&&a.skeleton.update()});
-b.matrixWorldInverse.getInverse(b.matrixWorld);xc.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);Ac.setFromMatrix(xc);Ga.length=0;fb.length=0;Ra.length=0;q(a,a,b);!0===I.sortObjects&&(fb.sort(k),Ra.sort(m));r(this.renderPluginsPre,a,b);I.info.render.calls=0;I.info.render.vertices=0;I.info.render.faces=0;I.info.render.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);d=0;for(e=Ca.length;d<e;d++)f=Ca[d],g=f.object,
-g.visible&&(B(g,b),p(f));a.overrideMaterial?(d=a.overrideMaterial,this.setBlending(d.blending,d.blendEquation,d.blendSrc,d.blendDst),this.setDepthTest(d.depthTest),this.setDepthWrite(d.depthWrite),N(d.polygonOffset,d.polygonOffsetFactor,d.polygonOffsetUnits),t(fb,b,Ga,h,!0,d),t(Ra,b,Ga,h,!0,d),s(Ca,"",b,Ga,h,!1,d)):(d=null,this.setBlending(THREE.NoBlending),t(fb,b,Ga,h,!1,d),s(Ca,"opaque",b,Ga,h,!1,d),t(Ra,b,Ga,h,!0,d),s(Ca,"transparent",b,Ga,h,!0,d));r(this.renderPluginsPost,a,b);c&&c.generateMipmaps&&
-c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&V(c);this.setDepthTest(!0);this.setDepthWrite(!0)}};this.renderImmediateObject=function(a,b,c,d,e){var f=x(a,b,c,d,e);Xa=-1;I.setMaterialFaces(d);e.immediateRenderCallback?e.immediateRenderCallback(f,l,Ac):e.render(function(a){I.renderBufferImmediate(a,f,d)})};this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};this.setFaceCulling=function(a,b){a===THREE.CullFaceNone?l.disable(l.CULL_FACE):
-(b===THREE.FrontFaceDirectionCW?l.frontFace(l.CW):l.frontFace(l.CCW),a===THREE.CullFaceBack?l.cullFace(l.BACK):a===THREE.CullFaceFront?l.cullFace(l.FRONT):l.cullFace(l.FRONT_AND_BACK),l.enable(l.CULL_FACE))};this.setMaterialFaces=function(a){var b=a.side===THREE.DoubleSide;a=a.side===THREE.BackSide;Vb!==b&&(b?l.disable(l.CULL_FACE):l.enable(l.CULL_FACE),Vb=b);Kb!==a&&(a?l.frontFace(l.CW):l.frontFace(l.CCW),Kb=a)};this.setDepthTest=function(a){jb!==a&&(a?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST),
-jb=a)};this.setDepthWrite=function(a){Eb!==a&&(l.depthMask(a),Eb=a)};this.setBlending=function(a,b,c,d){a!==ib&&(a===THREE.NoBlending?l.disable(l.BLEND):a===THREE.AdditiveBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),l.blendFunc(l.SRC_ALPHA,l.ONE)):a===THREE.SubtractiveBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),l.blendFunc(l.ZERO,l.ONE_MINUS_SRC_COLOR)):a===THREE.MultiplyBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),l.blendFunc(l.ZERO,l.SRC_COLOR)):a===THREE.CustomBlending?
-l.enable(l.BLEND):(l.enable(l.BLEND),l.blendEquationSeparate(l.FUNC_ADD,l.FUNC_ADD),l.blendFuncSeparate(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA,l.ONE,l.ONE_MINUS_SRC_ALPHA)),ib=a);if(a===THREE.CustomBlending){if(b!==Wb&&(l.blendEquation(S(b)),Wb=b),c!==Xb||d!==Db)l.blendFunc(S(c),S(d)),Xb=c,Db=d}else Db=Xb=Wb=null};this.uploadTexture=function(a){a.__webglInit||(a.__webglInit=!0,a.addEventListener("dispose",hc),a.__webglTexture=l.createTexture(),I.info.memory.textures++);l.bindTexture(l.TEXTURE_2D,a.__webglTexture);
-l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,a.flipY);l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);l.pixelStorei(l.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=E(a.image,Xc);var b=a.image,c=THREE.Math.isPowerOfTwo(b.width)&&THREE.Math.isPowerOfTwo(b.height),d=S(a.format),e=S(a.type);Q(l.TEXTURE_2D,a,c);var f=a.mipmaps;if(a instanceof THREE.DataTexture)if(0<f.length&&c){for(var g=0,h=f.length;g<h;g++)b=f[g],l.texImage2D(l.TEXTURE_2D,g,d,b.width,b.height,0,d,e,b.data);a.generateMipmaps=
-!1}else l.texImage2D(l.TEXTURE_2D,0,d,b.width,b.height,0,d,e,b.data);else if(a instanceof THREE.CompressedTexture)for(g=0,h=f.length;g<h;g++)b=f[g],a.format!==THREE.RGBAFormat?-1<kc.indexOf(d)?l.compressedTexImage2D(l.TEXTURE_2D,g,d,b.width,b.height,0,b.data):console.warn("Attempt to load unsupported compressed texture format"):l.texImage2D(l.TEXTURE_2D,g,d,b.width,b.height,0,d,e,b.data);else if(0<f.length&&c){g=0;for(h=f.length;g<h;g++)b=f[g],l.texImage2D(l.TEXTURE_2D,g,d,d,e,b);a.generateMipmaps=
-!1}else l.texImage2D(l.TEXTURE_2D,0,d,d,e,a.image);a.generateMipmaps&&c&&l.generateMipmap(l.TEXTURE_2D);a.needsUpdate=!1;if(a.onUpdate)a.onUpdate()};this.setTexture=function(a,b){l.activeTexture(l.TEXTURE0+b);a.needsUpdate?I.uploadTexture(a):l.bindTexture(l.TEXTURE_2D,a.__webglTexture)};this.setRenderTarget=function(a){var b=a instanceof THREE.WebGLRenderTargetCube;if(a&&!a.__webglFramebuffer){void 0===a.depthBuffer&&(a.depthBuffer=!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",
-Tc);a.__webglTexture=l.createTexture();I.info.memory.textures++;var c=THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height),d=S(a.format),e=S(a.type);if(b){a.__webglFramebuffer=[];a.__webglRenderbuffer=[];l.bindTexture(l.TEXTURE_CUBE_MAP,a.__webglTexture);Q(l.TEXTURE_CUBE_MAP,a,c);for(var f=0;6>f;f++){a.__webglFramebuffer[f]=l.createFramebuffer();a.__webglRenderbuffer[f]=l.createRenderbuffer();l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,d,a.width,a.height,0,d,e,null);var g=a,h=l.TEXTURE_CUBE_MAP_POSITIVE_X+
-f;l.bindFramebuffer(l.FRAMEBUFFER,a.__webglFramebuffer[f]);l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,h,g.__webglTexture,0);da(a.__webglRenderbuffer[f],a)}c&&l.generateMipmap(l.TEXTURE_CUBE_MAP)}else a.__webglFramebuffer=l.createFramebuffer(),a.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:l.createRenderbuffer(),l.bindTexture(l.TEXTURE_2D,a.__webglTexture),Q(l.TEXTURE_2D,a,c),l.texImage2D(l.TEXTURE_2D,0,d,a.width,a.height,0,d,e,null),d=l.TEXTURE_2D,l.bindFramebuffer(l.FRAMEBUFFER,
-a.__webglFramebuffer),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,d,a.__webglTexture,0),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,a.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,a.__webglRenderbuffer):da(a.__webglRenderbuffer,a),c&&l.generateMipmap(l.TEXTURE_2D);b?l.bindTexture(l.TEXTURE_CUBE_MAP,null):l.bindTexture(l.TEXTURE_2D,
-null);l.bindRenderbuffer(l.RENDERBUFFER,null);l.bindFramebuffer(l.FRAMEBUFFER,null)}a?(b=b?a.__webglFramebuffer[a.activeCubeFace]:a.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=kb,a=lb,d=lc,e=mc);b!==ub&&(l.bindFramebuffer(l.FRAMEBUFFER,b),l.viewport(d,e,c,a),ub=b);zc=c;Gc=a};this.resetGLState=function(){Tb=tb=null;rb=Xa=Kb=Vb=Eb=jb=ib=-1;Ub=!0};this.shadowMapPlugin=new THREE.ShadowMapPlugin;this.addPrePlugin(this.shadowMapPlugin);this.addPostPlugin(new THREE.SpritePlugin);this.addPostPlugin(new THREE.LensFlarePlugin)};
+H);break;case "f":l.uniform1f($,H);break;case "v2":l.uniform2f($,H.x,H.y);break;case "v3":l.uniform3f($,H.x,H.y,H.z);break;case "v4":l.uniform4f($,H.x,H.y,H.z,H.w);break;case "c":l.uniform3f($,H.r,H.g,H.b);break;case "iv1":l.uniform1iv($,H);break;case "iv":l.uniform3iv($,H);break;case "fv1":l.uniform1fv($,H);break;case "fv":l.uniform3fv($,H);break;case "v2v":void 0===ea._array&&(ea._array=new Float32Array(2*H.length));for(var aa=0,Ua=H.length;aa<Ua;aa++)fb=2*aa,ea._array[fb]=H[aa].x,ea._array[fb+
+1]=H[aa].y;l.uniform2fv($,ea._array);break;case "v3v":void 0===ea._array&&(ea._array=new Float32Array(3*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)fb=3*aa,ea._array[fb]=H[aa].x,ea._array[fb+1]=H[aa].y,ea._array[fb+2]=H[aa].z;l.uniform3fv($,ea._array);break;case "v4v":void 0===ea._array&&(ea._array=new Float32Array(4*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)fb=4*aa,ea._array[fb]=H[aa].x,ea._array[fb+1]=H[aa].y,ea._array[fb+2]=H[aa].z,ea._array[fb+3]=H[aa].w;l.uniform4fv($,ea._array);break;case "m3":l.uniformMatrix3fv($,
+!1,H.elements);break;case "m3v":void 0===ea._array&&(ea._array=new Float32Array(9*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)H[aa].flattenToArrayOffset(ea._array,9*aa);l.uniformMatrix3fv($,!1,ea._array);break;case "m4":l.uniformMatrix4fv($,!1,H.elements);break;case "m4v":void 0===ea._array&&(ea._array=new Float32Array(16*H.length));aa=0;for(Ua=H.length;aa<Ua;aa++)H[aa].flattenToArrayOffset(ea._array,16*aa);l.uniformMatrix4fv($,!1,ea._array);break;case "t":eb=H;zb=C();l.uniform1i($,zb);if(!eb)continue;
+if(eb instanceof THREE.CubeTexture||eb.image instanceof Array&&6===eb.image.length){var wa=eb,Yb=zb;if(6===wa.image.length)if(wa.needsUpdate){wa.image.__webglTextureCube||(wa.addEventListener("dispose",hc),wa.image.__webglTextureCube=l.createTexture(),I.info.memory.textures++);l.activeTexture(l.TEXTURE0+Yb);l.bindTexture(l.TEXTURE_CUBE_MAP,wa.image.__webglTextureCube);l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,wa.flipY);for(var Zb=wa instanceof THREE.CompressedTexture,$b=[],ba=0;6>ba;ba++)$b[ba]=I.autoScaleCubemaps&&
+!Zb?E(wa.image[ba],Vc):wa.image[ba];var ac=$b[0],Ob=THREE.Math.isPowerOfTwo(ac.width)&&THREE.Math.isPowerOfTwo(ac.height),ob=S(wa.format),Pb=S(wa.type);Q(l.TEXTURE_CUBE_MAP,wa,Ob);for(ba=0;6>ba;ba++)if(Zb)for(var pb,ia=$b[ba].mipmaps,Ab=0,Vb=ia.length;Ab<Vb;Ab++)pb=ia[Ab],wa.format!==THREE.RGBAFormat&&wa.format!==THREE.RGBFormat?-1<kc.indexOf(ob)?l.compressedTexImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+ba,Ab,ob,pb.width,pb.height,0,pb.data):console.warn("Attempt to load unsupported compressed texture format"):
+l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+ba,Ab,ob,pb.width,pb.height,0,ob,Pb,pb.data);else l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+ba,0,ob,ob,Pb,$b[ba]);wa.generateMipmaps&&Ob&&l.generateMipmap(l.TEXTURE_CUBE_MAP);wa.needsUpdate=!1;if(wa.onUpdate)wa.onUpdate()}else l.activeTexture(l.TEXTURE0+Yb),l.bindTexture(l.TEXTURE_CUBE_MAP,wa.image.__webglTextureCube)}else if(eb instanceof THREE.WebGLRenderTargetCube){var Wb=eb;l.activeTexture(l.TEXTURE0+zb);l.bindTexture(l.TEXTURE_CUBE_MAP,Wb.__webglTexture)}else I.setTexture(eb,
+zb);break;case "tv":void 0===ea._array&&(ea._array=[]);aa=0;for(Ua=ea.value.length;aa<Ua;aa++)ea._array[aa]=C();l.uniform1iv($,ea._array);aa=0;for(Ua=ea.value.length;aa<Ua;aa++)eb=ea.value[aa],zb=ea._array[aa],eb&&I.setTexture(eb,zb);break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+Jb)}}}}l.uniformMatrix4fv(oa.modelViewMatrix,!1,e._modelViewMatrix.elements);oa.normalMatrix&&l.uniformMatrix3fv(oa.normalMatrix,!1,e._normalMatrix.elements);null!==oa.modelMatrix&&l.uniformMatrix4fv(oa.modelMatrix,
+!1,e.matrixWorld.elements);return ra}function G(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.spotLightColor.needsUpdate=b;a.spotLightPosition.needsUpdate=b;a.spotLightDistance.needsUpdate=b;a.spotLightDirection.needsUpdate=b;a.spotLightAngleCos.needsUpdate=b;a.spotLightExponent.needsUpdate=b;a.hemisphereLightSkyColor.needsUpdate=
+b;a.hemisphereLightGroundColor.needsUpdate=b;a.hemisphereLightDirection.needsUpdate=b}function C(){var a=ec;a>=Kc&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+Kc);ec+=1;return a}function B(a,b){a._modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,a.matrixWorld);a._normalMatrix.getNormalMatrix(a._modelViewMatrix)}function y(a,b,c,d){a[b]=c.r*c.r*d;a[b+1]=c.g*c.g*d;a[b+2]=c.b*c.b*d}function D(a,b,c,d){a[b]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function J(a){a!==
+Lc&&(l.lineWidth(a),Lc=a)}function N(a,b,c){Mc!==a&&(a?l.enable(l.POLYGON_OFFSET_FILL):l.disable(l.POLYGON_OFFSET_FILL),Mc=a);!a||Nc===b&&Oc===c||(l.polygonOffset(b,c),Nc=b,Oc=c)}function Q(a,b,c){c?(l.texParameteri(a,l.TEXTURE_WRAP_S,S(b.wrapS)),l.texParameteri(a,l.TEXTURE_WRAP_T,S(b.wrapT)),l.texParameteri(a,l.TEXTURE_MAG_FILTER,S(b.magFilter)),l.texParameteri(a,l.TEXTURE_MIN_FILTER,S(b.minFilter))):(l.texParameteri(a,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(a,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),
+l.texParameteri(a,l.TEXTURE_MAG_FILTER,R(b.magFilter)),l.texParameteri(a,l.TEXTURE_MIN_FILTER,R(b.minFilter)));jb&&b.type!==THREE.FloatType&&(1<b.anisotropy||b.__oldAnisotropy)&&(l.texParameterf(a,jb.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,Pc)),b.__oldAnisotropy=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.log("THREE.WebGLRenderer:",a,"is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height+".");return d}return a}function da(a,b){l.bindRenderbuffer(l.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(l.renderbufferStorage(l.RENDERBUFFER,l.DEPTH_COMPONENT16,b.width,b.height),l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(l.renderbufferStorage(l.RENDERBUFFER,l.DEPTH_STENCIL,b.width,b.height),
+l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,a)):l.renderbufferStorage(l.RENDERBUFFER,l.RGBA4,b.width,b.height)}function V(a){a instanceof THREE.WebGLRenderTargetCube?(l.bindTexture(l.TEXTURE_CUBE_MAP,a.__webglTexture),l.generateMipmap(l.TEXTURE_CUBE_MAP),l.bindTexture(l.TEXTURE_CUBE_MAP,null)):(l.bindTexture(l.TEXTURE_2D,a.__webglTexture),l.generateMipmap(l.TEXTURE_2D),l.bindTexture(l.TEXTURE_2D,null))}function R(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||
+a===THREE.NearestMipMapLinearFilter?l.NEAREST:l.LINEAR}function S(a){if(a===THREE.RepeatWrapping)return l.REPEAT;if(a===THREE.ClampToEdgeWrapping)return l.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return l.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return l.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return l.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return l.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return l.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return l.LINEAR_MIPMAP_NEAREST;
+if(a===THREE.LinearMipMapLinearFilter)return l.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return l.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return l.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return l.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return l.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return l.BYTE;if(a===THREE.ShortType)return l.SHORT;if(a===THREE.UnsignedShortType)return l.UNSIGNED_SHORT;if(a===THREE.IntType)return l.INT;if(a===THREE.UnsignedIntType)return l.UNSIGNED_INT;
+if(a===THREE.FloatType)return l.FLOAT;if(a===THREE.AlphaFormat)return l.ALPHA;if(a===THREE.RGBFormat)return l.RGB;if(a===THREE.RGBAFormat)return l.RGBA;if(a===THREE.LuminanceFormat)return l.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return l.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return l.FUNC_ADD;if(a===THREE.SubtractEquation)return l.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return l.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return l.ZERO;if(a===THREE.OneFactor)return l.ONE;if(a===
+THREE.SrcColorFactor)return l.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return l.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return l.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return l.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return l.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return l.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return l.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return l.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return l.SRC_ALPHA_SATURATE;
+if(null!==Ea){if(a===THREE.RGB_S3TC_DXT1_Format)return Ea.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===THREE.RGBA_S3TC_DXT5_Format)return Ea.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(null!==Fa){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return Fa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return Fa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return Fa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
+if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return Fa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(void 0!==$a){if(a===THREE.MinEquation)return $a.MIN_EXT;if(a===THREE.MaxEquation)return $a.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var L=void 0!==a.canvas?a.canvas:document.createElement("canvas"),xa=void 0!==a.context?a.context:null,P=void 0!==a.precision?a.precision:"highp",ya=void 0!==a.alpha?a.alpha:!1,la=void 0!==a.depth?a.depth:!0,sa=void 0!==a.stencil?a.stencil:!0,K=void 0!==
+a.antialias?a.antialias:!1,ha=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,ra=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,Ia=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:!1,ta=new THREE.Color(0),Ja=0,Ga=[],Ta={},Ca=[],hb=[],Ra=[];this.domElement=L;this.context=null;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=
+this.autoClear=!0;this.shadowMapEnabled=this.gammaOutput=this.gammaInput=!1;this.shadowMapAutoUpdate=!0;this.shadowMapType=THREE.PCFShadowMap;this.shadowMapCullFace=THREE.CullFaceFront;this.shadowMapCascade=this.shadowMapDebug=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;this.renderPluginsPre=[];this.renderPluginsPost=[];this.info={memory:{programs:0,geometries:0,textures:0},render:{calls:0,vertices:0,faces:0,points:0}};var I=this,Na=[],ub=null,Xb=null,tb=-1,Xa=null,
+Tb=null,ec=0,Jb=-1,Vb=-1,kb=-1,Wb=-1,lc=-1,Eb=-1,lb=-1,Kb=-1,Mc=null,Nc=null,Oc=null,Lc=null,mc=0,nc=0,mb=L.width,gb=L.height,zc=0,Gc=0,Lb=new Uint8Array(16),vb=new Uint8Array(16),Ac=new THREE.Frustum,xc=new THREE.Matrix4,Dc=new THREE.Matrix4,Qa=new THREE.Vector3,va=new THREE.Vector3,Ub=!0,Jc={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[]},
+hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},l,sb,oc,jb,Ea,Fa,Fb,$a;(function(){try{var a={alpha:ya,depth:la,stencil:sa,antialias:K,premultipliedAlpha:ha,preserveDrawingBuffer:ra};l=xa||L.getContext("webgl",a)||L.getContext("experimental-webgl",a);if(null===l)throw"Error creating WebGL context.";}catch(b){console.error(b)}sb=l.getExtension("OES_texture_float");l.getExtension("OES_texture_float_linear");oc=l.getExtension("OES_standard_derivatives");jb=l.getExtension("EXT_texture_filter_anisotropic")||
+l.getExtension("MOZ_EXT_texture_filter_anisotropic")||l.getExtension("WEBKIT_EXT_texture_filter_anisotropic");Ea=l.getExtension("WEBGL_compressed_texture_s3tc")||l.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||l.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");Fa=l.getExtension("WEBGL_compressed_texture_pvrtc")||l.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");Fb=l.getExtension("OES_element_index_uint");$a=l.getExtension("EXT_blend_minmax");null===sb&&console.log("THREE.WebGLRenderer: Float textures not supported.");
+null===oc&&console.log("THREE.WebGLRenderer: Standard derivatives not supported.");null===jb&&console.log("THREE.WebGLRenderer: Anisotropic texture filtering not supported.");null===Ea&&console.log("THREE.WebGLRenderer: S3TC compressed textures not supported.");null===Fa&&console.log("THREE.WebGLRenderer: PVRTC compressed textures not supported.");null===Fb&&console.log("THREE.WebGLRenderer: elementindex as unsigned integer not supported.");null===$a&&console.log("THREE.WebGLRenderer: min max blend equations not supported.");
+void 0===l.getShaderPrecisionFormat&&(l.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});Ia&&l.getExtension("EXT_frag_depth")})();l.clearColor(0,0,0,1);l.clearDepth(1);l.clearStencil(0);l.enable(l.DEPTH_TEST);l.depthFunc(l.LEQUAL);l.frontFace(l.CCW);l.cullFace(l.BACK);l.enable(l.CULL_FACE);l.enable(l.BLEND);l.blendEquation(l.FUNC_ADD);l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA);l.viewport(mc,nc,mb,gb);l.clearColor(ta.r,ta.g,ta.b,Ja);this.context=l;var Kc=l.getParameter(l.MAX_TEXTURE_IMAGE_UNITS),
+Wc=l.getParameter(l.MAX_VERTEX_TEXTURE_IMAGE_UNITS),Xc=l.getParameter(l.MAX_TEXTURE_SIZE),Vc=l.getParameter(l.MAX_CUBE_MAP_TEXTURE_SIZE),Pc=jb?l.getParameter(jb.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,gc=0<Wc,fc=gc&&sb,kc=[];if(Fa||Ea)for(var Qc=l.getParameter(l.COMPRESSED_TEXTURE_FORMATS),vc=0;vc<Qc.length;vc++)kc.push(Qc[vc]);var Yc=l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.HIGH_FLOAT),Zc=l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.MEDIUM_FLOAT);l.getShaderPrecisionFormat(l.VERTEX_SHADER,l.LOW_FLOAT);
+var $c=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.HIGH_FLOAT),ad=l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.MEDIUM_FLOAT);l.getShaderPrecisionFormat(l.FRAGMENT_SHADER,l.LOW_FLOAT);var bd=0<Yc.precision&&0<$c.precision,Rc=0<Zc.precision&&0<ad.precision;"highp"!==P||bd||(Rc?(P="mediump",console.warn("THREE.WebGLRenderer: highp not supported, using mediump.")):(P="lowp",console.warn("THREE.WebGLRenderer: highp and mediump not supported, using lowp.")));"mediump"!==P||Rc||(P="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));
+this.getContext=function(){return l};this.supportsVertexTextures=function(){return gc};this.supportsFloatTextures=function(){return sb};this.supportsStandardDerivatives=function(){return oc};this.supportsCompressedTextureS3TC=function(){return Ea};this.supportsCompressedTexturePVRTC=function(){return Fa};this.supportsBlendMinMax=function(){return $a};this.getMaxAnisotropy=function(){return Pc};this.getPrecision=function(){return P};this.setSize=function(a,b,c){L.width=a*this.devicePixelRatio;L.height=
+b*this.devicePixelRatio;!1!==c&&(L.style.width=a+"px",L.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){mc=a*this.devicePixelRatio;nc=b*this.devicePixelRatio;mb=c*this.devicePixelRatio;gb=d*this.devicePixelRatio;l.viewport(mc,nc,mb,gb)};this.setScissor=function(a,b,c,d){l.scissor(a*this.devicePixelRatio,b*this.devicePixelRatio,c*this.devicePixelRatio,d*this.devicePixelRatio)};this.enableScissorTest=function(a){a?l.enable(l.SCISSOR_TEST):l.disable(l.SCISSOR_TEST)};
+this.setClearColor=function(a,b){ta.set(a);Ja=void 0!==b?b:1;l.clearColor(ta.r,ta.g,ta.b,Ja)};this.setClearColorHex=function(a,b){console.warn("THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.");this.setClearColor(a,b)};this.getClearColor=function(){return ta};this.getClearAlpha=function(){return Ja};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=l.COLOR_BUFFER_BIT;if(void 0===b||b)d|=l.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=l.STENCIL_BUFFER_BIT;l.clear(d)};
+this.clearColor=function(){l.clear(l.COLOR_BUFFER_BIT)};this.clearDepth=function(){l.clear(l.DEPTH_BUFFER_BIT)};this.clearStencil=function(){l.clear(l.STENCIL_BUFFER_BIT)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.addPostPlugin=function(a){a.init(this,Ga,Ta,Ca);this.renderPluginsPost.push(a)};this.addPrePlugin=function(a){a.init(this,Ga,Ta,Ca);this.renderPluginsPre.push(a)};this.updateShadowMap=function(a,b){ub=null;tb=Xa=Kb=lb=kb=-1;Ub=!0;Vb=Jb=-1;this.shadowMapPlugin.update(a,
+b)};var Ec=function(a){a.target.traverse(function(a){a.removeEventListener("remove",Ec);if(a instanceof THREE.Mesh||a instanceof THREE.PointCloud||a instanceof THREE.Line)delete Ta[a.id];else if(a instanceof THREE.ImmediateRenderObject||a.immediateRenderCallback)for(var b=Ca,c=b.length-1;0<=c;c--)b[c].object===a&&b.splice(c,1);delete a.__webglInit;delete a._modelViewMatrix;delete a._normalMatrix;delete a.__webglActive})},Fc=function(a){a=a.target;a.removeEventListener("dispose",Fc);a.__webglInit=
+void 0;if(a instanceof THREE.BufferGeometry){for(var b in a.attributes)void 0!==a.attributes[b].buffer&&l.deleteBuffer(a.attributes[b].buffer);I.info.memory.geometries--}else if(void 0!==a.geometryGroups){b=0;for(var c=a.geometryGroupsList.length;b<c;b++){var d=a.geometryGroupsList[b];if(void 0!==d.numMorphTargets)for(var e=0,f=d.numMorphTargets;e<f;e++)l.deleteBuffer(d.__webglMorphTargetsBuffers[e]);if(void 0!==d.numMorphNormals)for(e=0,f=d.numMorphNormals;e<f;e++)l.deleteBuffer(d.__webglMorphNormalsBuffers[e]);
+Sc(d)}}else Sc(a)},hc=function(a){a=a.target;a.removeEventListener("dispose",hc);a.image&&a.image.__webglTextureCube?l.deleteTexture(a.image.__webglTextureCube):a.__webglInit&&(a.__webglInit=!1,l.deleteTexture(a.__webglTexture));I.info.memory.textures--},Tc=function(a){a=a.target;a.removeEventListener("dispose",Tc);if(a&&a.__webglTexture)if(l.deleteTexture(a.__webglTexture),a instanceof THREE.WebGLRenderTargetCube)for(var b=0;6>b;b++)l.deleteFramebuffer(a.__webglFramebuffer[b]),l.deleteRenderbuffer(a.__webglRenderbuffer[b]);
+else l.deleteFramebuffer(a.__webglFramebuffer),l.deleteRenderbuffer(a.__webglRenderbuffer);I.info.memory.textures--},Ic=function(a){a=a.target;a.removeEventListener("dispose",Ic);Hc(a)},Sc=function(a){void 0!==a.__webglVertexBuffer&&l.deleteBuffer(a.__webglVertexBuffer);void 0!==a.__webglNormalBuffer&&l.deleteBuffer(a.__webglNormalBuffer);void 0!==a.__webglTangentBuffer&&l.deleteBuffer(a.__webglTangentBuffer);void 0!==a.__webglColorBuffer&&l.deleteBuffer(a.__webglColorBuffer);void 0!==a.__webglUVBuffer&&
+l.deleteBuffer(a.__webglUVBuffer);void 0!==a.__webglUV2Buffer&&l.deleteBuffer(a.__webglUV2Buffer);void 0!==a.__webglSkinIndicesBuffer&&l.deleteBuffer(a.__webglSkinIndicesBuffer);void 0!==a.__webglSkinWeightsBuffer&&l.deleteBuffer(a.__webglSkinWeightsBuffer);void 0!==a.__webglFaceBuffer&&l.deleteBuffer(a.__webglFaceBuffer);void 0!==a.__webglLineBuffer&&l.deleteBuffer(a.__webglLineBuffer);void 0!==a.__webglLineDistanceBuffer&&l.deleteBuffer(a.__webglLineDistanceBuffer);if(void 0!==a.__webglCustomAttributesList)for(var b in a.__webglCustomAttributesList)l.deleteBuffer(a.__webglCustomAttributesList[b].buffer);
+I.info.memory.geometries--},Hc=function(a){var b=a.program.program;if(void 0!==b){a.program=void 0;var c,d,e=!1;a=0;for(c=Na.length;a<c;a++)if(d=Na[a],d.program===b){d.usedTimes--;0===d.usedTimes&&(e=!0);break}if(!0===e){e=[];a=0;for(c=Na.length;a<c;a++)d=Na[a],d.program!==b&&e.push(d);Na=e;l.deleteProgram(b);I.info.memory.programs--}}};this.renderBufferImmediate=function(a,b,c){g();a.hasPositions&&!a.__webglVertexBuffer&&(a.__webglVertexBuffer=l.createBuffer());a.hasNormals&&!a.__webglNormalBuffer&&
+(a.__webglNormalBuffer=l.createBuffer());a.hasUvs&&!a.__webglUvBuffer&&(a.__webglUvBuffer=l.createBuffer());a.hasColors&&!a.__webglColorBuffer&&(a.__webglColorBuffer=l.createBuffer());a.hasPositions&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglVertexBuffer),l.bufferData(l.ARRAY_BUFFER,a.positionArray,l.DYNAMIC_DRAW),f(b.attributes.position),l.vertexAttribPointer(b.attributes.position,3,l.FLOAT,!1,0,0));if(a.hasNormals){l.bindBuffer(l.ARRAY_BUFFER,a.__webglNormalBuffer);if(c.shading===THREE.FlatShading){var d,
+e,k,m,n,p,r,s,t,q,u,v=3*a.count;for(u=0;u<v;u+=9)q=a.normalArray,d=q[u],e=q[u+1],k=q[u+2],m=q[u+3],p=q[u+4],s=q[u+5],n=q[u+6],r=q[u+7],t=q[u+8],d=(d+m+n)/3,e=(e+p+r)/3,k=(k+s+t)/3,q[u]=d,q[u+1]=e,q[u+2]=k,q[u+3]=d,q[u+4]=e,q[u+5]=k,q[u+6]=d,q[u+7]=e,q[u+8]=k}l.bufferData(l.ARRAY_BUFFER,a.normalArray,l.DYNAMIC_DRAW);f(b.attributes.normal);l.vertexAttribPointer(b.attributes.normal,3,l.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglUvBuffer),l.bufferData(l.ARRAY_BUFFER,a.uvArray,
+l.DYNAMIC_DRAW),f(b.attributes.uv),l.vertexAttribPointer(b.attributes.uv,2,l.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(l.bindBuffer(l.ARRAY_BUFFER,a.__webglColorBuffer),l.bufferData(l.ARRAY_BUFFER,a.colorArray,l.DYNAMIC_DRAW),f(b.attributes.color),l.vertexAttribPointer(b.attributes.color,3,l.FLOAT,!1,0,0));h();l.drawArrays(l.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,f,h){if(!1!==d.visible)if(a=x(a,b,c,d,h),b=!1,c=16777215*f.id+2*a.id+(d.wireframe?
+1:0),c!==Xa&&(Xa=c,b=!0),b&&g(),h instanceof THREE.Mesh)if(h=!0===d.wireframe?l.LINES:l.TRIANGLES,c=f.attributes.index){var k,m;c.array instanceof Uint32Array?(k=l.UNSIGNED_INT,m=4):(k=l.UNSIGNED_SHORT,m=2);var n=f.offsets;if(0===n.length)b&&(e(d,a,f,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,c.array.length,k,0),I.info.render.calls++,I.info.render.vertices+=c.array.length,I.info.render.faces+=c.array.length/3;else{b=!0;for(var p=0,r=n.length;p<r;p++){var s=n[p].index;b&&(e(d,
+a,f,s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer));l.drawElements(h,n[p].count,k,n[p].start*m);I.info.render.calls++;I.info.render.vertices+=n[p].count;I.info.render.faces+=n[p].count/3}}}else b&&e(d,a,f,0),d=f.attributes.position,l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.vertices+=d.array.length/3,I.info.render.faces+=d.array.length/9;else if(h instanceof THREE.PointCloud)b&&e(d,a,f,0),d=f.attributes.position,l.drawArrays(l.POINTS,0,d.array.length/3),I.info.render.calls++,
+I.info.render.points+=d.array.length/3;else if(h instanceof THREE.Line)if(h=h.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,J(d.linewidth),c=f.attributes.index)if(c.array instanceof Uint32Array?(k=l.UNSIGNED_INT,m=4):(k=l.UNSIGNED_SHORT,m=2),n=f.offsets,0===n.length)b&&(e(d,a,f,0),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,c.array.length,k,0),I.info.render.calls++,I.info.render.vertices+=c.array.length;else for(1<n.length&&(b=!0),p=0,r=n.length;p<r;p++)s=n[p].index,b&&(e(d,a,f,
+s),l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,c.buffer)),l.drawElements(h,n[p].count,k,n[p].start*m),I.info.render.calls++,I.info.render.vertices+=n[p].count;else b&&e(d,a,f,0),d=f.attributes.position,l.drawArrays(h,0,d.array.length/3),I.info.render.calls++,I.info.render.points+=d.array.length/3};this.renderBuffer=function(a,b,c,d,e,k){if(!1!==d.visible){var m,p;c=x(a,b,c,d,k);b=c.attributes;a=!1;c=16777215*e.id+2*c.id+(d.wireframe?1:0);c!==Xa&&(Xa=c,a=!0);a&&g();if(!d.morphTargets&&0<=b.position)a&&(l.bindBuffer(l.ARRAY_BUFFER,
+e.__webglVertexBuffer),f(b.position),l.vertexAttribPointer(b.position,3,l.FLOAT,!1,0,0));else if(k.morphTargetBase){c=d.program.attributes;-1!==k.morphTargetBase&&0<=c.position?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[k.morphTargetBase]),f(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0)):0<=c.position&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglVertexBuffer),f(c.position),l.vertexAttribPointer(c.position,3,l.FLOAT,!1,0,0));if(k.morphTargetForcedOrder.length){var r=0;p=k.morphTargetForcedOrder;
+for(m=k.morphTargetInfluences;r<d.numSupportedMorphTargets&&r<p.length;)0<=c["morphTarget"+r]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[p[r]]),f(c["morphTarget"+r]),l.vertexAttribPointer(c["morphTarget"+r],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+r]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphNormalsBuffers[p[r]]),f(c["morphNormal"+r]),l.vertexAttribPointer(c["morphNormal"+r],3,l.FLOAT,!1,0,0)),k.__webglMorphTargetInfluences[r]=m[p[r]],r++}else{p=[];m=k.morphTargetInfluences;
+var s,q=m.length;for(s=0;s<q;s++)r=m[s],0<r&&p.push([r,s]);p.length>d.numSupportedMorphTargets?(p.sort(n),p.length=d.numSupportedMorphTargets):p.length>d.numSupportedMorphNormals?p.sort(n):0===p.length&&p.push([0,0]);for(r=0;r<d.numSupportedMorphTargets;)p[r]?(s=p[r][1],0<=c["morphTarget"+r]&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglMorphTargetsBuffers[s]),f(c["morphTarget"+r]),l.vertexAttribPointer(c["morphTarget"+r],3,l.FLOAT,!1,0,0)),0<=c["morphNormal"+r]&&d.morphNormals&&(l.bindBuffer(l.ARRAY_BUFFER,
+e.__webglMorphNormalsBuffers[s]),f(c["morphNormal"+r]),l.vertexAttribPointer(c["morphNormal"+r],3,l.FLOAT,!1,0,0)),k.__webglMorphTargetInfluences[r]=m[s]):k.__webglMorphTargetInfluences[r]=0,r++}null!==d.program.uniforms.morphTargetInfluences&&l.uniform1fv(d.program.uniforms.morphTargetInfluences,k.__webglMorphTargetInfluences)}if(a){if(e.__webglCustomAttributesList)for(m=0,p=e.__webglCustomAttributesList.length;m<p;m++)c=e.__webglCustomAttributesList[m],0<=b[c.buffer.belongsToAttribute]&&(l.bindBuffer(l.ARRAY_BUFFER,
+c.buffer),f(b[c.buffer.belongsToAttribute]),l.vertexAttribPointer(b[c.buffer.belongsToAttribute],c.size,l.FLOAT,!1,0,0));0<=b.color&&(0<k.geometry.colors.length||0<k.geometry.faces.length?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglColorBuffer),f(b.color),l.vertexAttribPointer(b.color,3,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib3fv(b.color,d.defaultAttributeValues.color));0<=b.normal&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglNormalBuffer),f(b.normal),l.vertexAttribPointer(b.normal,
+3,l.FLOAT,!1,0,0));0<=b.tangent&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglTangentBuffer),f(b.tangent),l.vertexAttribPointer(b.tangent,4,l.FLOAT,!1,0,0));0<=b.uv&&(k.geometry.faceVertexUvs[0]?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUVBuffer),f(b.uv),l.vertexAttribPointer(b.uv,2,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib2fv(b.uv,d.defaultAttributeValues.uv));0<=b.uv2&&(k.geometry.faceVertexUvs[1]?(l.bindBuffer(l.ARRAY_BUFFER,e.__webglUV2Buffer),f(b.uv2),l.vertexAttribPointer(b.uv2,
+2,l.FLOAT,!1,0,0)):void 0!==d.defaultAttributeValues&&l.vertexAttrib2fv(b.uv2,d.defaultAttributeValues.uv2));d.skinning&&0<=b.skinIndex&&0<=b.skinWeight&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinIndicesBuffer),f(b.skinIndex),l.vertexAttribPointer(b.skinIndex,4,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,e.__webglSkinWeightsBuffer),f(b.skinWeight),l.vertexAttribPointer(b.skinWeight,4,l.FLOAT,!1,0,0));0<=b.lineDistance&&(l.bindBuffer(l.ARRAY_BUFFER,e.__webglLineDistanceBuffer),f(b.lineDistance),l.vertexAttribPointer(b.lineDistance,
+1,l.FLOAT,!1,0,0))}h();k instanceof THREE.Mesh?(k=e.__typeArray===Uint32Array?l.UNSIGNED_INT:l.UNSIGNED_SHORT,d.wireframe?(J(d.wireframeLinewidth),a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglLineBuffer),l.drawElements(l.LINES,e.__webglLineCount,k,0)):(a&&l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,e.__webglFaceBuffer),l.drawElements(l.TRIANGLES,e.__webglFaceCount,k,0)),I.info.render.calls++,I.info.render.vertices+=e.__webglFaceCount,I.info.render.faces+=e.__webglFaceCount/3):k instanceof THREE.Line?(k=
+k.type===THREE.LineStrip?l.LINE_STRIP:l.LINES,J(d.linewidth),l.drawArrays(k,0,e.__webglLineCount),I.info.render.calls++):k instanceof THREE.PointCloud&&(l.drawArrays(l.POINTS,0,e.__webglParticleCount),I.info.render.calls++,I.info.render.points+=e.__webglParticleCount)}};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,f,g,h=a.fog;tb=-1;Tb=null;Ub=!0;!0===a.autoUpdate&&a.updateMatrixWorld();
+void 0===b.parent&&b.updateMatrixWorld();a.traverse(function(a){a instanceof THREE.SkinnedMesh&&a.skeleton.update()});b.matrixWorldInverse.getInverse(b.matrixWorld);xc.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);Ac.setFromMatrix(xc);Ga.length=0;hb.length=0;Ra.length=0;q(a,a,b);!0===I.sortObjects&&(hb.sort(k),Ra.sort(m));r(this.renderPluginsPre,a,b);I.info.render.calls=0;I.info.render.vertices=0;I.info.render.faces=0;I.info.render.points=0;this.setRenderTarget(c);(this.autoClear||d)&&
+this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);d=0;for(e=Ca.length;d<e;d++)f=Ca[d],g=f.object,g.visible&&(B(g,b),p(f));a.overrideMaterial?(d=a.overrideMaterial,this.setBlending(d.blending,d.blendEquation,d.blendSrc,d.blendDst),this.setDepthTest(d.depthTest),this.setDepthWrite(d.depthWrite),N(d.polygonOffset,d.polygonOffsetFactor,d.polygonOffsetUnits),t(hb,b,Ga,h,!0,d),t(Ra,b,Ga,h,!0,d),s(Ca,"",b,Ga,h,!1,d)):(d=null,this.setBlending(THREE.NoBlending),t(hb,b,Ga,h,!1,d),s(Ca,
+"opaque",b,Ga,h,!1,d),t(Ra,b,Ga,h,!0,d),s(Ca,"transparent",b,Ga,h,!0,d));r(this.renderPluginsPost,a,b);c&&c.generateMipmaps&&c.minFilter!==THREE.NearestFilter&&c.minFilter!==THREE.LinearFilter&&V(c);this.setDepthTest(!0);this.setDepthWrite(!0)}};this.renderImmediateObject=function(a,b,c,d,e){var f=x(a,b,c,d,e);Xa=-1;I.setMaterialFaces(d);e.immediateRenderCallback?e.immediateRenderCallback(f,l,Ac):e.render(function(a){I.renderBufferImmediate(a,f,d)})};this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};
+this.setFaceCulling=function(a,b){a===THREE.CullFaceNone?l.disable(l.CULL_FACE):(b===THREE.FrontFaceDirectionCW?l.frontFace(l.CW):l.frontFace(l.CCW),a===THREE.CullFaceBack?l.cullFace(l.BACK):a===THREE.CullFaceFront?l.cullFace(l.FRONT):l.cullFace(l.FRONT_AND_BACK),l.enable(l.CULL_FACE))};this.setMaterialFaces=function(a){var b=a.side===THREE.DoubleSide;a=a.side===THREE.BackSide;Jb!==b&&(b?l.disable(l.CULL_FACE):l.enable(l.CULL_FACE),Jb=b);Vb!==a&&(a?l.frontFace(l.CW):l.frontFace(l.CCW),Vb=a)};this.setDepthTest=
+function(a){lb!==a&&(a?l.enable(l.DEPTH_TEST):l.disable(l.DEPTH_TEST),lb=a)};this.setDepthWrite=function(a){Kb!==a&&(l.depthMask(a),Kb=a)};this.setBlending=function(a,b,c,d){a!==kb&&(a===THREE.NoBlending?l.disable(l.BLEND):a===THREE.AdditiveBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),l.blendFunc(l.SRC_ALPHA,l.ONE)):a===THREE.SubtractiveBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),l.blendFunc(l.ZERO,l.ONE_MINUS_SRC_COLOR)):a===THREE.MultiplyBlending?(l.enable(l.BLEND),l.blendEquation(l.FUNC_ADD),
+l.blendFunc(l.ZERO,l.SRC_COLOR)):a===THREE.CustomBlending?l.enable(l.BLEND):(l.enable(l.BLEND),l.blendEquationSeparate(l.FUNC_ADD,l.FUNC_ADD),l.blendFuncSeparate(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA,l.ONE,l.ONE_MINUS_SRC_ALPHA)),kb=a);if(a===THREE.CustomBlending){if(b!==Wb&&(l.blendEquation(S(b)),Wb=b),c!==lc||d!==Eb)l.blendFunc(S(c),S(d)),lc=c,Eb=d}else Eb=lc=Wb=null};this.uploadTexture=function(a){a.__webglInit||(a.__webglInit=!0,a.addEventListener("dispose",hc),a.__webglTexture=l.createTexture(),
+I.info.memory.textures++);l.bindTexture(l.TEXTURE_2D,a.__webglTexture);l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,a.flipY);l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);l.pixelStorei(l.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=E(a.image,Xc);var b=a.image,c=THREE.Math.isPowerOfTwo(b.width)&&THREE.Math.isPowerOfTwo(b.height),d=S(a.format),e=S(a.type);Q(l.TEXTURE_2D,a,c);var f=a.mipmaps;if(a instanceof THREE.DataTexture)if(0<f.length&&c){for(var g=0,h=f.length;g<h;g++)b=f[g],l.texImage2D(l.TEXTURE_2D,
+g,d,b.width,b.height,0,d,e,b.data);a.generateMipmaps=!1}else l.texImage2D(l.TEXTURE_2D,0,d,b.width,b.height,0,d,e,b.data);else if(a instanceof THREE.CompressedTexture)for(g=0,h=f.length;g<h;g++)b=f[g],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<kc.indexOf(d)?l.compressedTexImage2D(l.TEXTURE_2D,g,d,b.width,b.height,0,b.data):console.warn("Attempt to load unsupported compressed texture format"):l.texImage2D(l.TEXTURE_2D,g,d,b.width,b.height,0,d,e,b.data);else if(0<f.length&&c){g=0;for(h=
+f.length;g<h;g++)b=f[g],l.texImage2D(l.TEXTURE_2D,g,d,d,e,b);a.generateMipmaps=!1}else l.texImage2D(l.TEXTURE_2D,0,d,d,e,a.image);a.generateMipmaps&&c&&l.generateMipmap(l.TEXTURE_2D);a.needsUpdate=!1;if(a.onUpdate)a.onUpdate()};this.setTexture=function(a,b){l.activeTexture(l.TEXTURE0+b);a.needsUpdate?I.uploadTexture(a):l.bindTexture(l.TEXTURE_2D,a.__webglTexture)};this.setRenderTarget=function(a){var b=a instanceof THREE.WebGLRenderTargetCube;if(a&&!a.__webglFramebuffer){void 0===a.depthBuffer&&(a.depthBuffer=
+!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",Tc);a.__webglTexture=l.createTexture();I.info.memory.textures++;var c=THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height),d=S(a.format),e=S(a.type);if(b){a.__webglFramebuffer=[];a.__webglRenderbuffer=[];l.bindTexture(l.TEXTURE_CUBE_MAP,a.__webglTexture);Q(l.TEXTURE_CUBE_MAP,a,c);for(var f=0;6>f;f++){a.__webglFramebuffer[f]=l.createFramebuffer();a.__webglRenderbuffer[f]=l.createRenderbuffer();l.texImage2D(l.TEXTURE_CUBE_MAP_POSITIVE_X+
+f,0,d,a.width,a.height,0,d,e,null);var g=a,h=l.TEXTURE_CUBE_MAP_POSITIVE_X+f;l.bindFramebuffer(l.FRAMEBUFFER,a.__webglFramebuffer[f]);l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,h,g.__webglTexture,0);da(a.__webglRenderbuffer[f],a)}c&&l.generateMipmap(l.TEXTURE_CUBE_MAP)}else a.__webglFramebuffer=l.createFramebuffer(),a.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:l.createRenderbuffer(),l.bindTexture(l.TEXTURE_2D,a.__webglTexture),Q(l.TEXTURE_2D,a,c),l.texImage2D(l.TEXTURE_2D,
+0,d,a.width,a.height,0,d,e,null),d=l.TEXTURE_2D,l.bindFramebuffer(l.FRAMEBUFFER,a.__webglFramebuffer),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,d,a.__webglTexture,0),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_ATTACHMENT,l.RENDERBUFFER,a.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&l.framebufferRenderbuffer(l.FRAMEBUFFER,l.DEPTH_STENCIL_ATTACHMENT,l.RENDERBUFFER,a.__webglRenderbuffer):da(a.__webglRenderbuffer,a),c&&l.generateMipmap(l.TEXTURE_2D);
+b?l.bindTexture(l.TEXTURE_CUBE_MAP,null):l.bindTexture(l.TEXTURE_2D,null);l.bindRenderbuffer(l.RENDERBUFFER,null);l.bindFramebuffer(l.FRAMEBUFFER,null)}a?(b=b?a.__webglFramebuffer[a.activeCubeFace]:a.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=mb,a=gb,d=mc,e=nc);b!==Xb&&(l.bindFramebuffer(l.FRAMEBUFFER,b),l.viewport(d,e,c,a),Xb=b);zc=c;Gc=a};this.resetGLState=function(){Tb=ub=null;tb=Xa=Vb=Jb=Kb=lb=kb=-1;Ub=!0};this.shadowMapPlugin=new THREE.ShadowMapPlugin;this.addPrePlugin(this.shadowMapPlugin);
+this.addPostPlugin(new THREE.SpritePlugin);this.addPostPlugin(new THREE.LensFlarePlugin)};
 THREE.WebGLRenderTarget=function(a,b,c){this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.format=void 0!==c.format?c.format:
 THREE.WebGLRenderTarget=function(a,b,c){this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.format=void 0!==c.format?c.format:
 THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=null};
 THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=null};
 THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){this.width=a;this.height=b},clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;
 THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(a,b){this.width=a;this.height=b},clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter;a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;
@@ -675,13 +676,13 @@ y=n[k][h+1].clone();this.faces.push(new THREE.Face3(t,s,v,[w,u,x]));this.faceVer
 s,p,[w,u,A])),this.faceVertexUvs[0].push([G,C,B]);if(!1===g&&0<b)for(this.vertices.push(new THREE.Vector3(0,-f,0)),h=0;h<d;h++)t=m[k][h+1],s=m[k][h],p=this.vertices.length-1,w=new THREE.Vector3(0,-1,0),u=new THREE.Vector3(0,-1,0),A=new THREE.Vector3(0,-1,0),G=n[k][h+1].clone(),C=n[k][h].clone(),B=new THREE.Vector2(C.x,1),this.faces.push(new THREE.Face3(t,s,p,[w,u,A])),this.faceVertexUvs[0].push([G,C,B]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);
 s,p,[w,u,A])),this.faceVertexUvs[0].push([G,C,B]);if(!1===g&&0<b)for(this.vertices.push(new THREE.Vector3(0,-f,0)),h=0;h<d;h++)t=m[k][h+1],s=m[k][h],p=this.vertices.length-1,w=new THREE.Vector3(0,-1,0),u=new THREE.Vector3(0,-1,0),A=new THREE.Vector3(0,-1,0),G=n[k][h+1].clone(),C=n[k][h].clone(),B=new THREE.Vector2(C.x,1),this.faces.push(new THREE.Face3(t,s,p,[w,u,A])),this.faceVertexUvs[0].push([G,C,B]);this.computeFaceNormals()};THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype);
 THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=a instanceof Array?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);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=a instanceof Array?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);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.log("die");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),m=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/m-h)*g-(c.y+f/m-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)==
 THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.log("die");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),m=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/m-h)*g-(c.y+f/m-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(c,d){var e,f;for(K=c.length;0<=--K;){e=K;f=K-1;0>f&&(f=c.length-1);for(var g=0,h=t+2*n,g=0;g<h;g++){var k=xa*g,m=xa*(g+1),p=d+e+k,k=d+f+k,q=d+f+m,m=d+e+m,r=c,s=g,v=h,w=e,x=f,p=p+Q,k=k+Q,q=q+Q,m=m+Q;N.faces.push(new THREE.Face3(p,k,m,null,null,u));N.faces.push(new THREE.Face3(k,q,m,null,null,u));p=A.generateSideWallUV(N,a,r,b,p,k,q,m,s,v,w,x);N.faceVertexUvs[0].push([p[0],p[1],p[3]]);
+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(c,d){var e,f;for(K=c.length;0<=--K;){e=K;f=K-1;0>f&&(f=c.length-1);for(var g=0,h=t+2*n,g=0;g<h;g++){var k=ya*g,m=ya*(g+1),p=d+e+k,k=d+f+k,q=d+f+m,m=d+e+m,r=c,s=g,v=h,w=e,x=f,p=p+Q,k=k+Q,q=q+Q,m=m+Q;N.faces.push(new THREE.Face3(p,k,m,null,null,u));N.faces.push(new THREE.Face3(k,q,m,null,null,u));p=A.generateSideWallUV(N,a,r,b,p,k,q,m,s,v,w,x);N.faceVertexUvs[0].push([p[0],p[1],p[3]]);
 N.faceVertexUvs[0].push([p[1],p[2],p[3]])}}}function g(a,b,c){N.vertices.push(new THREE.Vector3(a,b,c))}function f(c,d,e,f){c+=Q;d+=Q;e+=Q;N.faces.push(new THREE.Face3(c,d,e,null,null,w));c=f?A.generateBottomUV(N,a,b,c,d,e):A.generateTopUV(N,a,b,c,d,e);N.faceVertexUvs[0].push(c)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,m=void 0!==b.bevelSize?b.bevelSize:k-2,n=void 0!==b.bevelSegments?b.bevelSegments:3,q=void 0!==b.bevelEnabled?b.bevelEnabled:!0,r=void 0!==
 N.faceVertexUvs[0].push([p[1],p[2],p[3]])}}}function g(a,b,c){N.vertices.push(new THREE.Vector3(a,b,c))}function f(c,d,e,f){c+=Q;d+=Q;e+=Q;N.faces.push(new THREE.Face3(c,d,e,null,null,w));c=f?A.generateBottomUV(N,a,b,c,d,e):A.generateTopUV(N,a,b,c,d,e);N.faceVertexUvs[0].push(c)}var h=void 0!==b.amount?b.amount:100,k=void 0!==b.bevelThickness?b.bevelThickness:6,m=void 0!==b.bevelSize?b.bevelSize:k-2,n=void 0!==b.bevelSegments?b.bevelSegments:3,q=void 0!==b.bevelEnabled?b.bevelEnabled:!0,r=void 0!==
 b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,s=b.extrudePath,p,v=!1,w=b.material,u=b.extrudeMaterial,A=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,x,G,C,B;s&&(p=s.getSpacedPoints(t),v=!0,q=!1,x=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,t,!1),G=new THREE.Vector3,C=new THREE.Vector3,B=new THREE.Vector3);q||(m=k=n=0);var y,D,J,N=this,Q=this.vertices.length,s=a.extractPoints(r),r=s.shape,E=s.holes;if(s=!THREE.Shape.Utils.isClockWise(r)){r=
 b.curveSegments?b.curveSegments:12,t=void 0!==b.steps?b.steps:1,s=b.extrudePath,p,v=!1,w=b.material,u=b.extrudeMaterial,A=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,x,G,C,B;s&&(p=s.getSpacedPoints(t),v=!0,q=!1,x=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,t,!1),G=new THREE.Vector3,C=new THREE.Vector3,B=new THREE.Vector3);q||(m=k=n=0);var y,D,J,N=this,Q=this.vertices.length,s=a.extractPoints(r),r=s.shape,E=s.holes;if(s=!THREE.Shape.Utils.isClockWise(r)){r=
-r.reverse();D=0;for(J=E.length;D<J;D++)y=E[D],THREE.Shape.Utils.isClockWise(y)&&(E[D]=y.reverse());s=!1}var da=THREE.Shape.Utils.triangulateShape(r,E),V=r;D=0;for(J=E.length;D<J;D++)y=E[D],r=r.concat(y);var R,S,L,wa,P,xa=r.length,la,sa=da.length,s=[],K=0;L=V.length;R=L-1;for(S=K+1;K<L;K++,R++,S++)R===L&&(R=0),S===L&&(S=0),s[K]=d(V[K],V[R],V[S]);var ha=[],ra,Ia=s.concat();D=0;for(J=E.length;D<J;D++){y=E[D];ra=[];K=0;L=y.length;R=L-1;for(S=K+1;K<L;K++,R++,S++)R===L&&(R=0),S===L&&(S=0),ra[K]=d(y[K],
-y[R],y[S]);ha.push(ra);Ia=Ia.concat(ra)}for(R=0;R<n;R++){L=R/n;wa=k*(1-L);S=m*Math.sin(L*Math.PI/2);K=0;for(L=V.length;K<L;K++)P=c(V[K],s[K],S),g(P.x,P.y,-wa);D=0;for(J=E.length;D<J;D++)for(y=E[D],ra=ha[D],K=0,L=y.length;K<L;K++)P=c(y[K],ra[K],S),g(P.x,P.y,-wa)}S=m;for(K=0;K<xa;K++)P=q?c(r[K],Ia[K],S):r[K],v?(C.copy(x.normals[0]).multiplyScalar(P.x),G.copy(x.binormals[0]).multiplyScalar(P.y),B.copy(p[0]).add(C).add(G),g(B.x,B.y,B.z)):g(P.x,P.y,0);for(L=1;L<=t;L++)for(K=0;K<xa;K++)P=q?c(r[K],Ia[K],
-S):r[K],v?(C.copy(x.normals[L]).multiplyScalar(P.x),G.copy(x.binormals[L]).multiplyScalar(P.y),B.copy(p[L]).add(C).add(G),g(B.x,B.y,B.z)):g(P.x,P.y,h/t*L);for(R=n-1;0<=R;R--){L=R/n;wa=k*(1-L);S=m*Math.sin(L*Math.PI/2);K=0;for(L=V.length;K<L;K++)P=c(V[K],s[K],S),g(P.x,P.y,h+wa);D=0;for(J=E.length;D<J;D++)for(y=E[D],ra=ha[D],K=0,L=y.length;K<L;K++)P=c(y[K],ra[K],S),v?g(P.x,P.y+p[t-1].y,p[t-1].x+wa):g(P.x,P.y,h+wa)}(function(){if(q){var a;a=0*xa;for(K=0;K<sa;K++)la=da[K],f(la[2]+a,la[1]+a,la[0]+a,!0);
-a=t+2*n;a*=xa;for(K=0;K<sa;K++)la=da[K],f(la[0]+a,la[1]+a,la[2]+a,!1)}else{for(K=0;K<sa;K++)la=da[K],f(la[2],la[1],la[0],!0);for(K=0;K<sa;K++)la=da[K],f(la[0]+xa*t,la[1]+xa*t,la[2]+xa*t,!1)}})();(function(){var a=0;e(V,a);a+=V.length;D=0;for(J=E.length;D<J;D++)y=E[D],e(y,a),a+=y.length})()};
+r.reverse();D=0;for(J=E.length;D<J;D++)y=E[D],THREE.Shape.Utils.isClockWise(y)&&(E[D]=y.reverse());s=!1}var da=THREE.Shape.Utils.triangulateShape(r,E),V=r;D=0;for(J=E.length;D<J;D++)y=E[D],r=r.concat(y);var R,S,L,xa,P,ya=r.length,la,sa=da.length,s=[],K=0;L=V.length;R=L-1;for(S=K+1;K<L;K++,R++,S++)R===L&&(R=0),S===L&&(S=0),s[K]=d(V[K],V[R],V[S]);var ha=[],ra,Ia=s.concat();D=0;for(J=E.length;D<J;D++){y=E[D];ra=[];K=0;L=y.length;R=L-1;for(S=K+1;K<L;K++,R++,S++)R===L&&(R=0),S===L&&(S=0),ra[K]=d(y[K],
+y[R],y[S]);ha.push(ra);Ia=Ia.concat(ra)}for(R=0;R<n;R++){L=R/n;xa=k*(1-L);S=m*Math.sin(L*Math.PI/2);K=0;for(L=V.length;K<L;K++)P=c(V[K],s[K],S),g(P.x,P.y,-xa);D=0;for(J=E.length;D<J;D++)for(y=E[D],ra=ha[D],K=0,L=y.length;K<L;K++)P=c(y[K],ra[K],S),g(P.x,P.y,-xa)}S=m;for(K=0;K<ya;K++)P=q?c(r[K],Ia[K],S):r[K],v?(C.copy(x.normals[0]).multiplyScalar(P.x),G.copy(x.binormals[0]).multiplyScalar(P.y),B.copy(p[0]).add(C).add(G),g(B.x,B.y,B.z)):g(P.x,P.y,0);for(L=1;L<=t;L++)for(K=0;K<ya;K++)P=q?c(r[K],Ia[K],
+S):r[K],v?(C.copy(x.normals[L]).multiplyScalar(P.x),G.copy(x.binormals[L]).multiplyScalar(P.y),B.copy(p[L]).add(C).add(G),g(B.x,B.y,B.z)):g(P.x,P.y,h/t*L);for(R=n-1;0<=R;R--){L=R/n;xa=k*(1-L);S=m*Math.sin(L*Math.PI/2);K=0;for(L=V.length;K<L;K++)P=c(V[K],s[K],S),g(P.x,P.y,h+xa);D=0;for(J=E.length;D<J;D++)for(y=E[D],ra=ha[D],K=0,L=y.length;K<L;K++)P=c(y[K],ra[K],S),v?g(P.x,P.y+p[t-1].y,p[t-1].x+xa):g(P.x,P.y,h+xa)}(function(){if(q){var a;a=0*ya;for(K=0;K<sa;K++)la=da[K],f(la[2]+a,la[1]+a,la[0]+a,!0);
+a=t+2*n;a*=ya;for(K=0;K<sa;K++)la=da[K],f(la[0]+a,la[1]+a,la[2]+a,!1)}else{for(K=0;K<sa;K++)la=da[K],f(la[2],la[1],la[0],!0);for(K=0;K<sa;K++)la=da[K],f(la[0]+ya*t,la[1]+ya*t,la[2]+ya*t,!1)}})();(function(){var a=0;e(V,a);a+=V.length;D=0;for(J=E.length;D<J;D++)y=E[D],e(y,a),a+=y.length})()};
 THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d,e,g){b=a.vertices[e].x;e=a.vertices[e].y;c=a.vertices[g].x;g=a.vertices[g].y;return[new THREE.Vector2(a.vertices[d].x,a.vertices[d].y),new THREE.Vector2(b,e),new THREE.Vector2(c,g)]},generateBottomUV:function(a,b,c,d,e,g){return this.generateTopUV(a,b,c,d,e,g)},generateSideWallUV:function(a,b,c,d,e,g,f,h,k,m,n,q){b=a.vertices[e].x;c=a.vertices[e].y;e=a.vertices[e].z;d=a.vertices[g].x;k=a.vertices[g].y;g=a.vertices[g].z;m=a.vertices[f].x;
 THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d,e,g){b=a.vertices[e].x;e=a.vertices[e].y;c=a.vertices[g].x;g=a.vertices[g].y;return[new THREE.Vector2(a.vertices[d].x,a.vertices[d].y),new THREE.Vector2(b,e),new THREE.Vector2(c,g)]},generateBottomUV:function(a,b,c,d,e,g){return this.generateTopUV(a,b,c,d,e,g)},generateSideWallUV:function(a,b,c,d,e,g,f,h,k,m,n,q){b=a.vertices[e].x;c=a.vertices[e].y;e=a.vertices[e].z;d=a.vertices[g].x;k=a.vertices[g].y;g=a.vertices[g].z;m=a.vertices[f].x;
 n=a.vertices[f].y;f=a.vertices[f].z;q=a.vertices[h].x;var r=a.vertices[h].y;a=a.vertices[h].z;return 0.01>Math.abs(c-k)?[new THREE.Vector2(b,1-e),new THREE.Vector2(d,1-g),new THREE.Vector2(m,1-f),new THREE.Vector2(q,1-a)]:[new THREE.Vector2(c,1-e),new THREE.Vector2(k,1-g),new THREE.Vector2(n,1-f),new THREE.Vector2(r,1-a)]}};THREE.ExtrudeGeometry.__v1=new THREE.Vector2;THREE.ExtrudeGeometry.__v2=new THREE.Vector2;THREE.ExtrudeGeometry.__v3=new THREE.Vector2;THREE.ExtrudeGeometry.__v4=new THREE.Vector2;
 n=a.vertices[f].y;f=a.vertices[f].z;q=a.vertices[h].x;var r=a.vertices[h].y;a=a.vertices[h].z;return 0.01>Math.abs(c-k)?[new THREE.Vector2(b,1-e),new THREE.Vector2(d,1-g),new THREE.Vector2(m,1-f),new THREE.Vector2(q,1-a)]:[new THREE.Vector2(c,1-e),new THREE.Vector2(k,1-g),new THREE.Vector2(n,1-f),new THREE.Vector2(r,1-a)]}};THREE.ExtrudeGeometry.__v1=new THREE.Vector2;THREE.ExtrudeGeometry.__v2=new THREE.Vector2;THREE.ExtrudeGeometry.__v3=new THREE.Vector2;THREE.ExtrudeGeometry.__v4=new THREE.Vector2;
 THREE.ExtrudeGeometry.__v5=new THREE.Vector2;THREE.ExtrudeGeometry.__v6=new THREE.Vector2;THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===a instanceof Array&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);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.ExtrudeGeometry.__v5=new THREE.Vector2;THREE.ExtrudeGeometry.__v6=new THREE.Vector2;THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===a instanceof Array&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};