Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
1a1311c24a
3 changed files with 212 additions and 202 deletions
  1. 48 43
      build/three.js
  2. 116 116
      build/three.min.js
  3. 48 43
      build/three.module.js

+ 48 - 43
build/three.js

@@ -29404,6 +29404,7 @@
 
 						if ( onError ) onError( error );
 
+						scope.manager.itemEnd( url );
 						scope.manager.itemError( url );
 
 					}, 0 );
@@ -29442,6 +29443,7 @@
 
 						if ( onError ) onError( event );
 
+						scope.manager.itemEnd( url );
 						scope.manager.itemError( url );
 
 					}
@@ -29462,6 +29464,7 @@
 
 					if ( onError ) onError( event );
 
+					scope.manager.itemEnd( url );
 					scope.manager.itemError( url );
 
 				}, false );
@@ -29808,6 +29811,7 @@
 
 				if ( onError ) onError( event );
 
+				scope.manager.itemEnd( url );
 				scope.manager.itemError( url );
 
 			}, false );
@@ -32334,18 +32338,6 @@
 
 			var index = json.data.index;
 
-			var TYPED_ARRAYS = {
-				'Int8Array': Int8Array,
-				'Uint8Array': Uint8Array,
-				'Uint8ClampedArray': Uint8ClampedArray,
-				'Int16Array': Int16Array,
-				'Uint16Array': Uint16Array,
-				'Int32Array': Int32Array,
-				'Uint32Array': Uint32Array,
-				'Float32Array': Float32Array,
-				'Float64Array': Float64Array
-			};
-
 			if ( index !== undefined ) {
 
 				var typedArray = new TYPED_ARRAYS[ index.type ]( index.array );
@@ -32400,6 +32392,18 @@
 
 	} );
 
+	var TYPED_ARRAYS = {
+		Int8Array: Int8Array,
+		Uint8Array: Uint8Array,
+		Uint8ClampedArray: Uint8ClampedArray,
+		Int16Array: Int16Array,
+		Uint16Array: Uint16Array,
+		Int32Array: Int32Array,
+		Uint32Array: Uint32Array,
+		Float32Array: Float32Array,
+		Float64Array: Float64Array
+	};
+
 	/**
 	 * @author alteredq / http://alteredqualia.com/
 	 */
@@ -33646,6 +33650,7 @@
 
 				}, undefined, function () {
 
+					scope.manager.itemEnd( url );
 					scope.manager.itemError( url );
 
 				} );
@@ -33676,32 +33681,6 @@
 
 		parseTextures: function ( json, images ) {
 
-			var TextureMapping = {
-				UVMapping: UVMapping,
-				CubeReflectionMapping: CubeReflectionMapping,
-				CubeRefractionMapping: CubeRefractionMapping,
-				EquirectangularReflectionMapping: EquirectangularReflectionMapping,
-				EquirectangularRefractionMapping: EquirectangularRefractionMapping,
-				SphericalReflectionMapping: SphericalReflectionMapping,
-				CubeUVReflectionMapping: CubeUVReflectionMapping,
-				CubeUVRefractionMapping: CubeUVRefractionMapping
-			};
-
-			var TextureWrapping = {
-				RepeatWrapping: RepeatWrapping,
-				ClampToEdgeWrapping: ClampToEdgeWrapping,
-				MirroredRepeatWrapping: MirroredRepeatWrapping
-			};
-
-			var TextureFilter = {
-				NearestFilter: NearestFilter,
-				NearestMipMapNearestFilter: NearestMipMapNearestFilter,
-				NearestMipMapLinearFilter: NearestMipMapLinearFilter,
-				LinearFilter: LinearFilter,
-				LinearMipMapNearestFilter: LinearMipMapNearestFilter,
-				LinearMipMapLinearFilter: LinearMipMapLinearFilter
-			};
-
 			function parseConstant( value, type ) {
 
 				if ( typeof( value ) === 'number' ) return value;
@@ -33739,19 +33718,19 @@
 
 					if ( data.name !== undefined ) texture.name = data.name;
 
-					if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TextureMapping );
+					if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );
 
 					if ( data.offset !== undefined ) texture.offset.fromArray( data.offset );
 					if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );
 					if ( data.wrap !== undefined ) {
 
-						texture.wrapS = parseConstant( data.wrap[ 0 ], TextureWrapping );
-						texture.wrapT = parseConstant( data.wrap[ 1 ], TextureWrapping );
+						texture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );
+						texture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );
 
 					}
 
-					if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TextureFilter );
-					if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TextureFilter );
+					if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );
+					if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );
 					if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;
 
 					if ( data.flipY !== undefined ) texture.flipY = data.flipY;
@@ -34047,6 +34026,32 @@
 
 	} );
 
+	var TEXTURE_MAPPING = {
+		UVMapping: UVMapping,
+		CubeReflectionMapping: CubeReflectionMapping,
+		CubeRefractionMapping: CubeRefractionMapping,
+		EquirectangularReflectionMapping: EquirectangularReflectionMapping,
+		EquirectangularRefractionMapping: EquirectangularRefractionMapping,
+		SphericalReflectionMapping: SphericalReflectionMapping,
+		CubeUVReflectionMapping: CubeUVReflectionMapping,
+		CubeUVRefractionMapping: CubeUVRefractionMapping
+	};
+
+	var TEXTURE_WRAPPING = {
+		RepeatWrapping: RepeatWrapping,
+		ClampToEdgeWrapping: ClampToEdgeWrapping,
+		MirroredRepeatWrapping: MirroredRepeatWrapping
+	};
+
+	var TEXTURE_FILTER = {
+		NearestFilter: NearestFilter,
+		NearestMipMapNearestFilter: NearestMipMapNearestFilter,
+		NearestMipMapLinearFilter: NearestMipMapLinearFilter,
+		LinearFilter: LinearFilter,
+		LinearMipMapNearestFilter: LinearMipMapNearestFilter,
+		LinearMipMapLinearFilter: LinearMipMapLinearFilter
+	};
+
 	/**
 	 * @author zz85 / http://www.lab4games.net/zz85/blog
 	 *

+ 116 - 116
build/three.min.js

@@ -1,16 +1,16 @@
 // threejs.org/license
-(function(k,ra){"object"===typeof exports&&"undefined"!==typeof module?ra(exports):"function"===typeof define&&define.amd?define(["exports"],ra):ra(k.THREE=k.THREE||{})})(this,function(k){function ra(){}function D(a,b){this.x=a||0;this.y=b||0}function ba(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:bf++});this.uuid=Y.generateUUID();this.name="";this.image=void 0!==a?a:ba.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:ba.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=
+(function(k,ra){"object"===typeof exports&&"undefined"!==typeof module?ra(exports):"function"===typeof define&&define.amd?define(["exports"],ra):ra(k.THREE=k.THREE||{})})(this,function(k){function ra(){}function D(a,b){this.x=a||0;this.y=b||0}function ba(a,b,c,d,e,f,g,h,l,m){Object.defineProperty(this,"id",{value:ef++});this.uuid=Y.generateUUID();this.name="";this.image=void 0!==a?a:ba.DEFAULT_IMAGE;this.mipmaps=[];this.mapping=void 0!==b?b:ba.DEFAULT_MAPPING;this.wrapS=void 0!==c?c:1001;this.wrapT=
 void 0!==d?d:1001;this.magFilter=void 0!==e?e:1006;this.minFilter=void 0!==f?f:1008;this.anisotropy=void 0!==l?l:1;this.format=void 0!==g?g:1023;this.type=void 0!==h?h:1009;this.offset=new D(0,0);this.repeat=new D(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==m?m:3E3;this.version=0;this.onUpdate=null}function ha(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}function Ab(a,b,c){this.uuid=Y.generateUUID();this.width=
 a;this.height=b;this.scissor=new ha(0,0,a,b);this.scissorTest=!1;this.viewport=new ha(0,0,a,b);c=c||{};void 0===c.minFilter&&(c.minFilter=1006);this.texture=new ba(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy,c.encoding);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.depthTexture=void 0!==c.depthTexture?c.depthTexture:null}function Bb(a,b,c){Ab.call(this,a,b,c);this.activeMipMapLevel=
 this.activeCubeFace=0}function oa(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._w=void 0!==d?d:1}function p(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}function L(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function cb(a,b,c,d,e,f,g,h,l,m,u,q){ba.call(this,null,f,g,h,l,m,d,e,u,q);this.image={data:a,width:b,height:c};this.magFilter=void 0!==l?l:1003;this.minFilter=void 0!==
 m?m:1003;this.flipY=this.generateMipmaps=!1;this.unpackAlignment=1}function Xa(a,b,c,d,e,f,g,h,l,m){a=void 0!==a?a:[];ba.call(this,a,void 0!==b?b:301,c,d,e,f,g,h,l,m);this.flipY=!1}function Cb(a,b,c){var d=a[0];if(0>=d||0<d)return a;var e=b*c,f=ve[e];void 0===f&&(f=new Float32Array(e),ve[e]=f);if(0!==b)for(d.toArray(f,0),d=1,e=0;d!==b;++d)e+=c,a[d].toArray(f,e);return f}function we(a,b){var c=xe[b];void 0===c&&(c=new Int32Array(b),xe[b]=c);for(var d=0;d!==b;++d)c[d]=a.allocTextureUnit();return c}
-function cf(a,b){a.uniform1f(this.addr,b)}function df(a,b){a.uniform1i(this.addr,b)}function ef(a,b){void 0===b.x?a.uniform2fv(this.addr,b):a.uniform2f(this.addr,b.x,b.y)}function ff(a,b){void 0!==b.x?a.uniform3f(this.addr,b.x,b.y,b.z):void 0!==b.r?a.uniform3f(this.addr,b.r,b.g,b.b):a.uniform3fv(this.addr,b)}function gf(a,b){void 0===b.x?a.uniform4fv(this.addr,b):a.uniform4f(this.addr,b.x,b.y,b.z,b.w)}function hf(a,b){a.uniformMatrix2fv(this.addr,!1,b.elements||b)}function jf(a,b){void 0===b.elements?
-a.uniformMatrix3fv(this.addr,!1,b):(ye.set(b.elements),a.uniformMatrix3fv(this.addr,!1,ye))}function kf(a,b){void 0===b.elements?a.uniformMatrix4fv(this.addr,!1,b):(ze.set(b.elements),a.uniformMatrix4fv(this.addr,!1,ze))}function lf(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTexture2D(b||Ae,d)}function mf(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTextureCube(b||Be,d)}function Ce(a,b){a.uniform2iv(this.addr,b)}function De(a,b){a.uniform3iv(this.addr,b)}function Ee(a,
-b){a.uniform4iv(this.addr,b)}function nf(a){switch(a){case 5126:return cf;case 35664:return ef;case 35665:return ff;case 35666:return gf;case 35674:return hf;case 35675:return jf;case 35676:return kf;case 35678:return lf;case 35680:return mf;case 5124:case 35670:return df;case 35667:case 35671:return Ce;case 35668:case 35672:return De;case 35669:case 35673:return Ee}}function of(a,b){a.uniform1fv(this.addr,b)}function pf(a,b){a.uniform1iv(this.addr,b)}function qf(a,b){a.uniform2fv(this.addr,Cb(b,
-this.size,2))}function rf(a,b){a.uniform3fv(this.addr,Cb(b,this.size,3))}function sf(a,b){a.uniform4fv(this.addr,Cb(b,this.size,4))}function tf(a,b){a.uniformMatrix2fv(this.addr,!1,Cb(b,this.size,4))}function uf(a,b){a.uniformMatrix3fv(this.addr,!1,Cb(b,this.size,9))}function vf(a,b){a.uniformMatrix4fv(this.addr,!1,Cb(b,this.size,16))}function wf(a,b,c){var d=b.length,e=we(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.setTexture2D(b[a]||Ae,e[a])}function xf(a,b,c){var d=b.length,e=we(c,d);a.uniform1iv(this.addr,
-e);for(a=0;a!==d;++a)c.setTextureCube(b[a]||Be,e[a])}function yf(a){switch(a){case 5126:return of;case 35664:return qf;case 35665:return rf;case 35666:return sf;case 35674:return tf;case 35675:return uf;case 35676:return vf;case 35678:return wf;case 35680:return xf;case 5124:case 35670:return pf;case 35667:case 35671:return Ce;case 35668:case 35672:return De;case 35669:case 35673:return Ee}}function zf(a,b,c){this.id=a;this.addr=c;this.setValue=nf(b.type)}function Af(a,b,c){this.id=a;this.addr=c;
-this.size=b.size;this.setValue=yf(b.type)}function Fe(a){this.id=a;this.seq=[];this.map={}}function db(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(var d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,h=e.name,l=h.length;for(Ld.lastIndex=0;;){var m=Ld.exec(h),u=Ld.lastIndex,q=m[1],n=m[3];"]"===m[2]&&(q|=0);if(void 0===n||"["===n&&u+2===l){h=g;e=void 0===n?new zf(q,e,f):new Af(q,e,f);h.seq.push(e);h.map[e.id]=e;break}else n=
-g.map[q],void 0===n&&(n=new Fe(q),q=g,g=n,q.seq.push(g),q.map[g.id]=g),g=n}}}function K(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function ed(a,b){this.min=void 0!==a?a:new D(Infinity,Infinity);this.max=void 0!==b?b:new D(-Infinity,-Infinity)}function Bf(a,b){var c,d,e,f,g,h,l,m,u,q,n=a.context,t=a.state,k,r,x,y,w,G;this.render=function(v,O,C){if(0!==b.length){v=new p;var F=C.w/C.z,H=.5*C.z,Z=.5*C.w,aa=16/C.w,pa=new D(aa*F,aa),J=new p(1,1,0),eb=new D(1,1),E=new ed;E.min.set(C.x,
+function ff(a,b){a.uniform1f(this.addr,b)}function gf(a,b){a.uniform1i(this.addr,b)}function hf(a,b){void 0===b.x?a.uniform2fv(this.addr,b):a.uniform2f(this.addr,b.x,b.y)}function jf(a,b){void 0!==b.x?a.uniform3f(this.addr,b.x,b.y,b.z):void 0!==b.r?a.uniform3f(this.addr,b.r,b.g,b.b):a.uniform3fv(this.addr,b)}function kf(a,b){void 0===b.x?a.uniform4fv(this.addr,b):a.uniform4f(this.addr,b.x,b.y,b.z,b.w)}function lf(a,b){a.uniformMatrix2fv(this.addr,!1,b.elements||b)}function mf(a,b){void 0===b.elements?
+a.uniformMatrix3fv(this.addr,!1,b):(ye.set(b.elements),a.uniformMatrix3fv(this.addr,!1,ye))}function nf(a,b){void 0===b.elements?a.uniformMatrix4fv(this.addr,!1,b):(ze.set(b.elements),a.uniformMatrix4fv(this.addr,!1,ze))}function of(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTexture2D(b||Ae,d)}function pf(a,b,c){var d=c.allocTextureUnit();a.uniform1i(this.addr,d);c.setTextureCube(b||Be,d)}function Ce(a,b){a.uniform2iv(this.addr,b)}function De(a,b){a.uniform3iv(this.addr,b)}function Ee(a,
+b){a.uniform4iv(this.addr,b)}function qf(a){switch(a){case 5126:return ff;case 35664:return hf;case 35665:return jf;case 35666:return kf;case 35674:return lf;case 35675:return mf;case 35676:return nf;case 35678:return of;case 35680:return pf;case 5124:case 35670:return gf;case 35667:case 35671:return Ce;case 35668:case 35672:return De;case 35669:case 35673:return Ee}}function rf(a,b){a.uniform1fv(this.addr,b)}function sf(a,b){a.uniform1iv(this.addr,b)}function tf(a,b){a.uniform2fv(this.addr,Cb(b,
+this.size,2))}function uf(a,b){a.uniform3fv(this.addr,Cb(b,this.size,3))}function vf(a,b){a.uniform4fv(this.addr,Cb(b,this.size,4))}function wf(a,b){a.uniformMatrix2fv(this.addr,!1,Cb(b,this.size,4))}function xf(a,b){a.uniformMatrix3fv(this.addr,!1,Cb(b,this.size,9))}function yf(a,b){a.uniformMatrix4fv(this.addr,!1,Cb(b,this.size,16))}function zf(a,b,c){var d=b.length,e=we(c,d);a.uniform1iv(this.addr,e);for(a=0;a!==d;++a)c.setTexture2D(b[a]||Ae,e[a])}function Af(a,b,c){var d=b.length,e=we(c,d);a.uniform1iv(this.addr,
+e);for(a=0;a!==d;++a)c.setTextureCube(b[a]||Be,e[a])}function Bf(a){switch(a){case 5126:return rf;case 35664:return tf;case 35665:return uf;case 35666:return vf;case 35674:return wf;case 35675:return xf;case 35676:return yf;case 35678:return zf;case 35680:return Af;case 5124:case 35670:return sf;case 35667:case 35671:return Ce;case 35668:case 35672:return De;case 35669:case 35673:return Ee}}function Cf(a,b,c){this.id=a;this.addr=c;this.setValue=qf(b.type)}function Df(a,b,c){this.id=a;this.addr=c;
+this.size=b.size;this.setValue=Bf(b.type)}function Fe(a){this.id=a;this.seq=[];this.map={}}function db(a,b,c){this.seq=[];this.map={};this.renderer=c;c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(var d=0;d<c;++d){var e=a.getActiveUniform(b,d),f=a.getUniformLocation(b,e.name),g=this,h=e.name,l=h.length;for(Ld.lastIndex=0;;){var m=Ld.exec(h),u=Ld.lastIndex,q=m[1],n=m[3];"]"===m[2]&&(q|=0);if(void 0===n||"["===n&&u+2===l){h=g;e=void 0===n?new Cf(q,e,f):new Df(q,e,f);h.seq.push(e);h.map[e.id]=e;break}else n=
+g.map[q],void 0===n&&(n=new Fe(q),q=g,g=n,q.seq.push(g),q.map[g.id]=g),g=n}}}function K(a,b,c){return void 0===b&&void 0===c?this.set(a):this.setRGB(a,b,c)}function ed(a,b){this.min=void 0!==a?a:new D(Infinity,Infinity);this.max=void 0!==b?b:new D(-Infinity,-Infinity)}function Ef(a,b){var c,d,e,f,g,h,l,m,u,q,n=a.context,t=a.state,k,r,x,y,w,G;this.render=function(v,O,C){if(0!==b.length){v=new p;var F=C.w/C.z,H=.5*C.z,Z=.5*C.w,aa=16/C.w,pa=new D(aa*F,aa),J=new p(1,1,0),eb=new D(1,1),E=new ed;E.min.set(C.x,
 C.y);E.max.set(C.x+(C.z-16),C.y+(C.w-16));if(void 0===y){var aa=new Float32Array([-1,-1,0,0,1,-1,1,0,1,1,1,1,-1,1,0,1]),ga=new Uint16Array([0,1,2,0,2,3]);k=n.createBuffer();r=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,k);n.bufferData(n.ARRAY_BUFFER,aa,n.STATIC_DRAW);n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r);n.bufferData(n.ELEMENT_ARRAY_BUFFER,ga,n.STATIC_DRAW);w=n.createTexture();G=n.createTexture();t.bindTexture(n.TEXTURE_2D,w);n.texImage2D(n.TEXTURE_2D,0,n.RGB,16,16,0,n.RGB,n.UNSIGNED_BYTE,null);
 n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST);t.bindTexture(n.TEXTURE_2D,G);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,16,16,0,n.RGBA,n.UNSIGNED_BYTE,null);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,
 n.TEXTURE_MAG_FILTER,n.NEAREST);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST);var aa=x={vertexShader:"uniform lowp int renderType;\nuniform vec3 screenPosition;\nuniform vec2 scale;\nuniform float rotation;\nuniform sampler2D occlusionMap;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvarying float vVisibility;\nvoid main() {\nvUV = uv;\nvec2 pos = position;\nif ( renderType == 2 ) {\nvec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );\nvisibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );\nvVisibility =        visibility.r / 9.0;\nvVisibility *= 1.0 - visibility.g / 9.0;\nvVisibility *=       visibility.b / 9.0;\nvVisibility *= 1.0 - visibility.a / 9.0;\npos.x = cos( rotation ) * position.x - sin( rotation ) * position.y;\npos.y = sin( rotation ) * position.x + cos( rotation ) * position.y;\n}\ngl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );\n}",
@@ -20,7 +20,7 @@ h=n.getUniformLocation(y,"scale");l=n.getUniformLocation(y,"rotation");m=n.getUn
 pa.set(aa*F,aa),N=b[ga],v.set(N.matrixWorld.elements[12],N.matrixWorld.elements[13],N.matrixWorld.elements[14]),v.applyMatrix4(O.matrixWorldInverse),v.applyMatrix4(O.projectionMatrix),J.copy(v),eb.x=C.x+J.x*H+H-8,eb.y=C.y+J.y*Z+Z-8,!0===E.containsPoint(eb)){t.activeTexture(n.TEXTURE0);t.bindTexture(n.TEXTURE_2D,null);t.activeTexture(n.TEXTURE1);t.bindTexture(n.TEXTURE_2D,w);n.copyTexImage2D(n.TEXTURE_2D,0,n.RGB,eb.x,eb.y,16,16,0);n.uniform1i(c,0);n.uniform2f(h,pa.x,pa.y);n.uniform3f(m,J.x,J.y,J.z);
 t.disable(n.BLEND);t.enable(n.DEPTH_TEST);n.drawElements(n.TRIANGLES,6,n.UNSIGNED_SHORT,0);t.activeTexture(n.TEXTURE0);t.bindTexture(n.TEXTURE_2D,G);n.copyTexImage2D(n.TEXTURE_2D,0,n.RGBA,eb.x,eb.y,16,16,0);n.uniform1i(c,1);t.disable(n.DEPTH_TEST);t.activeTexture(n.TEXTURE1);t.bindTexture(n.TEXTURE_2D,w);n.drawElements(n.TRIANGLES,6,n.UNSIGNED_SHORT,0);N.positionScreen.copy(J);N.customUpdateCallback?N.customUpdateCallback(N):N.updateLensFlares();n.uniform1i(c,2);t.enable(n.BLEND);for(var W=0,ka=N.lensFlares.length;W<
 ka;W++){var V=N.lensFlares[W];.001<V.opacity&&.001<V.scale&&(J.x=V.x,J.y=V.y,J.z=V.z,aa=V.size*V.scale/C.w,pa.x=aa*F,pa.y=aa,n.uniform3f(m,J.x,J.y,J.z),n.uniform2f(h,pa.x,pa.y),n.uniform1f(l,V.rotation),n.uniform1f(f,V.opacity),n.uniform3f(g,V.color.r,V.color.g,V.color.b),t.setBlending(V.blending,V.blendEquation,V.blendSrc,V.blendDst),a.setTexture2D(V.texture,1),n.drawElements(n.TRIANGLES,6,n.UNSIGNED_SHORT,0))}}t.enable(n.CULL_FACE);t.enable(n.DEPTH_TEST);t.buffers.depth.setMask(!0);a.resetGLState()}}}
-function Cf(a,b){var c,d,e,f,g,h,l,m,u,q,n,t,k,r,x,y,w;function G(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:b.id-a.id}var v=a.context,O=a.state,C,F,H,Z,aa=new p,pa=new oa,J=new p;this.render=function(p,D){if(0!==b.length){if(void 0===H){var ga=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),Q=new Uint16Array([0,1,2,0,2,3]);C=v.createBuffer();F=v.createBuffer();v.bindBuffer(v.ARRAY_BUFFER,C);v.bufferData(v.ARRAY_BUFFER,ga,v.STATIC_DRAW);
+function Ff(a,b){var c,d,e,f,g,h,l,m,u,q,n,t,k,r,x,y,w;function G(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:b.id-a.id}var v=a.context,O=a.state,C,F,H,Z,aa=new p,pa=new oa,J=new p;this.render=function(p,D){if(0!==b.length){if(void 0===H){var ga=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),Q=new Uint16Array([0,1,2,0,2,3]);C=v.createBuffer();F=v.createBuffer();v.bindBuffer(v.ARRAY_BUFFER,C);v.bufferData(v.ARRAY_BUFFER,ga,v.STATIC_DRAW);
 v.bindBuffer(v.ELEMENT_ARRAY_BUFFER,F);v.bufferData(v.ELEMENT_ARRAY_BUFFER,Q,v.STATIC_DRAW);var ga=v.createProgram(),Q=v.createShader(v.VERTEX_SHADER),N=v.createShader(v.FRAGMENT_SHADER);v.shaderSource(Q,["precision "+a.getPrecision()+" float;","uniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform float rotation;\nuniform vec2 scale;\nuniform vec2 uvOffset;\nuniform vec2 uvScale;\nattribute vec2 position;\nattribute vec2 uv;\nvarying vec2 vUV;\nvoid main() {\nvUV = uvOffset + uv * uvScale;\nvec2 alignedPosition = position * scale;\nvec2 rotatedPosition;\nrotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\nrotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\nvec4 finalPosition;\nfinalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\nfinalPosition.xy += rotatedPosition;\nfinalPosition = projectionMatrix * finalPosition;\ngl_Position = finalPosition;\n}"].join("\n"));
 v.shaderSource(N,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n"));
 v.compileShader(Q);v.compileShader(N);v.attachShader(ga,Q);v.attachShader(ga,N);v.linkProgram(ga);H=ga;y=v.getAttribLocation(H,"position");w=v.getAttribLocation(H,"uv");c=v.getUniformLocation(H,"uvOffset");d=v.getUniformLocation(H,"uvScale");e=v.getUniformLocation(H,"rotation");f=v.getUniformLocation(H,"scale");g=v.getUniformLocation(H,"color");h=v.getUniformLocation(H,"map");l=v.getUniformLocation(H,"opacity");m=v.getUniformLocation(H,"modelViewMatrix");u=v.getUniformLocation(H,"projectionMatrix");
@@ -28,19 +28,19 @@ q=v.getUniformLocation(H,"fogType");n=v.getUniformLocation(H,"fogDensity");t=v.g
 O.disable(v.CULL_FACE);O.enable(v.BLEND);v.bindBuffer(v.ARRAY_BUFFER,C);v.vertexAttribPointer(y,2,v.FLOAT,!1,16,0);v.vertexAttribPointer(w,2,v.FLOAT,!1,16,8);v.bindBuffer(v.ELEMENT_ARRAY_BUFFER,F);v.uniformMatrix4fv(u,!1,D.projectionMatrix.elements);O.activeTexture(v.TEXTURE0);v.uniform1i(h,0);Q=ga=0;(N=p.fog)?(v.uniform3f(r,N.color.r,N.color.g,N.color.b),N.isFog?(v.uniform1f(t,N.near),v.uniform1f(k,N.far),v.uniform1i(q,1),Q=ga=1):N.isFogExp2&&(v.uniform1f(n,N.density),v.uniform1i(q,2),Q=ga=2)):(v.uniform1i(q,
 0),Q=ga=0);for(var N=0,W=b.length;N<W;N++){var ka=b[N];ka.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,ka.matrixWorld);ka.z=-ka.modelViewMatrix.elements[14]}b.sort(G);for(var V=[],N=0,W=b.length;N<W;N++){var ka=b[N],R=ka.material;!1!==R.visible&&(v.uniform1f(x,R.alphaTest),v.uniformMatrix4fv(m,!1,ka.modelViewMatrix.elements),ka.matrixWorld.decompose(aa,pa,J),V[0]=J.x,V[1]=J.y,ka=0,p.fog&&R.fog&&(ka=Q),ga!==ka&&(v.uniform1i(q,ka),ga=ka),null!==R.map?(v.uniform2f(c,R.map.offset.x,R.map.offset.y),
 v.uniform2f(d,R.map.repeat.x,R.map.repeat.y)):(v.uniform2f(c,0,0),v.uniform2f(d,1,1)),v.uniform1f(l,R.opacity),v.uniform3f(g,R.color.r,R.color.g,R.color.b),v.uniform1f(e,R.rotation),v.uniform2fv(f,V),O.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),O.buffers.depth.setTest(R.depthTest),O.buffers.depth.setMask(R.depthWrite),R.map?a.setTexture2D(R.map,0):a.setTexture2D(Z,0),v.drawElements(v.TRIANGLES,6,v.UNSIGNED_SHORT,0))}O.enable(v.CULL_FACE);a.resetGLState()}}}function X(){Object.defineProperty(this,
-"id",{value:Df++});this.uuid=Y.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.shading=2;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=
+"id",{value:Gf++});this.uuid=Y.generateUUID();this.name="";this.type="Material";this.lights=this.fog=!0;this.blending=1;this.side=0;this.shading=2;this.vertexColors=0;this.opacity=1;this.transparent=!1;this.blendSrc=204;this.blendDst=205;this.blendEquation=100;this.blendEquationAlpha=this.blendDstAlpha=this.blendSrcAlpha=null;this.depthFunc=3;this.depthWrite=this.depthTest=!0;this.clippingPlanes=null;this.clipShadows=this.clipIntersection=!1;this.colorWrite=!0;this.precision=null;this.polygonOffset=
 !1;this.polygonOffsetUnits=this.polygonOffsetFactor=0;this.dithering=!1;this.alphaTest=0;this.premultipliedAlpha=!1;this.overdraw=0;this.needsUpdate=this.visible=!0}function Da(a){X.call(this);this.type="ShaderMaterial";this.defines={};this.uniforms={};this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}";this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}";this.linewidth=1;this.wireframe=!1;this.wireframeLinewidth=
 1;this.morphNormals=this.morphTargets=this.skinning=this.clipping=this.lights=this.fog=!1;this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1};this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]};this.index0AttributeName=void 0;void 0!==a&&(void 0!==a.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(a))}function Ya(a){X.call(this);this.type="MeshDepthMaterial";this.depthPacking=
 3200;this.morphTargets=this.skinning=!1;this.displacementMap=this.alphaMap=this.map=null;this.displacementScale=1;this.displacementBias=0;this.wireframe=!1;this.wireframeLinewidth=1;this.lights=this.fog=!1;this.setValues(a)}function Ra(a,b){this.min=void 0!==a?a:new p(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new p(-Infinity,-Infinity,-Infinity)}function Ba(a,b){this.center=void 0!==a?a:new p;this.radius=void 0!==b?b:0}function Fa(){this.elements=[1,0,0,0,1,0,0,0,1];0<arguments.length&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}
 function va(a,b){this.normal=void 0!==a?a:new p(1,0,0);this.constant=void 0!==b?b:0}function fd(a,b,c,d,e,f){this.planes=[void 0!==a?a:new va,void 0!==b?b:new va,void 0!==c?c:new va,void 0!==d?d:new va,void 0!==e?e:new va,void 0!==f?f:new va]}function Ge(a,b,c,d){function e(b,c,d,e){var f=b.geometry,g;g=r;var h=b.customDepthMaterial;d&&(g=x,h=b.customDistanceMaterial);h?g=h:(h=!1,c.morphTargets&&(f&&f.isBufferGeometry?h=f.morphAttributes&&f.morphAttributes.position&&0<f.morphAttributes.position.length:
 f&&f.isGeometry&&(h=f.morphTargets&&0<f.morphTargets.length)),b.isSkinnedMesh&&!1===c.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",b),b=b.isSkinnedMesh&&c.skinning,f=0,h&&(f|=1),b&&(f|=2),g=g[f]);a.localClippingEnabled&&!0===c.clipShadows&&0!==c.clippingPlanes.length&&(f=g.uuid,h=c.uuid,b=y[f],void 0===b&&(b={},y[f]=b),f=b[h],void 0===f&&(f=g.clone(),b[h]=f),g=f);g.visible=c.visible;g.wireframe=c.wireframe;h=c.side;aa.renderSingleSided&&2==
 h&&(h=0);aa.renderReverseSided&&(0===h?h=1:1===h&&(h=0));g.side=h;g.clipShadows=c.clipShadows;g.clippingPlanes=c.clippingPlanes;g.wireframeLinewidth=c.wireframeLinewidth;g.linewidth=c.linewidth;d&&void 0!==g.uniforms.lightPos&&g.uniforms.lightPos.value.copy(e);return g}function f(b,d,g,h){if(!1!==b.visible){if(b.layers.test(d.layers)&&(b.isMesh||b.isLine||b.isPoints)&&b.castShadow&&(!b.frustumCulled||l.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(g.matrixWorldInverse,b.matrixWorld);var m=
-c.update(b),u=b.material;if(Array.isArray(u))for(var n=m.groups,q=0,t=n.length;q<t;q++){var y=n[q],w=u[y.materialIndex];w&&w.visible&&(w=e(b,w,h,k),a.renderBufferDirect(g,null,m,w,b,y))}else u.visible&&(w=e(b,u,h,k),a.renderBufferDirect(g,null,m,w,b,null))}b=b.children;m=0;for(u=b.length;m<u;m++)f(b[m],d,g,h)}}var g=a.context,h=a.state,l=new fd,m=new L,u=b.shadows,q=new D,n=new D(d.maxTextureSize,d.maxTextureSize),t=new p,k=new p,r=Array(4),x=Array(4),y={},w=[new p(1,0,0),new p(-1,0,0),new p(0,0,
+c.update(b),n=b.material;if(Array.isArray(n))for(var u=m.groups,q=0,t=u.length;q<t;q++){var y=u[q],w=n[y.materialIndex];w&&w.visible&&(w=e(b,w,h,k),a.renderBufferDirect(g,null,m,w,b,y))}else n.visible&&(w=e(b,n,h,k),a.renderBufferDirect(g,null,m,w,b,null))}b=b.children;m=0;for(n=b.length;m<n;m++)f(b[m],d,g,h)}}var g=a.context,h=a.state,l=new fd,m=new L,u=b.shadows,q=new D,n=new D(d.maxTextureSize,d.maxTextureSize),t=new p,k=new p,r=Array(4),x=Array(4),y={},w=[new p(1,0,0),new p(-1,0,0),new p(0,0,
 1),new p(0,0,-1),new p(0,1,0),new p(0,-1,0)],G=[new p(0,1,0),new p(0,1,0),new p(0,1,0),new p(0,1,0),new p(0,0,1),new p(0,0,-1)],v=[new ha,new ha,new ha,new ha,new ha,new ha];b=new Ya;b.depthPacking=3201;b.clipping=!0;d=Za.distanceRGBA;for(var O=Ga.clone(d.uniforms),C=0;4!==C;++C){var F=0!==(C&1),H=0!==(C&2),Z=b.clone();Z.morphTargets=F;Z.skinning=H;r[C]=Z;F=new Da({defines:{USE_SHADOWMAP:""},uniforms:O,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,morphTargets:F,skinning:H,clipping:!0});
 x[C]=F}var aa=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=1;this.renderSingleSided=this.renderReverseSided=!0;this.render=function(b,c){if(!1!==aa.enabled&&(!1!==aa.autoUpdate||!1!==aa.needsUpdate)&&0!==u.length){h.disable(g.BLEND);h.buffers.color.setClear(1,1,1,1);h.buffers.depth.setTest(!0);h.setScissorTest(!1);for(var d,e,y=0,r=u.length;y<r;y++){var p=u[y],x=p.shadow;if(void 0===x)console.warn("THREE.WebGLShadowMap:",p,"has no shadow.");else{var O=x.camera;q.copy(x.mapSize);
 q.min(n);if(p&&p.isPointLight){d=6;e=!0;var C=q.x,F=q.y;v[0].set(2*C,F,C,F);v[1].set(0,F,C,F);v[2].set(3*C,F,C,F);v[3].set(C,F,C,F);v[4].set(3*C,0,C,F);v[5].set(C,0,C,F);q.x*=4;q.y*=2}else d=1,e=!1;null===x.map&&(x.map=new Ab(q.x,q.y,{minFilter:1003,magFilter:1003,format:1023}),x.map.texture.name=p.name+".shadowMap",O.updateProjectionMatrix());x.isSpotLightShadow&&x.update(p);C=x.map;x=x.matrix;k.setFromMatrixPosition(p.matrixWorld);O.position.copy(k);a.setRenderTarget(C);a.clear();for(C=0;C<d;C++)e?
 (t.copy(O.position),t.add(w[C]),O.up.copy(G[C]),O.lookAt(t),h.viewport(v[C])):(t.setFromMatrixPosition(p.target.matrixWorld),O.lookAt(t)),O.updateMatrixWorld(),O.matrixWorldInverse.getInverse(O.matrixWorld),x.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),x.multiply(O.projectionMatrix),x.multiply(O.matrixWorldInverse),m.multiplyMatrices(O.projectionMatrix,O.matrixWorldInverse),l.setFromMatrix(m),f(b,c,O,e)}}d=a.getClearColor();e=a.getClearAlpha();a.setClearColor(d,e);aa.needsUpdate=!1}}}function fb(a,
-b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function $a(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||$a.DefaultOrder}function Md(){this.mask=1}function A(){Object.defineProperty(this,"id",{value:Ef++});this.uuid=Y.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=A.DefaultUp.clone();var a=new p,b=new $a,c=new oa,d=new p(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,
+b){this.origin=void 0!==a?a:new p;this.direction=void 0!==b?b:new p}function $a(a,b,c,d){this._x=a||0;this._y=b||0;this._z=c||0;this._order=d||$a.DefaultOrder}function Md(){this.mask=1}function A(){Object.defineProperty(this,"id",{value:Hf++});this.uuid=Y.generateUUID();this.name="";this.type="Object3D";this.parent=null;this.children=[];this.up=A.DefaultUp.clone();var a=new p,b=new $a,c=new oa,d=new p(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,
 void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,value:a},rotation:{enumerable:!0,value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d},modelViewMatrix:{value:new L},normalMatrix:{value:new Fa}});this.matrix=new L;this.matrixWorld=new L;this.matrixAutoUpdate=A.DefaultMatrixAutoUpdate;this.matrixWorldNeedsUpdate=!1;this.layers=new Md;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.renderOrder=0;this.userData={};this.onBeforeRender=
 function(){};this.onAfterRender=function(){}}function Db(a,b){this.start=void 0!==a?a:new p;this.end=void 0!==b?b:new p}function Sa(a,b,c){this.a=void 0!==a?a:new p;this.b=void 0!==b?b:new p;this.c=void 0!==c?c:new p}function Ta(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d&&d.isVector3?d:new p;this.vertexNormals=Array.isArray(d)?d:[];this.color=e&&e.isColor?e:new K;this.vertexColors=Array.isArray(e)?e:[];this.materialIndex=void 0!==f?f:0}function Ha(a){X.call(this);this.type="MeshBasicMaterial";
 this.color=new K(16777215);this.lightMap=this.map=null;this.lightMapIntensity=1;this.aoMap=null;this.aoMapIntensity=1;this.envMap=this.alphaMap=this.specularMap=null;this.combine=0;this.reflectivity=1;this.refractionRatio=.98;this.wireframe=!1;this.wireframeLinewidth=1;this.wireframeLinejoin=this.wireframeLinecap="round";this.lights=this.morphTargets=this.skinning=!1;this.setValues(a)}function P(a,b,c){if(Array.isArray(a))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
@@ -53,25 +53,25 @@ e,W[c]=D,m.push(W.x,W.y,W.z),W[a]=0,W[b]=0,W[c]=0<k?1:-1,u.push(W.x,W.y,W.z),q.p
 -1,-1,c,b,a,f,e,0);g("z","y","x",1,-1,c,b,-a,f,e,1);g("x","z","y",1,1,a,c,b,d,f,2);g("x","z","y",1,-1,a,c,-b,d,f,3);g("x","y","z",1,-1,a,b,c,d,e,4);g("x","y","z",-1,-1,a,b,-c,d,e,5);this.setIndex(l);this.addAttribute("position",new E(m,3));this.addAttribute("normal",new E(u,3));this.addAttribute("uv",new E(q,2))}function uc(a,b,c,d){T.call(this);this.type="PlaneGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};this.fromBufferGeometry(new jb(a,b,c,d));this.mergeVertices()}
 function jb(a,b,c,d){I.call(this);this.type="PlaneBufferGeometry";this.parameters={width:a,height:b,widthSegments:c,heightSegments:d};var e=a/2,f=b/2;c=Math.floor(c)||1;d=Math.floor(d)||1;var g=c+1,h=d+1,l=a/c,m=b/d,u=[],q=[],n=[],t=[];for(a=0;a<h;a++){var k=a*m-f;for(b=0;b<g;b++)q.push(b*l-e,-k,0),n.push(0,0,1),t.push(b/c),t.push(1-a/d)}for(a=0;a<d;a++)for(b=0;b<c;b++)e=b+g*(a+1),f=b+1+g*(a+1),h=b+1+g*a,u.push(b+g*a,e,h),u.push(e,f,h);this.setIndex(u);this.addAttribute("position",new E(q,3));this.addAttribute("normal",
 new E(n,3));this.addAttribute("uv",new E(t,2))}function Ma(){A.call(this);this.type="Camera";this.matrixWorldInverse=new L;this.projectionMatrix=new L}function xa(a,b,c,d){Ma.call(this);this.type="PerspectiveCamera";this.fov=void 0!==a?a:50;this.zoom=1;this.near=void 0!==c?c:.1;this.far=void 0!==d?d:2E3;this.focus=10;this.aspect=void 0!==b?b:1;this.view=null;this.filmGauge=35;this.filmOffset=0;this.updateProjectionMatrix()}function Fb(a,b,c,d,e,f){Ma.call(this);this.type="OrthographicCamera";this.zoom=
-1;this.view=null;this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function Ff(a){var b={};return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return b[a.uuid]},remove:function(c){var d=b[c.uuid];d&&(a.deleteBuffer(d.buffer),delete b[c.uuid])},update:function(c,d){c.isInterleavedBufferAttribute&&(c=c.data);var e=b[c.uuid];if(void 0===e){var e=c.uuid,f=c,g=f.array,h=f.dynamic?a.DYNAMIC_DRAW:a.STATIC_DRAW,
+1;this.view=null;this.left=a;this.right=b;this.top=c;this.bottom=d;this.near=void 0!==e?e:.1;this.far=void 0!==f?f:2E3;this.updateProjectionMatrix()}function If(a){var b={};return{get:function(a){a.isInterleavedBufferAttribute&&(a=a.data);return b[a.uuid]},remove:function(c){var d=b[c.uuid];d&&(a.deleteBuffer(d.buffer),delete b[c.uuid])},update:function(c,d){c.isInterleavedBufferAttribute&&(c=c.data);var e=b[c.uuid];if(void 0===e){var e=c.uuid,f=c,g=f.array,h=f.dynamic?a.DYNAMIC_DRAW:a.STATIC_DRAW,
 l=a.createBuffer();a.bindBuffer(d,l);a.bufferData(d,g,h);f.onUploadCallback();h=a.FLOAT;g instanceof Float32Array?h=a.FLOAT:g instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):g instanceof Uint16Array?h=a.UNSIGNED_SHORT:g instanceof Int16Array?h=a.SHORT:g instanceof Uint32Array?h=a.UNSIGNED_INT:g instanceof Int32Array?h=a.INT:g instanceof Int8Array?h=a.BYTE:g instanceof Uint8Array&&(h=a.UNSIGNED_BYTE);b[e]={buffer:l,type:h,bytesPerElement:g.BYTES_PER_ELEMENT,version:f.version}}else e.version<
-c.version&&(f=c,g=f.array,l=f.updateRange,a.bindBuffer(d,e.buffer),!1===f.dynamic?a.bufferData(d,g,a.STATIC_DRAW):-1===l.count?a.bufferSubData(d,0,g):0===l.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(a.bufferSubData(d,l.offset*g.BYTES_PER_ELEMENT,g.subarray(l.offset,l.offset+l.count)),l.count=0),e.version=c.version)}}}function Gf(a,b){return a.renderOrder!==
-b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Hf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function If(){var a=[],b=-1,c=[],d=-1;return{opaque:a,transparent:c,init:function(){d=b=-1},push:function(e,f,g,h,l){var m,u;g.transparent?(m=c,u=++d):(m=a,u=++b);(u=m[u])?(u.id=e.id,u.object=e,
-u.geometry=f,u.material=g,u.program=g.program,u.renderOrder=e.renderOrder,u.z=h,u.group=l):(u={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:l},m.push(u))},finish:function(){a.length=b+1;c.length=d+1},sort:function(){a.sort(Gf);c.sort(Hf)}}}function Jf(){var a={};return{get:function(b,c){var d=b.id+","+c.id,e=a[d];void 0===e&&(console.log("THREE.WebGLRenderLists:",d),e=new If,a[d]=e);return e},dispose:function(){a={}}}}function Kf(a,b,c){var d,e,f;this.setMode=
+c.version&&(f=c,g=f.array,l=f.updateRange,a.bindBuffer(d,e.buffer),!1===f.dynamic?a.bufferData(d,g,a.STATIC_DRAW):-1===l.count?a.bufferSubData(d,0,g):0===l.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(a.bufferSubData(d,l.offset*g.BYTES_PER_ELEMENT,g.subarray(l.offset,l.offset+l.count)),l.count=0),e.version=c.version)}}}function Jf(a,b){return a.renderOrder!==
+b.renderOrder?a.renderOrder-b.renderOrder:a.program&&b.program&&a.program!==b.program?a.program.id-b.program.id:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function Kf(a,b){return a.renderOrder!==b.renderOrder?a.renderOrder-b.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function Lf(){var a=[],b=-1,c=[],d=-1;return{opaque:a,transparent:c,init:function(){d=b=-1},push:function(e,f,g,h,l){var m,u;g.transparent?(m=c,u=++d):(m=a,u=++b);(u=m[u])?(u.id=e.id,u.object=e,
+u.geometry=f,u.material=g,u.program=g.program,u.renderOrder=e.renderOrder,u.z=h,u.group=l):(u={id:e.id,object:e,geometry:f,material:g,program:g.program,renderOrder:e.renderOrder,z:h,group:l},m.push(u))},finish:function(){a.length=b+1;c.length=d+1},sort:function(){a.sort(Jf);c.sort(Kf)}}}function Mf(){var a={};return{get:function(b,c){var d=b.id+","+c.id,e=a[d];void 0===e&&(console.log("THREE.WebGLRenderLists:",d),e=new Lf,a[d]=e);return e},dispose:function(){a={}}}}function Nf(a,b,c){var d,e,f;this.setMode=
 function(a){d=a};this.setIndex=function(c){c.array instanceof Uint32Array&&b.get("OES_element_index_uint")?(e=a.UNSIGNED_INT,f=4):c.array instanceof Uint16Array?(e=a.UNSIGNED_SHORT,f=2):(e=a.UNSIGNED_BYTE,f=1)};this.render=function(b,h){a.drawElements(d,h,e,b*f);c.calls++;c.vertices+=h;d===a.TRIANGLES&&(c.faces+=h/3)};this.renderInstances=function(g,h,l){var m=b.get("ANGLE_instanced_arrays");null===m?console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):
-(m.drawElementsInstancedANGLE(d,l,e,h*f,g.maxInstancedCount),c.calls++,c.vertices+=l*g.maxInstancedCount,d===a.TRIANGLES&&(c.faces+=g.maxInstancedCount*l/3))}}function Lf(a,b,c){var d;this.setMode=function(a){d=a};this.render=function(b,f){a.drawArrays(d,b,f);c.calls++;c.vertices+=f;d===a.TRIANGLES&&(c.faces+=f/3)};this.renderInstances=function(e,f,g){var h=b.get("ANGLE_instanced_arrays");if(null===h)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
-else{var l=e.attributes.position;l.isInterleavedBufferAttribute?(g=l.data.count,h.drawArraysInstancedANGLE(d,0,g,e.maxInstancedCount)):h.drawArraysInstancedANGLE(d,f,g,e.maxInstancedCount);c.calls++;c.vertices+=g*e.maxInstancedCount;d===a.TRIANGLES&&(c.faces+=e.maxInstancedCount*g/3)}}}function Mf(a,b,c){function d(a){a=a.target;var h=e[a.id];null!==h.index&&b.remove(h.index);for(var l in h.attributes)b.remove(h.attributes[l]);a.removeEventListener("dispose",d);delete e[a.id];if(l=f[a.id])b.remove(l),
+(m.drawElementsInstancedANGLE(d,l,e,h*f,g.maxInstancedCount),c.calls++,c.vertices+=l*g.maxInstancedCount,d===a.TRIANGLES&&(c.faces+=g.maxInstancedCount*l/3))}}function Of(a,b,c){var d;this.setMode=function(a){d=a};this.render=function(b,f){a.drawArrays(d,b,f);c.calls++;c.vertices+=f;d===a.TRIANGLES&&(c.faces+=f/3)};this.renderInstances=function(e,f,g){var h=b.get("ANGLE_instanced_arrays");if(null===h)console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
+else{var l=e.attributes.position;l.isInterleavedBufferAttribute?(g=l.data.count,h.drawArraysInstancedANGLE(d,0,g,e.maxInstancedCount)):h.drawArraysInstancedANGLE(d,f,g,e.maxInstancedCount);c.calls++;c.vertices+=g*e.maxInstancedCount;d===a.TRIANGLES&&(c.faces+=e.maxInstancedCount*g/3)}}}function Pf(a,b,c){function d(a){a=a.target;var h=e[a.id];null!==h.index&&b.remove(h.index);for(var l in h.attributes)b.remove(h.attributes[l]);a.removeEventListener("dispose",d);delete e[a.id];if(l=f[a.id])b.remove(l),
 delete f[a.id];if(l=f[h.id])b.remove(l),delete f[h.id];c.geometries--}var e={},f={};return{get:function(a,b){var f=e[b.id];if(f)return f;b.addEventListener("dispose",d);b.isBufferGeometry?f=b:b.isGeometry&&(void 0===b._bufferGeometry&&(b._bufferGeometry=(new I).setFromObject(a)),f=b._bufferGeometry);e[b.id]=f;c.geometries++;return f},update:function(c){var d=c.index,e=c.attributes;null!==d&&b.update(d,a.ELEMENT_ARRAY_BUFFER);for(var f in e)b.update(e[f],a.ARRAY_BUFFER);c=c.morphAttributes;for(f in c)for(var d=
-c[f],e=0,u=d.length;e<u;e++)b.update(d[e],a.ARRAY_BUFFER)},getWireframeAttribute:function(c){var d=f[c.id];if(d)return d;var d=[],e=c.index,m=c.attributes;if(null!==e)for(var e=e.array,m=0,u=e.length;m<u;m+=3){var q=e[m+0],n=e[m+1],t=e[m+2];d.push(q,n,n,t,t,q)}else for(e=m.position.array,m=0,u=e.length/3-1;m<u;m+=3)q=m+0,n=m+1,t=m+2,d.push(q,n,n,t,t,q);d=new (65535<Nd(d)?hb:gb)(d,1);b.update(d,a.ELEMENT_ARRAY_BUFFER);return f[c.id]=d}}}function Nf(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];
+c[f],e=0,u=d.length;e<u;e++)b.update(d[e],a.ARRAY_BUFFER)},getWireframeAttribute:function(c){var d=f[c.id];if(d)return d;var d=[],e=c.index,m=c.attributes;if(null!==e)for(var e=e.array,m=0,u=e.length;m<u;m+=3){var q=e[m+0],n=e[m+1],t=e[m+2];d.push(q,n,n,t,t,q)}else for(e=m.position.array,m=0,u=e.length/3-1;m<u;m+=3)q=m+0,n=m+1,t=m+2,d.push(q,n,n,t,t,q);d=new (65535<Nd(d)?hb:gb)(d,1);b.update(d,a.ELEMENT_ARRAY_BUFFER);return f[c.id]=d}}}function Qf(){var a={};return{get:function(b){if(void 0!==a[b.id])return a[b.id];
 var c;switch(b.type){case "DirectionalLight":c={direction:new p,color:new K,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new D};break;case "SpotLight":c={position:new p,direction:new p,color:new K,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new D};break;case "PointLight":c={position:new p,color:new K,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new D};break;case "HemisphereLight":c={direction:new p,skyColor:new K,
-groundColor:new K};break;case "RectAreaLight":c={color:new K,position:new p,halfWidth:new p,halfHeight:new p}}return a[b.id]=c}}}function Of(a,b,c){var d={};return{update:function(a){var f=c.frame,g=a.geometry,h=b.get(a,g);d[h.id]!==f&&(g.isGeometry&&h.updateFromObject(a),b.update(h),d[h.id]=f);return h},clear:function(){d={}}}}function Pf(a){a=a.split("\n");for(var b=0;b<a.length;b++)a[b]=b+1+": "+a[b];return a.join("\n")}function Ie(a,b,c){var d=a.createShader(b);a.shaderSource(d,c);a.compileShader(d);
-!1===a.getShaderParameter(d,a.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile.");""!==a.getShaderInfoLog(d)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",b===a.VERTEX_SHADER?"vertex":"fragment",a.getShaderInfoLog(d),Pf(c));return d}function Je(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD",
-"( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+a);}}function Pd(a,b){var c=Je(b);return"vec4 "+a+"( vec4 value ) { return "+c[0]+"ToLinear"+c[1]+"; }"}function Qf(a,b){var c=Je(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+c[0]+c[1]+"; }"}function Rf(a,b){var c;switch(b){case 1:c="Linear";break;case 2:c="Reinhard";break;case 3:c="Uncharted2";break;case 4:c="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+
-b);}return"vec3 "+a+"( vec3 color ) { return "+c+"ToneMapping( color ); }"}function Sf(a,b,c){a=a||{};return[a.derivatives||b.envMapCubeUV||b.bumpMap||b.normalMap||b.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",a.drawBuffers&&c.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(a.shaderTextureLOD||b.envMap)&&c.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":
-""].filter(vc).join("\n")}function Tf(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function vc(a){return""!==a}function Ke(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function Qd(a){return a.replace(/^\s*#include +<([\w\d.]+)>/gm,function(a,c){var d=S[c];
-if(void 0===d)throw Error("Can not resolve #include <"+c+">");return Qd(d)})}function Le(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c<parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]");return a})}function Uf(a,b,c,d){var e=a.context,f=c.extensions,g=c.defines,h=c.__webglShader.vertexShader,l=c.__webglShader.fragmentShader,m="SHADOWMAP_TYPE_BASIC";1===d.shadowMapType?m="SHADOWMAP_TYPE_PCF":2===d.shadowMapType&&
+groundColor:new K};break;case "RectAreaLight":c={color:new K,position:new p,halfWidth:new p,halfHeight:new p}}return a[b.id]=c}}}function Rf(a,b,c){var d={};return{update:function(a){var f=c.frame,g=a.geometry,h=b.get(a,g);d[h.id]!==f&&(g.isGeometry&&h.updateFromObject(a),b.update(h),d[h.id]=f);return h},clear:function(){d={}}}}function Sf(a){a=a.split("\n");for(var b=0;b<a.length;b++)a[b]=b+1+": "+a[b];return a.join("\n")}function Ie(a,b,c){var d=a.createShader(b);a.shaderSource(d,c);a.compileShader(d);
+!1===a.getShaderParameter(d,a.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile.");""!==a.getShaderInfoLog(d)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",b===a.VERTEX_SHADER?"vertex":"fragment",a.getShaderInfoLog(d),Sf(c));return d}function Je(a){switch(a){case 3E3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD",
+"( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw Error("unsupported encoding: "+a);}}function Pd(a,b){var c=Je(b);return"vec4 "+a+"( vec4 value ) { return "+c[0]+"ToLinear"+c[1]+"; }"}function Tf(a,b){var c=Je(b);return"vec4 "+a+"( vec4 value ) { return LinearTo"+c[0]+c[1]+"; }"}function Uf(a,b){var c;switch(b){case 1:c="Linear";break;case 2:c="Reinhard";break;case 3:c="Uncharted2";break;case 4:c="OptimizedCineon";break;default:throw Error("unsupported toneMapping: "+
+b);}return"vec3 "+a+"( vec3 color ) { return "+c+"ToneMapping( color ); }"}function Vf(a,b,c){a=a||{};return[a.derivatives||b.envMapCubeUV||b.bumpMap||b.normalMap||b.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(a.fragDepth||b.logarithmicDepthBuffer)&&c.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",a.drawBuffers&&c.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(a.shaderTextureLOD||b.envMap)&&c.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":
+""].filter(vc).join("\n")}function Wf(a){var b=[],c;for(c in a){var d=a[c];!1!==d&&b.push("#define "+c+" "+d)}return b.join("\n")}function vc(a){return""!==a}function Ke(a,b){return a.replace(/NUM_DIR_LIGHTS/g,b.numDirLights).replace(/NUM_SPOT_LIGHTS/g,b.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,b.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,b.numPointLights).replace(/NUM_HEMI_LIGHTS/g,b.numHemiLights)}function Qd(a){return a.replace(/^\s*#include +<([\w\d.]+)>/gm,function(a,c){var d=S[c];
+if(void 0===d)throw Error("Can not resolve #include <"+c+">");return Qd(d)})}function Le(a){return a.replace(/for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,function(a,c,d,e){a="";for(c=parseInt(c);c<parseInt(d);c++)a+=e.replace(/\[ i \]/g,"[ "+c+" ]");return a})}function Xf(a,b,c,d){var e=a.context,f=c.extensions,g=c.defines,h=c.__webglShader.vertexShader,l=c.__webglShader.fragmentShader,m="SHADOWMAP_TYPE_BASIC";1===d.shadowMapType?m="SHADOWMAP_TYPE_PCF":2===d.shadowMapType&&
 (m="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",q="ENVMAP_MODE_REFLECTION",n="ENVMAP_BLENDING_MULTIPLY";if(d.envMap){switch(c.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(c.envMap.mapping){case 302:case 304:q="ENVMAP_MODE_REFRACTION"}switch(c.combine){case 0:n="ENVMAP_BLENDING_MULTIPLY";break;case 1:n="ENVMAP_BLENDING_MIX";break;case 2:n="ENVMAP_BLENDING_ADD"}}var t=
-0<a.gammaFactor?a.gammaFactor:1,f=Sf(f,d,a.extensions),k=Tf(g),r=e.createProgram();c.isRawShaderMaterial?(g=[k,"\n"].filter(vc).join("\n"),m=[f,k,"\n"].filter(vc).join("\n")):(g=["precision "+d.precision+" float;","precision "+d.precision+" int;","#define SHADER_NAME "+c.__webglShader.name,k,d.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+t,"#define MAX_BONES "+d.maxBones,d.useFog&&d.fog?"#define USE_FOG":"",d.useFog&&d.fogExp?"#define FOG_EXP2":"",d.map?"#define USE_MAP":
+0<a.gammaFactor?a.gammaFactor:1,f=Vf(f,d,a.extensions),k=Wf(g),r=e.createProgram();c.isRawShaderMaterial?(g=[k,"\n"].filter(vc).join("\n"),m=[f,k,"\n"].filter(vc).join("\n")):(g=["precision "+d.precision+" float;","precision "+d.precision+" int;","#define SHADER_NAME "+c.__webglShader.name,k,d.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+t,"#define MAX_BONES "+d.maxBones,d.useFog&&d.fog?"#define USE_FOG":"",d.useFog&&d.fogExp?"#define FOG_EXP2":"",d.map?"#define USE_MAP":
 "",d.envMap?"#define USE_ENVMAP":"",d.envMap?"#define "+q:"",d.lightMap?"#define USE_LIGHTMAP":"",d.aoMap?"#define USE_AOMAP":"",d.emissiveMap?"#define USE_EMISSIVEMAP":"",d.bumpMap?"#define USE_BUMPMAP":"",d.normalMap?"#define USE_NORMALMAP":"",d.displacementMap&&d.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",d.specularMap?"#define USE_SPECULARMAP":"",d.roughnessMap?"#define USE_ROUGHNESSMAP":"",d.metalnessMap?"#define USE_METALNESSMAP":"",d.alphaMap?"#define USE_ALPHAMAP":"",d.vertexColors?
 "#define USE_COLOR":"",d.flatShading?"#define FLAT_SHADED":"",d.skinning?"#define USE_SKINNING":"",d.useVertexTexture?"#define BONE_TEXTURE":"",d.morphTargets?"#define USE_MORPHTARGETS":"",d.morphNormals&&!1===d.flatShading?"#define USE_MORPHNORMALS":"",d.doubleSided?"#define DOUBLE_SIDED":"",d.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+d.numClippingPlanes,d.shadowMapEnabled?"#define USE_SHADOWMAP":"",d.shadowMapEnabled?"#define "+m:"",d.sizeAttenuation?"#define USE_SIZEATTENUATION":
 "",d.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",d.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;",
@@ -79,18 +79,18 @@ if(void 0===d)throw Error("Can not resolve #include <"+c+">");return Qd(d)})}fun
 "#endif","\n"].filter(vc).join("\n"),m=[f,"precision "+d.precision+" float;","precision "+d.precision+" int;","#define SHADER_NAME "+c.__webglShader.name,k,d.alphaTest?"#define ALPHATEST "+d.alphaTest:"","#define GAMMA_FACTOR "+t,d.useFog&&d.fog?"#define USE_FOG":"",d.useFog&&d.fogExp?"#define FOG_EXP2":"",d.map?"#define USE_MAP":"",d.envMap?"#define USE_ENVMAP":"",d.envMap?"#define "+u:"",d.envMap?"#define "+q:"",d.envMap?"#define "+n:"",d.lightMap?"#define USE_LIGHTMAP":"",d.aoMap?"#define USE_AOMAP":
 "",d.emissiveMap?"#define USE_EMISSIVEMAP":"",d.bumpMap?"#define USE_BUMPMAP":"",d.normalMap?"#define USE_NORMALMAP":"",d.specularMap?"#define USE_SPECULARMAP":"",d.roughnessMap?"#define USE_ROUGHNESSMAP":"",d.metalnessMap?"#define USE_METALNESSMAP":"",d.alphaMap?"#define USE_ALPHAMAP":"",d.vertexColors?"#define USE_COLOR":"",d.gradientMap?"#define USE_GRADIENTMAP":"",d.flatShading?"#define FLAT_SHADED":"",d.doubleSided?"#define DOUBLE_SIDED":"",d.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+
 d.numClippingPlanes,"#define UNION_CLIPPING_PLANES "+(d.numClippingPlanes-d.numClipIntersection),d.shadowMapEnabled?"#define USE_SHADOWMAP":"",d.shadowMapEnabled?"#define "+m:"",d.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",d.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",d.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",d.logarithmicDepthBuffer&&a.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",d.envMap&&a.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":
-"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==d.toneMapping?"#define TONE_MAPPING":"",0!==d.toneMapping?S.tonemapping_pars_fragment:"",0!==d.toneMapping?Rf("toneMapping",d.toneMapping):"",d.dithering?"#define DITHERING":"",d.dithering?S.dithering_pars_fragment:"",d.outputEncoding||d.mapEncoding||d.envMapEncoding||d.emissiveMapEncoding?S.encodings_pars_fragment:"",d.mapEncoding?Pd("mapTexelToLinear",d.mapEncoding):"",d.envMapEncoding?Pd("envMapTexelToLinear",d.envMapEncoding):"",
-d.emissiveMapEncoding?Pd("emissiveMapTexelToLinear",d.emissiveMapEncoding):"",d.outputEncoding?Qf("linearToOutputTexel",d.outputEncoding):"",d.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(vc).join("\n"));h=Qd(h,d);h=Ke(h,d);l=Qd(l,d);l=Ke(l,d);c.isShaderMaterial||(h=Le(h),l=Le(l));l=m+l;h=Ie(e,e.VERTEX_SHADER,g+h);l=Ie(e,e.FRAGMENT_SHADER,l);e.attachShader(r,h);e.attachShader(r,l);void 0!==c.index0AttributeName?e.bindAttribLocation(r,0,c.index0AttributeName):!0===d.morphTargets&&
+"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==d.toneMapping?"#define TONE_MAPPING":"",0!==d.toneMapping?S.tonemapping_pars_fragment:"",0!==d.toneMapping?Uf("toneMapping",d.toneMapping):"",d.dithering?"#define DITHERING":"",d.dithering?S.dithering_pars_fragment:"",d.outputEncoding||d.mapEncoding||d.envMapEncoding||d.emissiveMapEncoding?S.encodings_pars_fragment:"",d.mapEncoding?Pd("mapTexelToLinear",d.mapEncoding):"",d.envMapEncoding?Pd("envMapTexelToLinear",d.envMapEncoding):"",
+d.emissiveMapEncoding?Pd("emissiveMapTexelToLinear",d.emissiveMapEncoding):"",d.outputEncoding?Tf("linearToOutputTexel",d.outputEncoding):"",d.depthPacking?"#define DEPTH_PACKING "+c.depthPacking:"","\n"].filter(vc).join("\n"));h=Qd(h,d);h=Ke(h,d);l=Qd(l,d);l=Ke(l,d);c.isShaderMaterial||(h=Le(h),l=Le(l));l=m+l;h=Ie(e,e.VERTEX_SHADER,g+h);l=Ie(e,e.FRAGMENT_SHADER,l);e.attachShader(r,h);e.attachShader(r,l);void 0!==c.index0AttributeName?e.bindAttribLocation(r,0,c.index0AttributeName):!0===d.morphTargets&&
 e.bindAttribLocation(r,0,"position");e.linkProgram(r);d=e.getProgramInfoLog(r);u=e.getShaderInfoLog(h);q=e.getShaderInfoLog(l);t=n=!0;if(!1===e.getProgramParameter(r,e.LINK_STATUS))n=!1,console.error("THREE.WebGLProgram: shader error: ",e.getError(),"gl.VALIDATE_STATUS",e.getProgramParameter(r,e.VALIDATE_STATUS),"gl.getProgramInfoLog",d,u,q);else if(""!==d)console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",d);else if(""===u||""===q)t=!1;t&&(this.diagnostics={runnable:n,material:c,programLog:d,
 vertexShader:{log:u,prefix:g},fragmentShader:{log:q,prefix:m}});e.deleteShader(h);e.deleteShader(l);var p;this.getUniforms=function(){void 0===p&&(p=new db(e,r,a));return p};var y;this.getAttributes=function(){if(void 0===y){for(var a={},b=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES),c=0;c<b;c++){var d=e.getActiveAttrib(r,c).name;a[d]=e.getAttribLocation(r,d)}y=a}return y};this.destroy=function(){e.deleteProgram(r);this.program=void 0};Object.defineProperties(this,{uniforms:{get:function(){console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms().");
-return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=Vf++;this.code=b;this.usedTimes=1;this.program=r;this.vertexShader=h;this.fragmentShader=l;return this}function Wf(a,b){function c(a,b){var c;a?a.isTexture?c=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),c=
+return this.getUniforms()}},attributes:{get:function(){console.warn("THREE.WebGLProgram: .attributes is now .getAttributes().");return this.getAttributes()}}});this.id=Yf++;this.code=b;this.usedTimes=1;this.program=r;this.vertexShader=h;this.fragmentShader=l;return this}function Zf(a,b){function c(a,b){var c;a?a.isTexture?c=a.encoding:a.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),c=
 a.texture.encoding):c=3E3;3E3===c&&b&&(c=3007);return c}var d=[],e={MeshDepthMaterial:"depth",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points"},f="precision supportsVertexTextures map mapEncoding envMap envMapMode envMapEncoding lightMap aoMap emissiveMap emissiveMapEncoding bumpMap normalMap displacementMap specularMap roughnessMap metalnessMap gradientMap alphaMap combine vertexColors fog useFog fogExp flatShading sizeAttenuation logarithmicDepthBuffer skinning maxBones useVertexTexture morphTargets morphNormals maxMorphTargets maxMorphNormals premultipliedAlpha numDirLights numPointLights numSpotLights numHemiLights numRectAreaLights shadowMapEnabled shadowMapType toneMapping physicallyCorrectLights alphaTest doubleSided flipSided numClippingPlanes numClipIntersection depthPacking dithering".split(" ");
 this.getParameters=function(d,f,l,m,u,q){var n=e[d.type],t;if(q.isSkinnedMesh)if(t=q.skeleton.bones,b.floatVertexTextures)t=1024;else{var k=Math.min(Math.floor((b.maxVertexUniforms-20)/4),t.length);k<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+k+"."),t=0):t=k}else t=0;k=a.getPrecision();null!==d.precision&&(k=b.getMaxPrecision(d.precision),k!==d.precision&&console.warn("THREE.WebGLProgram.getParameters:",d.precision,"not supported, using",k,"instead."));
 var r=a.getRenderTarget();return{shaderID:n,precision:k,supportsVertexTextures:b.vertexTextures,outputEncoding:c(r?r.texture:null,a.gammaOutput),map:!!d.map,mapEncoding:c(d.map,a.gammaInput),envMap:!!d.envMap,envMapMode:d.envMap&&d.envMap.mapping,envMapEncoding:c(d.envMap,a.gammaInput),envMapCubeUV:!!d.envMap&&(306===d.envMap.mapping||307===d.envMap.mapping),lightMap:!!d.lightMap,aoMap:!!d.aoMap,emissiveMap:!!d.emissiveMap,emissiveMapEncoding:c(d.emissiveMap,a.gammaInput),bumpMap:!!d.bumpMap,normalMap:!!d.normalMap,
 displacementMap:!!d.displacementMap,roughnessMap:!!d.roughnessMap,metalnessMap:!!d.metalnessMap,specularMap:!!d.specularMap,alphaMap:!!d.alphaMap,gradientMap:!!d.gradientMap,combine:d.combine,vertexColors:d.vertexColors,fog:!!l,useFog:d.fog,fogExp:l&&l.isFogExp2,flatShading:1===d.shading,sizeAttenuation:d.sizeAttenuation,logarithmicDepthBuffer:b.logarithmicDepthBuffer,skinning:d.skinning&&0<t,maxBones:t,useVertexTexture:b.floatVertexTextures,morphTargets:d.morphTargets,morphNormals:d.morphNormals,
 maxMorphTargets:a.maxMorphTargets,maxMorphNormals:a.maxMorphNormals,numDirLights:f.directional.length,numPointLights:f.point.length,numSpotLights:f.spot.length,numRectAreaLights:f.rectArea.length,numHemiLights:f.hemi.length,numClippingPlanes:m,numClipIntersection:u,dithering:d.dithering,shadowMapEnabled:a.shadowMap.enabled&&q.receiveShadow&&0<f.shadows.length,shadowMapType:a.shadowMap.type,toneMapping:a.toneMapping,physicallyCorrectLights:a.physicallyCorrectLights,premultipliedAlpha:d.premultipliedAlpha,
 alphaTest:d.alphaTest,doubleSided:2===d.side,flipSided:1===d.side,depthPacking:void 0!==d.depthPacking?d.depthPacking:!1}};this.getProgramCode=function(a,b){var c=[];b.shaderID?c.push(b.shaderID):(c.push(a.fragmentShader),c.push(a.vertexShader));if(void 0!==a.defines)for(var d in a.defines)c.push(d),c.push(a.defines[d]);for(d=0;d<f.length;d++)c.push(b[f[d]]);return c.join()};this.acquireProgram=function(b,c,e){for(var f,u=0,q=d.length;u<q;u++){var n=d[u];if(n.code===e){f=n;++f.usedTimes;break}}void 0===
-f&&(f=new Uf(a,e,b,c),d.push(f));return f};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=d.indexOf(a);d[b]=d[d.length-1];d.pop();a.destroy()}};this.programs=d}function Xf(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+
+f&&(f=new Xf(a,e,b,c),d.push(f));return f};this.releaseProgram=function(a){if(0===--a.usedTimes){var b=d.indexOf(a);d[b]=d[d.length-1];d.pop();a.destroy()}};this.programs=d}function $f(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+
 a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function l(a){return Y.isPowerOfTwo(a.width)&&Y.isPowerOfTwo(a.height)}function m(b){return 1003===b||1004===b||1005===b?a.NEAREST:a.LINEAR}function u(b){b=b.target;b.removeEventListener("dispose",u);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.remove(b)}g.textures--}function q(b){b=b.target;
 b.removeEventListener("dispose",q);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b.isWebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.remove(b.texture);d.remove(b)}g.textures--}function n(b,
 m){var n=d.get(b);if(0<b.version&&n.__version!==b.version){var q=b.image;if(void 0===q)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",b);else if(!1===q.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",b);else{void 0===n.__webglInit&&(n.__webglInit=!0,b.addEventListener("dispose",u),n.__webglTexture=a.createTexture(),g.textures++);c.activeTexture(a.TEXTURE0+m);c.bindTexture(a.TEXTURE_2D,n.__webglTexture);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,
@@ -109,25 +109,25 @@ e);c.bindTexture(a.TEXTURE_CUBE_MAP,d.get(b).__webglTexture)};this.setupRenderTa
 b,a.COLOR_ATTACHMENT0,a.TEXTURE_CUBE_MAP_POSITIVE_X+u);b.texture.generateMipmaps&&m&&a.generateMipmap(a.TEXTURE_CUBE_MAP);c.bindTexture(a.TEXTURE_CUBE_MAP,null)}else c.bindTexture(a.TEXTURE_2D,f.__webglTexture),t(a.TEXTURE_2D,b.texture,m),k(e.__webglFramebuffer,b,a.COLOR_ATTACHMENT0,a.TEXTURE_2D),b.texture.generateMipmaps&&m&&a.generateMipmap(a.TEXTURE_2D),c.bindTexture(a.TEXTURE_2D,null);if(b.depthBuffer){e=d.get(b);f=!0===b.isWebGLRenderTargetCube;if(b.depthTexture){if(f)throw Error("target.depthTexture not supported in Cube render targets");
 if(b&&b.isWebGLRenderTargetCube)throw Error("Depth Texture with cube render targets is not supported!");a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer);if(!b.depthTexture||!b.depthTexture.isDepthTexture)throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");d.get(b.depthTexture).__webglTexture&&b.depthTexture.image.width===b.width&&b.depthTexture.image.height===b.height||(b.depthTexture.image.width=b.width,b.depthTexture.image.height=b.height,b.depthTexture.needsUpdate=
 !0);n(b.depthTexture,0);e=d.get(b.depthTexture).__webglTexture;if(1026===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.TEXTURE_2D,e,0);else if(1027===b.depthTexture.format)a.framebufferTexture2D(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.TEXTURE_2D,e,0);else throw Error("Unknown depthTexture format");}else if(f)for(e.__webglDepthbuffer=[],f=0;6>f;f++)a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer[f]),e.__webglDepthbuffer[f]=a.createRenderbuffer(),r(e.__webglDepthbuffer[f],
-b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),r(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture;e.generateMipmaps&&l(b)&&1003!==e.minFilter&&1006!==e.minFilter&&(b=b&&b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,e=d.get(e).__webglTexture,c.bindTexture(b,e),a.generateMipmap(b),c.bindTexture(b,null))}}function Yf(){var a={};return{get:function(b){b=b.uuid;
-var c=a[b];void 0===c&&(c={},a[b]=c);return c},remove:function(b){delete a[b.uuid]},clear:function(){a={}}}}function Zf(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER,a.NEAREST);for(b=0;b<d;b++)a.texImage2D(c+b,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,e);return f}function e(b){!0!==w[b]&&(a.enable(b),w[b]=!0)}function f(b){!1!==w[b]&&(a.disable(b),w[b]=!1)}function g(b,d,
-g,h,l,m,u,n){0!==b?e(a.BLEND):f(a.BLEND);if(b!==v||n!==pa)2===b?n?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):3===b?n?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):4===b?n?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,
-a.SRC_COLOR,a.ZERO,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR)):n?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),v=b,pa=n;if(5===b){l=l||d;m=m||g;u=u||h;if(d!==O||l!==H)a.blendEquationSeparate(c(d),c(l)),O=d,H=l;if(g!==C||h!==F||m!==Z||u!==aa)a.blendFuncSeparate(c(g),
-c(h),c(m),c(u)),C=g,F=h,Z=m,aa=u}else aa=Z=H=F=C=O=null}function h(b){J!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),J=b)}function l(b){0!==b?(e(a.CULL_FACE),b!==D&&(1===b?a.cullFace(a.BACK):2===b?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):f(a.CULL_FACE);D=b}function m(b,c,d){if(b){if(e(a.POLYGON_OFFSET_FILL),A!==c||Q!==d)a.polygonOffset(c,d),A=c,Q=d}else f(a.POLYGON_OFFSET_FILL)}function u(b){void 0===b&&(b=a.TEXTURE0+W-1);V!==b&&(a.activeTexture(b),V=b)}var q=new function(){var b=!1,c=new ha,
+b);else a.bindFramebuffer(a.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=a.createRenderbuffer(),r(e.__webglDepthbuffer,b);a.bindFramebuffer(a.FRAMEBUFFER,null)}};this.updateRenderTargetMipmap=function(b){var e=b.texture;e.generateMipmaps&&l(b)&&1003!==e.minFilter&&1006!==e.minFilter&&(b=b&&b.isWebGLRenderTargetCube?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D,e=d.get(e).__webglTexture,c.bindTexture(b,e),a.generateMipmap(b),c.bindTexture(b,null))}}function ag(){var a={};return{get:function(b){b=b.uuid;
+var c=a[b];void 0===c&&(c={},a[b]=c);return c},remove:function(b){delete a[b.uuid]},clear:function(){a={}}}}function bg(a,b,c){function d(b,c,d){var e=new Uint8Array(4),f=a.createTexture();a.bindTexture(b,f);a.texParameteri(b,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(b,a.TEXTURE_MAG_FILTER,a.NEAREST);for(b=0;b<d;b++)a.texImage2D(c+b,0,a.RGBA,1,1,0,a.RGBA,a.UNSIGNED_BYTE,e);return f}function e(b){!0!==w[b]&&(a.enable(b),w[b]=!0)}function f(b){!1!==w[b]&&(a.disable(b),w[b]=!1)}function g(b,d,
+g,h,l,m,n,u){0!==b?e(a.BLEND):f(a.BLEND);if(b!==v||u!==pa)2===b?u?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE,a.ONE,a.ONE)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.SRC_ALPHA,a.ONE)):3===b?u?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,a.ZERO,a.ONE_MINUS_SRC_COLOR,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.ONE_MINUS_SRC_COLOR)):4===b?u?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ZERO,
+a.SRC_COLOR,a.ZERO,a.SRC_ALPHA)):(a.blendEquation(a.FUNC_ADD),a.blendFunc(a.ZERO,a.SRC_COLOR)):u?(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)):(a.blendEquationSeparate(a.FUNC_ADD,a.FUNC_ADD),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA)),v=b,pa=u;if(5===b){l=l||d;m=m||g;n=n||h;if(d!==O||l!==H)a.blendEquationSeparate(c(d),c(l)),O=d,H=l;if(g!==C||h!==F||m!==Z||n!==aa)a.blendFuncSeparate(c(g),
+c(h),c(m),c(n)),C=g,F=h,Z=m,aa=n}else aa=Z=H=F=C=O=null}function h(b){J!==b&&(b?a.frontFace(a.CW):a.frontFace(a.CCW),J=b)}function l(b){0!==b?(e(a.CULL_FACE),b!==D&&(1===b?a.cullFace(a.BACK):2===b?a.cullFace(a.FRONT):a.cullFace(a.FRONT_AND_BACK))):f(a.CULL_FACE);D=b}function m(b,c,d){if(b){if(e(a.POLYGON_OFFSET_FILL),A!==c||Q!==d)a.polygonOffset(c,d),A=c,Q=d}else f(a.POLYGON_OFFSET_FILL)}function u(b){void 0===b&&(b=a.TEXTURE0+W-1);V!==b&&(a.activeTexture(b),V=b)}var q=new function(){var b=!1,c=new ha,
 d=null,e=new ha;return{setMask:function(c){d===c||b||(a.colorMask(c,c,c,c),d=c)},setLocked:function(a){b=a},setClear:function(b,d,f,g,h){!0===h&&(b*=g,d*=g,f*=g);c.set(b,d,f,g);!1===e.equals(c)&&(a.clearColor(b,d,f,g),e.copy(c))},reset:function(){b=!1;d=null;e.set(0,0,0,1)}}},n=new function(){var b=!1,c=null,d=null,g=null;return{setTest:function(b){b?e(a.DEPTH_TEST):f(a.DEPTH_TEST)},setMask:function(d){c===d||b||(a.depthMask(d),c=d)},setFunc:function(b){if(d!==b){if(b)switch(b){case 0:a.depthFunc(a.NEVER);
-break;case 1:a.depthFunc(a.ALWAYS);break;case 2:a.depthFunc(a.LESS);break;case 3:a.depthFunc(a.LEQUAL);break;case 4:a.depthFunc(a.EQUAL);break;case 5:a.depthFunc(a.GEQUAL);break;case 6:a.depthFunc(a.GREATER);break;case 7:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);d=b}},setLocked:function(a){b=a},setClear:function(b){g!==b&&(a.clearDepth(b),g=b)},reset:function(){b=!1;g=d=c=null}}},t=new function(){var b=!1,c=null,d=null,g=null,h=null,l=null,m=null,u=null,
-n=null;return{setTest:function(b){b?e(a.STENCIL_TEST):f(a.STENCIL_TEST)},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,e){if(d!==b||g!==c||h!==e)a.stencilFunc(b,c,e),d=b,g=c,h=e},setOp:function(b,c,d){if(l!==b||m!==c||u!==d)a.stencilOp(b,c,d),l=b,m=c,u=d},setLocked:function(a){b=a},setClear:function(b){n!==b&&(a.clearStencil(b),n=b)},reset:function(){b=!1;n=u=m=l=h=g=d=c=null}}},k=a.getParameter(a.MAX_VERTEX_ATTRIBS),r=new Uint8Array(k),p=new Uint8Array(k),y=new Uint8Array(k),
+break;case 1:a.depthFunc(a.ALWAYS);break;case 2:a.depthFunc(a.LESS);break;case 3:a.depthFunc(a.LEQUAL);break;case 4:a.depthFunc(a.EQUAL);break;case 5:a.depthFunc(a.GEQUAL);break;case 6:a.depthFunc(a.GREATER);break;case 7:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);d=b}},setLocked:function(a){b=a},setClear:function(b){g!==b&&(a.clearDepth(b),g=b)},reset:function(){b=!1;g=d=c=null}}},t=new function(){var b=!1,c=null,d=null,g=null,h=null,l=null,m=null,n=null,
+u=null;return{setTest:function(b){b?e(a.STENCIL_TEST):f(a.STENCIL_TEST)},setMask:function(d){c===d||b||(a.stencilMask(d),c=d)},setFunc:function(b,c,e){if(d!==b||g!==c||h!==e)a.stencilFunc(b,c,e),d=b,g=c,h=e},setOp:function(b,c,d){if(l!==b||m!==c||n!==d)a.stencilOp(b,c,d),l=b,m=c,n=d},setLocked:function(a){b=a},setClear:function(b){u!==b&&(a.clearStencil(b),u=b)},reset:function(){b=!1;u=n=m=l=h=g=d=c=null}}},k=a.getParameter(a.MAX_VERTEX_ATTRIBS),r=new Uint8Array(k),p=new Uint8Array(k),y=new Uint8Array(k),
 w={},G=null,v=null,O=null,C=null,F=null,H=null,Z=null,aa=null,pa=!1,J=null,D=null,E=null,A=null,Q=null,N=null,W=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),k=parseFloat(/^WebGL\ ([0-9])/.exec(a.getParameter(a.VERSION))[1]),ka=1<=parseFloat(k),V=null,R={},I=new ha,K=new ha,L={};L[a.TEXTURE_2D]=d(a.TEXTURE_2D,a.TEXTURE_2D,1);L[a.TEXTURE_CUBE_MAP]=d(a.TEXTURE_CUBE_MAP,a.TEXTURE_CUBE_MAP_POSITIVE_X,6);return{buffers:{color:q,depth:n,stencil:t},init:function(){q.setClear(0,0,0,1);n.setClear(1);t.setClear(0);
 e(a.DEPTH_TEST);n.setFunc(3);h(!1);l(1);e(a.CULL_FACE);e(a.BLEND);g(1)},initAttributes:function(){for(var a=0,b=r.length;a<b;a++)r[a]=0},enableAttribute:function(c){r[c]=1;0===p[c]&&(a.enableVertexAttribArray(c),p[c]=1);0!==y[c]&&(b.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(c,0),y[c]=0)},enableAttributeAndDivisor:function(c,d){r[c]=1;0===p[c]&&(a.enableVertexAttribArray(c),p[c]=1);y[c]!==d&&(b.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(c,d),y[c]=d)},disableUnusedAttributes:function(){for(var b=
 0,c=p.length;b!==c;++b)p[b]!==r[b]&&(a.disableVertexAttribArray(b),p[b]=0)},enable:e,disable:f,getCompressedTextureFormats:function(){if(null===G&&(G=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")||b.get("WEBGL_compressed_texture_etc1")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)G.push(c[d]);return G},setBlending:g,setMaterial:function(b){2===b.side?f(a.CULL_FACE):e(a.CULL_FACE);h(1===b.side);!0===b.transparent?g(b.blending,b.blendEquation,
 b.blendSrc,b.blendDst,b.blendEquationAlpha,b.blendSrcAlpha,b.blendDstAlpha,b.premultipliedAlpha):g(0);n.setFunc(b.depthFunc);n.setTest(b.depthTest);n.setMask(b.depthWrite);q.setMask(b.colorWrite);m(b.polygonOffset,b.polygonOffsetFactor,b.polygonOffsetUnits)},setFlipSided:h,setCullFace:l,setLineWidth:function(b){b!==E&&(ka&&a.lineWidth(b),E=b)},setPolygonOffset:m,getScissorTest:function(){return N},setScissorTest:function(b){(N=b)?e(a.SCISSOR_TEST):f(a.SCISSOR_TEST)},activeTexture:u,bindTexture:function(b,
 c){null===V&&u();var d=R[V];void 0===d&&(d={type:void 0,texture:void 0},R[V]=d);if(d.type!==b||d.texture!==c)a.bindTexture(b,c||L[b]),d.type=b,d.texture=c},compressedTexImage2D:function(){try{a.compressedTexImage2D.apply(a,arguments)}catch(b){console.error(b)}},texImage2D:function(){try{a.texImage2D.apply(a,arguments)}catch(b){console.error(b)}},scissor:function(b){!1===I.equals(b)&&(a.scissor(b.x,b.y,b.z,b.w),I.copy(b))},viewport:function(b){!1===K.equals(b)&&(a.viewport(b.x,b.y,b.z,b.w),K.copy(b))},
-reset:function(){for(var b=0;b<p.length;b++)1===p[b]&&(a.disableVertexAttribArray(b),p[b]=0);w={};V=G=null;R={};D=J=v=null;q.reset();n.reset();t.reset()}}}function $f(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,
+reset:function(){for(var b=0;b<p.length;b++)1===p[b]&&(a.disableVertexAttribArray(b),p[b]=0);w={};V=G=null;R={};D=J=v=null;q.reset();n.reset();t.reset()}}}function cg(a,b,c){function d(b){if("highp"===b){if(0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.HIGH_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,a.HIGH_FLOAT).precision)return"highp";b="mediump"}return"mediump"===b&&0<a.getShaderPrecisionFormat(a.VERTEX_SHADER,a.MEDIUM_FLOAT).precision&&0<a.getShaderPrecisionFormat(a.FRAGMENT_SHADER,
 a.MEDIUM_FLOAT).precision?"mediump":"lowp"}var e,f=void 0!==c.precision?c.precision:"highp",g=d(f);g!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",g,"instead."),f=g);c=!0===c.logarithmicDepthBuffer&&!!b.get("EXT_frag_depth");var g=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),h=a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=a.getParameter(a.MAX_TEXTURE_SIZE),m=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE),u=a.getParameter(a.MAX_VERTEX_ATTRIBS),q=a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS),
 n=a.getParameter(a.MAX_VARYING_VECTORS),t=a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS),k=0<h,r=!!b.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==e)return e;var c=b.get("EXT_texture_filter_anisotropic");return e=null!==c?a.getParameter(c.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:d,precision:f,logarithmicDepthBuffer:c,maxTextures:g,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:m,maxAttributes:u,maxVertexUniforms:q,maxVaryings:n,maxFragmentUniforms:t,vertexTextures:k,
-floatFragmentTextures:r,floatVertexTextures:k&&r}}function ag(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "WEBGL_depth_texture":d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
+floatFragmentTextures:r,floatVertexTextures:k&&r}}function dg(a){var b={};return{get:function(c){if(void 0!==b[c])return b[c];var d;switch(c){case "WEBGL_depth_texture":d=a.getExtension("WEBGL_depth_texture")||a.getExtension("MOZ_WEBGL_depth_texture")||a.getExtension("WEBKIT_WEBGL_depth_texture");break;case "EXT_texture_filter_anisotropic":d=a.getExtension("EXT_texture_filter_anisotropic")||a.getExtension("MOZ_EXT_texture_filter_anisotropic")||a.getExtension("WEBKIT_EXT_texture_filter_anisotropic");
 break;case "WEBGL_compressed_texture_s3tc":d=a.getExtension("WEBGL_compressed_texture_s3tc")||a.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case "WEBGL_compressed_texture_pvrtc":d=a.getExtension("WEBGL_compressed_texture_pvrtc")||a.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case "WEBGL_compressed_texture_etc1":d=a.getExtension("WEBGL_compressed_texture_etc1");break;default:d=a.getExtension(c)}null===d&&console.warn("THREE.WebGLRenderer: "+
-c+" extension not supported.");return b[c]=d}}}function bg(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,l),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,
+c+" extension not supported.");return b[c]=d}}}function eg(){function a(){m.value!==d&&(m.value=d,m.needsUpdate=0<e);c.numPlanes=e;c.numIntersection=0}function b(a,b,d,e){var f=null!==a?a.length:0,g=null;if(0!==f){g=m.value;if(!0!==e||null===g){e=d+4*f;b=b.matrixWorldInverse;l.getNormalMatrix(b);if(null===g||g.length<e)g=new Float32Array(e);for(e=0;e!==f;++e,d+=4)h.copy(a[e]).applyMatrix4(b,l),h.normal.toArray(g,d),g[d+3]=h.constant}m.value=g;m.needsUpdate=!0}c.numPlanes=f;return g}var c=this,d=null,
 e=0,f=!1,g=!1,h=new va,l=new Fa,m={value:null,needsUpdate:!1};this.uniform=m;this.numIntersection=this.numPlanes=0;this.init=function(a,c,g){var h=0!==a.length||c||0!==e||f;f=c;d=b(a,g,0);e=a.length;return h};this.beginShadows=function(){g=!0;b(null)};this.endShadows=function(){g=!1;a()};this.setState=function(c,h,l,t,k,r){if(!f||null===c||0===c.length||g&&!l)g?b(null):a();else{l=g?0:e;var p=4*l,y=k.clippingState||null;m.value=y;y=b(c,t,p,r);for(c=0;c!==p;++c)y[c]=d[c];k.clippingState=y;this.numIntersection=
 h?this.numPlanes:0;this.numPlanes+=l}}}function Td(a){function b(){ea.init();ea.scissor(ka.copy(ca).multiplyScalar(M));ea.viewport(R.copy(ia).multiplyScalar(M));ea.buffers.color.setClear(P.r,P.g,P.b,X,O)}function c(){W=E=null;N="";Q=-1;ea.reset()}function d(a){a.preventDefault();c();b();fa.clear();va.clear()}function e(a){a=a.target;a.removeEventListener("dispose",e);f(a);fa.remove(a)}function f(a){var b=fa.get(a).program;a.program=void 0;void 0!==b&&Aa.releaseProgram(b)}function g(a,b,c){a.render(function(a){J.renderBufferImmediate(a,
 b,c)})}function h(a,b){return Math.abs(b[0])-Math.abs(a[0])}function l(a,b,c){if(a.visible){if(a.layers.test(b.layers))if(a.isLight)F.push(a);else if(a.isSprite)a.frustumCulled&&!Rd.intersectsSprite(a)||aa.push(a);else if(a.isLensFlare)D.push(a);else if(a.isImmediateRenderObject)c&&Na.setFromMatrixPosition(a.matrixWorld).applyMatrix4(gd),H.push(a,null,a.material,Na.z,null);else if(a.isMesh||a.isLine||a.isPoints)if(a.isSkinnedMesh&&a.skeleton.update(),!a.frustumCulled||Rd.intersectsObject(a)){c&&Na.setFromMatrixPosition(a.matrixWorld).applyMatrix4(gd);
@@ -153,37 +153,37 @@ a)return B.LUMINANCE_ALPHA;if(1026===a)return B.DEPTH_COMPONENT;if(1027===a)retu
 a)return B.ONE_MINUS_DST_COLOR;if(210===a)return B.SRC_ALPHA_SATURATE;if(2001===a||2002===a||2003===a||2004===a)if(b=ma.get("WEBGL_compressed_texture_s3tc"),null!==b){if(2001===a)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(2002===a)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(2003===a)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(2004===a)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(2100===a||2101===a||2102===a||2103===a)if(b=ma.get("WEBGL_compressed_texture_pvrtc"),null!==b){if(2100===a)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
 if(2101===a)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(2102===a)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(2103===a)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(2151===a&&(b=ma.get("WEBGL_compressed_texture_etc1"),null!==b))return b.COMPRESSED_RGB_ETC1_WEBGL;if(103===a||104===a)if(b=ma.get("EXT_blend_minmax"),null!==b){if(103===a)return b.MIN_EXT;if(104===a)return b.MAX_EXT}return 1020===a&&(b=ma.get("WEBGL_depth_texture"),null!==b)?b.UNSIGNED_INT_24_8_WEBGL:0}console.log("THREE.WebGLRenderer",
 "85dev");a=a||{};var r=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),x=void 0!==a.context?a.context:null,y=void 0!==a.alpha?a.alpha:!1,w=void 0!==a.depth?a.depth:!0,G=void 0!==a.stencil?a.stencil:!0,v=void 0!==a.antialias?a.antialias:!1,O=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,C=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,F=[],H=null,Z=new Float32Array(8),aa=[],D=[];this.domElement=r;this.context=null;this.sortObjects=this.autoClearStencil=
-this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var J=this,E=null,A=null,ga=null,Q=-1,N="",W=null,ka=new ha,V=null,R=new ha,T=0,P=new K(0),X=0,S=r.width,ba=r.height,M=1,ca=new ha(0,0,S,ba),na=!1,ia=new ha(0,0,S,ba),Rd=new fd,Oa=new bg,oa=
+this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMappingWhitePoint=this.toneMappingExposure=this.toneMapping=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var J=this,E=null,A=null,ga=null,Q=-1,N="",W=null,ka=new ha,V=null,R=new ha,T=0,P=new K(0),X=0,S=r.width,ba=r.height,M=1,ca=new ha(0,0,S,ba),na=!1,ia=new ha(0,0,S,ba),Rd=new fd,Oa=new eg,oa=
 !1,Sd=!1,gd=new L,Na=new p,Ud=new L,qa=new L,da={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},ua={geometries:0,textures:0},la={frame:0,calls:0,vertices:0,faces:0,points:0};this.info={render:la,memory:ua,programs:null};var B;try{y={alpha:y,depth:w,stencil:G,antialias:v,premultipliedAlpha:O,preserveDrawingBuffer:C};B=x||r.getContext("webgl",
-y)||r.getContext("experimental-webgl",y);if(null===B){if(null!==r.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}void 0===B.getShaderPrecisionFormat&&(B.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});r.addEventListener("webglcontextlost",d,!1)}catch(cg){console.error("THREE.WebGLRenderer: "+cg)}var ma=new ag(B);ma.get("WEBGL_depth_texture");ma.get("OES_texture_float");ma.get("OES_texture_float_linear");
-ma.get("OES_texture_half_float");ma.get("OES_texture_half_float_linear");ma.get("OES_standard_derivatives");ma.get("ANGLE_instanced_arrays");ma.get("OES_element_index_uint")&&(I.MaxIndex=4294967296);var ja=new $f(B,ma,a),ea=new Zf(B,ma,k),fa=new Yf,ra=new Xf(B,ma,ea,fa,ja,k,ua),za=new Ff(B),Ca=new Mf(B,za,ua),va=new Of(B,Ca,la),Aa=new Wf(this,ja),Ba=new Nf,Fa=new Jf;this.info.programs=Aa.programs;var Ja=new Lf(B,ma,la),Ka=new Kf(B,ma,la),Ea,ya,sa,ta;b();this.context=B;this.capabilities=ja;this.extensions=
-ma;this.properties=fa;this.state=ea;var Ia=new Ge(this,da,va,ja);this.shadowMap=Ia;var La=new Cf(this,aa),Ma=new Bf(this,D);this.getContext=function(){return B};this.getContextAttributes=function(){return B.getContextAttributes()};this.forceContextLoss=function(){var a=ma.get("WEBGL_lose_context");a&&a.loseContext()};this.getMaxAnisotropy=function(){return ja.getMaxAnisotropy()};this.getPrecision=function(){return ja.precision};this.getPixelRatio=function(){return M};this.setPixelRatio=function(a){void 0!==
+y)||r.getContext("experimental-webgl",y);if(null===B){if(null!==r.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}void 0===B.getShaderPrecisionFormat&&(B.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});r.addEventListener("webglcontextlost",d,!1)}catch(fg){console.error("THREE.WebGLRenderer: "+fg)}var ma=new dg(B);ma.get("WEBGL_depth_texture");ma.get("OES_texture_float");ma.get("OES_texture_float_linear");
+ma.get("OES_texture_half_float");ma.get("OES_texture_half_float_linear");ma.get("OES_standard_derivatives");ma.get("ANGLE_instanced_arrays");ma.get("OES_element_index_uint")&&(I.MaxIndex=4294967296);var ja=new cg(B,ma,a),ea=new bg(B,ma,k),fa=new ag,ra=new $f(B,ma,ea,fa,ja,k,ua),za=new If(B),Ca=new Pf(B,za,ua),va=new Rf(B,Ca,la),Aa=new Zf(this,ja),Ba=new Qf,Fa=new Mf;this.info.programs=Aa.programs;var Ja=new Of(B,ma,la),Ka=new Nf(B,ma,la),Ea,ya,sa,ta;b();this.context=B;this.capabilities=ja;this.extensions=
+ma;this.properties=fa;this.state=ea;var Ia=new Ge(this,da,va,ja);this.shadowMap=Ia;var La=new Ff(this,aa),Ma=new Ef(this,D);this.getContext=function(){return B};this.getContextAttributes=function(){return B.getContextAttributes()};this.forceContextLoss=function(){var a=ma.get("WEBGL_lose_context");a&&a.loseContext()};this.getMaxAnisotropy=function(){return ja.getMaxAnisotropy()};this.getPrecision=function(){return ja.precision};this.getPixelRatio=function(){return M};this.setPixelRatio=function(a){void 0!==
 a&&(M=a,this.setSize(ia.z,ia.w,!1))};this.getSize=function(){return{width:S,height:ba}};this.setSize=function(a,b,c){S=a;ba=b;r.width=a*M;r.height=b*M;!1!==c&&(r.style.width=a+"px",r.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){ea.viewport(ia.set(a,b,c,d))};this.setScissor=function(a,b,c,d){ea.scissor(ca.set(a,b,c,d))};this.setScissorTest=function(a){ea.setScissorTest(na=a)};this.getClearColor=function(){return P};this.setClearColor=function(a,b){P.set(a);X=void 0!==
 b?b:1;ea.buffers.color.setClear(P.r,P.g,P.b,X,O)};this.getClearAlpha=function(){return X};this.setClearAlpha=function(a){X=a;ea.buffers.color.setClear(P.r,P.g,P.b,X,O)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=B.COLOR_BUFFER_BIT;if(void 0===b||b)d|=B.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=B.STENCIL_BUFFER_BIT;B.clear(d)};this.clearColor=function(){this.clear(!0,!1,!1)};this.clearDepth=function(){this.clear(!1,!0,!1)};this.clearStencil=function(){this.clear(!1,!1,!0)};this.clearTarget=
 function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=c;this.dispose=function(){r.removeEventListener("webglcontextlost",d,!1);Fa.dispose()};this.renderBufferImmediate=function(a,b,c){ea.initAttributes();var d=fa.get(a);a.hasPositions&&!d.position&&(d.position=B.createBuffer());a.hasNormals&&!d.normal&&(d.normal=B.createBuffer());a.hasUvs&&!d.uv&&(d.uv=B.createBuffer());a.hasColors&&!d.color&&(d.color=B.createBuffer());b=b.getAttributes();a.hasPositions&&(B.bindBuffer(B.ARRAY_BUFFER,
 d.position),B.bufferData(B.ARRAY_BUFFER,a.positionArray,B.DYNAMIC_DRAW),ea.enableAttribute(b.position),B.vertexAttribPointer(b.position,3,B.FLOAT,!1,0,0));if(a.hasNormals){B.bindBuffer(B.ARRAY_BUFFER,d.normal);if(!c.isMeshPhongMaterial&&!c.isMeshStandardMaterial&&!c.isMeshNormalMaterial&&1===c.shading)for(var e=0,f=3*a.count;e<f;e+=9){var g=a.normalArray,h=(g[e+0]+g[e+3]+g[e+6])/3,l=(g[e+1]+g[e+4]+g[e+7])/3,m=(g[e+2]+g[e+5]+g[e+8])/3;g[e+0]=h;g[e+1]=l;g[e+2]=m;g[e+3]=h;g[e+4]=l;g[e+5]=m;g[e+6]=h;
 g[e+7]=l;g[e+8]=m}B.bufferData(B.ARRAY_BUFFER,a.normalArray,B.DYNAMIC_DRAW);ea.enableAttribute(b.normal);B.vertexAttribPointer(b.normal,3,B.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(B.bindBuffer(B.ARRAY_BUFFER,d.uv),B.bufferData(B.ARRAY_BUFFER,a.uvArray,B.DYNAMIC_DRAW),ea.enableAttribute(b.uv),B.vertexAttribPointer(za.uv,2,B.FLOAT,!1,0,0));a.hasColors&&0!==c.vertexColors&&(B.bindBuffer(B.ARRAY_BUFFER,d.color),B.bufferData(B.ARRAY_BUFFER,a.colorArray,B.DYNAMIC_DRAW),ea.enableAttribute(b.color),B.vertexAttribPointer(b.color,
-3,B.FLOAT,!1,0,0));ea.disableUnusedAttributes();B.drawArrays(B.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){ea.setMaterial(d);var g=q(a,b,d,e);a=c.id+"_"+g.id+"_"+(!0===d.wireframe);var l=!1;a!==N&&(N=a,l=!0);b=e.morphTargetInfluences;if(void 0!==b){var m=[];a=0;for(var u=b.length;a<u;a++)l=b[a],m.push([l,a]);m.sort(h);8<m.length&&(m.length=8);var n=c.morphAttributes;a=0;for(u=m.length;a<u;a++)l=m[a],Z[a]=l[0],0!==l[0]?(b=l[1],!0===d.morphTargets&&n.position&&c.addAttribute("morphTarget"+
-a,n.position[b]),!0===d.morphNormals&&n.normal&&c.addAttribute("morphNormal"+a,n.normal[b])):(!0===d.morphTargets&&c.removeAttribute("morphTarget"+a),!0===d.morphNormals&&c.removeAttribute("morphNormal"+a));a=m.length;for(b=Z.length;a<b;a++)Z[a]=0;g.getUniforms().setValue(B,"morphTargetInfluences",Z);l=!0}b=c.index;u=c.attributes.position;m=1;!0===d.wireframe&&(b=Ca.getWireframeAttribute(c),m=2);a=Ja;null!==b&&(a=Ka,a.setIndex(b));if(l){l=void 0;if(c&&c.isInstancedBufferGeometry&&null===ma.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
-else{void 0===l&&(l=0);ea.initAttributes();var n=c.attributes,g=g.getAttributes(),k=d.defaultAttributeValues,t;for(t in g){var r=g[t];if(0<=r){var z=n[t];if(void 0!==z){var p=z.normalized,w=z.itemSize,v=za.get(z),x=v.buffer,y=v.type,v=v.bytesPerElement;if(z.isInterleavedBufferAttribute){var G=z.data,O=G.stride,z=z.offset;G&&G.isInstancedInterleavedBuffer?(ea.enableAttributeAndDivisor(r,G.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=G.meshPerAttribute*G.count)):ea.enableAttribute(r);
+3,B.FLOAT,!1,0,0));ea.disableUnusedAttributes();B.drawArrays(B.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,f){ea.setMaterial(d);var g=q(a,b,d,e);a=c.id+"_"+g.id+"_"+(!0===d.wireframe);var l=!1;a!==N&&(N=a,l=!0);b=e.morphTargetInfluences;if(void 0!==b){var m=[];a=0;for(var n=b.length;a<n;a++)l=b[a],m.push([l,a]);m.sort(h);8<m.length&&(m.length=8);var u=c.morphAttributes;a=0;for(n=m.length;a<n;a++)l=m[a],Z[a]=l[0],0!==l[0]?(b=l[1],!0===d.morphTargets&&u.position&&c.addAttribute("morphTarget"+
+a,u.position[b]),!0===d.morphNormals&&u.normal&&c.addAttribute("morphNormal"+a,u.normal[b])):(!0===d.morphTargets&&c.removeAttribute("morphTarget"+a),!0===d.morphNormals&&c.removeAttribute("morphNormal"+a));a=m.length;for(b=Z.length;a<b;a++)Z[a]=0;g.getUniforms().setValue(B,"morphTargetInfluences",Z);l=!0}b=c.index;n=c.attributes.position;m=1;!0===d.wireframe&&(b=Ca.getWireframeAttribute(c),m=2);a=Ja;null!==b&&(a=Ka,a.setIndex(b));if(l){l=void 0;if(c&&c.isInstancedBufferGeometry&&null===ma.get("ANGLE_instanced_arrays"))console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");
+else{void 0===l&&(l=0);ea.initAttributes();var u=c.attributes,g=g.getAttributes(),k=d.defaultAttributeValues,t;for(t in g){var r=g[t];if(0<=r){var z=u[t];if(void 0!==z){var p=z.normalized,w=z.itemSize,v=za.get(z),x=v.buffer,y=v.type,v=v.bytesPerElement;if(z.isInterleavedBufferAttribute){var G=z.data,O=G.stride,z=z.offset;G&&G.isInstancedInterleavedBuffer?(ea.enableAttributeAndDivisor(r,G.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=G.meshPerAttribute*G.count)):ea.enableAttribute(r);
 B.bindBuffer(B.ARRAY_BUFFER,x);B.vertexAttribPointer(r,w,y,p,O*v,(l*O+z)*v)}else z.isInstancedBufferAttribute?(ea.enableAttributeAndDivisor(r,z.meshPerAttribute),void 0===c.maxInstancedCount&&(c.maxInstancedCount=z.meshPerAttribute*z.count)):ea.enableAttribute(r),B.bindBuffer(B.ARRAY_BUFFER,x),B.vertexAttribPointer(r,w,y,p,0,l*w*v)}else if(void 0!==k&&(p=k[t],void 0!==p))switch(p.length){case 2:B.vertexAttrib2fv(r,p);break;case 3:B.vertexAttrib3fv(r,p);break;case 4:B.vertexAttrib4fv(r,p);break;default:B.vertexAttrib1fv(r,
-p)}}}ea.disableUnusedAttributes()}null!==b&&B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,za.get(b).buffer)}t=0;null!==b?t=b.count:void 0!==u&&(t=u.count);u=c.drawRange.start*m;l=null!==f?f.start*m:0;b=Math.max(u,l);f=Math.max(0,Math.min(t,u+c.drawRange.count*m,l+(null!==f?f.count*m:Infinity))-1-b+1);if(0!==f){if(e.isMesh)if(!0===d.wireframe)ea.setLineWidth(d.wireframeLinewidth*(null===A?M:1)),a.setMode(B.LINES);else switch(e.drawMode){case 0:a.setMode(B.TRIANGLES);break;case 1:a.setMode(B.TRIANGLE_STRIP);
+p)}}}ea.disableUnusedAttributes()}null!==b&&B.bindBuffer(B.ELEMENT_ARRAY_BUFFER,za.get(b).buffer)}t=0;null!==b?t=b.count:void 0!==n&&(t=n.count);n=c.drawRange.start*m;l=null!==f?f.start*m:0;b=Math.max(n,l);f=Math.max(0,Math.min(t,n+c.drawRange.count*m,l+(null!==f?f.count*m:Infinity))-1-b+1);if(0!==f){if(e.isMesh)if(!0===d.wireframe)ea.setLineWidth(d.wireframeLinewidth*(null===A?M:1)),a.setMode(B.LINES);else switch(e.drawMode){case 0:a.setMode(B.TRIANGLES);break;case 1:a.setMode(B.TRIANGLE_STRIP);
 break;case 2:a.setMode(B.TRIANGLE_FAN)}else e.isLine?(d=d.linewidth,void 0===d&&(d=1),ea.setLineWidth(d*(null===A?M:1)),e.isLineSegments?a.setMode(B.LINES):e.isLineLoop?a.setMode(B.LINE_LOOP):a.setMode(B.LINE_STRIP)):e.isPoints&&a.setMode(B.POINTS);c&&c.isInstancedBufferGeometry?0<c.maxInstancedCount&&a.renderInstances(c,b,f):a.render(b,f)}};this.render=function(a,b,c,d){if(void 0!==b&&!0!==b.isCamera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{N="";
-Q=-1;W=null;!0===a.autoUpdate&&a.updateMatrixWorld();b.onBeforeRender(J);null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);gd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);Rd.setFromMatrix(gd);F.length=0;aa.length=0;D.length=0;Sd=this.localClippingEnabled;oa=Oa.init(this.clippingPlanes,Sd,b);H=Fa.get(a,b);H.init();l(a,b,J.sortObjects);H.finish();!0===J.sortObjects&&H.sort();oa&&Oa.beginShadows();for(var e=F,f=0,g=0,h=e.length;g<h;g++){var u=e[g];u.castShadow&&
-(da.shadows[f]=u,f++)}da.shadows.length=f;Ia.render(a,b);for(var e=F,n,q=u=0,k=0,t,r,z,p=b.matrixWorldInverse,w=0,v=0,x=0,y=0,G=0,f=0,g=e.length;f<g;f++)if(h=e[f],n=h.color,t=h.intensity,r=h.distance,z=h.shadow&&h.shadow.map?h.shadow.map.texture:null,h.isAmbientLight)u+=n.r*t,q+=n.g*t,k+=n.b*t;else if(h.isDirectionalLight){var C=Ba.get(h);C.color.copy(h.color).multiplyScalar(h.intensity);C.direction.setFromMatrixPosition(h.matrixWorld);Na.setFromMatrixPosition(h.target.matrixWorld);C.direction.sub(Na);
-C.direction.transformDirection(p);if(C.shadow=h.castShadow)n=h.shadow,C.shadowBias=n.bias,C.shadowRadius=n.radius,C.shadowMapSize=n.mapSize;da.directionalShadowMap[w]=z;da.directionalShadowMatrix[w]=h.shadow.matrix;da.directional[w]=C;w++}else if(h.isSpotLight){C=Ba.get(h);C.position.setFromMatrixPosition(h.matrixWorld);C.position.applyMatrix4(p);C.color.copy(n).multiplyScalar(t);C.distance=r;C.direction.setFromMatrixPosition(h.matrixWorld);Na.setFromMatrixPosition(h.target.matrixWorld);C.direction.sub(Na);
-C.direction.transformDirection(p);C.coneCos=Math.cos(h.angle);C.penumbraCos=Math.cos(h.angle*(1-h.penumbra));C.decay=0===h.distance?0:h.decay;if(C.shadow=h.castShadow)n=h.shadow,C.shadowBias=n.bias,C.shadowRadius=n.radius,C.shadowMapSize=n.mapSize;da.spotShadowMap[x]=z;da.spotShadowMatrix[x]=h.shadow.matrix;da.spot[x]=C;x++}else if(h.isRectAreaLight)C=Ba.get(h),C.color.copy(n).multiplyScalar(t/(h.width*h.height)),C.position.setFromMatrixPosition(h.matrixWorld),C.position.applyMatrix4(p),qa.identity(),
-Ud.copy(h.matrixWorld),Ud.premultiply(p),qa.extractRotation(Ud),C.halfWidth.set(.5*h.width,0,0),C.halfHeight.set(0,.5*h.height,0),C.halfWidth.applyMatrix4(qa),C.halfHeight.applyMatrix4(qa),da.rectArea[y]=C,y++;else if(h.isPointLight){C=Ba.get(h);C.position.setFromMatrixPosition(h.matrixWorld);C.position.applyMatrix4(p);C.color.copy(h.color).multiplyScalar(h.intensity);C.distance=h.distance;C.decay=0===h.distance?0:h.decay;if(C.shadow=h.castShadow)n=h.shadow,C.shadowBias=n.bias,C.shadowRadius=n.radius,
-C.shadowMapSize=n.mapSize;da.pointShadowMap[v]=z;void 0===da.pointShadowMatrix[v]&&(da.pointShadowMatrix[v]=new L);Na.setFromMatrixPosition(h.matrixWorld).negate();da.pointShadowMatrix[v].identity().setPosition(Na);da.point[v]=C;v++}else h.isHemisphereLight&&(C=Ba.get(h),C.direction.setFromMatrixPosition(h.matrixWorld),C.direction.transformDirection(p),C.direction.normalize(),C.skyColor.copy(h.color).multiplyScalar(t),C.groundColor.copy(h.groundColor).multiplyScalar(t),da.hemi[G]=C,G++);da.ambient[0]=
-u;da.ambient[1]=q;da.ambient[2]=k;da.directional.length=w;da.spot.length=x;da.rectArea.length=y;da.point.length=v;da.hemi.length=G;da.hash=w+","+v+","+x+","+y+","+G+","+da.shadows.length;oa&&Oa.endShadows();la.frame++;la.calls=0;la.vertices=0;la.faces=0;la.points=0;void 0===c&&(c=null);this.setRenderTarget(c);e=a.background;null===e?ea.buffers.color.setClear(P.r,P.g,P.b,X,O):e&&e.isColor&&(ea.buffers.color.setClear(e.r,e.g,e.b,1,O),d=!0);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,
+Q=-1;W=null;!0===a.autoUpdate&&a.updateMatrixWorld();b.onBeforeRender(J);null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);gd.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse);Rd.setFromMatrix(gd);F.length=0;aa.length=0;D.length=0;Sd=this.localClippingEnabled;oa=Oa.init(this.clippingPlanes,Sd,b);H=Fa.get(a,b);H.init();l(a,b,J.sortObjects);H.finish();!0===J.sortObjects&&H.sort();oa&&Oa.beginShadows();for(var e=F,f=0,g=0,h=e.length;g<h;g++){var n=e[g];n.castShadow&&
+(da.shadows[f]=n,f++)}da.shadows.length=f;Ia.render(a,b);for(var e=F,u,q=n=0,k=0,t,r,z,p=b.matrixWorldInverse,w=0,v=0,x=0,y=0,G=0,f=0,g=e.length;f<g;f++)if(h=e[f],u=h.color,t=h.intensity,r=h.distance,z=h.shadow&&h.shadow.map?h.shadow.map.texture:null,h.isAmbientLight)n+=u.r*t,q+=u.g*t,k+=u.b*t;else if(h.isDirectionalLight){var C=Ba.get(h);C.color.copy(h.color).multiplyScalar(h.intensity);C.direction.setFromMatrixPosition(h.matrixWorld);Na.setFromMatrixPosition(h.target.matrixWorld);C.direction.sub(Na);
+C.direction.transformDirection(p);if(C.shadow=h.castShadow)u=h.shadow,C.shadowBias=u.bias,C.shadowRadius=u.radius,C.shadowMapSize=u.mapSize;da.directionalShadowMap[w]=z;da.directionalShadowMatrix[w]=h.shadow.matrix;da.directional[w]=C;w++}else if(h.isSpotLight){C=Ba.get(h);C.position.setFromMatrixPosition(h.matrixWorld);C.position.applyMatrix4(p);C.color.copy(u).multiplyScalar(t);C.distance=r;C.direction.setFromMatrixPosition(h.matrixWorld);Na.setFromMatrixPosition(h.target.matrixWorld);C.direction.sub(Na);
+C.direction.transformDirection(p);C.coneCos=Math.cos(h.angle);C.penumbraCos=Math.cos(h.angle*(1-h.penumbra));C.decay=0===h.distance?0:h.decay;if(C.shadow=h.castShadow)u=h.shadow,C.shadowBias=u.bias,C.shadowRadius=u.radius,C.shadowMapSize=u.mapSize;da.spotShadowMap[x]=z;da.spotShadowMatrix[x]=h.shadow.matrix;da.spot[x]=C;x++}else if(h.isRectAreaLight)C=Ba.get(h),C.color.copy(u).multiplyScalar(t/(h.width*h.height)),C.position.setFromMatrixPosition(h.matrixWorld),C.position.applyMatrix4(p),qa.identity(),
+Ud.copy(h.matrixWorld),Ud.premultiply(p),qa.extractRotation(Ud),C.halfWidth.set(.5*h.width,0,0),C.halfHeight.set(0,.5*h.height,0),C.halfWidth.applyMatrix4(qa),C.halfHeight.applyMatrix4(qa),da.rectArea[y]=C,y++;else if(h.isPointLight){C=Ba.get(h);C.position.setFromMatrixPosition(h.matrixWorld);C.position.applyMatrix4(p);C.color.copy(h.color).multiplyScalar(h.intensity);C.distance=h.distance;C.decay=0===h.distance?0:h.decay;if(C.shadow=h.castShadow)u=h.shadow,C.shadowBias=u.bias,C.shadowRadius=u.radius,
+C.shadowMapSize=u.mapSize;da.pointShadowMap[v]=z;void 0===da.pointShadowMatrix[v]&&(da.pointShadowMatrix[v]=new L);Na.setFromMatrixPosition(h.matrixWorld).negate();da.pointShadowMatrix[v].identity().setPosition(Na);da.point[v]=C;v++}else h.isHemisphereLight&&(C=Ba.get(h),C.direction.setFromMatrixPosition(h.matrixWorld),C.direction.transformDirection(p),C.direction.normalize(),C.skyColor.copy(h.color).multiplyScalar(t),C.groundColor.copy(h.groundColor).multiplyScalar(t),da.hemi[G]=C,G++);da.ambient[0]=
+n;da.ambient[1]=q;da.ambient[2]=k;da.directional.length=w;da.spot.length=x;da.rectArea.length=y;da.point.length=v;da.hemi.length=G;da.hash=w+","+v+","+x+","+y+","+G+","+da.shadows.length;oa&&Oa.endShadows();la.frame++;la.calls=0;la.vertices=0;la.faces=0;la.points=0;void 0===c&&(c=null);this.setRenderTarget(c);e=a.background;null===e?ea.buffers.color.setClear(P.r,P.g,P.b,X,O):e&&e.isColor&&(ea.buffers.color.setClear(e.r,e.g,e.b,1,O),d=!0);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,
 this.autoClearStencil);e&&e.isCubeTexture?(void 0===sa&&(sa=new xa,ta=new wa(new ib(5,5,5),new Da({uniforms:Za.cube.uniforms,vertexShader:Za.cube.vertexShader,fragmentShader:Za.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))),sa.projectionMatrix.copy(b.projectionMatrix),sa.matrixWorld.extractRotation(b.matrixWorld),sa.matrixWorldInverse.getInverse(sa.matrixWorld),ta.material.uniforms.tCube.value=e,ta.modelViewMatrix.multiplyMatrices(sa.matrixWorldInverse,ta.matrixWorld),va.update(ta),
 J.renderBufferDirect(sa,null,ta.geometry,ta.material,ta,null)):e&&e.isTexture&&(void 0===Ea&&(Ea=new Fb(-1,1,1,-1,0,1),ya=new wa(new jb(2,2),new Ha({depthTest:!1,depthWrite:!1,fog:!1}))),ya.material.map=e,va.update(ya),J.renderBufferDirect(Ea,null,ya.geometry,ya.material,ya,null));d=H.opaque;e=H.transparent;a.overrideMaterial?(f=a.overrideMaterial,d.length&&m(d,a,b,f),e.length&&m(e,a,b,f)):(d.length&&m(d,a,b),e.length&&m(e,a,b));La.render(a,b);Ma.render(a,b,R);c&&ra.updateRenderTargetMipmap(c);ea.buffers.depth.setTest(!0);
 ea.buffers.depth.setMask(!0);ea.buffers.color.setMask(!0);b.isArrayCamera&&b.enabled&&J.setScissorTest(!1);b.onAfterRender(J)}};this.setFaceCulling=function(a,b){ea.setCullFace(a);ea.setFlipSided(0===b)};this.allocTextureUnit=function(){var a=T;a>=ja.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ja.maxTextures);T+=1;return a};this.setTexture2D=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTarget&&(a||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),
 a=!0),b=b.texture);ra.setTexture2D(b,c)}}();this.setTexture=function(){var a=!1;return function(b,c){a||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),a=!0);ra.setTexture2D(b,c)}}();this.setTextureCube=function(){var a=!1;return function(b,c){b&&b.isWebGLRenderTargetCube&&(a||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),a=!0),b=b.texture);b&&b.isCubeTexture||Array.isArray(b.image)&&
 6===b.image.length?ra.setTextureCube(b,c):ra.setTextureCubeDynamic(b,c)}}();this.getRenderTarget=function(){return A};this.setRenderTarget=function(a){(A=a)&&void 0===fa.get(a).__webglFramebuffer&&ra.setupRenderTarget(a);var b=a&&a.isWebGLRenderTargetCube,c;a?(c=fa.get(a),c=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,ka.copy(a.scissor),V=a.scissorTest,R.copy(a.viewport)):(c=null,ka.copy(ca).multiplyScalar(M),V=na,R.copy(ia).multiplyScalar(M));ga!==c&&(B.bindFramebuffer(B.FRAMEBUFFER,
 c),ga=c);ea.scissor(ka);ea.setScissorTest(V);ea.viewport(R);b&&(b=fa.get(a.texture),B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,b.__webglTexture,a.activeMipMapLevel))};this.readRenderTargetPixels=function(a,b,c,d,e,f){if(!1===(a&&a.isWebGLRenderTarget))console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var g=fa.get(a).__webglFramebuffer;if(g){var h=!1;g!==ga&&(B.bindFramebuffer(B.FRAMEBUFFER,
-g),h=!0);try{var l=a.texture,m=l.format,n=l.type;1023!==m&&k(m)!==B.getParameter(B.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===n||k(n)===B.getParameter(B.IMPLEMENTATION_COLOR_READ_TYPE)||1015===n&&(ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===n&&ma.get("EXT_color_buffer_half_float")?B.checkFramebufferStatus(B.FRAMEBUFFER)===B.FRAMEBUFFER_COMPLETE?0<=b&&
-b<=a.width-d&&0<=c&&c<=a.height-e&&B.readPixels(b,c,d,e,k(m),k(n),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&B.bindFramebuffer(B.FRAMEBUFFER,ga)}}}}}function Gb(a,b){this.name="";this.color=new K(a);this.density=void 0!==b?b:2.5E-4}function Hb(a,b,c){this.name="";this.color=
+g),h=!0);try{var l=a.texture,m=l.format,u=l.type;1023!==m&&k(m)!==B.getParameter(B.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):1009===u||k(u)===B.getParameter(B.IMPLEMENTATION_COLOR_READ_TYPE)||1015===u&&(ma.get("OES_texture_float")||ma.get("WEBGL_color_buffer_float"))||1016===u&&ma.get("EXT_color_buffer_half_float")?B.checkFramebufferStatus(B.FRAMEBUFFER)===B.FRAMEBUFFER_COMPLETE?0<=b&&
+b<=a.width-d&&0<=c&&c<=a.height-e&&B.readPixels(b,c,d,e,k(m),k(u),f):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete."):console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.")}finally{h&&B.bindFramebuffer(B.FRAMEBUFFER,ga)}}}}}function Gb(a,b){this.name="";this.color=new K(a);this.density=void 0!==b?b:2.5E-4}function Hb(a,b,c){this.name="";this.color=
 new K(a);this.near=void 0!==b?b:1;this.far=void 0!==c?c:1E3}function hd(){A.call(this);this.type="Scene";this.overrideMaterial=this.fog=this.background=null;this.autoUpdate=!0}function Vd(a,b,c,d,e){A.call(this);this.lensFlares=[];this.positionScreen=new p;this.customUpdateCallback=void 0;void 0!==a&&this.add(a,b,c,d,e)}function ab(a){X.call(this);this.type="SpriteMaterial";this.color=new K(16777215);this.map=null;this.rotation=0;this.lights=this.fog=!1;this.setValues(a)}function wc(a){A.call(this);
 this.type="Sprite";this.material=void 0!==a?a:new ab}function xc(){A.call(this);this.type="LOD";Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function yc(a,b){a=a||[];this.bones=a.slice(0);this.boneMatrices=new Float32Array(16*this.bones.length);if(void 0===b)this.calculateInverses();else if(this.bones.length===b.length)this.boneInverses=b.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length.");this.boneInverses=[];for(var c=0,d=this.bones.length;c<d;c++)this.boneInverses.push(new L)}}
 function id(){A.call(this);this.type="Bone"}function jd(a,b){wa.call(this,a,b);this.type="SkinnedMesh";this.bindMode="attached";this.bindMatrix=new L;this.bindMatrixInverse=new L;var c=this.initBones(),c=new yc(c);this.bind(c,this.matrixWorld);this.normalizeSkinWeights()}function ia(a){X.call(this);this.type="LineBasicMaterial";this.color=new K(16777215);this.linewidth=1;this.linejoin=this.linecap="round";this.lights=!1;this.setValues(a)}function Ja(a,b,c){if(1===c)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),
@@ -280,7 +280,7 @@ a)},min:function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y);retu
 c)},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},roundToZero:function(){this.x=0>this.x?Math.ceil(this.x):Math.floor(this.x);this.y=0>this.y?Math.ceil(this.y):Math.floor(this.y);return this},negate:function(){this.x=-this.x;this.y=-this.y;return this},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*
 this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var a=Math.atan2(this.y,this.x);0>a&&(a+=2*Math.PI);return a},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x;a=this.y-a.y;return b*b+a*a},distanceToManhattan:function(a){return Math.abs(this.x-a.x)+
 Math.abs(this.y-a.y)},setLength:function(a){return this.multiplyScalar(a/this.length())},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},lerpVectors:function(a,b,c){return this.subVectors(b,a).multiplyScalar(c).add(a)},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a,b){void 0===b&&(b=0);this.x=a[b];this.y=a[b+1];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this.x;a[b+1]=this.y;return a},fromBufferAttribute:function(a,
-b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=this.x-a.x,f=this.y-a.y;this.x=e*c-f*d+a.x;this.y=e*d+f*c+a.y;return this}});var bf=0;ba.DEFAULT_IMAGE=void 0;ba.DEFAULT_MAPPING=300;Object.defineProperty(ba.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(ba.prototype,ra.prototype,{constructor:ba,isTexture:!0,
+b,c){void 0!==c&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute().");this.x=a.getX(b);this.y=a.getY(b);return this},rotateAround:function(a,b){var c=Math.cos(b),d=Math.sin(b),e=this.x-a.x,f=this.y-a.y;this.x=e*c-f*d+a.x;this.y=e*d+f*c+a.y;return this}});var ef=0;ba.DEFAULT_IMAGE=void 0;ba.DEFAULT_MAPPING=300;Object.defineProperty(ba.prototype,"needsUpdate",{set:function(a){!0===a&&this.version++}});Object.assign(ba.prototype,ra.prototype,{constructor:ba,isTexture:!0,
 clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.name=a.name;this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;
 this.encoding=a.encoding;return this},toJSON:function(a){if(void 0!==a.textures[this.uuid])return a.textures[this.uuid];var b={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var c=this.image;void 0===c.uuid&&(c.uuid=
 Y.generateUUID());if(void 0===a.images[c.uuid]){var d=a.images,e=c.uuid,f=c.uuid,g;void 0!==c.toDataURL?g=c:(g=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),g.width=c.width,g.height=c.height,g.getContext("2d").drawImage(c,0,0,c.width,c.height));g=2048<g.width||2048<g.height?g.toDataURL("image/jpeg",.6):g.toDataURL("image/png");d[e]={uuid:f,url:g}}b.image=c.uuid}return a.textures[this.uuid]=b},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(a){if(300===
@@ -341,7 +341,7 @@ l=a.set(f[8],f[9],f[10]).length();0>this.determinant()&&(g=-g);c.x=f[12];c.y=f[1
 var g=this.elements;g[0]=2*e/(b-a);g[4]=0;g[8]=(b+a)/(b-a);g[12]=0;g[1]=0;g[5]=2*e/(c-d);g[9]=(c+d)/(c-d);g[13]=0;g[2]=0;g[6]=0;g[10]=-(f+e)/(f-e);g[14]=-2*f*e/(f-e);g[3]=0;g[7]=0;g[11]=-1;g[15]=0;return this},makeOrthographic:function(a,b,c,d,e,f){var g=this.elements,h=1/(b-a),l=1/(c-d),m=1/(f-e);g[0]=2*h;g[4]=0;g[8]=0;g[12]=-((b+a)*h);g[1]=0;g[5]=2*l;g[9]=0;g[13]=-((c+d)*l);g[2]=0;g[6]=0;g[10]=-2*m;g[14]=-((f+e)*m);g[3]=0;g[7]=0;g[11]=0;g[15]=1;return this},equals:function(a){var b=this.elements;
 a=a.elements;for(var c=0;16>c;c++)if(b[c]!==a[c])return!1;return!0},fromArray:function(a,b){void 0===b&&(b=0);for(var c=0;16>c;c++)this.elements[c]=a[c+b];return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);var c=this.elements;a[b]=c[0];a[b+1]=c[1];a[b+2]=c[2];a[b+3]=c[3];a[b+4]=c[4];a[b+5]=c[5];a[b+6]=c[6];a[b+7]=c[7];a[b+8]=c[8];a[b+9]=c[9];a[b+10]=c[10];a[b+11]=c[11];a[b+12]=c[12];a[b+13]=c[13];a[b+14]=c[14];a[b+15]=c[15];return a}});cb.prototype=Object.create(ba.prototype);
 cb.prototype.constructor=cb;cb.prototype.isDataTexture=!0;Xa.prototype=Object.create(ba.prototype);Xa.prototype.constructor=Xa;Xa.prototype.isCubeTexture=!0;Object.defineProperty(Xa.prototype,"images",{get:function(){return this.image},set:function(a){this.image=a}});var Ae=new ba,Be=new Xa,ve=[],xe=[],ze=new Float32Array(16),ye=new Float32Array(9);Fe.prototype.setValue=function(a,b){for(var c=this.seq,d=0,e=c.length;d!==e;++d){var f=c[d];f.setValue(a,b[f.id])}};var Ld=/([\w\d_]+)(\])?(\[|\.)?/g;
-db.prototype.setValue=function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};db.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};db.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};db.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var dg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,
+db.prototype.setValue=function(a,b,c){b=this.map[b];void 0!==b&&b.setValue(a,c,this.renderer)};db.prototype.setOptional=function(a,b,c){b=b[c];void 0!==b&&this.setValue(a,c,b)};db.upload=function(a,b,c,d){for(var e=0,f=b.length;e!==f;++e){var g=b[e],h=c[g.id];!1!==h.needsUpdate&&g.setValue(a,h.value,d)}};db.seqWithValue=function(a,b){for(var c=[],d=0,e=a.length;d!==e;++d){var f=a[d];f.id in b&&c.push(f)}return c};var gg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,
 beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,
 darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,
 khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,
@@ -351,7 +351,7 @@ yellow:16776960,yellowgreen:10145074};Object.assign(K.prototype,{isColor:!0,r:1,
 --d;return d<1/6?a+6*(c-a)*d:.5>d?c:d<2/3?a+6*(c-a)*(2/3-d):a}return function(b,c,d){b=Y.euclideanModulo(b,1);c=Y.clamp(c,0,1);d=Y.clamp(d,0,1);0===c?this.r=this.g=this.b=d:(c=.5>=d?d*(1+c):d+c-d*c,d=2*d-c,this.r=a(d,c,b+1/3),this.g=a(d,c,b),this.b=a(d,c,b-1/3));return this}}(),setStyle:function(a){function b(b){void 0!==b&&1>parseFloat(b)&&console.warn("THREE.Color: Alpha component of "+a+" will be ignored.")}var c;if(c=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(a)){var d=c[2];switch(c[1]){case "rgb":case "rgba":if(c=
 /^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(255,parseInt(c[1],10))/255,this.g=Math.min(255,parseInt(c[2],10))/255,this.b=Math.min(255,parseInt(c[3],10))/255,b(c[5]),this;if(c=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d))return this.r=Math.min(100,parseInt(c[1],10))/100,this.g=Math.min(100,parseInt(c[2],10))/100,this.b=Math.min(100,parseInt(c[3],10))/100,b(c[5]),this;break;case "hsl":case "hsla":if(c=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(d)){var d=
 parseFloat(c[1])/360,e=parseInt(c[2],10)/100,f=parseInt(c[3],10)/100;b(c[5]);return this.setHSL(d,e,f)}}}else if(c=/^\#([A-Fa-f0-9]+)$/.exec(a)){c=c[1];d=c.length;if(3===d)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===d)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}a&&0<a.length&&
-(c=dg[a],void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);var c=0<b?1/b:1;this.r=Math.pow(a.r,c);this.g=Math.pow(a.g,c);this.b=Math.pow(a.b,c);return this},
+(c=gg[a],void 0!==c?this.setHex(c):console.warn("THREE.Color: Unknown color "+a));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;return this},copyGammaToLinear:function(a,b){void 0===b&&(b=2);this.r=Math.pow(a.r,b);this.g=Math.pow(a.g,b);this.b=Math.pow(a.b,b);return this},copyLinearToGamma:function(a,b){void 0===b&&(b=2);var c=0<b?1/b:1;this.r=Math.pow(a.r,c);this.g=Math.pow(a.g,c);this.b=Math.pow(a.b,c);return this},
 convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);this.b=Math.sqrt(this.b);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(a){a=a||{h:0,s:0,l:0};var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),g,h=(f+e)/2;if(f===
 e)f=g=0;else{var l=e-f,f=.5>=h?l/(e+f):l/(2-e-f);switch(e){case b:g=(c-d)/l+(c<d?6:0);break;case c:g=(d-b)/l+2;break;case d:g=(b-c)/l+4}g/=6}a.h=g;a.s=f;a.l=h;return a},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(a,b,c){var d=this.getHSL();d.h+=a;d.s+=b;d.l+=c;this.setHSL(d.h,d.s,d.l);return this},add:function(a){this.r+=a.r;this.g+=a.g;this.b+=a.b;return this},addColors:function(a,b){this.r=a.r+b.r;this.g=a.g+b.g;this.b=a.b+b.b;return this},
 addScalar:function(a){this.r+=a;this.g+=a;this.b+=a;return this},sub:function(a){this.r=Math.max(0,this.r-a.r);this.g=Math.max(0,this.g-a.g);this.b=Math.max(0,this.b-a.b);return this},multiply:function(a){this.r*=a.r;this.g*=a.g;this.b*=a.b;return this},multiplyScalar:function(a){this.r*=a;this.g*=a;this.b*=a;return this},lerp:function(a,b){this.r+=(a.r-this.r)*b;this.g+=(a.g-this.g)*b;this.b+=(a.b-this.b)*b;return this},equals:function(a){return a.r===this.r&&a.g===this.g&&a.b===this.b},fromArray:function(a,
@@ -424,7 +424,7 @@ tFlip:{value:-1}},vertexShader:S.equirect_vert,fragmentShader:S.equirect_frag},d
 for(var b=0,c=a.length;b<c;b++)this.expandByPoint(a[b]);return this},setFromCenterAndSize:function(){var a=new D;return function(b,c){var d=a.copy(c).multiplyScalar(.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},isEmpty:function(){return this.max.x<this.min.x||
 this.max.y<this.min.y},getCenter:function(a){a=a||new D;return this.isEmpty()?a.set(0,0):a.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(a){a=a||new D;return this.isEmpty()?a.set(0,0):a.subVectors(this.max,this.min)},expandByPoint:function(a){this.min.min(a);this.max.max(a);return this},expandByVector:function(a){this.min.sub(a);this.max.add(a);return this},expandByScalar:function(a){this.min.addScalar(-a);this.max.addScalar(a);return this},containsPoint:function(a){return a.x<
 this.min.x||a.x>this.max.x||a.y<this.min.y||a.y>this.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y},getParameter:function(a,b){return(b||new D).set((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(a){return a.max.x<this.min.x||a.min.x>this.max.x||a.max.y<this.min.y||a.min.y>this.max.y?!1:!0},clampPoint:function(a,b){return(b||new D).copy(a).clamp(this.min,this.max)},
-distanceToPoint:function(){var a=new D;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Df=0;Object.assign(X.prototype,ra.prototype,{isMaterial:!0,setValues:function(a){if(void 0!==
+distanceToPoint:function(){var a=new D;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)}});var Gf=0;Object.assign(X.prototype,ra.prototype,{isMaterial:!0,setValues:function(a){if(void 0!==
 a)for(var b in a){var c=a[b];if(void 0===c)console.warn("THREE.Material: '"+b+"' parameter is undefined.");else{var d=this[b];void 0===d?console.warn("THREE."+this.type+": '"+b+"' is not a property of this material."):d&&d.isColor?d.set(c):d&&d.isVector3&&c&&c.isVector3?d.copy(c):this[b]="overdraw"===b?Number(c):c}}},toJSON:function(a){function b(a){var b=[],c;for(c in a){var d=a[c];delete d.metadata;b.push(d)}return b}var c=void 0===a;c&&(a={textures:{},images:{}});var d={metadata:{version:4.5,type:"Material",
 generator:"Material.toJSON"}};d.uuid=this.uuid;d.type=this.type;""!==this.name&&(d.name=this.name);this.color&&this.color.isColor&&(d.color=this.color.getHex());void 0!==this.roughness&&(d.roughness=this.roughness);void 0!==this.metalness&&(d.metalness=this.metalness);this.emissive&&this.emissive.isColor&&(d.emissive=this.emissive.getHex());this.specular&&this.specular.isColor&&(d.specular=this.specular.getHex());void 0!==this.shininess&&(d.shininess=this.shininess);void 0!==this.clearCoat&&(d.clearCoat=
 this.clearCoat);void 0!==this.clearCoatRoughness&&(d.clearCoatRoughness=this.clearCoatRoughness);this.map&&this.map.isTexture&&(d.map=this.map.toJSON(a).uuid);this.alphaMap&&this.alphaMap.isTexture&&(d.alphaMap=this.alphaMap.toJSON(a).uuid);this.lightMap&&this.lightMap.isTexture&&(d.lightMap=this.lightMap.toJSON(a).uuid);this.bumpMap&&this.bumpMap.isTexture&&(d.bumpMap=this.bumpMap.toJSON(a).uuid,d.bumpScale=this.bumpScale);this.normalMap&&this.normalMap.isTexture&&(d.normalMap=this.normalMap.toJSON(a).uuid,
@@ -475,7 +475,7 @@ b,c){var d=Y.clamp,e=a.elements;a=e[0];var f=e[4],g=e[8],h=e[1],l=e[5],m=e[9],k=
 Math.atan2(-f,l)):(this._y=0,this._z=Math.atan2(h,a))):"ZYX"===b?(this._y=Math.asin(-d(k,-1,1)),.99999>Math.abs(k)?(this._x=Math.atan2(q,e),this._z=Math.atan2(h,a)):(this._x=0,this._z=Math.atan2(-f,l))):"YZX"===b?(this._z=Math.asin(d(h,-1,1)),.99999>Math.abs(h)?(this._x=Math.atan2(-m,l),this._y=Math.atan2(-k,a)):(this._x=0,this._y=Math.atan2(g,e))):"XZY"===b?(this._z=Math.asin(-d(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(q,l),this._y=Math.atan2(g,a)):(this._x=Math.atan2(-m,e),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+
 b);this._order=b;if(!1!==c)this.onChangeCallback();return this},setFromQuaternion:function(){var a=new L;return function(b,c,d){a.makeRotationFromQuaternion(b);return this.setFromRotationMatrix(a,c,d)}}(),setFromVector3:function(a,b){return this.set(a.x,a.y,a.z,b||this._order)},reorder:function(){var a=new oa;return function(b){a.setFromEuler(this);return this.setFromQuaternion(a,b)}}(),equals:function(a){return a._x===this._x&&a._y===this._y&&a._z===this._z&&a._order===this._order},fromArray:function(a){this._x=
 a[0];this._y=a[1];this._z=a[2];void 0!==a[3]&&(this._order=a[3]);this.onChangeCallback();return this},toArray:function(a,b){void 0===a&&(a=[]);void 0===b&&(b=0);a[b]=this._x;a[b+1]=this._y;a[b+2]=this._z;a[b+3]=this._order;return a},toVector3:function(a){return a?a.set(this._x,this._y,this._z):new p(this._x,this._y,this._z)},onChange:function(a){this.onChangeCallback=a;return this},onChangeCallback:function(){}});Object.assign(Md.prototype,{set:function(a){this.mask=1<<a|0},enable:function(a){this.mask=
-this.mask|1<<a|0},toggle:function(a){this.mask^=1<<a|0},disable:function(a){this.mask&=~(1<<a|0)},test:function(a){return 0!==(this.mask&a.mask)}});var Ef=0;A.DefaultUp=new p(0,1,0);A.DefaultMatrixAutoUpdate=!0;Object.assign(A.prototype,ra.prototype,{isObject3D:!0,applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,
+this.mask|1<<a|0},toggle:function(a){this.mask^=1<<a|0},disable:function(a){this.mask&=~(1<<a|0)},test:function(a){return 0!==(this.mask&a.mask)}});var Hf=0;A.DefaultUp=new p(0,1,0);A.DefaultMatrixAutoUpdate=!0;Object.assign(A.prototype,ra.prototype,{isObject3D:!0,applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,
 !0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new oa;return function(b,c){a.setFromAxisAngle(b,c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new p(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new p(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new p(0,0,1);return function(b){return this.rotateOnAxis(a,
 b)}}(),translateOnAxis:function(){var a=new p;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));return this}}(),translateX:function(){var a=new p(1,0,0);return function(b){return this.translateOnAxis(a,b)}}(),translateY:function(){var a=new p(0,1,0);return function(b){return this.translateOnAxis(a,b)}}(),translateZ:function(){var a=new p(0,0,1);return function(b){return this.translateOnAxis(a,b)}}(),localToWorld:function(a){return a.applyMatrix4(this.matrixWorld)},
 worldToLocal:function(){var a=new L;return function(b){return b.applyMatrix4(a.getInverse(this.matrixWorld))}}(),lookAt:function(){var a=new L;return function(b){this.isCamera?a.lookAt(this.position,b,this.up):a.lookAt(b,this.position,this.up);this.quaternion.setFromRotationMatrix(a)}}(),add:function(a){if(1<arguments.length){for(var b=0;b<arguments.length;b++)this.add(arguments[b]);return this}if(a===this)return console.error("THREE.Object3D.add: object can't be added as a child of itself.",a),this;
@@ -561,7 +561,7 @@ getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHe
 this.view;if(null!==f)var g=f.fullWidth,h=f.fullHeight,e=e+f.offsetX*d/g,b=b-f.offsetY*c/h,d=f.width/g*d,c=f.height/h*c;f=this.filmOffset;0!==f&&(e+=a*f/this.getFilmWidth());this.projectionMatrix.makePerspective(e,e+d,b,b-c,a,this.far)},toJSON:function(a){a=A.prototype.toJSON.call(this,a);a.object.fov=this.fov;a.object.zoom=this.zoom;a.object.near=this.near;a.object.far=this.far;a.object.focus=this.focus;a.object.aspect=this.aspect;null!==this.view&&(a.object.view=Object.assign({},this.view));a.object.filmGauge=
 this.filmGauge;a.object.filmOffset=this.filmOffset;return a}});Fb.prototype=Object.assign(Object.create(Ma.prototype),{constructor:Fb,isOrthographicCamera:!0,copy:function(a){Ma.prototype.copy.call(this,a);this.left=a.left;this.right=a.right;this.top=a.top;this.bottom=a.bottom;this.near=a.near;this.far=a.far;this.zoom=a.zoom;this.view=null===a.view?null:Object.assign({},a.view);return this},setViewOffset:function(a,b,c,d,e,f){this.view={fullWidth:a,fullHeight:b,offsetX:c,offsetY:d,width:e,height:f};
 this.updateProjectionMatrix()},clearViewOffset:function(){this.view=null;this.updateProjectionMatrix()},updateProjectionMatrix:function(){var a=(this.right-this.left)/(2*this.zoom),b=(this.top-this.bottom)/(2*this.zoom),c=(this.right+this.left)/2,d=(this.top+this.bottom)/2,e=c-a,c=c+a,a=d+b,b=d-b;if(null!==this.view)var c=this.zoom/(this.view.width/this.view.fullWidth),b=this.zoom/(this.view.height/this.view.fullHeight),f=(this.right-this.left)/this.view.width,d=(this.top-this.bottom)/this.view.height,
-e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=A.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});var Vf=0;Gb.prototype.isFogExp2=!0;
+e=e+this.view.offsetX/c*f,c=e+this.view.width/c*f,a=a-this.view.offsetY/b*d,b=a-this.view.height/b*d;this.projectionMatrix.makeOrthographic(e,c,a,b,this.near,this.far)},toJSON:function(a){a=A.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.left=this.left;a.object.right=this.right;a.object.top=this.top;a.object.bottom=this.bottom;a.object.near=this.near;a.object.far=this.far;null!==this.view&&(a.object.view=Object.assign({},this.view));return a}});var Yf=0;Gb.prototype.isFogExp2=!0;
 Gb.prototype.clone=function(){return new Gb(this.color.getHex(),this.density)};Gb.prototype.toJSON=function(a){return{type:"FogExp2",color:this.color.getHex(),density:this.density}};Hb.prototype.isFog=!0;Hb.prototype.clone=function(){return new Hb(this.color.getHex(),this.near,this.far)};Hb.prototype.toJSON=function(a){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}};hd.prototype=Object.assign(Object.create(A.prototype),{constructor:hd,copy:function(a,b){A.prototype.copy.call(this,
 a,b);null!==a.background&&(this.background=a.background.clone());null!==a.fog&&(this.fog=a.fog.clone());null!==a.overrideMaterial&&(this.overrideMaterial=a.overrideMaterial.clone());this.autoUpdate=a.autoUpdate;this.matrixAutoUpdate=a.matrixAutoUpdate;return this},toJSON:function(a){var b=A.prototype.toJSON.call(this,a);null!==this.background&&(b.object.background=this.background.toJSON(a));null!==this.fog&&(b.object.fog=this.fog.toJSON());return b}});Vd.prototype=Object.assign(Object.create(A.prototype),
 {constructor:Vd,isLensFlare:!0,copy:function(a){A.prototype.copy.call(this,a);this.positionScreen.copy(a.positionScreen);this.customUpdateCallback=a.customUpdateCallback;for(var b=0,c=a.lensFlares.length;b<c;b++)this.lensFlares.push(a.lensFlares[b]);return this},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 K(16777215));void 0===d&&(d=1);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:0,
@@ -615,20 +615,20 @@ a.displacementScale;this.displacementBias=a.displacementBias;this.specularMap=a.
 Object.create(sa.prototype);ob.prototype.constructor=ob;ob.prototype.isMeshToonMaterial=!0;ob.prototype.copy=function(a){sa.prototype.copy.call(this,a);this.gradientMap=a.gradientMap;return this};pb.prototype=Object.create(X.prototype);pb.prototype.constructor=pb;pb.prototype.isMeshNormalMaterial=!0;pb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.bumpMap=a.bumpMap;this.bumpScale=a.bumpScale;this.normalMap=a.normalMap;this.normalScale.copy(a.normalScale);this.displacementMap=a.displacementMap;
 this.displacementScale=a.displacementScale;this.displacementBias=a.displacementBias;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};qb.prototype=Object.create(X.prototype);qb.prototype.constructor=qb;qb.prototype.isMeshLambertMaterial=!0;qb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.map=a.map;this.lightMap=a.lightMap;this.lightMapIntensity=
 a.lightMapIntensity;this.aoMap=a.aoMap;this.aoMapIntensity=a.aoMapIntensity;this.emissive.copy(a.emissive);this.emissiveMap=a.emissiveMap;this.emissiveIntensity=a.emissiveIntensity;this.specularMap=a.specularMap;this.alphaMap=a.alphaMap;this.envMap=a.envMap;this.combine=a.combine;this.reflectivity=a.reflectivity;this.refractionRatio=a.refractionRatio;this.wireframe=a.wireframe;this.wireframeLinewidth=a.wireframeLinewidth;this.wireframeLinecap=a.wireframeLinecap;this.wireframeLinejoin=a.wireframeLinejoin;
-this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};rb.prototype=Object.create(X.prototype);rb.prototype.constructor=rb;rb.prototype.isLineDashedMaterial=!0;rb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var eg=Object.freeze({ShadowMaterial:Zb,SpriteMaterial:ab,RawShaderMaterial:$b,ShaderMaterial:Da,PointsMaterial:Ka,
+this.skinning=a.skinning;this.morphTargets=a.morphTargets;this.morphNormals=a.morphNormals;return this};rb.prototype=Object.create(X.prototype);rb.prototype.constructor=rb;rb.prototype.isLineDashedMaterial=!0;rb.prototype.copy=function(a){X.prototype.copy.call(this,a);this.color.copy(a.color);this.linewidth=a.linewidth;this.scale=a.scale;this.dashSize=a.dashSize;this.gapSize=a.gapSize;return this};var hg=Object.freeze({ShadowMaterial:Zb,SpriteMaterial:ab,RawShaderMaterial:$b,ShaderMaterial:Da,PointsMaterial:Ka,
 MeshPhysicalMaterial:nb,MeshStandardMaterial:Pa,MeshPhongMaterial:sa,MeshToonMaterial:ob,MeshNormalMaterial:pb,MeshLambertMaterial:qb,MeshDepthMaterial:Ya,MeshBasicMaterial:Ha,LineDashedMaterial:rb,LineBasicMaterial:ia,Material:X}),dd={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}},za=new Wd;Object.assign(ta.prototype,{load:function(a,b,
 c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);var e=this,f=dd.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;var g=a.match(/^data:(.*?)(;base64)?,(.*)$/);if(g){var h=g[1],l=!!g[2],g=g[3],g=window.decodeURIComponent(g);l&&(g=window.atob(g));try{var m,k=(this.responseType||"").toLowerCase();switch(k){case "arraybuffer":case "blob":m=new ArrayBuffer(g.length);for(var q=new Uint8Array(m),l=0;l<g.length;l++)q[l]=g.charCodeAt(l);
-"blob"===k&&(m=new Blob([m],{type:h}));break;case "document":m=(new DOMParser).parseFromString(g,h);break;case "json":m=JSON.parse(g);break;default:m=g}window.setTimeout(function(){b&&b(m);e.manager.itemEnd(a)},0)}catch(p){window.setTimeout(function(){d&&d(p);e.manager.itemError(a)},0)}}else{var n=new XMLHttpRequest;n.open("GET",a,!0);n.addEventListener("load",function(c){var f=c.target.response;dd.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn("THREE.FileLoader: HTTP Status 0 received."),
-b&&b(f),e.manager.itemEnd(a)):(d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&n.addEventListener("progress",function(a){c(a)},!1);n.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(h in this.requestHeader)n.setRequestHeader(h,this.requestHeader[h]);
-n.send(null)}e.manager.itemStart(a);return n},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(Me.prototype,{load:function(a,b,c,d){function e(e){l.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,format:a.format,mipmaps:a.mipmaps};
-m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new Jb;h.image=g;var l=new ta(this.manager);l.setPath(this.path);l.setResponseType("arraybuffer");if(Array.isArray(a))for(var m=0,k=0,q=a.length;k<q;++k)e(k);else l.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*a.mipmapCount+e]),g[d].format=a.format,
-g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=a;return this}});Object.assign(Xd.prototype,{load:function(a,b,c,d){var e=this,f=new cb,g=new ta(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==a.data&&(f.image.width=a.width,f.image.height=
-a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});Object.assign(Rc.prototype,{load:function(a,b,c,
-d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);var e=this,f=dd.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;c=document.createElementNS("http://www.w3.org/1999/xhtml","img");c.addEventListener("load",function(){dd.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);c.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&(c.crossOrigin=this.crossOrigin);e.manager.itemStart(a);
-c.src=a;return c},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Yd.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Xa,g=new Rc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=
-a;return this}});Object.assign(nd.prototype,{load:function(a,b,c,d){var e=new Rc(this.manager);e.setCrossOrigin(this.crossOrigin);e.setPath(this.path);var f=new ba;f.image=e.load(a,function(){var c=0<a.search(/\.(jpg|jpeg)$/)||0===a.search(/^data\:image\/jpeg/);f.format=c?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},c,d);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});na.prototype=Object.assign(Object.create(A.prototype),{constructor:na,
-isLight:!0,copy:function(a){A.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=A.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==this.penumbra&&
-(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});od.prototype=Object.assign(Object.create(na.prototype),{constructor:od,isHemisphereLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});Object.assign(sb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},
+"blob"===k&&(m=new Blob([m],{type:h}));break;case "document":m=(new DOMParser).parseFromString(g,h);break;case "json":m=JSON.parse(g);break;default:m=g}window.setTimeout(function(){b&&b(m);e.manager.itemEnd(a)},0)}catch(p){window.setTimeout(function(){d&&d(p);e.manager.itemEnd(a);e.manager.itemError(a)},0)}}else{var n=new XMLHttpRequest;n.open("GET",a,!0);n.addEventListener("load",function(c){var f=c.target.response;dd.add(a,f);200===this.status?(b&&b(f),e.manager.itemEnd(a)):0===this.status?(console.warn("THREE.FileLoader: HTTP Status 0 received."),
+b&&b(f),e.manager.itemEnd(a)):(d&&d(c),e.manager.itemEnd(a),e.manager.itemError(a))},!1);void 0!==c&&n.addEventListener("progress",function(a){c(a)},!1);n.addEventListener("error",function(b){d&&d(b);e.manager.itemEnd(a);e.manager.itemError(a)},!1);void 0!==this.responseType&&(n.responseType=this.responseType);void 0!==this.withCredentials&&(n.withCredentials=this.withCredentials);n.overrideMimeType&&n.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(h in this.requestHeader)n.setRequestHeader(h,
+this.requestHeader[h]);n.send(null)}e.manager.itemStart(a);return n},setPath:function(a){this.path=a;return this},setResponseType:function(a){this.responseType=a;return this},setWithCredentials:function(a){this.withCredentials=a;return this},setMimeType:function(a){this.mimeType=a;return this},setRequestHeader:function(a){this.requestHeader=a;return this}});Object.assign(Me.prototype,{load:function(a,b,c,d){function e(e){l.load(a[e],function(a){a=f._parser(a,!0);g[e]={width:a.width,height:a.height,
+format:a.format,mipmaps:a.mipmaps};m+=1;6===m&&(1===a.mipmapCount&&(h.minFilter=1006),h.format=a.format,h.needsUpdate=!0,b&&b(h))},c,d)}var f=this,g=[],h=new Jb;h.image=g;var l=new ta(this.manager);l.setPath(this.path);l.setResponseType("arraybuffer");if(Array.isArray(a))for(var m=0,k=0,q=a.length;k<q;++k)e(k);else l.load(a,function(a){a=f._parser(a,!0);if(a.isCubemap)for(var c=a.mipmaps.length/a.mipmapCount,d=0;d<c;d++){g[d]={mipmaps:[]};for(var e=0;e<a.mipmapCount;e++)g[d].mipmaps.push(a.mipmaps[d*
+a.mipmapCount+e]),g[d].format=a.format,g[d].width=a.width,g[d].height=a.height}else h.image.width=a.width,h.image.height=a.height,h.mipmaps=a.mipmaps;1===a.mipmapCount&&(h.minFilter=1006);h.format=a.format;h.needsUpdate=!0;b&&b(h)},c,d);return h},setPath:function(a){this.path=a;return this}});Object.assign(Xd.prototype,{load:function(a,b,c,d){var e=this,f=new cb,g=new ta(this.manager);g.setResponseType("arraybuffer");g.load(a,function(a){if(a=e._parser(a))void 0!==a.image?f.image=a.image:void 0!==
+a.data&&(f.image.width=a.width,f.image.height=a.height,f.image.data=a.data),f.wrapS=void 0!==a.wrapS?a.wrapS:1001,f.wrapT=void 0!==a.wrapT?a.wrapT:1001,f.magFilter=void 0!==a.magFilter?a.magFilter:1006,f.minFilter=void 0!==a.minFilter?a.minFilter:1008,f.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(f.format=a.format),void 0!==a.type&&(f.type=a.type),void 0!==a.mipmaps&&(f.mipmaps=a.mipmaps),1===a.mipmapCount&&(f.minFilter=1006),f.needsUpdate=!0,b&&b(f,a)},c,d);return f}});Object.assign(Rc.prototype,
+{load:function(a,b,c,d){void 0===a&&(a="");void 0!==this.path&&(a=this.path+a);var e=this,f=dd.get(a);if(void 0!==f)return e.manager.itemStart(a),setTimeout(function(){b&&b(f);e.manager.itemEnd(a)},0),f;c=document.createElementNS("http://www.w3.org/1999/xhtml","img");c.addEventListener("load",function(){dd.add(a,this);b&&b(this);e.manager.itemEnd(a)},!1);c.addEventListener("error",function(b){d&&d(b);e.manager.itemEnd(a);e.manager.itemError(a)},!1);"data:"!==a.substr(0,5)&&void 0!==this.crossOrigin&&
+(c.crossOrigin=this.crossOrigin);e.manager.itemStart(a);c.src=a;return c},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});Object.assign(Yd.prototype,{load:function(a,b,c,d){function e(c){g.load(a[c],function(a){f.images[c]=a;h++;6===h&&(f.needsUpdate=!0,b&&b(f))},void 0,d)}var f=new Xa,g=new Rc(this.manager);g.setCrossOrigin(this.crossOrigin);g.setPath(this.path);var h=0;for(c=0;c<a.length;++c)e(c);return f},setCrossOrigin:function(a){this.crossOrigin=
+a;return this},setPath:function(a){this.path=a;return this}});Object.assign(nd.prototype,{load:function(a,b,c,d){var e=new Rc(this.manager);e.setCrossOrigin(this.crossOrigin);e.setPath(this.path);var f=new ba;f.image=e.load(a,function(){var c=0<a.search(/\.(jpg|jpeg)$/)||0===a.search(/^data\:image\/jpeg/);f.format=c?1022:1023;f.needsUpdate=!0;void 0!==b&&b(f)},c,d);return f},setCrossOrigin:function(a){this.crossOrigin=a;return this},setPath:function(a){this.path=a;return this}});na.prototype=Object.assign(Object.create(A.prototype),
+{constructor:na,isLight:!0,copy:function(a){A.prototype.copy.call(this,a);this.color.copy(a.color);this.intensity=a.intensity;return this},toJSON:function(a){a=A.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();a.object.intensity=this.intensity;void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.distance&&(a.object.distance=this.distance);void 0!==this.angle&&(a.object.angle=this.angle);void 0!==this.decay&&(a.object.decay=this.decay);void 0!==
+this.penumbra&&(a.object.penumbra=this.penumbra);void 0!==this.shadow&&(a.object.shadow=this.shadow.toJSON());return a}});od.prototype=Object.assign(Object.create(na.prototype),{constructor:od,isHemisphereLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.groundColor.copy(a.groundColor);return this}});Object.assign(sb.prototype,{copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.radius=a.radius;this.mapSize.copy(a.mapSize);return this},clone:function(){return(new this.constructor).copy(this)},
 toJSON:function(){var a={};0!==this.bias&&(a.bias=this.bias);1!==this.radius&&(a.radius=this.radius);if(512!==this.mapSize.x||512!==this.mapSize.y)a.mapSize=this.mapSize.toArray();a.camera=this.camera.toJSON(!1).object;delete a.camera.matrix;return a}});pd.prototype=Object.assign(Object.create(sb.prototype),{constructor:pd,isSpotLightShadow:!0,update:function(a){var b=2*Y.RAD2DEG*a.angle,c=this.mapSize.width/this.mapSize.height;a=a.distance||500;var d=this.camera;if(b!==d.fov||c!==d.aspect||a!==d.far)d.fov=
 b,d.aspect=c,d.far=a,d.updateProjectionMatrix()}});qd.prototype=Object.assign(Object.create(na.prototype),{constructor:qd,isSpotLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.distance=a.distance;this.angle=a.angle;this.penumbra=a.penumbra;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});rd.prototype=Object.assign(Object.create(na.prototype),{constructor:rd,isPointLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.distance=a.distance;
 this.decay=a.decay;this.shadow=a.shadow.clone();return this}});sd.prototype=Object.assign(Object.create(sb.prototype),{constructor:sd});td.prototype=Object.assign(Object.create(na.prototype),{constructor:td,isDirectionalLight:!0,copy:function(a){na.prototype.copy.call(this,a);this.target=a.target.clone();this.shadow=a.shadow.clone();return this}});ud.prototype=Object.assign(Object.create(na.prototype),{constructor:ud,isAmbientLight:!0});vd.prototype=Object.assign(Object.create(na.prototype),{constructor:vd,
@@ -650,34 +650,34 @@ bc.prototype=Object.assign(Object.create(Wa),{constructor:bc,ValueTypeName:"numb
 Bd.prototype=Object.assign(Object.create(Wa),{constructor:Bd,ValueTypeName:"color"});ub.prototype=Wa;Wa.constructor=ub;Object.assign(ub,{parse:function(a){if(void 0===a.type)throw Error("track type undefined, can not parse");var b=ub._getTrackTypeForValueTypeName(a.type);if(void 0===a.times){var c=[],d=[];ua.flattenJSON(a.keys,c,d,"value");a.times=c;a.values=d}return void 0!==b.parse?b.parse(a):new b(a.name,a.times,a.values,a.interpolation)},toJSON:function(a){var b=a.constructor;if(void 0!==b.toJSON)b=
 b.toJSON(a);else{var b={name:a.name,times:ua.convertArray(a.times,Array),values:ua.convertArray(a.values,Array)},c=a.getInterpolation();c!==a.DefaultInterpolation&&(b.interpolation=c)}b.type=a.ValueTypeName;return b},_getTrackTypeForValueTypeName:function(a){switch(a.toLowerCase()){case "scalar":case "double":case "float":case "number":case "integer":return bc;case "vector":case "vector2":case "vector3":case "vector4":return ac;case "color":return Bd;case "quaternion":return Tc;case "bool":case "boolean":return Ad;
 case "string":return zd}throw Error("Unsupported typeName: "+a);}});Object.assign(Aa,{parse:function(a){for(var b=[],c=a.tracks,d=1/(a.fps||1),e=0,f=c.length;e!==f;++e)b.push(ub.parse(c[e]).scale(d));return new Aa(a.name,a.duration,b)},toJSON:function(a){var b=[],c=a.tracks;a={name:a.name,duration:a.duration,tracks:b};for(var d=0,e=c.length;d!==e;++d)b.push(ub.toJSON(c[d]));return a},CreateFromMorphTargetSequence:function(a,b,c,d){for(var e=b.length,f=[],g=0;g<e;g++){var h=[],l=[];h.push((g+e-1)%
-e,g,(g+1)%e);l.push(0,1,0);var m=ua.getKeyframeOrder(h),h=ua.sortedArray(h,1,m),l=ua.sortedArray(l,1,m);d||0!==h[0]||(h.push(e),l.push(l[0]));f.push((new bc(".morphTargetInfluences["+b[g].name+"]",h,l)).scale(1/c))}return new Aa(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,
-g=a.length;f<g;f++){var h=a[f],l=h.name.match(e);if(l&&1<l.length){var m=l[1];(l=d[m])||(d[m]=l=[]);l.push(h)}}a=[];for(m in d)a.push(Aa.CreateFromMorphTargetSequence(m,d[m],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("  no animation in JSONLoader data"),null;for(var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ua.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30,h=a.hierarchy||[],l=0;l<h.length;l++){var m=
-h[l].keys;if(m&&0!==m.length)if(m[0].morphTargets){for(var f={},k=0;k<m.length;k++)if(m[k].morphTargets)for(var q=0;q<m[k].morphTargets.length;q++)f[m[k].morphTargets[q]]=-1;for(var n in f){for(var p=[],z=[],q=0;q!==m[k].morphTargets.length;++q){var r=m[k];p.push(r.time);z.push(r.morphTarget===n?1:0)}d.push(new bc(".morphTargetInfluence["+n+"]",p,z))}f=f.length*(g||1)}else k=".bones["+b[l].name+"]",c(ac,k+".position",m,"pos",d),c(Tc,k+".quaternion",m,"rot",d),c(ac,k+".scale",m,"scl",d)}return 0===
+e,g,(g+1)%e);l.push(0,1,0);var k=ua.getKeyframeOrder(h),h=ua.sortedArray(h,1,k),l=ua.sortedArray(l,1,k);d||0!==h[0]||(h.push(e),l.push(l[0]));f.push((new bc(".morphTargetInfluences["+b[g].name+"]",h,l)).scale(1/c))}return new Aa(a,-1,f)},findByName:function(a,b){var c=a;Array.isArray(a)||(c=a.geometry&&a.geometry.animations||a.animations);for(var d=0;d<c.length;d++)if(c[d].name===b)return c[d];return null},CreateClipsFromMorphTargetSequences:function(a,b,c){for(var d={},e=/^([\w-]*?)([\d]+)$/,f=0,
+g=a.length;f<g;f++){var h=a[f],l=h.name.match(e);if(l&&1<l.length){var k=l[1];(l=d[k])||(d[k]=l=[]);l.push(h)}}a=[];for(k in d)a.push(Aa.CreateFromMorphTargetSequence(k,d[k],b,c));return a},parseAnimation:function(a,b){if(!a)return console.error("  no animation in JSONLoader data"),null;for(var c=function(a,b,c,d,e){if(0!==c.length){var f=[],g=[];ua.flattenJSON(c,f,g,d);0!==f.length&&e.push(new a(b,f,g))}},d=[],e=a.name||"default",f=a.length||-1,g=a.fps||30,h=a.hierarchy||[],l=0;l<h.length;l++){var k=
+h[l].keys;if(k&&0!==k.length)if(k[0].morphTargets){for(var f={},p=0;p<k.length;p++)if(k[p].morphTargets)for(var q=0;q<k[p].morphTargets.length;q++)f[k[p].morphTargets[q]]=-1;for(var n in f){for(var t=[],z=[],q=0;q!==k[p].morphTargets.length;++q){var r=k[p];t.push(r.time);z.push(r.morphTarget===n?1:0)}d.push(new bc(".morphTargetInfluence["+n+"]",t,z))}f=f.length*(g||1)}else p=".bones["+b[l].name+"]",c(ac,p+".position",k,"pos",d),c(Tc,p+".quaternion",k,"rot",d),c(ac,p+".scale",k,"scl",d)}return 0===
 d.length?null:new Aa(e,f,d)}});Object.assign(Aa.prototype,{resetDuration:function(){for(var a=0,b=0,c=this.tracks.length;b!==c;++b)var d=this.tracks[b],a=Math.max(a,d.times[d.times.length-1]);this.duration=a},trim:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].trim(0,this.duration);return this},optimize:function(){for(var a=0;a<this.tracks.length;a++)this.tracks[a].optimize();return this}});Object.assign(Cd.prototype,{load:function(a,b,c,d){var e=this,f=new ta(e.manager);f.setResponseType("json");
-f.load(a,function(a){b(e.parse(a))},c,d)},setTextures:function(a){this.textures=a},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new eg[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==
+f.load(a,function(a){b(e.parse(a))},c,d)},setTextures:function(a){this.textures=a},parse:function(a){function b(a){void 0===c[a]&&console.warn("THREE.MaterialLoader: Undefined texture",a);return c[a]}var c=this.textures,d=new hg[a.type];void 0!==a.uuid&&(d.uuid=a.uuid);void 0!==a.name&&(d.name=a.name);void 0!==a.color&&d.color.setHex(a.color);void 0!==a.roughness&&(d.roughness=a.roughness);void 0!==a.metalness&&(d.metalness=a.metalness);void 0!==a.emissive&&d.emissive.setHex(a.emissive);void 0!==
 a.specular&&d.specular.setHex(a.specular);void 0!==a.shininess&&(d.shininess=a.shininess);void 0!==a.clearCoat&&(d.clearCoat=a.clearCoat);void 0!==a.clearCoatRoughness&&(d.clearCoatRoughness=a.clearCoatRoughness);void 0!==a.uniforms&&(d.uniforms=a.uniforms);void 0!==a.vertexShader&&(d.vertexShader=a.vertexShader);void 0!==a.fragmentShader&&(d.fragmentShader=a.fragmentShader);void 0!==a.vertexColors&&(d.vertexColors=a.vertexColors);void 0!==a.fog&&(d.fog=a.fog);void 0!==a.shading&&(d.shading=a.shading);
 void 0!==a.blending&&(d.blending=a.blending);void 0!==a.side&&(d.side=a.side);void 0!==a.opacity&&(d.opacity=a.opacity);void 0!==a.transparent&&(d.transparent=a.transparent);void 0!==a.alphaTest&&(d.alphaTest=a.alphaTest);void 0!==a.depthTest&&(d.depthTest=a.depthTest);void 0!==a.depthWrite&&(d.depthWrite=a.depthWrite);void 0!==a.colorWrite&&(d.colorWrite=a.colorWrite);void 0!==a.wireframe&&(d.wireframe=a.wireframe);void 0!==a.wireframeLinewidth&&(d.wireframeLinewidth=a.wireframeLinewidth);void 0!==
 a.wireframeLinecap&&(d.wireframeLinecap=a.wireframeLinecap);void 0!==a.wireframeLinejoin&&(d.wireframeLinejoin=a.wireframeLinejoin);void 0!==a.skinning&&(d.skinning=a.skinning);void 0!==a.morphTargets&&(d.morphTargets=a.morphTargets);void 0!==a.size&&(d.size=a.size);void 0!==a.sizeAttenuation&&(d.sizeAttenuation=a.sizeAttenuation);void 0!==a.map&&(d.map=b(a.map));void 0!==a.alphaMap&&(d.alphaMap=b(a.alphaMap),d.transparent=!0);void 0!==a.bumpMap&&(d.bumpMap=b(a.bumpMap));void 0!==a.bumpScale&&(d.bumpScale=
 a.bumpScale);void 0!==a.normalMap&&(d.normalMap=b(a.normalMap));if(void 0!==a.normalScale){var e=a.normalScale;!1===Array.isArray(e)&&(e=[e,e]);d.normalScale=(new D).fromArray(e)}void 0!==a.displacementMap&&(d.displacementMap=b(a.displacementMap));void 0!==a.displacementScale&&(d.displacementScale=a.displacementScale);void 0!==a.displacementBias&&(d.displacementBias=a.displacementBias);void 0!==a.roughnessMap&&(d.roughnessMap=b(a.roughnessMap));void 0!==a.metalnessMap&&(d.metalnessMap=b(a.metalnessMap));
 void 0!==a.emissiveMap&&(d.emissiveMap=b(a.emissiveMap));void 0!==a.emissiveIntensity&&(d.emissiveIntensity=a.emissiveIntensity);void 0!==a.specularMap&&(d.specularMap=b(a.specularMap));void 0!==a.envMap&&(d.envMap=b(a.envMap));void 0!==a.reflectivity&&(d.reflectivity=a.reflectivity);void 0!==a.lightMap&&(d.lightMap=b(a.lightMap));void 0!==a.lightMapIntensity&&(d.lightMapIntensity=a.lightMapIntensity);void 0!==a.aoMap&&(d.aoMap=b(a.aoMap));void 0!==a.aoMapIntensity&&(d.aoMapIntensity=a.aoMapIntensity);
-void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));if(void 0!==a.materials)for(var e=0,f=a.materials.length;e<f;e++)d.materials.push(this.parse(a.materials[e]));return d}});Object.assign(Zd.prototype,{load:function(a,b,c,d){var e=this,f=new ta(e.manager);f.setResponseType("json");f.load(a,function(a){b(e.parse(a))},c,d)},parse:function(a){var b=new I,c=a.data.index,d={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,
-Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};void 0!==c&&(c=new d[c.type](c.array),b.setIndex(new P(c,1)));var e=a.data.attributes,f;for(f in e){var g=e[f],c=new d[g.type](g.array);b.addAttribute(f,new P(c,g.itemSize,g.normalized))}d=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==d)for(f=0,c=d.length;f!==c;++f)e=d[f],b.addGroup(e.start,e.count,e.materialIndex);a=a.data.boundingSphere;void 0!==a&&(d=new p,void 0!==a.center&&d.fromArray(a.center),
-b.boundingSphere=new Ba(d,a.radius));return b}});cc.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(cc.prototype,{crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a=
-{NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},b=new K,c=new nd,d=new Cd;return function(e,f,g){function h(a,b,d,e,h){a=f+a;var m=cc.Handlers.get(a);null!==m?a=m.load(a):(c.setCrossOrigin(g),a=c.load(a));void 0!==b&&(a.repeat.fromArray(b),1!==b[0]&&(a.wrapS=1E3),1!==b[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==e&&("repeat"===e[0]&&(a.wrapS=1E3),"mirror"===e[0]&&(a.wrapS=1002),"repeat"===e[1]&&(a.wrapT=1E3),"mirror"===
-e[1]&&(a.wrapT=1002));void 0!==h&&(a.anisotropy=h);b=Y.generateUUID();l[b]=a;return b}var l={},m={uuid:Y.generateUUID(),type:"MeshLambertMaterial"},k;for(k in e){var q=e[k];switch(k){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":m.name=q;break;case "blending":m.blending=a[q];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",k,"is no longer supported.");break;case "colorDiffuse":m.color=b.fromArray(q).getHex();break;
-case "colorSpecular":m.specular=b.fromArray(q).getHex();break;case "colorEmissive":m.emissive=b.fromArray(q).getHex();break;case "specularCoef":m.shininess=q;break;case "shading":"basic"===q.toLowerCase()&&(m.type="MeshBasicMaterial");"phong"===q.toLowerCase()&&(m.type="MeshPhongMaterial");"standard"===q.toLowerCase()&&(m.type="MeshStandardMaterial");break;case "mapDiffuse":m.map=h(q,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;
-case "mapEmissive":m.emissiveMap=h(q,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case "mapEmissiveRepeat":case "mapEmissiveOffset":case "mapEmissiveWrap":case "mapEmissiveAnisotropy":break;case "mapLight":m.lightMap=h(q,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":m.aoMap=h(q,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,
-e.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":m.bumpMap=h(q,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case "mapBumpScale":m.bumpScale=q;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":m.normalMap=h(q,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case "mapNormalFactor":m.normalScale=[q,q];break;
-case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":m.specularMap=h(q,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapMetalness":m.metalnessMap=h(q,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case "mapMetalnessRepeat":case "mapMetalnessOffset":case "mapMetalnessWrap":case "mapMetalnessAnisotropy":break;
-case "mapRoughness":m.roughnessMap=h(q,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case "mapRoughnessRepeat":case "mapRoughnessOffset":case "mapRoughnessWrap":case "mapRoughnessAnisotropy":break;case "mapAlpha":m.alphaMap=h(q,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":m.side=1;break;case "doubleSided":m.side=
-2;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");m.opacity=q;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":m[k]=q;break;case "vertexColors":!0===q&&(m.vertexColors=2);"face"===q&&(m.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",k,q)}}"MeshBasicMaterial"===m.type&&delete m.emissive;"MeshPhongMaterial"!==
-m.type&&delete m.specular;1>m.opacity&&(m.transparent=!0);d.setTextures(l);return d.parse(m)}}()});Object.assign($d.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:cc.prototype.extractUrlBase(a),g=new ta(this.manager);g.setResponseType("json");g.setWithCredentials(this.withCredentials);g.load(a,function(c){var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");
-return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(){return function(a,b){void 0!==a.data&&(a=a.data);a.scale=void 0!==a.scale?1/a.scale:1;var c=new T,d=a,e,f,g,h,l,m,k,q,n,t,z,r,x,y,w=d.faces;n=d.vertices;var A=d.normals,v=d.colors;m=d.scale;var E=0;if(void 0!==d.uvs){for(e=0;e<d.uvs.length;e++)d.uvs[e].length&&
-E++;for(e=0;e<E;e++)c.faceVertexUvs[e]=[]}h=0;for(l=n.length;h<l;)e=new p,e.x=n[h++]*m,e.y=n[h++]*m,e.z=n[h++]*m,c.vertices.push(e);h=0;for(l=w.length;h<l;)if(n=w[h++],t=n&1,g=n&2,e=n&8,k=n&16,z=n&32,m=n&64,n&=128,t){t=new Ta;t.a=w[h];t.b=w[h+1];t.c=w[h+3];r=new Ta;r.a=w[h+1];r.b=w[h+2];r.c=w[h+3];h+=4;g&&(g=w[h++],t.materialIndex=g,r.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<E;e++)for(x=d.uvs[e],c.faceVertexUvs[e][g]=[],c.faceVertexUvs[e][g+1]=[],f=0;4>f;f++)q=w[h++],y=x[2*q],q=x[2*q+1],y=
-new D(y,q),2!==f&&c.faceVertexUvs[e][g].push(y),0!==f&&c.faceVertexUvs[e][g+1].push(y);k&&(k=3*w[h++],t.normal.set(A[k++],A[k++],A[k]),r.normal.copy(t.normal));if(z)for(e=0;4>e;e++)k=3*w[h++],z=new p(A[k++],A[k++],A[k]),2!==e&&t.vertexNormals.push(z),0!==e&&r.vertexNormals.push(z);m&&(m=w[h++],m=v[m],t.color.setHex(m),r.color.setHex(m));if(n)for(e=0;4>e;e++)m=w[h++],m=v[m],2!==e&&t.vertexColors.push(new K(m)),0!==e&&r.vertexColors.push(new K(m));c.faces.push(t);c.faces.push(r)}else{t=new Ta;t.a=w[h++];
-t.b=w[h++];t.c=w[h++];g&&(g=w[h++],t.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<E;e++)for(x=d.uvs[e],c.faceVertexUvs[e][g]=[],f=0;3>f;f++)q=w[h++],y=x[2*q],q=x[2*q+1],y=new D(y,q),c.faceVertexUvs[e][g].push(y);k&&(k=3*w[h++],t.normal.set(A[k++],A[k++],A[k]));if(z)for(e=0;3>e;e++)k=3*w[h++],z=new p(A[k++],A[k++],A[k]),t.vertexNormals.push(z);m&&(m=w[h++],t.color.setHex(v[m]));if(n)for(e=0;3>e;e++)m=w[h++],t.vertexColors.push(new K(v[m]));c.faces.push(t)}d=a;h=void 0!==d.influencesPerVertex?d.influencesPerVertex:
+void 0!==a.gradientMap&&(d.gradientMap=b(a.gradientMap));if(void 0!==a.materials)for(var e=0,f=a.materials.length;e<f;e++)d.materials.push(this.parse(a.materials[e]));return d}});Object.assign(Zd.prototype,{load:function(a,b,c,d){var e=this,f=new ta(e.manager);f.setResponseType("json");f.load(a,function(a){b(e.parse(a))},c,d)},parse:function(a){var b=new I,c=a.data.index;void 0!==c&&(c=new bf[c.type](c.array),b.setIndex(new P(c,1)));var d=a.data.attributes,e;for(e in d){var f=d[e],c=new bf[f.type](f.array);
+b.addAttribute(e,new P(c,f.itemSize,f.normalized))}e=a.data.groups||a.data.drawcalls||a.data.offsets;if(void 0!==e)for(c=0,d=e.length;c!==d;++c)f=e[c],b.addGroup(f.start,f.count,f.materialIndex);a=a.data.boundingSphere;void 0!==a&&(e=new p,void 0!==a.center&&e.fromArray(a.center),b.boundingSphere=new Ba(e,a.radius));return b}});var bf={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,
+Float32Array:Float32Array,Float64Array:Float64Array};cc.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};Object.assign(cc.prototype,{crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a=
+{NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},b=new K,c=new nd,d=new Cd;return function(e,f,g){function h(a,b,d,e,h){a=f+a;var k=cc.Handlers.get(a);null!==k?a=k.load(a):(c.setCrossOrigin(g),a=c.load(a));void 0!==b&&(a.repeat.fromArray(b),1!==b[0]&&(a.wrapS=1E3),1!==b[1]&&(a.wrapT=1E3));void 0!==d&&a.offset.fromArray(d);void 0!==e&&("repeat"===e[0]&&(a.wrapS=1E3),"mirror"===e[0]&&(a.wrapS=1002),"repeat"===e[1]&&(a.wrapT=1E3),"mirror"===
+e[1]&&(a.wrapT=1002));void 0!==h&&(a.anisotropy=h);b=Y.generateUUID();l[b]=a;return b}var l={},k={uuid:Y.generateUUID(),type:"MeshLambertMaterial"},p;for(p in e){var q=e[p];switch(p){case "DbgColor":case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":k.name=q;break;case "blending":k.blending=a[q];break;case "colorAmbient":case "mapAmbient":console.warn("THREE.Loader.createMaterial:",p,"is no longer supported.");break;case "colorDiffuse":k.color=b.fromArray(q).getHex();break;
+case "colorSpecular":k.specular=b.fromArray(q).getHex();break;case "colorEmissive":k.emissive=b.fromArray(q).getHex();break;case "specularCoef":k.shininess=q;break;case "shading":"basic"===q.toLowerCase()&&(k.type="MeshBasicMaterial");"phong"===q.toLowerCase()&&(k.type="MeshPhongMaterial");"standard"===q.toLowerCase()&&(k.type="MeshStandardMaterial");break;case "mapDiffuse":k.map=h(q,e.mapDiffuseRepeat,e.mapDiffuseOffset,e.mapDiffuseWrap,e.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;
+case "mapEmissive":k.emissiveMap=h(q,e.mapEmissiveRepeat,e.mapEmissiveOffset,e.mapEmissiveWrap,e.mapEmissiveAnisotropy);break;case "mapEmissiveRepeat":case "mapEmissiveOffset":case "mapEmissiveWrap":case "mapEmissiveAnisotropy":break;case "mapLight":k.lightMap=h(q,e.mapLightRepeat,e.mapLightOffset,e.mapLightWrap,e.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;case "mapAO":k.aoMap=h(q,e.mapAORepeat,e.mapAOOffset,e.mapAOWrap,
+e.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":k.bumpMap=h(q,e.mapBumpRepeat,e.mapBumpOffset,e.mapBumpWrap,e.mapBumpAnisotropy);break;case "mapBumpScale":k.bumpScale=q;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":k.normalMap=h(q,e.mapNormalRepeat,e.mapNormalOffset,e.mapNormalWrap,e.mapNormalAnisotropy);break;case "mapNormalFactor":k.normalScale=[q,q];break;
+case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":k.specularMap=h(q,e.mapSpecularRepeat,e.mapSpecularOffset,e.mapSpecularWrap,e.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapMetalness":k.metalnessMap=h(q,e.mapMetalnessRepeat,e.mapMetalnessOffset,e.mapMetalnessWrap,e.mapMetalnessAnisotropy);break;case "mapMetalnessRepeat":case "mapMetalnessOffset":case "mapMetalnessWrap":case "mapMetalnessAnisotropy":break;
+case "mapRoughness":k.roughnessMap=h(q,e.mapRoughnessRepeat,e.mapRoughnessOffset,e.mapRoughnessWrap,e.mapRoughnessAnisotropy);break;case "mapRoughnessRepeat":case "mapRoughnessOffset":case "mapRoughnessWrap":case "mapRoughnessAnisotropy":break;case "mapAlpha":k.alphaMap=h(q,e.mapAlphaRepeat,e.mapAlphaOffset,e.mapAlphaWrap,e.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;case "flipSided":k.side=1;break;case "doubleSided":k.side=
+2;break;case "transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity");k.opacity=q;break;case "depthTest":case "depthWrite":case "colorWrite":case "opacity":case "reflectivity":case "transparent":case "visible":case "wireframe":k[p]=q;break;case "vertexColors":!0===q&&(k.vertexColors=2);"face"===q&&(k.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",p,q)}}"MeshBasicMaterial"===k.type&&delete k.emissive;"MeshPhongMaterial"!==
+k.type&&delete k.specular;1>k.opacity&&(k.transparent=!0);d.setTextures(l);return d.parse(k)}}()});Object.assign($d.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:cc.prototype.extractUrlBase(a),g=new ta(this.manager);g.setResponseType("json");g.setWithCredentials(this.withCredentials);g.load(a,function(c){var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");
+return}if("scene"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(){return function(a,b){void 0!==a.data&&(a=a.data);a.scale=void 0!==a.scale?1/a.scale:1;var c=new T,d=a,e,f,g,h,l,k,u,q,n,t,z,r,x,y,w=d.faces;n=d.vertices;var A=d.normals,v=d.colors;k=d.scale;var E=0;if(void 0!==d.uvs){for(e=0;e<d.uvs.length;e++)d.uvs[e].length&&
+E++;for(e=0;e<E;e++)c.faceVertexUvs[e]=[]}h=0;for(l=n.length;h<l;)e=new p,e.x=n[h++]*k,e.y=n[h++]*k,e.z=n[h++]*k,c.vertices.push(e);h=0;for(l=w.length;h<l;)if(n=w[h++],t=n&1,g=n&2,e=n&8,u=n&16,z=n&32,k=n&64,n&=128,t){t=new Ta;t.a=w[h];t.b=w[h+1];t.c=w[h+3];r=new Ta;r.a=w[h+1];r.b=w[h+2];r.c=w[h+3];h+=4;g&&(g=w[h++],t.materialIndex=g,r.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<E;e++)for(x=d.uvs[e],c.faceVertexUvs[e][g]=[],c.faceVertexUvs[e][g+1]=[],f=0;4>f;f++)q=w[h++],y=x[2*q],q=x[2*q+1],y=
+new D(y,q),2!==f&&c.faceVertexUvs[e][g].push(y),0!==f&&c.faceVertexUvs[e][g+1].push(y);u&&(u=3*w[h++],t.normal.set(A[u++],A[u++],A[u]),r.normal.copy(t.normal));if(z)for(e=0;4>e;e++)u=3*w[h++],z=new p(A[u++],A[u++],A[u]),2!==e&&t.vertexNormals.push(z),0!==e&&r.vertexNormals.push(z);k&&(k=w[h++],k=v[k],t.color.setHex(k),r.color.setHex(k));if(n)for(e=0;4>e;e++)k=w[h++],k=v[k],2!==e&&t.vertexColors.push(new K(k)),0!==e&&r.vertexColors.push(new K(k));c.faces.push(t);c.faces.push(r)}else{t=new Ta;t.a=w[h++];
+t.b=w[h++];t.c=w[h++];g&&(g=w[h++],t.materialIndex=g);g=c.faces.length;if(e)for(e=0;e<E;e++)for(x=d.uvs[e],c.faceVertexUvs[e][g]=[],f=0;3>f;f++)q=w[h++],y=x[2*q],q=x[2*q+1],y=new D(y,q),c.faceVertexUvs[e][g].push(y);u&&(u=3*w[h++],t.normal.set(A[u++],A[u++],A[u]));if(z)for(e=0;3>e;e++)u=3*w[h++],z=new p(A[u++],A[u++],A[u]),t.vertexNormals.push(z);k&&(k=w[h++],t.color.setHex(v[k]));if(n)for(e=0;3>e;e++)k=w[h++],t.vertexColors.push(new K(v[k]));c.faces.push(t)}d=a;h=void 0!==d.influencesPerVertex?d.influencesPerVertex:
 2;if(d.skinWeights)for(l=0,w=d.skinWeights.length;l<w;l+=h)c.skinWeights.push(new ha(d.skinWeights[l],1<h?d.skinWeights[l+1]:0,2<h?d.skinWeights[l+2]:0,3<h?d.skinWeights[l+3]:0));if(d.skinIndices)for(l=0,w=d.skinIndices.length;l<w;l+=h)c.skinIndices.push(new ha(d.skinIndices[l],1<h?d.skinIndices[l+1]:0,2<h?d.skinIndices[l+2]:0,3<h?d.skinIndices[l+3]:0));c.bones=d.bones;c.bones&&0<c.bones.length&&(c.skinWeights.length!==c.skinIndices.length||c.skinIndices.length!==c.vertices.length)&&console.warn("When skinning, number of vertices ("+
-c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.");l=a;w=l.scale;if(void 0!==l.morphTargets)for(d=0,h=l.morphTargets.length;d<h;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=l.morphTargets[d].name,c.morphTargets[d].vertices=[],A=c.morphTargets[d].vertices,v=l.morphTargets[d].vertices,E=0,n=v.length;E<n;E+=3)m=new p,m.x=v[E]*w,m.y=v[E+1]*w,m.z=v[E+2]*w,A.push(m);if(void 0!==l.morphColors&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),
+c.vertices.length+"), skinIndices ("+c.skinIndices.length+"), and skinWeights ("+c.skinWeights.length+") should match.");l=a;w=l.scale;if(void 0!==l.morphTargets)for(d=0,h=l.morphTargets.length;d<h;d++)for(c.morphTargets[d]={},c.morphTargets[d].name=l.morphTargets[d].name,c.morphTargets[d].vertices=[],A=c.morphTargets[d].vertices,v=l.morphTargets[d].vertices,E=0,n=v.length;E<n;E+=3)k=new p,k.x=v[E]*w,k.y=v[E+1]*w,k.z=v[E+2]*w,A.push(k);if(void 0!==l.morphColors&&0<l.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),
 w=c.faces,l=l.morphColors[0].colors,d=0,h=w.length;d<h;d++)w[d].color.fromArray(l,3*d);l=a;d=[];h=[];void 0!==l.animation&&h.push(l.animation);void 0!==l.animations&&(l.animations.length?h=h.concat(l.animations):h.push(l.animations));for(l=0;l<h.length;l++)(w=Aa.parseAnimation(h[l],c.bones))&&d.push(w);c.morphTargets&&(h=Aa.CreateClipsFromMorphTargetSequences(c.morphTargets,10),d=d.concat(h));0<d.length&&(c.animations=d);c.computeFaceNormals();c.computeBoundingSphere();if(void 0===a.materials||0===
 a.materials.length)return{geometry:c};d=cc.prototype.initMaterials(a.materials,b,this.crossOrigin);return{geometry:c,materials:d}}}()});Object.assign(Ne.prototype,{load:function(a,b,c,d){""===this.texturePath&&(this.texturePath=a.substring(0,a.lastIndexOf("/")+1));var e=this;(new ta(e.manager)).load(a,function(c){var g=null;try{g=JSON.parse(c)}catch(h){void 0!==d&&d(h);console.error("THREE:ObjectLoader: Can't parse "+a+".",h.message);return}c=g.metadata;void 0===c||void 0===c.type||"geometry"===c.type.toLowerCase()?
 console.error("THREE.ObjectLoader: Can't load "+a+". Use THREE.JSONLoader instead."):e.parse(g,b)},c,d)},setTexturePath:function(a){this.texturePath=a},setCrossOrigin:function(a){this.crossOrigin=a},parse:function(a,b){var c=this.parseGeometries(a.geometries),d=this.parseImages(a.images,function(){void 0!==b&&b(e)}),d=this.parseTextures(a.textures,d),d=this.parseMaterials(a.materials,d),e=this.parseObject(a.object,c,d);a.animations&&(e.animations=this.parseAnimations(a.animations));void 0!==a.images&&
@@ -685,17 +685,17 @@ console.error("THREE.ObjectLoader: Can't load "+a+". Use THREE.JSONLoader instea
 new La[h.type](h.radius,h.segments,h.thetaStart,h.thetaLength);break;case "CylinderGeometry":case "CylinderBufferGeometry":g=new La[h.type](h.radiusTop,h.radiusBottom,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case "ConeGeometry":case "ConeBufferGeometry":g=new La[h.type](h.radius,h.height,h.radialSegments,h.heightSegments,h.openEnded,h.thetaStart,h.thetaLength);break;case "SphereGeometry":case "SphereBufferGeometry":g=new La[h.type](h.radius,h.widthSegments,
 h.heightSegments,h.phiStart,h.phiLength,h.thetaStart,h.thetaLength);break;case "DodecahedronGeometry":case "IcosahedronGeometry":case "OctahedronGeometry":case "TetrahedronGeometry":g=new La[h.type](h.radius,h.detail);break;case "RingGeometry":case "RingBufferGeometry":g=new La[h.type](h.innerRadius,h.outerRadius,h.thetaSegments,h.phiSegments,h.thetaStart,h.thetaLength);break;case "TorusGeometry":case "TorusBufferGeometry":g=new La[h.type](h.radius,h.tube,h.radialSegments,h.tubularSegments,h.arc);
 break;case "TorusKnotGeometry":case "TorusKnotBufferGeometry":g=new La[h.type](h.radius,h.tube,h.tubularSegments,h.radialSegments,h.p,h.q);break;case "LatheGeometry":case "LatheBufferGeometry":g=new La[h.type](h.points,h.segments,h.phiStart,h.phiLength);break;case "BufferGeometry":g=d.parse(h);break;case "Geometry":g=c.parse(h,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+h.type+'"');continue}g.uuid=h.uuid;void 0!==h.name&&(g.name=h.name);
-b[h.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==a){var d=new Cd;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=d.parse(a[e]);c[g.uuid]=g}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=Aa.parse(a[c]);b.push(d)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return g.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemError(a)})}var d=this,e={};if(void 0!==a&&0<a.length){var f=new Wd(b),g=new Rc(f);
-g.setCrossOrigin(this.crossOrigin);for(var f=0,h=a.length;f<h;f++){var l=a[f],k=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:d.texturePath+l.url;e[l.uuid]=c(k)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,
-CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},e={RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},f={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008},g={};if(void 0!==a)for(var h=0,l=a.length;h<l;h++){var k=a[h];void 0===k.image&&console.warn('THREE.ObjectLoader: No "image" specified for',k.uuid);void 0===b[k.image]&&console.warn("THREE.ObjectLoader: Undefined image",
-k.image);var p=new ba(b[k.image]);p.needsUpdate=!0;p.uuid=k.uuid;void 0!==k.name&&(p.name=k.name);void 0!==k.mapping&&(p.mapping=c(k.mapping,d));void 0!==k.offset&&p.offset.fromArray(k.offset);void 0!==k.repeat&&p.repeat.fromArray(k.repeat);void 0!==k.wrap&&(p.wrapS=c(k.wrap[0],e),p.wrapT=c(k.wrap[1],e));void 0!==k.minFilter&&(p.minFilter=c(k.minFilter,f));void 0!==k.magFilter&&(p.magFilter=c(k.magFilter,f));void 0!==k.anisotropy&&(p.anisotropy=k.anisotropy);void 0!==k.flipY&&(p.flipY=k.flipY);g[k.uuid]=
-p}return g},parseObject:function(){var a=new L;return function(b,c,d){function e(a){void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]}function f(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],c=0,e=a.length;c<e;c++){var f=a[c];void 0===d[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(d[f])}return b}void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",a);return d[a]}}var g;switch(b.type){case "Scene":g=new hd;void 0!==b.background&&
-Number.isInteger(b.background)&&(g.background=new K(b.background));void 0!==b.fog&&("Fog"===b.fog.type?g.fog=new Hb(b.fog.color,b.fog.near,b.fog.far):"FogExp2"===b.fog.type&&(g.fog=new Gb(b.fog.color,b.fog.density)));break;case "PerspectiveCamera":g=new xa(b.fov,b.aspect,b.near,b.far);void 0!==b.focus&&(g.focus=b.focus);void 0!==b.zoom&&(g.zoom=b.zoom);void 0!==b.filmGauge&&(g.filmGauge=b.filmGauge);void 0!==b.filmOffset&&(g.filmOffset=b.filmOffset);void 0!==b.view&&(g.view=Object.assign({},b.view));
-break;case "OrthographicCamera":g=new Fb(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":g=new ud(b.color,b.intensity);break;case "DirectionalLight":g=new td(b.color,b.intensity);break;case "PointLight":g=new rd(b.color,b.intensity,b.distance,b.decay);break;case "RectAreaLight":g=new vd(b.color,b.intensity,b.width,b.height);break;case "SpotLight":g=new qd(b.color,b.intensity,b.distance,b.angle,b.penumbra,b.decay);break;case "HemisphereLight":g=new od(b.color,b.groundColor,b.intensity);
-break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":g=e(b.geometry);var h=f(b.material);g=g.bones&&0<g.bones.length?new jd(g,h):new wa(g,h);break;case "LOD":g=new xc;break;case "Line":g=new Ja(e(b.geometry),f(b.material),b.mode);break;case "LineLoop":g=new kd(e(b.geometry),f(b.material));break;case "LineSegments":g=new ca(e(b.geometry),f(b.material));break;case "PointCloud":case "Points":g=new Ib(e(b.geometry),f(b.material));break;
-case "Sprite":g=new wc(f(b.material));break;case "Group":g=new zc;break;default:g=new A}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),void 0!==b.scale&&g.scale.fromArray(b.scale));void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&
-(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias),void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var l in b.children)g.add(this.parseObject(b.children[l],c,d));if("LOD"===b.type)for(b=
-b.levels,h=0;h<b.length;h++){var k=b[h];l=g.getObjectByProperty("uuid",k.object);void 0!==l&&g.addLevel(l,k.distance)}return g}}()});Object.assign(ja.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/
+b[h.uuid]=g}return b},parseMaterials:function(a,b){var c={};if(void 0!==a){var d=new Cd;d.setTextures(b);for(var e=0,f=a.length;e<f;e++){var g=d.parse(a[e]);c[g.uuid]=g}}return c},parseAnimations:function(a){for(var b=[],c=0;c<a.length;c++){var d=Aa.parse(a[c]);b.push(d)}return b},parseImages:function(a,b){function c(a){d.manager.itemStart(a);return g.load(a,function(){d.manager.itemEnd(a)},void 0,function(){d.manager.itemEnd(a);d.manager.itemError(a)})}var d=this,e={};if(void 0!==a&&0<a.length){var f=
+new Wd(b),g=new Rc(f);g.setCrossOrigin(this.crossOrigin);for(var f=0,h=a.length;f<h;f++){var l=a[f],k=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l.url)?l.url:d.texturePath+l.url;e[l.uuid]=c(k)}}return e},parseTextures:function(a,b){function c(a,b){if("number"===typeof a)return a;console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",a);return b[a]}var d={};if(void 0!==a)for(var e=0,f=a.length;e<f;e++){var g=a[e];void 0===g.image&&console.warn('THREE.ObjectLoader: No "image" specified for',
+g.uuid);void 0===b[g.image]&&console.warn("THREE.ObjectLoader: Undefined image",g.image);var h=new ba(b[g.image]);h.needsUpdate=!0;h.uuid=g.uuid;void 0!==g.name&&(h.name=g.name);void 0!==g.mapping&&(h.mapping=c(g.mapping,ig));void 0!==g.offset&&h.offset.fromArray(g.offset);void 0!==g.repeat&&h.repeat.fromArray(g.repeat);void 0!==g.wrap&&(h.wrapS=c(g.wrap[0],cf),h.wrapT=c(g.wrap[1],cf));void 0!==g.minFilter&&(h.minFilter=c(g.minFilter,df));void 0!==g.magFilter&&(h.magFilter=c(g.magFilter,df));void 0!==
+g.anisotropy&&(h.anisotropy=g.anisotropy);void 0!==g.flipY&&(h.flipY=g.flipY);d[g.uuid]=h}return d},parseObject:function(){var a=new L;return function(b,c,d){function e(a){void 0===c[a]&&console.warn("THREE.ObjectLoader: Undefined geometry",a);return c[a]}function f(a){if(void 0!==a){if(Array.isArray(a)){for(var b=[],c=0,e=a.length;c<e;c++){var f=a[c];void 0===d[f]&&console.warn("THREE.ObjectLoader: Undefined material",f);b.push(d[f])}return b}void 0===d[a]&&console.warn("THREE.ObjectLoader: Undefined material",
+a);return d[a]}}var g;switch(b.type){case "Scene":g=new hd;void 0!==b.background&&Number.isInteger(b.background)&&(g.background=new K(b.background));void 0!==b.fog&&("Fog"===b.fog.type?g.fog=new Hb(b.fog.color,b.fog.near,b.fog.far):"FogExp2"===b.fog.type&&(g.fog=new Gb(b.fog.color,b.fog.density)));break;case "PerspectiveCamera":g=new xa(b.fov,b.aspect,b.near,b.far);void 0!==b.focus&&(g.focus=b.focus);void 0!==b.zoom&&(g.zoom=b.zoom);void 0!==b.filmGauge&&(g.filmGauge=b.filmGauge);void 0!==b.filmOffset&&
+(g.filmOffset=b.filmOffset);void 0!==b.view&&(g.view=Object.assign({},b.view));break;case "OrthographicCamera":g=new Fb(b.left,b.right,b.top,b.bottom,b.near,b.far);break;case "AmbientLight":g=new ud(b.color,b.intensity);break;case "DirectionalLight":g=new td(b.color,b.intensity);break;case "PointLight":g=new rd(b.color,b.intensity,b.distance,b.decay);break;case "RectAreaLight":g=new vd(b.color,b.intensity,b.width,b.height);break;case "SpotLight":g=new qd(b.color,b.intensity,b.distance,b.angle,b.penumbra,
+b.decay);break;case "HemisphereLight":g=new od(b.color,b.groundColor,b.intensity);break;case "SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case "Mesh":g=e(b.geometry);var h=f(b.material);g=g.bones&&0<g.bones.length?new jd(g,h):new wa(g,h);break;case "LOD":g=new xc;break;case "Line":g=new Ja(e(b.geometry),f(b.material),b.mode);break;case "LineLoop":g=new kd(e(b.geometry),f(b.material));break;case "LineSegments":g=new ca(e(b.geometry),f(b.material));
+break;case "PointCloud":case "Points":g=new Ib(e(b.geometry),f(b.material));break;case "Sprite":g=new wc(f(b.material));break;case "Group":g=new zc;break;default:g=new A}g.uuid=b.uuid;void 0!==b.name&&(g.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(g.position,g.quaternion,g.scale)):(void 0!==b.position&&g.position.fromArray(b.position),void 0!==b.rotation&&g.rotation.fromArray(b.rotation),void 0!==b.quaternion&&g.quaternion.fromArray(b.quaternion),void 0!==b.scale&&g.scale.fromArray(b.scale));
+void 0!==b.castShadow&&(g.castShadow=b.castShadow);void 0!==b.receiveShadow&&(g.receiveShadow=b.receiveShadow);b.shadow&&(void 0!==b.shadow.bias&&(g.shadow.bias=b.shadow.bias),void 0!==b.shadow.radius&&(g.shadow.radius=b.shadow.radius),void 0!==b.shadow.mapSize&&g.shadow.mapSize.fromArray(b.shadow.mapSize),void 0!==b.shadow.camera&&(g.shadow.camera=this.parseObject(b.shadow.camera)));void 0!==b.visible&&(g.visible=b.visible);void 0!==b.userData&&(g.userData=b.userData);if(void 0!==b.children)for(var l in b.children)g.add(this.parseObject(b.children[l],
+c,d));if("LOD"===b.type)for(b=b.levels,h=0;h<b.length;h++){var k=b[h];l=g.getObjectByProperty("uuid",k.object);void 0!==l&&g.addLevel(l,k.distance)}return g}}()});var ig={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},cf={RepeatWrapping:1E3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},df={NearestFilter:1003,NearestMipMapNearestFilter:1004,
+NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};Object.assign(ja.prototype,{getPoint:function(){console.warn("THREE.Curve: .getPoint() not implemented.");return null},getPointAt:function(a){a=this.getUtoTmapping(a);return this.getPoint(a)},getPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPoint(c/a));return b},getSpacedPoints:function(a){void 0===a&&(a=5);for(var b=[],c=0;c<=a;c++)b.push(this.getPointAt(c/
 a));return b},getLength:function(){var a=this.getLengths();return a[a.length-1]},getLengths:function(a){void 0===a&&(a=this.arcLengthDivisions);if(this.cacheArcLengths&&this.cacheArcLengths.length===a+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var b=[],c,d=this.getPoint(0),e,f=0;b.push(0);for(e=1;e<=a;e++)c=this.getPoint(e/a),f+=c.distanceTo(d),b.push(f),d=c;return this.cacheArcLengths=b},updateArcLengths:function(){this.needsUpdate=!0;this.getLengths()},getUtoTmapping:function(a,
 b){var c=this.getLengths(),d,e=c.length,f;f=b?b:a*c[e-1];for(var g=0,h=e-1,l;g<=h;)if(d=Math.floor(g+(h-g)/2),l=c[d]-f,0>l)g=d+1;else if(0<l)h=d-1;else{h=d;break}d=h;if(c[d]===f)return d/(e-1);g=c[d];return(d+(f-g)/(c[d+1]-g))/(e-1)},getTangent:function(a){var b=a-1E-4;a+=1E-4;0>b&&(b=0);1<a&&(a=1);b=this.getPoint(b);return this.getPoint(a).clone().sub(b).normalize()},getTangentAt:function(a){a=this.getUtoTmapping(a);return this.getTangent(a)},computeFrenetFrames:function(a,b){var c=new p,d=[],e=
 [],f=[],g=new p,h=new L,l,k;for(l=0;l<=a;l++)k=l/a,d[l]=this.getTangentAt(k),d[l].normalize();e[0]=new p;f[0]=new p;l=Number.MAX_VALUE;k=Math.abs(d[0].x);var u=Math.abs(d[0].y),q=Math.abs(d[0].z);k<=l&&(l=k,c.set(1,0,0));u<=l&&(l=u,c.set(0,1,0));q<=l&&c.set(0,0,1);g.crossVectors(d[0],c).normalize();e[0].crossVectors(d[0],g);f[0].crossVectors(d[0],e[0]);for(l=1;l<=a;l++)e[l]=e[l-1].clone(),f[l]=f[l-1].clone(),g.crossVectors(d[l-1],d[l]),g.length()>Number.EPSILON&&(g.normalize(),c=Math.acos(Y.clamp(d[l-
@@ -710,14 +710,14 @@ function(a){var b=this.v0,c=this.v1,d=this.v2;return new D(vb(a,b.x,c.x,d.x),vb(
 b),new D(c,d));this.curves.push(a);this.currentPoint.set(c,d)},bezierCurveTo:function(a,b,c,d,e,f){a=new dc(this.currentPoint.clone(),new D(a,b),new D(c,d),new D(e,f));this.curves.push(a);this.currentPoint.set(e,f)},splineThru:function(a){var b=[this.currentPoint.clone()].concat(a),b=new xb(b);this.curves.push(b);this.currentPoint.copy(a[a.length-1])},arc:function(a,b,c,d,e,f){this.absarc(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f)},absarc:function(a,b,c,d,e,f){this.absellipse(a,b,c,c,d,
 e,f)},ellipse:function(a,b,c,d,e,f,g,h){this.absellipse(a+this.currentPoint.x,b+this.currentPoint.y,c,d,e,f,g,h)},absellipse:function(a,b,c,d,e,f,g,h){a=new Va(a,b,c,d,e,f,g,h);0<this.curves.length&&(b=a.getPoint(0),b.equals(this.currentPoint)||this.lineTo(b.x,b.y));this.curves.push(a);a=a.getPoint(1);this.currentPoint.copy(a)}});Vc.prototype=re;re.constructor=Vc;yb.prototype=Object.assign(Object.create(re),{constructor:yb,getPointsHoles:function(a){for(var b=[],c=0,d=this.holes.length;c<d;c++)b[c]=
 this.holes[c].getPoints(a);return b},extractAllPoints:function(a){return{shape:this.getPoints(a),holes:this.getPointsHoles(a)}},extractPoints:function(a){return this.extractAllPoints(a)}});Object.assign(ae.prototype,{moveTo:function(a,b){this.currentPath=new Vc;this.subPaths.push(this.currentPath);this.currentPath.moveTo(a,b)},lineTo:function(a,b){this.currentPath.lineTo(a,b)},quadraticCurveTo:function(a,b,c,d){this.currentPath.quadraticCurveTo(a,b,c,d)},bezierCurveTo:function(a,b,c,d,e,f){this.currentPath.bezierCurveTo(a,
-b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new yb;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],l=h.x-g.x,k=h.y-g.y;if(Math.abs(k)>Number.EPSILON){if(0>k&&(g=b[f],l=-l,h=b[e],k=-k),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=k*(a.x-g.x)-l*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=
-a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=ya.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g,h,l,k=[];if(1===f.length)return h=f[0],l=new yb,l.curves=h.curves,k.push(l),k;var p=!e(f[0].getPoints()),p=a?!p:p;l=[];var q=[],n=[],t=0,z;q[t]=void 0;n[t]=[];for(var r=0,x=f.length;r<x;r++)h=f[r],z=h.getPoints(),g=e(z),(g=a?!g:g)?(!p&&q[t]&&t++,q[t]={s:new yb,p:z},q[t].s.curves=h.curves,p&&t++,n[t]=[]):n[t].push({h:h,p:z[0]});if(!q[0])return c(f);if(1<q.length){r=
-!1;h=[];e=0;for(f=q.length;e<f;e++)l[e]=[];e=0;for(f=q.length;e<f;e++)for(g=n[e],p=0;p<g.length;p++){t=g[p];z=!0;for(x=0;x<q.length;x++)d(t.p,q[x].p)&&(e!==x&&h.push({froms:e,tos:x,hole:p}),z?(z=!1,l[x].push(t)):r=!0);z&&l[e].push(t)}0<h.length&&(r||(n=l))}r=0;for(e=q.length;r<e;r++)for(l=q[r].s,k.push(l),h=n[r],f=0,g=h.length;f<g;f++)l.holes.push(h[f].h);return k}});Object.assign(be.prototype,{isFont:!0,generateShapes:function(a,b,c){void 0===b&&(b=100);void 0===c&&(c=4);var d=this.data;a=String(a).split("");
-var e=b/d.resolution,f=(d.boundingBox.yMax-d.boundingBox.yMin+d.underlineThickness)*e,g=0,h=0;b=[];for(var l=0;l<a.length;l++){var k=a[l];if("\n"===k)g=0,h-=f;else{var p;p=e;var q=g,n=h;if(k=d.glyphs[k]||d.glyphs["?"]){var t=new ae,z=[],r,x,y,w,A,v,E,C;if(k.o)for(var F=k._cachedOutline||(k._cachedOutline=k.o.split(" ")),D=0,K=F.length;D<K;)switch(F[D++]){case "m":r=F[D++]*p+q;x=F[D++]*p+n;t.moveTo(r,x);break;case "l":r=F[D++]*p+q;x=F[D++]*p+n;t.lineTo(r,x);break;case "q":r=F[D++]*p+q;x=F[D++]*p+n;
-A=F[D++]*p+q;v=F[D++]*p+n;t.quadraticCurveTo(A,v,r,x);if(w=z[z.length-1]){y=w.x;w=w.y;for(var I=1;I<=c;I++){var L=I/c;vb(L,y,A,r);vb(L,w,v,x)}}break;case "b":if(r=F[D++]*p+q,x=F[D++]*p+n,A=F[D++]*p+q,v=F[D++]*p+n,E=F[D++]*p+q,C=F[D++]*p+n,t.bezierCurveTo(A,v,E,C,r,x),w=z[z.length-1])for(y=w.x,w=w.y,I=1;I<=c;I++)L=I/c,wb(L,y,A,E,r),wb(L,w,v,C,x)}p={offsetX:k.ha*p,path:t}}else p=void 0;g+=p.offsetX;b.push(p.path)}}c=[];d=0;for(a=b.length;d<a;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}});
+b,c,d,e,f)},splineThru:function(a){this.currentPath.splineThru(a)},toShapes:function(a,b){function c(a){for(var b=[],c=0,d=a.length;c<d;c++){var e=a[c],f=new yb;f.curves=e.curves;b.push(f)}return b}function d(a,b){for(var c=b.length,d=!1,e=c-1,f=0;f<c;e=f++){var g=b[e],h=b[f],k=h.x-g.x,l=h.y-g.y;if(Math.abs(l)>Number.EPSILON){if(0>l&&(g=b[f],k=-k,h=b[e],l=-l),!(a.y<g.y||a.y>h.y))if(a.y===g.y){if(a.x===g.x)return!0}else{e=l*(a.x-g.x)-k*(a.y-g.y);if(0===e)return!0;0>e||(d=!d)}}else if(a.y===g.y&&(h.x<=
+a.x&&a.x<=g.x||g.x<=a.x&&a.x<=h.x))return!0}return d}var e=ya.isClockWise,f=this.subPaths;if(0===f.length)return[];if(!0===b)return c(f);var g,h,k,m=[];if(1===f.length)return h=f[0],k=new yb,k.curves=h.curves,m.push(k),m;var p=!e(f[0].getPoints()),p=a?!p:p;k=[];var q=[],n=[],t=0,z;q[t]=void 0;n[t]=[];for(var r=0,x=f.length;r<x;r++)h=f[r],z=h.getPoints(),g=e(z),(g=a?!g:g)?(!p&&q[t]&&t++,q[t]={s:new yb,p:z},q[t].s.curves=h.curves,p&&t++,n[t]=[]):n[t].push({h:h,p:z[0]});if(!q[0])return c(f);if(1<q.length){r=
+!1;h=[];e=0;for(f=q.length;e<f;e++)k[e]=[];e=0;for(f=q.length;e<f;e++)for(g=n[e],p=0;p<g.length;p++){t=g[p];z=!0;for(x=0;x<q.length;x++)d(t.p,q[x].p)&&(e!==x&&h.push({froms:e,tos:x,hole:p}),z?(z=!1,k[x].push(t)):r=!0);z&&k[e].push(t)}0<h.length&&(r||(n=k))}r=0;for(e=q.length;r<e;r++)for(k=q[r].s,m.push(k),h=n[r],f=0,g=h.length;f<g;f++)k.holes.push(h[f].h);return m}});Object.assign(be.prototype,{isFont:!0,generateShapes:function(a,b,c){void 0===b&&(b=100);void 0===c&&(c=4);var d=this.data;a=String(a).split("");
+var e=b/d.resolution,f=(d.boundingBox.yMax-d.boundingBox.yMin+d.underlineThickness)*e,g=0,h=0;b=[];for(var k=0;k<a.length;k++){var m=a[k];if("\n"===m)g=0,h-=f;else{var p;p=e;var q=g,n=h;if(m=d.glyphs[m]||d.glyphs["?"]){var t=new ae,z=[],r,x,y,w,A,v,E,C;if(m.o)for(var F=m._cachedOutline||(m._cachedOutline=m.o.split(" ")),D=0,K=F.length;D<K;)switch(F[D++]){case "m":r=F[D++]*p+q;x=F[D++]*p+n;t.moveTo(r,x);break;case "l":r=F[D++]*p+q;x=F[D++]*p+n;t.lineTo(r,x);break;case "q":r=F[D++]*p+q;x=F[D++]*p+n;
+A=F[D++]*p+q;v=F[D++]*p+n;t.quadraticCurveTo(A,v,r,x);if(w=z[z.length-1]){y=w.x;w=w.y;for(var I=1;I<=c;I++){var L=I/c;vb(L,y,A,r);vb(L,w,v,x)}}break;case "b":if(r=F[D++]*p+q,x=F[D++]*p+n,A=F[D++]*p+q,v=F[D++]*p+n,E=F[D++]*p+q,C=F[D++]*p+n,t.bezierCurveTo(A,v,E,C,r,x),w=z[z.length-1])for(y=w.x,w=w.y,I=1;I<=c;I++)L=I/c,wb(L,y,A,E,r),wb(L,w,v,C,x)}p={offsetX:m.ha*p,path:t}}else p=void 0;g+=p.offsetX;b.push(p.path)}}c=[];d=0;for(a=b.length;d<a;d++)Array.prototype.push.apply(c,b[d].toShapes());return c}});
 Object.assign(Pe.prototype,{load:function(a,b,c,d){var e=this;(new ta(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new be(a)}});var Jd,fe={getContext:function(){void 0===Jd&&(Jd=new (window.AudioContext||window.webkitAudioContext));return Jd},setContext:function(a){Jd=a}};Object.assign(ce.prototype,
-{load:function(a,b,c,d){var e=new ta(this.manager);e.setResponseType("arraybuffer");e.load(a,function(a){fe.getContext().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(Qe.prototype,{update:function(){var a,b,c,d,e,f,g,h,l=new L,k=new L;return function(p){if(a!==this||b!==p.focus||c!==p.fov||d!==p.aspect*this.aspect||e!==p.near||f!==p.far||g!==p.zoom||h!==this.eyeSep){a=this;b=p.focus;c=p.fov;d=p.aspect*this.aspect;e=p.near;f=p.far;g=p.zoom;var q=p.projectionMatrix.clone();h=this.eyeSep/
-2;var n=h*e/b,t=e*Math.tan(Y.DEG2RAD*c*.5)/g,z,r;k.elements[12]=-h;l.elements[12]=h;z=-t*d+n;r=t*d+n;q.elements[0]=2*e/(r-z);q.elements[8]=(r+z)/(r-z);this.cameraL.projectionMatrix.copy(q);z=-t*d-n;r=t*d-n;q.elements[0]=2*e/(r-z);q.elements[8]=(r+z)/(r-z);this.cameraR.projectionMatrix.copy(q)}this.cameraL.matrixWorld.copy(p.matrixWorld).multiply(k);this.cameraR.matrixWorld.copy(p.matrixWorld).multiply(l)}}()});Dd.prototype=Object.create(A.prototype);Dd.prototype.constructor=Dd;de.prototype=Object.assign(Object.create(xa.prototype),
+{load:function(a,b,c,d){var e=new ta(this.manager);e.setResponseType("arraybuffer");e.load(a,function(a){fe.getContext().decodeAudioData(a,function(a){b(a)})},c,d)}});Object.assign(Qe.prototype,{update:function(){var a,b,c,d,e,f,g,h,k=new L,m=new L;return function(p){if(a!==this||b!==p.focus||c!==p.fov||d!==p.aspect*this.aspect||e!==p.near||f!==p.far||g!==p.zoom||h!==this.eyeSep){a=this;b=p.focus;c=p.fov;d=p.aspect*this.aspect;e=p.near;f=p.far;g=p.zoom;var q=p.projectionMatrix.clone();h=this.eyeSep/
+2;var n=h*e/b,t=e*Math.tan(Y.DEG2RAD*c*.5)/g,z,r;m.elements[12]=-h;k.elements[12]=h;z=-t*d+n;r=t*d+n;q.elements[0]=2*e/(r-z);q.elements[8]=(r+z)/(r-z);this.cameraL.projectionMatrix.copy(q);z=-t*d-n;r=t*d-n;q.elements[0]=2*e/(r-z);q.elements[8]=(r+z)/(r-z);this.cameraR.projectionMatrix.copy(q)}this.cameraL.matrixWorld.copy(p.matrixWorld).multiply(m);this.cameraR.matrixWorld.copy(p.matrixWorld).multiply(k)}}()});Dd.prototype=Object.create(A.prototype);Dd.prototype.constructor=Dd;de.prototype=Object.assign(Object.create(xa.prototype),
 {constructor:de,isArrayCamera:!0});ee.prototype=Object.assign(Object.create(A.prototype),{constructor:ee,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(a){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):
 this.gain.disconnect(this.context.destination);this.filter=a;this.gain.connect(this.filter);this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(a){this.gain.gain.value=a},updateMatrixWorld:function(){var a=new p,b=new oa,c=new p,d=new p;return function(e){A.prototype.updateMatrixWorld.call(this,e);e=this.context.listener;var f=this.up;this.matrixWorld.decompose(a,b,c);d.set(0,0,-1).applyQuaternion(b);e.positionX?(e.positionX.setValueAtTime(a.x,
 this.context.currentTime),e.positionY.setValueAtTime(a.y,this.context.currentTime),e.positionZ.setValueAtTime(a.z,this.context.currentTime),e.forwardX.setValueAtTime(d.x,this.context.currentTime),e.forwardY.setValueAtTime(d.y,this.context.currentTime),e.forwardZ.setValueAtTime(d.z,this.context.currentTime),e.upX.setValueAtTime(f.x,this.context.currentTime),e.upY.setValueAtTime(f.y,this.context.currentTime),e.upZ.setValueAtTime(f.z,this.context.currentTime)):(e.setPosition(a.x,a.y,a.z),e.setOrientation(d.x,
@@ -741,8 +741,8 @@ d=b.propertyName,e=b.propertyIndex;a||(this.node=a=la.findNode(this.rootNode,b.n
 break;case "bones":if(!a.skeleton){console.error("  can not bind to bones as node does not have a skeleton",this);return}a=a.skeleton.bones;for(c=0;c<a.length;c++)if(a[c].name===f){f=c;break}break;default:if(void 0===a[c]){console.error("  can not bind to objectName of node, undefined",this);return}a=a[c]}if(void 0!==f){if(void 0===a[f]){console.error("  trying to bind to objectIndex of objectName, but is undefined:",this,a);return}a=a[f]}}f=a[d];if(void 0===f)console.error("  trying to update property for track: "+
 b.nodeName+"."+d+" but it wasn't found.",a);else{b=this.Versioning.None;void 0!==a.needsUpdate?(b=this.Versioning.NeedsUpdate,this.targetObject=a):void 0!==a.matrixWorldNeedsUpdate&&(b=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=a);c=this.BindingType.Direct;if(void 0!==e){if("morphTargetInfluences"===d){if(!a.geometry){console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry",this);return}if(!a.geometry.morphTargets){console.error("  can not bind to morphTargetInfluences becasuse node does not have a geometry.morphTargets",
 this);return}for(c=0;c<this.node.geometry.morphTargets.length;c++)if(a.geometry.morphTargets[c].name===e){e=c;break}}c=this.BindingType.ArrayElement;this.resolvedProperty=f;this.propertyIndex=e}else void 0!==f.fromArray&&void 0!==f.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=f):Array.isArray(f)?(c=this.BindingType.EntireArray,this.resolvedProperty=f):this.propertyName=d;this.getValue=this.GetterByBindingType[c];this.setValue=this.SetterByBindingTypeAndVersioning[c][b]}}else console.error("  trying to update node for track: "+
-this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(la.prototype,{_getValue_unbound:la.prototype.getValue,_setValue_unbound:la.prototype.setValue});Object.assign(Se.prototype,{isAnimationObjectGroup:!0,add:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._paths,g=this._parsedPaths,h=this._bindings,l=h.length,k=0,p=arguments.length;k!==p;++k){var q=
-arguments[k],n=q.uuid,t=e[n];if(void 0===t){t=c++;e[n]=t;b.push(q);for(var n=0,z=l;n!==z;++n)h[n].push(new la(q,f[n],g[n]))}else if(t<d){var r=--d,z=b[r];e[z.uuid]=t;b[t]=z;e[n]=r;b[r]=q;n=0;for(z=l;n!==z;++n){var x=h[n],y=x[t];x[t]=x[r];void 0===y&&(y=new la(q,f[n],g[n]));x[r]=y}}else void 0!==b[t]&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=d},remove:function(a){for(var b=this._objects,
+this.path+" but it wasn't found.")},unbind:function(){this.node=null;this.getValue=this._getValue_unbound;this.setValue=this._setValue_unbound}});Object.assign(la.prototype,{_getValue_unbound:la.prototype.getValue,_setValue_unbound:la.prototype.setValue});Object.assign(Se.prototype,{isAnimationObjectGroup:!0,add:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._paths,g=this._parsedPaths,h=this._bindings,k=h.length,m=0,p=arguments.length;m!==p;++m){var q=
+arguments[m],n=q.uuid,t=e[n];if(void 0===t){t=c++;e[n]=t;b.push(q);for(var n=0,z=k;n!==z;++n)h[n].push(new la(q,f[n],g[n]))}else if(t<d){var r=--d,z=b[r];e[z.uuid]=t;b[t]=z;e[n]=r;b[r]=q;n=0;for(z=k;n!==z;++n){var x=h[n],y=x[t];x[t]=x[r];void 0===y&&(y=new la(q,f[n],g[n]));x[r]=y}}else void 0!==b[t]&&console.error("Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes...")}this.nCachedObjects_=d},remove:function(a){for(var b=this._objects,
 c=this.nCachedObjects_,d=this._indicesByUUID,e=this._bindings,f=e.length,g=0,h=arguments.length;g!==h;++g){var k=arguments[g],m=k.uuid,p=d[m];if(void 0!==p&&p>=c){var q=c++,n=b[q];d[n.uuid]=p;b[p]=n;d[m]=q;b[q]=k;k=0;for(m=f;k!==m;++k){var n=e[k],t=n[p];n[p]=n[q];n[q]=t}}}this.nCachedObjects_=c},uncache:function(a){for(var b=this._objects,c=b.length,d=this.nCachedObjects_,e=this._indicesByUUID,f=this._bindings,g=f.length,h=0,k=arguments.length;h!==k;++h){var m=arguments[h].uuid,p=e[m];if(void 0!==
 p)if(delete e[m],p<d){var m=--d,q=b[m],n=--c,t=b[n];e[q.uuid]=p;b[p]=q;e[t.uuid]=m;b[m]=t;b.pop();q=0;for(t=g;q!==t;++q){var z=f[q],r=z[n];z[p]=z[m];z[m]=r;z.pop()}}else for(n=--c,t=b[n],e[t.uuid]=p,b[p]=t,b.pop(),q=0,t=g;q!==t;++q)z=f[q],z[p]=z[n],z.pop()}this.nCachedObjects_=d},subscribe_:function(a,b){var c=this._bindingsIndicesByPath,d=c[a],e=this._bindings;if(void 0!==d)return e[d];var f=this._paths,g=this._parsedPaths,h=this._objects,k=this.nCachedObjects_,m=Array(h.length),d=e.length;c[a]=
 d;f.push(a);g.push(b);e.push(m);c=k;for(d=h.length;c!==d;++c)m[c]=new la(h[c],a,b);return m},unsubscribe_:function(a){var b=this._bindingsIndicesByPath,c=b[a];if(void 0!==c){var d=this._paths,e=this._parsedPaths,f=this._bindings,g=f.length-1,h=f[g];b[a[g]]=c;f[c]=h;f.pop();e[c]=e[g];e.pop();d[c]=d[g];d.pop()}}});Object.assign(Te.prototype,{play:function(){this._mixer._activateAction(this);return this},stop:function(){this._mixer._deactivateAction(this);return this.reset()},reset:function(){this.paused=

+ 48 - 43
build/three.module.js

@@ -29398,6 +29398,7 @@ Object.assign( FileLoader.prototype, {
 
 					if ( onError ) onError( error );
 
+					scope.manager.itemEnd( url );
 					scope.manager.itemError( url );
 
 				}, 0 );
@@ -29436,6 +29437,7 @@ Object.assign( FileLoader.prototype, {
 
 					if ( onError ) onError( event );
 
+					scope.manager.itemEnd( url );
 					scope.manager.itemError( url );
 
 				}
@@ -29456,6 +29458,7 @@ Object.assign( FileLoader.prototype, {
 
 				if ( onError ) onError( event );
 
+				scope.manager.itemEnd( url );
 				scope.manager.itemError( url );
 
 			}, false );
@@ -29802,6 +29805,7 @@ Object.assign( ImageLoader.prototype, {
 
 			if ( onError ) onError( event );
 
+			scope.manager.itemEnd( url );
 			scope.manager.itemError( url );
 
 		}, false );
@@ -32328,18 +32332,6 @@ Object.assign( BufferGeometryLoader.prototype, {
 
 		var index = json.data.index;
 
-		var TYPED_ARRAYS = {
-			'Int8Array': Int8Array,
-			'Uint8Array': Uint8Array,
-			'Uint8ClampedArray': Uint8ClampedArray,
-			'Int16Array': Int16Array,
-			'Uint16Array': Uint16Array,
-			'Int32Array': Int32Array,
-			'Uint32Array': Uint32Array,
-			'Float32Array': Float32Array,
-			'Float64Array': Float64Array
-		};
-
 		if ( index !== undefined ) {
 
 			var typedArray = new TYPED_ARRAYS[ index.type ]( index.array );
@@ -32394,6 +32386,18 @@ Object.assign( BufferGeometryLoader.prototype, {
 
 } );
 
+var TYPED_ARRAYS = {
+	Int8Array: Int8Array,
+	Uint8Array: Uint8Array,
+	Uint8ClampedArray: Uint8ClampedArray,
+	Int16Array: Int16Array,
+	Uint16Array: Uint16Array,
+	Int32Array: Int32Array,
+	Uint32Array: Uint32Array,
+	Float32Array: Float32Array,
+	Float64Array: Float64Array
+};
+
 /**
  * @author alteredq / http://alteredqualia.com/
  */
@@ -33640,6 +33644,7 @@ Object.assign( ObjectLoader.prototype, {
 
 			}, undefined, function () {
 
+				scope.manager.itemEnd( url );
 				scope.manager.itemError( url );
 
 			} );
@@ -33670,32 +33675,6 @@ Object.assign( ObjectLoader.prototype, {
 
 	parseTextures: function ( json, images ) {
 
-		var TextureMapping = {
-			UVMapping: UVMapping,
-			CubeReflectionMapping: CubeReflectionMapping,
-			CubeRefractionMapping: CubeRefractionMapping,
-			EquirectangularReflectionMapping: EquirectangularReflectionMapping,
-			EquirectangularRefractionMapping: EquirectangularRefractionMapping,
-			SphericalReflectionMapping: SphericalReflectionMapping,
-			CubeUVReflectionMapping: CubeUVReflectionMapping,
-			CubeUVRefractionMapping: CubeUVRefractionMapping
-		};
-
-		var TextureWrapping = {
-			RepeatWrapping: RepeatWrapping,
-			ClampToEdgeWrapping: ClampToEdgeWrapping,
-			MirroredRepeatWrapping: MirroredRepeatWrapping
-		};
-
-		var TextureFilter = {
-			NearestFilter: NearestFilter,
-			NearestMipMapNearestFilter: NearestMipMapNearestFilter,
-			NearestMipMapLinearFilter: NearestMipMapLinearFilter,
-			LinearFilter: LinearFilter,
-			LinearMipMapNearestFilter: LinearMipMapNearestFilter,
-			LinearMipMapLinearFilter: LinearMipMapLinearFilter
-		};
-
 		function parseConstant( value, type ) {
 
 			if ( typeof( value ) === 'number' ) return value;
@@ -33733,19 +33712,19 @@ Object.assign( ObjectLoader.prototype, {
 
 				if ( data.name !== undefined ) texture.name = data.name;
 
-				if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TextureMapping );
+				if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );
 
 				if ( data.offset !== undefined ) texture.offset.fromArray( data.offset );
 				if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );
 				if ( data.wrap !== undefined ) {
 
-					texture.wrapS = parseConstant( data.wrap[ 0 ], TextureWrapping );
-					texture.wrapT = parseConstant( data.wrap[ 1 ], TextureWrapping );
+					texture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );
+					texture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );
 
 				}
 
-				if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TextureFilter );
-				if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TextureFilter );
+				if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );
+				if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );
 				if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;
 
 				if ( data.flipY !== undefined ) texture.flipY = data.flipY;
@@ -34041,6 +34020,32 @@ Object.assign( ObjectLoader.prototype, {
 
 } );
 
+var TEXTURE_MAPPING = {
+	UVMapping: UVMapping,
+	CubeReflectionMapping: CubeReflectionMapping,
+	CubeRefractionMapping: CubeRefractionMapping,
+	EquirectangularReflectionMapping: EquirectangularReflectionMapping,
+	EquirectangularRefractionMapping: EquirectangularRefractionMapping,
+	SphericalReflectionMapping: SphericalReflectionMapping,
+	CubeUVReflectionMapping: CubeUVReflectionMapping,
+	CubeUVRefractionMapping: CubeUVRefractionMapping
+};
+
+var TEXTURE_WRAPPING = {
+	RepeatWrapping: RepeatWrapping,
+	ClampToEdgeWrapping: ClampToEdgeWrapping,
+	MirroredRepeatWrapping: MirroredRepeatWrapping
+};
+
+var TEXTURE_FILTER = {
+	NearestFilter: NearestFilter,
+	NearestMipMapNearestFilter: NearestMipMapNearestFilter,
+	NearestMipMapLinearFilter: NearestMipMapLinearFilter,
+	LinearFilter: LinearFilter,
+	LinearMipMapNearestFilter: LinearMipMapNearestFilter,
+	LinearMipMapLinearFilter: LinearMipMapLinearFilter
+};
+
 /**
  * @author zz85 / http://www.lab4games.net/zz85/blog
  *