Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
c9b0d66499
2 changed files with 83 additions and 77 deletions
  1. 57 51
      build/three.js
  2. 26 26
      build/three.min.js

+ 57 - 51
build/three.js

@@ -32860,6 +32860,7 @@ THREE.TubeGeometry.FrenetFrames = function ( path, segments, closed ) {
 
 	initialNormal3();
 
+	/*
 	function initialNormal1(lastBinormal) {
 		// fixed start binormal. Has dangers of 0 vectors
 		normals[ 0 ] = new THREE.Vector3();
@@ -32881,6 +32882,7 @@ THREE.TubeGeometry.FrenetFrames = function ( path, segments, closed ) {
 		binormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] ).normalize();
 
 	}
+	*/
 
 	function initialNormal3() {
 		// select an initial normal vector perpenicular to the first tangent vector,
@@ -34608,38 +34610,42 @@ THREE.WireframeHelper = function ( object, hex ) {
 
 		geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
 
-	} else if ( object.geometry instanceof THREE.BufferGeometry && object.geometry.attributes.index !== undefined ) { // Indexed BufferGeometry
+	} else if ( object.geometry instanceof THREE.BufferGeometry ) {
 
-		var vertices = object.geometry.attributes.position.array;
-		var indices = object.geometry.attributes.index.array;
-		var offsets = object.geometry.offsets;
-		var numEdges = 0;
+		if ( object.geometry.attributes.index !== undefined ) { // Indexed BufferGeometry
 
-		// allocate maximal size
-		var edges = new Uint32Array( 2 * indices.length );
+			var vertices = object.geometry.attributes.position.array;
+			var indices = object.geometry.attributes.index.array;
+			var offsets = object.geometry.offsets;
+			var numEdges = 0;
 
-		for ( var o = 0, ol = offsets.length; o < ol; ++ o ) {
+			// allocate maximal size
+			var edges = new Uint32Array( 2 * indices.length );
 
-			var start = offsets[ o ].start;
-			var count = offsets[ o ].count;
-			var index = offsets[ o ].index;
+			for ( var o = 0, ol = offsets.length; o < ol; ++ o ) {
 
-			for ( var i = start, il = start + count; i < il; i += 3 ) {
+				var start = offsets[ o ].start;
+				var count = offsets[ o ].count;
+				var index = offsets[ o ].index;
 
-				for ( var j = 0; j < 3; j ++ ) {
+				for ( var i = start, il = start + count; i < il; i += 3 ) {
+
+					for ( var j = 0; j < 3; j ++ ) {
 
-					edge[ 0 ] = index + indices[ i + j ];
-					edge[ 1 ] = index + indices[ i + ( j + 1 ) % 3 ];
-					edge.sort( sortFunction );
+						edge[ 0 ] = index + indices[ i + j ];
+						edge[ 1 ] = index + indices[ i + ( j + 1 ) % 3 ];
+						edge.sort( sortFunction );
 
-					var key = edge.toString();
+						var key = edge.toString();
 
-					if ( hash[ key ] === undefined ) {
+						if ( hash[ key ] === undefined ) {
 
-						edges[ 2 * numEdges ] = edge[ 0 ];
-						edges[ 2 * numEdges + 1 ] = edge[ 1 ];
-						hash[ key ] = true;
-						numEdges ++;
+							edges[ 2 * numEdges ] = edge[ 0 ];
+							edges[ 2 * numEdges + 1 ] = edge[ 1 ];
+							hash[ key ] = true;
+							numEdges ++;
+
+						}
 
 					}
 
@@ -34647,55 +34653,55 @@ THREE.WireframeHelper = function ( object, hex ) {
 
 			}
 
-		}
+			var coords = new Float32Array( numEdges * 2 * 3 );
 
-		var coords = new Float32Array( numEdges * 2 * 3 );
+			for ( var i = 0, l = numEdges; i < l; i ++ ) {
 
-		for ( var i = 0, l = numEdges; i < l; i ++ ) {
+				for ( var j = 0; j < 2; j ++ ) {
 
-			for ( var j = 0; j < 2; j ++ ) {
+					var index = 6 * i + 3 * j;
+					var index2 = 3 * edges[ 2 * i + j];
+					coords[ index + 0 ] = vertices[ index2 ];
+					coords[ index + 1 ] = vertices[ index2 + 1 ];
+					coords[ index + 2 ] = vertices[ index2 + 2 ];
 
-				var index = 6 * i + 3 * j;
-				var index2 = 3 * edges[ 2 * i + j];
-				coords[ index + 0 ] = vertices[ index2 ];
-				coords[ index + 1 ] = vertices[ index2 + 1 ];
-				coords[ index + 2 ] = vertices[ index2 + 2 ];
+				}
 
 			}
 
-		}
+			geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
 
-		geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
+		} else { // non-indexed BufferGeometry
 
-	} else if ( object.geometry instanceof THREE.BufferGeometry ) { // non-indexed BufferGeometry
+			var vertices = object.geometry.attributes.position.array;
+			var numEdges = vertices.length / 3;
+			var numTris = numEdges / 3;
 
-		var vertices = object.geometry.attributes.position.array;
-		var numEdges = vertices.length / 3;
-		var numTris = numEdges / 3;
+			var coords = new Float32Array( numEdges * 2 * 3 );
 
-		var coords = new Float32Array( numEdges * 2 * 3 );
+			for ( var i = 0, l = numTris; i < l; i ++ ) {
 
-		for ( var i = 0, l = numTris; i < l; i ++ ) {
+				for ( var j = 0; j < 3; j ++ ) {
 
-			for ( var j = 0; j < 3; j ++ ) {
+					var index = 18 * i + 6 * j;
 
-				var index = 18 * i + 6 * j;
+					var index1 = 9 * i + 3 * j;
+					coords[ index + 0 ] = vertices[ index1 ];
+					coords[ index + 1 ] = vertices[ index1 + 1 ];
+					coords[ index + 2 ] = vertices[ index1 + 2 ];
 
-				var index1 = 9 * i + 3 * j;
-				coords[ index + 0 ] = vertices[ index1 ];
-				coords[ index + 1 ] = vertices[ index1 + 1 ];
-				coords[ index + 2 ] = vertices[ index1 + 2 ];
+					var index2 = 9 * i + 3 * ( ( j + 1 ) % 3 );
+					coords[ index + 3 ] = vertices[ index2 ];
+					coords[ index + 4 ] = vertices[ index2 + 1 ];
+					coords[ index + 5 ] = vertices[ index2 + 2 ];
 
-				var index2 = 9 * i + 3 * ( ( j + 1 ) % 3 );
-				coords[ index + 3 ] = vertices[ index2 ];
-				coords[ index + 4 ] = vertices[ index2 + 1 ];
-				coords[ index + 5 ] = vertices[ index2 + 2 ];
+				}
 
 			}
 
-		}
+			geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
 
-		geometry.addAttribute( 'position', new THREE.BufferAttribute( coords, 3 ) );
+		}
 
 	}
 

+ 26 - 26
build/three.min.js

@@ -415,29 +415,29 @@ k.shadowDarkness.value[ba]=l.shadowDarkness,k.shadowBias.value[ba]=l.shadowBias,
 n)m.uniform1fv(f,l);else if("fv"===n)m.uniform3fv(f,l);else if("v2v"===n){void 0===c._array&&(c._array=new Float32Array(2*l.length));n=0;for(q=l.length;n<q;n++)u=2*n,c._array[u]=l[n].x,c._array[u+1]=l[n].y;m.uniform2fv(f,c._array)}else if("v3v"===n){void 0===c._array&&(c._array=new Float32Array(3*l.length));n=0;for(q=l.length;n<q;n++)u=3*n,c._array[u]=l[n].x,c._array[u+1]=l[n].y,c._array[u+2]=l[n].z;m.uniform3fv(f,c._array)}else if("v4v"===n){void 0===c._array&&(c._array=new Float32Array(4*l.length));
 n=0;for(q=l.length;n<q;n++)u=4*n,c._array[u]=l[n].x,c._array[u+1]=l[n].y,c._array[u+2]=l[n].z,c._array[u+3]=l[n].w;m.uniform4fv(f,c._array)}else if("m3"===n)m.uniformMatrix3fv(f,!1,l.elements);else if("m3v"===n){void 0===c._array&&(c._array=new Float32Array(9*l.length));n=0;for(q=l.length;n<q;n++)l[n].flattenToArrayOffset(c._array,9*n);m.uniformMatrix3fv(f,!1,c._array)}else if("m4"===n)m.uniformMatrix4fv(f,!1,l.elements);else if("m4v"===n){void 0===c._array&&(c._array=new Float32Array(16*l.length));
 n=0;for(q=l.length;n<q;n++)l[n].flattenToArrayOffset(c._array,16*n);m.uniformMatrix4fv(f,!1,c._array)}else if("t"===n){if(u=l,l=B(),m.uniform1i(f,l),u)if(u instanceof THREE.CubeTexture||u.image instanceof Array&&6===u.image.length){if(c=u,f=l,6===c.image.length)if(c.needsUpdate){c.image.__webglTextureCube||(c.addEventListener("dispose",Fb),c.image.__webglTextureCube=m.createTexture(),M.info.memory.textures++);m.activeTexture(m.TEXTURE0+f);m.bindTexture(m.TEXTURE_CUBE_MAP,c.image.__webglTextureCube);
-m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,c.flipY);f=c instanceof THREE.CompressedTexture;l=[];for(n=0;6>n;n++)M.autoScaleCubemaps&&!f?(q=l,u=n,v=c.image[n],x=bc,v.width<=x&&v.height<=x||(A=Math.max(v.width,v.height),w=Math.floor(v.width*x/A),x=Math.floor(v.height*x/A),A=document.createElement("canvas"),A.width=w,A.height=x,A.getContext("2d").drawImage(v,0,0,v.width,v.height,0,0,w,x),v=A),q[u]=v):l[n]=c.image[n];n=l[0];q=THREE.Math.isPowerOfTwo(n.width)&&THREE.Math.isPowerOfTwo(n.height);u=L(c.format);
-v=L(c.type);Q(m.TEXTURE_CUBE_MAP,c,q);for(n=0;6>n;n++)if(f)for(x=l[n].mipmaps,A=0,y=x.length;A<y;A++)w=x[A],c.format!==THREE.RGBAFormat?m.compressedTexImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,A,u,w.width,w.height,0,w.data):m.texImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,A,u,w.width,w.height,0,u,v,w.data);else m.texImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,u,u,v,l[n]);c.generateMipmaps&&q&&m.generateMipmap(m.TEXTURE_CUBE_MAP);c.needsUpdate=!1;if(c.onUpdate)c.onUpdate()}else m.activeTexture(m.TEXTURE0+
-f),m.bindTexture(m.TEXTURE_CUBE_MAP,c.image.__webglTextureCube)}else u instanceof THREE.WebGLRenderTargetCube?(c=u,m.activeTexture(m.TEXTURE0+l),m.bindTexture(m.TEXTURE_CUBE_MAP,c.__webglTexture)):M.setTexture(u,l)}else if("tv"===n){void 0===c._array&&(c._array=[]);n=0;for(q=c.value.length;n<q;n++)c._array[n]=B();m.uniform1iv(f,c._array);n=0;for(q=c.value.length;n<q;n++)u=c.value[n],l=c._array[n],u&&M.setTexture(u,l)}else console.warn("THREE.WebGLRenderer: Unknown uniform type: "+n);(d instanceof
-THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&null!==h.cameraPosition&&(ya.setFromMatrixPosition(a.matrixWorld),m.uniform3f(h.cameraPosition,ya.x,ya.y,ya.z));(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&null!==h.viewMatrix&&m.uniformMatrix4fv(h.viewMatrix,!1,a.matrixWorldInverse.elements)}m.uniformMatrix4fv(h.modelViewMatrix,!1,e._modelViewMatrix.elements);h.normalMatrix&&m.uniformMatrix3fv(h.normalMatrix,
-!1,e._normalMatrix.elements);null!==h.modelMatrix&&m.uniformMatrix4fv(h.modelMatrix,!1,e.matrixWorld.elements);return g}function B(){var a=Ea;a>=mb&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+mb);Ea+=1;return a}function C(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 E(a,b,c,d){a[b]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function H(a){a!==ua&&(m.lineWidth(a),ua=a)}function y(a,b,c){ca!==a&&(a?m.enable(m.POLYGON_OFFSET_FILL):m.disable(m.POLYGON_OFFSET_FILL),
-ca=a);!a||ma===b&&oa===c||(m.polygonOffset(b,c),ma=b,oa=c)}function Q(a,b,c){c?(m.texParameteri(a,m.TEXTURE_WRAP_S,L(b.wrapS)),m.texParameteri(a,m.TEXTURE_WRAP_T,L(b.wrapT)),m.texParameteri(a,m.TEXTURE_MAG_FILTER,L(b.magFilter)),m.texParameteri(a,m.TEXTURE_MIN_FILTER,L(b.minFilter))):(m.texParameteri(a,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(a,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.texParameteri(a,m.TEXTURE_MAG_FILTER,R(b.magFilter)),m.texParameteri(a,m.TEXTURE_MIN_FILTER,R(b.minFilter)));
-db&&b.type!==THREE.FloatType&&(1<b.anisotropy||b.__oldAnisotropy)&&(m.texParameterf(a,db.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,Gb)),b.__oldAnisotropy=b.anisotropy)}function z(a,b){m.bindRenderbuffer(m.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_COMPONENT16,b.width,b.height),m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_STENCIL,b.width,
-b.height),m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_STENCIL_ATTACHMENT,m.RENDERBUFFER,a)):m.renderbufferStorage(m.RENDERBUFFER,m.RGBA4,b.width,b.height)}function R(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?m.NEAREST:m.LINEAR}function L(a){if(a===THREE.RepeatWrapping)return m.REPEAT;if(a===THREE.ClampToEdgeWrapping)return m.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return m.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return m.NEAREST;
-if(a===THREE.NearestMipMapNearestFilter)return m.NEAREST_MIPMAP_NEAREST;if(a===THREE.NearestMipMapLinearFilter)return m.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return m.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return m.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return m.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return m.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return m.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return m.UNSIGNED_SHORT_5_5_5_1;
-if(a===THREE.UnsignedShort565Type)return m.UNSIGNED_SHORT_5_6_5;if(a===THREE.ByteType)return m.BYTE;if(a===THREE.ShortType)return m.SHORT;if(a===THREE.UnsignedShortType)return m.UNSIGNED_SHORT;if(a===THREE.IntType)return m.INT;if(a===THREE.UnsignedIntType)return m.UNSIGNED_INT;if(a===THREE.FloatType)return m.FLOAT;if(a===THREE.AlphaFormat)return m.ALPHA;if(a===THREE.RGBFormat)return m.RGB;if(a===THREE.RGBAFormat)return m.RGBA;if(a===THREE.LuminanceFormat)return m.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return m.LUMINANCE_ALPHA;
-if(a===THREE.AddEquation)return m.FUNC_ADD;if(a===THREE.SubtractEquation)return m.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return m.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return m.ZERO;if(a===THREE.OneFactor)return m.ONE;if(a===THREE.SrcColorFactor)return m.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return m.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return m.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return m.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return m.DST_ALPHA;
-if(a===THREE.OneMinusDstAlphaFactor)return m.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return m.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return m.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return m.SRC_ALPHA_SATURATE;if(void 0!==Qa){if(a===THREE.RGB_S3TC_DXT1_Format)return Qa.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===THREE.RGBA_S3TC_DXT5_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT5_EXT}return 0}
-console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var I=void 0!==a.canvas?a.canvas:document.createElement("canvas"),F=void 0!==a.context?a.context:null,P=void 0!==a.precision?a.precision:"highp",X=void 0!==a.alpha?a.alpha:!1,N=void 0!==a.depth?a.depth:!0,la=void 0!==a.stencil?a.stencil:!0,S=void 0!==a.antialias?a.antialias:!1,W=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,D=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,ha=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:
-!1,fa=new THREE.Color(0),U=0;this.domElement=I;this.context=null;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.autoUpdateObjects=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 M=this,da=[],wa=null,ia=null,xa=-1,Ca=null,Ha=null,Ea=0,ba=-1,La=-1,Pa=-1,Sa=-1,Ta=-1,Ja=-1,ja=-1,za=-1,ca=null,ma=null,oa=null,ua=null,Da=0,Ka=0,Fa=I.width,ea=I.height,va=0,Ia=0,ta=new Uint8Array(16),pb=new Uint8Array(16),Bb=new THREE.Frustum,Pb=new THREE.Matrix4,ac=new THREE.Matrix4,
-ya=new THREE.Vector3,pa=new THREE.Vector3,cb=!0,Qb={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:[]}},m,qb,yb,db,Qa,rb;(function(){try{var a={alpha:X,depth:N,stencil:la,antialias:S,premultipliedAlpha:W,preserveDrawingBuffer:D};m=F||I.getContext("webgl",a)||I.getContext("experimental-webgl",
-a);if(null===m)throw"Error creating WebGL context.";}catch(b){console.error(b)}qb=m.getExtension("OES_texture_float");m.getExtension("OES_texture_float_linear");yb=m.getExtension("OES_standard_derivatives");db=m.getExtension("EXT_texture_filter_anisotropic")||m.getExtension("MOZ_EXT_texture_filter_anisotropic")||m.getExtension("WEBKIT_EXT_texture_filter_anisotropic");Qa=m.getExtension("WEBGL_compressed_texture_s3tc")||m.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||m.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");
-rb=m.getExtension("OES_element_index_uint");null===qb&&console.log("THREE.WebGLRenderer: Float textures not supported.");null===yb&&console.log("THREE.WebGLRenderer: Standard derivatives not supported.");null===db&&console.log("THREE.WebGLRenderer: Anisotropic texture filtering not supported.");null===Qa&&console.log("THREE.WebGLRenderer: S3TC compressed textures not supported.");null===rb&&console.log("THREE.WebGLRenderer: elementindex as unsigned integer not supported.");void 0===m.getShaderPrecisionFormat&&
-(m.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});ha&&m.getExtension("EXT_frag_depth")})();m.clearColor(0,0,0,1);m.clearDepth(1);m.clearStencil(0);m.enable(m.DEPTH_TEST);m.depthFunc(m.LEQUAL);m.frontFace(m.CCW);m.cullFace(m.BACK);m.enable(m.CULL_FACE);m.enable(m.BLEND);m.blendEquation(m.FUNC_ADD);m.blendFunc(m.SRC_ALPHA,m.ONE_MINUS_SRC_ALPHA);m.viewport(Da,Ka,Fa,ea);m.clearColor(fa.r,fa.g,fa.b,U);this.context=m;var mb=m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS),cc=m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS);
-m.getParameter(m.MAX_TEXTURE_SIZE);var bc=m.getParameter(m.MAX_CUBE_MAP_TEXTURE_SIZE),Gb=db?m.getParameter(db.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,Hb=0<cc,Eb=Hb&&qb;Qa&&m.getParameter(m.COMPRESSED_TEXTURE_FORMATS);var dc=m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.HIGH_FLOAT),ec=m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.MEDIUM_FLOAT);m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.LOW_FLOAT);var qc=m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,m.HIGH_FLOAT),rc=m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,
-m.MEDIUM_FLOAT);m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,m.LOW_FLOAT);var sc=0<dc.precision&&0<qc.precision,Ib=0<ec.precision&&0<rc.precision;"highp"!==P||sc||(Ib?(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||Ib||(P="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));this.getContext=function(){return m};this.supportsVertexTextures=
-function(){return Hb};this.supportsFloatTextures=function(){return qb};this.supportsStandardDerivatives=function(){return yb};this.supportsCompressedTextureS3TC=function(){return Qa};this.getMaxAnisotropy=function(){return Gb};this.getPrecision=function(){return P};this.setSize=function(a,b,c){I.width=a*this.devicePixelRatio;I.height=b*this.devicePixelRatio;!1!==c&&(I.style.width=a+"px",I.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){Da=a*this.devicePixelRatio;
-Ka=b*this.devicePixelRatio;Fa=c*this.devicePixelRatio;ea=d*this.devicePixelRatio;m.viewport(Da,Ka,Fa,ea)};this.setScissor=function(a,b,c,d){m.scissor(a*this.devicePixelRatio,b*this.devicePixelRatio,c*this.devicePixelRatio,d*this.devicePixelRatio)};this.enableScissorTest=function(a){a?m.enable(m.SCISSOR_TEST):m.disable(m.SCISSOR_TEST)};this.setClearColor=function(a,b){fa.set(a);U=void 0!==b?b:1;m.clearColor(fa.r,fa.g,fa.b,U)};this.setClearColorHex=function(a,b){console.warn("THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.");
+m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,c.flipY);f=c instanceof THREE.CompressedTexture;l=[];for(n=0;6>n;n++)q=l,u=n,M.autoScaleCubemaps&&!f?(v=c.image[n],x=bc,v.width<=x&&v.height<=x||(A=Math.max(v.width,v.height),w=Math.floor(v.width*x/A),x=Math.floor(v.height*x/A),A=document.createElement("canvas"),A.width=w,A.height=x,A.getContext("2d").drawImage(v,0,0,v.width,v.height,0,0,w,x),v=A)):v=c.image[n],q[u]=v;n=l[0];q=THREE.Math.isPowerOfTwo(n.width)&&THREE.Math.isPowerOfTwo(n.height);u=L(c.format);v=L(c.type);
+Q(m.TEXTURE_CUBE_MAP,c,q);for(n=0;6>n;n++)if(f)for(x=l[n].mipmaps,A=0,y=x.length;A<y;A++)w=x[A],c.format!==THREE.RGBAFormat?m.compressedTexImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,A,u,w.width,w.height,0,w.data):m.texImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,A,u,w.width,w.height,0,u,v,w.data);else m.texImage2D(m.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,u,u,v,l[n]);c.generateMipmaps&&q&&m.generateMipmap(m.TEXTURE_CUBE_MAP);c.needsUpdate=!1;if(c.onUpdate)c.onUpdate()}else m.activeTexture(m.TEXTURE0+f),m.bindTexture(m.TEXTURE_CUBE_MAP,
+c.image.__webglTextureCube)}else u instanceof THREE.WebGLRenderTargetCube?(c=u,m.activeTexture(m.TEXTURE0+l),m.bindTexture(m.TEXTURE_CUBE_MAP,c.__webglTexture)):M.setTexture(u,l)}else if("tv"===n){void 0===c._array&&(c._array=[]);n=0;for(q=c.value.length;n<q;n++)c._array[n]=B();m.uniform1iv(f,c._array);n=0;for(q=c.value.length;n<q;n++)u=c.value[n],l=c._array[n],u&&M.setTexture(u,l)}else console.warn("THREE.WebGLRenderer: Unknown uniform type: "+n);(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||
+d.envMap)&&null!==h.cameraPosition&&(ya.setFromMatrixPosition(a.matrixWorld),m.uniform3f(h.cameraPosition,ya.x,ya.y,ya.z));(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&null!==h.viewMatrix&&m.uniformMatrix4fv(h.viewMatrix,!1,a.matrixWorldInverse.elements)}m.uniformMatrix4fv(h.modelViewMatrix,!1,e._modelViewMatrix.elements);h.normalMatrix&&m.uniformMatrix3fv(h.normalMatrix,!1,e._normalMatrix.elements);null!==h.modelMatrix&&
+m.uniformMatrix4fv(h.modelMatrix,!1,e.matrixWorld.elements);return g}function B(){var a=Ea;a>=mb&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+mb);Ea+=1;return a}function C(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 E(a,b,c,d){a[b]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function H(a){a!==ua&&(m.lineWidth(a),ua=a)}function y(a,b,c){ca!==a&&(a?m.enable(m.POLYGON_OFFSET_FILL):m.disable(m.POLYGON_OFFSET_FILL),ca=a);!a||ma===b&&oa===c||
+(m.polygonOffset(b,c),ma=b,oa=c)}function Q(a,b,c){c?(m.texParameteri(a,m.TEXTURE_WRAP_S,L(b.wrapS)),m.texParameteri(a,m.TEXTURE_WRAP_T,L(b.wrapT)),m.texParameteri(a,m.TEXTURE_MAG_FILTER,L(b.magFilter)),m.texParameteri(a,m.TEXTURE_MIN_FILTER,L(b.minFilter))):(m.texParameteri(a,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(a,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.texParameteri(a,m.TEXTURE_MAG_FILTER,R(b.magFilter)),m.texParameteri(a,m.TEXTURE_MIN_FILTER,R(b.minFilter)));db&&b.type!==THREE.FloatType&&
+(1<b.anisotropy||b.__oldAnisotropy)&&(m.texParameterf(a,db.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,Gb)),b.__oldAnisotropy=b.anisotropy)}function z(a,b){m.bindRenderbuffer(m.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_COMPONENT16,b.width,b.height),m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(m.renderbufferStorage(m.RENDERBUFFER,m.DEPTH_STENCIL,b.width,b.height),m.framebufferRenderbuffer(m.FRAMEBUFFER,
+m.DEPTH_STENCIL_ATTACHMENT,m.RENDERBUFFER,a)):m.renderbufferStorage(m.RENDERBUFFER,m.RGBA4,b.width,b.height)}function R(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?m.NEAREST:m.LINEAR}function L(a){if(a===THREE.RepeatWrapping)return m.REPEAT;if(a===THREE.ClampToEdgeWrapping)return m.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return m.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return m.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return m.NEAREST_MIPMAP_NEAREST;
+if(a===THREE.NearestMipMapLinearFilter)return m.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return m.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return m.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return m.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return m.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return m.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return m.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return m.UNSIGNED_SHORT_5_6_5;
+if(a===THREE.ByteType)return m.BYTE;if(a===THREE.ShortType)return m.SHORT;if(a===THREE.UnsignedShortType)return m.UNSIGNED_SHORT;if(a===THREE.IntType)return m.INT;if(a===THREE.UnsignedIntType)return m.UNSIGNED_INT;if(a===THREE.FloatType)return m.FLOAT;if(a===THREE.AlphaFormat)return m.ALPHA;if(a===THREE.RGBFormat)return m.RGB;if(a===THREE.RGBAFormat)return m.RGBA;if(a===THREE.LuminanceFormat)return m.LUMINANCE;if(a===THREE.LuminanceAlphaFormat)return m.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return m.FUNC_ADD;
+if(a===THREE.SubtractEquation)return m.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return m.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return m.ZERO;if(a===THREE.OneFactor)return m.ONE;if(a===THREE.SrcColorFactor)return m.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return m.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return m.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return m.ONE_MINUS_SRC_ALPHA;if(a===THREE.DstAlphaFactor)return m.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return m.ONE_MINUS_DST_ALPHA;
+if(a===THREE.DstColorFactor)return m.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return m.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return m.SRC_ALPHA_SATURATE;if(void 0!==Qa){if(a===THREE.RGB_S3TC_DXT1_Format)return Qa.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===THREE.RGBA_S3TC_DXT5_Format)return Qa.COMPRESSED_RGBA_S3TC_DXT5_EXT}return 0}console.log("THREE.WebGLRenderer",
+THREE.REVISION);a=a||{};var I=void 0!==a.canvas?a.canvas:document.createElement("canvas"),F=void 0!==a.context?a.context:null,P=void 0!==a.precision?a.precision:"highp",X=void 0!==a.alpha?a.alpha:!1,N=void 0!==a.depth?a.depth:!0,la=void 0!==a.stencil?a.stencil:!0,S=void 0!==a.antialias?a.antialias:!1,W=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,D=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,ha=void 0!==a.logarithmicDepthBuffer?a.logarithmicDepthBuffer:!1,fa=new THREE.Color(0),
+U=0;this.domElement=I;this.context=null;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==self.devicePixelRatio?self.devicePixelRatio:1;this.autoUpdateObjects=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 M=this,da=[],wa=null,ia=null,xa=-1,Ca=null,Ha=null,Ea=0,ba=-1,La=-1,Pa=-1,Sa=-1,Ta=-1,Ja=-1,ja=-1,za=-1,ca=null,ma=null,oa=null,ua=null,Da=0,Ka=0,Fa=I.width,ea=I.height,va=0,Ia=0,ta=new Uint8Array(16),pb=new Uint8Array(16),Bb=new THREE.Frustum,Pb=new THREE.Matrix4,ac=new THREE.Matrix4,ya=new THREE.Vector3,
+pa=new THREE.Vector3,cb=!0,Qb={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:[]}},m,qb,yb,db,Qa,rb;(function(){try{var a={alpha:X,depth:N,stencil:la,antialias:S,premultipliedAlpha:W,preserveDrawingBuffer:D};m=F||I.getContext("webgl",a)||I.getContext("experimental-webgl",a);if(null===m)throw"Error creating WebGL context.";
+}catch(b){console.error(b)}qb=m.getExtension("OES_texture_float");m.getExtension("OES_texture_float_linear");yb=m.getExtension("OES_standard_derivatives");db=m.getExtension("EXT_texture_filter_anisotropic")||m.getExtension("MOZ_EXT_texture_filter_anisotropic")||m.getExtension("WEBKIT_EXT_texture_filter_anisotropic");Qa=m.getExtension("WEBGL_compressed_texture_s3tc")||m.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||m.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");rb=m.getExtension("OES_element_index_uint");
+null===qb&&console.log("THREE.WebGLRenderer: Float textures not supported.");null===yb&&console.log("THREE.WebGLRenderer: Standard derivatives not supported.");null===db&&console.log("THREE.WebGLRenderer: Anisotropic texture filtering not supported.");null===Qa&&console.log("THREE.WebGLRenderer: S3TC compressed textures not supported.");null===rb&&console.log("THREE.WebGLRenderer: elementindex as unsigned integer not supported.");void 0===m.getShaderPrecisionFormat&&(m.getShaderPrecisionFormat=function(){return{rangeMin:1,
+rangeMax:1,precision:1}});ha&&m.getExtension("EXT_frag_depth")})();m.clearColor(0,0,0,1);m.clearDepth(1);m.clearStencil(0);m.enable(m.DEPTH_TEST);m.depthFunc(m.LEQUAL);m.frontFace(m.CCW);m.cullFace(m.BACK);m.enable(m.CULL_FACE);m.enable(m.BLEND);m.blendEquation(m.FUNC_ADD);m.blendFunc(m.SRC_ALPHA,m.ONE_MINUS_SRC_ALPHA);m.viewport(Da,Ka,Fa,ea);m.clearColor(fa.r,fa.g,fa.b,U);this.context=m;var mb=m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS),cc=m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS);m.getParameter(m.MAX_TEXTURE_SIZE);
+var bc=m.getParameter(m.MAX_CUBE_MAP_TEXTURE_SIZE),Gb=db?m.getParameter(db.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,Hb=0<cc,Eb=Hb&&qb;Qa&&m.getParameter(m.COMPRESSED_TEXTURE_FORMATS);var dc=m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.HIGH_FLOAT),ec=m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.MEDIUM_FLOAT);m.getShaderPrecisionFormat(m.VERTEX_SHADER,m.LOW_FLOAT);var qc=m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,m.HIGH_FLOAT),rc=m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,m.MEDIUM_FLOAT);m.getShaderPrecisionFormat(m.FRAGMENT_SHADER,
+m.LOW_FLOAT);var sc=0<dc.precision&&0<qc.precision,Ib=0<ec.precision&&0<rc.precision;"highp"!==P||sc||(Ib?(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||Ib||(P="lowp",console.warn("THREE.WebGLRenderer: mediump not supported, using lowp."));this.getContext=function(){return m};this.supportsVertexTextures=function(){return Hb};this.supportsFloatTextures=
+function(){return qb};this.supportsStandardDerivatives=function(){return yb};this.supportsCompressedTextureS3TC=function(){return Qa};this.getMaxAnisotropy=function(){return Gb};this.getPrecision=function(){return P};this.setSize=function(a,b,c){I.width=a*this.devicePixelRatio;I.height=b*this.devicePixelRatio;!1!==c&&(I.style.width=a+"px",I.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){Da=a*this.devicePixelRatio;Ka=b*this.devicePixelRatio;Fa=c*this.devicePixelRatio;
+ea=d*this.devicePixelRatio;m.viewport(Da,Ka,Fa,ea)};this.setScissor=function(a,b,c,d){m.scissor(a*this.devicePixelRatio,b*this.devicePixelRatio,c*this.devicePixelRatio,d*this.devicePixelRatio)};this.enableScissorTest=function(a){a?m.enable(m.SCISSOR_TEST):m.disable(m.SCISSOR_TEST)};this.setClearColor=function(a,b){fa.set(a);U=void 0!==b?b:1;m.clearColor(fa.r,fa.g,fa.b,U)};this.setClearColorHex=function(a,b){console.warn("THREE.WebGLRenderer: .setClearColorHex() is being removed. Use .setClearColor() instead.");
 this.setClearColor(a,b)};this.getClearColor=function(){return fa};this.getClearAlpha=function(){return U};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=m.COLOR_BUFFER_BIT;if(void 0===b||b)d|=m.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=m.STENCIL_BUFFER_BIT;m.clear(d)};this.clearColor=function(){m.clear(m.COLOR_BUFFER_BIT)};this.clearDepth=function(){m.clear(m.DEPTH_BUFFER_BIT)};this.clearStencil=function(){m.clear(m.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);this.renderPluginsPost.push(a)};this.addPrePlugin=function(a){a.init(this);this.renderPluginsPre.push(a)};this.updateShadowMap=function(a,b){wa=null;xa=Ca=za=ja=Pa=-1;cb=!0;La=ba=-1;this.shadowMapPlugin.update(a,b)};var Cb=function(a){a=a.target;a.removeEventListener("dispose",Cb);a.__webglInit=void 0;if(a instanceof THREE.BufferGeometry){var b=a.attributes,c;for(c in b)void 0!==b[c].buffer&&m.deleteBuffer(b[c].buffer);M.info.memory.geometries--}else if(void 0!==
 a.geometryGroups)for(b in a.geometryGroups){c=a.geometryGroups[b];if(void 0!==c.numMorphTargets)for(var d=0,e=c.numMorphTargets;d<e;d++)m.deleteBuffer(c.__webglMorphTargetsBuffers[d]);if(void 0!==c.numMorphNormals)for(d=0,e=c.numMorphNormals;d<e;d++)m.deleteBuffer(c.__webglMorphNormalsBuffers[d]);Jb(c)}else Jb(a)},Fb=function(a){a=a.target;a.removeEventListener("dispose",Fb);a.image&&a.image.__webglTextureCube?m.deleteTexture(a.image.__webglTextureCube):a.__webglInit&&(a.__webglInit=!1,m.deleteTexture(a.__webglTexture));
@@ -656,9 +656,9 @@ THREE.VertexNormalsHelper.prototype.update=function(a){var b=new THREE.Vector3;r
 b.add(d[h]);h+=1;d[h].copy(b);h+=1}this.geometry.verticesNeedUpdate=!0;return this}}();THREE.VertexTangentsHelper=function(a,b,c,d){this.object=a;this.size=void 0!==b?b:1;b=void 0!==c?c:255;d=void 0!==d?d:1;c=new THREE.Geometry;a=a.geometry.faces;for(var e=0,f=a.length;e<f;e++)for(var g=0,h=a[e].vertexTangents.length;g<h;g++)c.vertices.push(new THREE.Vector3),c.vertices.push(new THREE.Vector3);THREE.Line.call(this,c,new THREE.LineBasicMaterial({color:b,linewidth:d}),THREE.LinePieces);this.matrixAutoUpdate=!1;this.update()};THREE.VertexTangentsHelper.prototype=Object.create(THREE.Line.prototype);
 THREE.VertexTangentsHelper.prototype.update=function(a){var b=new THREE.Vector3;return function(a){a=["a","b","c","d"];this.object.updateMatrixWorld(!0);for(var d=this.geometry.vertices,e=this.object.geometry.vertices,f=this.object.geometry.faces,g=this.object.matrixWorld,h=0,k=0,l=f.length;k<l;k++)for(var p=f[k],q=0,r=p.vertexTangents.length;q<r;q++){var t=p.vertexTangents[q];d[h].copy(e[p[a[q]]]).applyMatrix4(g);b.copy(t).transformDirection(g).multiplyScalar(this.size);b.add(d[h]);h+=1;d[h].copy(b);
 h+=1}this.geometry.verticesNeedUpdate=!0;return this}}();THREE.WireframeHelper=function(a,b){var c=void 0!==b?b:16777215,d=[0,0],e={},f=function(a,b){return a-b},g=["a","b","c"],h=new THREE.BufferGeometry;if(a.geometry instanceof THREE.Geometry){for(var k=a.geometry.vertices,l=a.geometry.faces,p=0,q=new Uint32Array(6*l.length),r=0,t=l.length;r<t;r++)for(var s=l[r],n=0;3>n;n++){d[0]=s[g[n]];d[1]=s[g[(n+1)%3]];d.sort(f);var v=d.toString();void 0===e[v]&&(q[2*p]=d[0],q[2*p+1]=d[1],e[v]=!0,p++)}d=new Float32Array(6*p);r=0;for(t=p;r<t;r++)for(n=0;2>n;n++)p=
-k[q[2*r+n]],g=6*r+3*n,d[g+0]=p.x,d[g+1]=p.y,d[g+2]=p.z;h.addAttribute("position",new THREE.BufferAttribute(d,3))}else if(a.geometry instanceof THREE.BufferGeometry&&void 0!==a.geometry.attributes.index){for(var k=a.geometry.attributes.position.array,t=a.geometry.attributes.index.array,l=a.geometry.offsets,p=0,q=new Uint32Array(2*t.length),s=0,w=l.length;s<w;++s)for(var n=l[s].start,v=l[s].count,g=l[s].index,r=n,u=n+v;r<u;r+=3)for(n=0;3>n;n++)d[0]=g+t[r+n],d[1]=g+t[r+(n+1)%3],d.sort(f),v=d.toString(),
-void 0===e[v]&&(q[2*p]=d[0],q[2*p+1]=d[1],e[v]=!0,p++);d=new Float32Array(6*p);r=0;for(t=p;r<t;r++)for(n=0;2>n;n++)g=6*r+3*n,p=3*q[2*r+n],d[g+0]=k[p],d[g+1]=k[p+1],d[g+2]=k[p+2];h.addAttribute("position",new THREE.BufferAttribute(d,3))}else if(a.geometry instanceof THREE.BufferGeometry){k=a.geometry.attributes.position.array;p=k.length/3;q=p/3;d=new Float32Array(6*p);r=0;for(t=q;r<t;r++)for(n=0;3>n;n++)g=18*r+6*n,q=9*r+3*n,d[g+0]=k[q],d[g+1]=k[q+1],d[g+2]=k[q+2],p=9*r+(n+1)%3*3,d[g+3]=k[p],d[g+4]=
-k[p+1],d[g+5]=k[p+2];h.addAttribute("position",new THREE.BufferAttribute(d,3))}THREE.Line.call(this,h,new THREE.LineBasicMaterial({color:c}),THREE.LinePieces);this.matrixAutoUpdate=!1;this.matrixWorld=a.matrixWorld};THREE.WireframeHelper.prototype=Object.create(THREE.Line.prototype);THREE.ImmediateRenderObject=function(){THREE.Object3D.call(this);this.render=function(a){}};THREE.ImmediateRenderObject.prototype=Object.create(THREE.Object3D.prototype);THREE.LensFlare=function(a,b,c,d,e){THREE.Object3D.call(this);this.lensFlares=[];this.positionScreen=new THREE.Vector3;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)};THREE.LensFlare.prototype=Object.create(THREE.Object3D.prototype);
+k[q[2*r+n]],g=6*r+3*n,d[g+0]=p.x,d[g+1]=p.y,d[g+2]=p.z;h.addAttribute("position",new THREE.BufferAttribute(d,3))}else if(a.geometry instanceof THREE.BufferGeometry){if(void 0!==a.geometry.attributes.index){for(var k=a.geometry.attributes.position.array,t=a.geometry.attributes.index.array,l=a.geometry.offsets,p=0,q=new Uint32Array(2*t.length),s=0,w=l.length;s<w;++s)for(var n=l[s].start,v=l[s].count,g=l[s].index,r=n,u=n+v;r<u;r+=3)for(n=0;3>n;n++)d[0]=g+t[r+n],d[1]=g+t[r+(n+1)%3],d.sort(f),v=d.toString(),
+void 0===e[v]&&(q[2*p]=d[0],q[2*p+1]=d[1],e[v]=!0,p++);d=new Float32Array(6*p);r=0;for(t=p;r<t;r++)for(n=0;2>n;n++)g=6*r+3*n,p=3*q[2*r+n],d[g+0]=k[p],d[g+1]=k[p+1],d[g+2]=k[p+2]}else for(k=a.geometry.attributes.position.array,p=k.length/3,q=p/3,d=new Float32Array(6*p),r=0,t=q;r<t;r++)for(n=0;3>n;n++)g=18*r+6*n,q=9*r+3*n,d[g+0]=k[q],d[g+1]=k[q+1],d[g+2]=k[q+2],p=9*r+(n+1)%3*3,d[g+3]=k[p],d[g+4]=k[p+1],d[g+5]=k[p+2];h.addAttribute("position",new THREE.BufferAttribute(d,3))}THREE.Line.call(this,h,new THREE.LineBasicMaterial({color:c}),
+THREE.LinePieces);this.matrixAutoUpdate=!1;this.matrixWorld=a.matrixWorld};THREE.WireframeHelper.prototype=Object.create(THREE.Line.prototype);THREE.ImmediateRenderObject=function(){THREE.Object3D.call(this);this.render=function(a){}};THREE.ImmediateRenderObject.prototype=Object.create(THREE.Object3D.prototype);THREE.LensFlare=function(a,b,c,d,e){THREE.Object3D.call(this);this.lensFlares=[];this.positionScreen=new THREE.Vector3;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)};THREE.LensFlare.prototype=Object.create(THREE.Object3D.prototype);
 THREE.LensFlare.prototype.add=function(a,b,c,d,e,f){void 0===b&&(b=-1);void 0===c&&(c=0);void 0===f&&(f=1);void 0===e&&(e=new THREE.Color(16777215));void 0===d&&(d=THREE.NormalBlending);c=Math.min(c,Math.max(0,c));this.lensFlares.push({texture:a,size:b,distance:c,x:0,y:0,z:0,scale:1,rotation:1,opacity:f,color:e,blending:d})};
 THREE.LensFlare.prototype.updateLensFlares=function(){var a,b=this.lensFlares.length,c,d=2*-this.positionScreen.x,e=2*-this.positionScreen.y;for(a=0;a<b;a++)c=this.lensFlares[a],c.x=this.positionScreen.x+d*c.distance,c.y=this.positionScreen.y+e*c.distance,c.wantedRotation=c.x*Math.PI*0.25,c.rotation+=0.25*(c.wantedRotation-c.rotation)};THREE.MorphBlendMesh=function(a,b){THREE.Mesh.call(this,a,b);this.animationsMap={};this.animationsList=[];var c=this.geometry.morphTargets.length;this.createAnimation("__default",0,c-1,c/1);this.setAnimationWeight("__default",1)};THREE.MorphBlendMesh.prototype=Object.create(THREE.Mesh.prototype);
 THREE.MorphBlendMesh.prototype.createAnimation=function(a,b,c,d){b={startFrame:b,endFrame:c,length:c-b+1,fps:d,duration:(c-b)/d,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[a]=b;this.animationsList.push(b)};