Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
106ab7020c
2 changed files with 335 additions and 369 deletions
  1. 268 302
      build/three.js
  2. 67 67
      build/three.min.js

+ 268 - 302
build/three.js

@@ -371,46 +371,6 @@ THREE.ZeroCurvatureEnding = 2400;
 THREE.ZeroSlopeEnding = 2401;
 THREE.WrapAroundEnding = 2402;
 
-// DEPRECATED
-
-THREE.Projector = function () {
-
-	console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
-
-	this.projectVector = function ( vector, camera ) {
-
-		console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
-		vector.project( camera );
-
-	};
-
-	this.unprojectVector = function ( vector, camera ) {
-
-		console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
-		vector.unproject( camera );
-
-	};
-
-	this.pickingRay = function ( vector, camera ) {
-
-		console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
-
-	};
-
-};
-
-THREE.CanvasRenderer = function () {
-
-	console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
-
-	this.domElement = document.createElement( 'canvas' );
-	this.clear = function () {};
-	this.render = function () {};
-	this.setClearColor = function () {};
-	this.setSize = function () {};
-
-};
-
 // File:src/math/Color.js
 
 /**
@@ -16641,74 +16601,6 @@ THREE.Light = function ( color ) {
 THREE.Light.prototype = Object.create( THREE.Object3D.prototype );
 THREE.Light.prototype.constructor = THREE.Light;
 
-Object.defineProperties( THREE.Light.prototype, {
-	onlyShadow: {
-		set: function ( value ) {
-			console.warn( 'THREE.Light: .onlyShadow has been removed.' );
-		}
-	},
-	shadowCameraFov: {
-		set: function ( value ) {
-			this.shadow.camera.fov = value;
-		}
-	},
-	shadowCameraLeft: {
-		set: function ( value ) {
-			this.shadow.camera.left = value;
-		}
-	},
-	shadowCameraRight: {
-		set: function ( value ) {
-			this.shadow.camera.right = value;
-		}
-	},
-	shadowCameraTop: {
-		set: function ( value ) {
-			this.shadow.camera.top = value;
-		}
-	},
-	shadowCameraBottom: {
-		set: function ( value ) {
-			this.shadow.camera.bottom = value;
-		}
-	},
-	shadowCameraNear: {
-		set: function ( value ) {
-			this.shadow.camera.near = value;
-		}
-	},
-	shadowCameraFar: {
-		set: function ( value ) {
-			this.shadow.camera.far = value;
-		}
-	},
-	shadowCameraVisible: {
-		set: function ( value ) {
-			console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.' );
-		}
-	},
-	shadowBias: {
-		set: function ( value ) {
-			this.shadow.bias = value;
-		}
-	},
-	shadowDarkness: {
-		set: function ( value ) {
-			this.shadow.darkness = value;
-		}
-	},
-	shadowMapWidth: {
-		set: function ( value ) {
-			this.shadow.mapSize.width = value;
-		}
-	},
-	shadowMapHeight: {
-		set: function ( value ) {
-			this.shadow.mapSize.height = value;
-		}
-	}
-} );
-
 THREE.Light.prototype.copy = function ( source ) {
 
 	THREE.Object3D.prototype.copy.call( this, source );
@@ -27925,144 +27817,6 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	}
 
-	// DEPRECATED
-
-	this.supportsFloatTextures = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
-		return extensions.get( 'OES_texture_float' );
-
-	};
-
-	this.supportsHalfFloatTextures = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
-		return extensions.get( 'OES_texture_half_float' );
-
-	};
-
-	this.supportsStandardDerivatives = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
-		return extensions.get( 'OES_standard_derivatives' );
-
-	};
-
-	this.supportsCompressedTextureS3TC = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
-		return extensions.get( 'WEBGL_compressed_texture_s3tc' );
-
-	};
-
-	this.supportsCompressedTexturePVRTC = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
-		return extensions.get( 'WEBGL_compressed_texture_pvrtc' );
-
-	};
-
-	this.supportsBlendMinMax = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
-		return extensions.get( 'EXT_blend_minmax' );
-
-	};
-
-	this.supportsVertexTextures = function () {
-
-		return capabilities.vertexTextures;
-
-	};
-
-	this.supportsInstancedArrays = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
-		return extensions.get( 'ANGLE_instanced_arrays' );
-
-	};
-
-	//
-
-	this.initMaterial = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
-
-	};
-
-	this.addPrePlugin = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
-
-	};
-
-	this.addPostPlugin = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
-
-	};
-
-	this.updateShadowMap = function () {
-
-		console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
-
-	};
-
-	Object.defineProperties( this, {
-		shadowMapEnabled: {
-			get: function () {
-
-				return shadowMap.enabled;
-
-			},
-			set: function ( value ) {
-
-				console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
-				shadowMap.enabled = value;
-
-			}
-		},
-		shadowMapType: {
-			get: function () {
-
-				return shadowMap.type;
-
-			},
-			set: function ( value ) {
-
-				console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
-				shadowMap.type = value;
-
-			}
-		},
-		shadowMapCullFace: {
-			get: function () {
-
-				return shadowMap.cullFace;
-
-			},
-			set: function ( value ) {
-
-				console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
-				shadowMap.cullFace = value;
-
-			}
-		},
-		shadowMapDebug: {
-			get: function () {
-
-				return shadowMap.debug;
-
-			},
-			set: function ( value ) {
-
-				console.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
-				shadowMap.debug = value;
-
-			}
-		}
-	} );
-
 };
 
 // File:src/renderers/WebGLRenderTarget.js
@@ -31606,63 +31360,189 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 
 };
 
-// File:src/extras/CurveUtils.js
+// File:src/Three.Legacy.js
 
 /**
- * @author zz85 / http://www.lab4games.net/zz85/blog
+ * @author mrdoob / http://mrdoob.com/
  */
 
-THREE.CurveUtils = {
-
-	tangentQuadraticBezier: function ( t, p0, p1, p2 ) {
-
-		return 2 * ( 1 - t ) * ( p1 - p0 ) + 2 * t * ( p2 - p1 );
-
+Object.defineProperties( THREE.Light.prototype, {
+	onlyShadow: {
+		set: function ( value ) {
+			console.warn( 'THREE.Light: .onlyShadow has been removed.' );
+		}
 	},
-
-	// Puay Bing, thanks for helping with this derivative!
-
-	tangentCubicBezier: function ( t, p0, p1, p2, p3 ) {
-
-		return - 3 * p0 * ( 1 - t ) * ( 1 - t )  +
-			3 * p1 * ( 1 - t ) * ( 1 - t ) - 6 * t * p1 * ( 1 - t ) +
-			6 * t *  p2 * ( 1 - t ) - 3 * t * t * p2 +
-			3 * t * t * p3;
-
+	shadowCameraFov: {
+		set: function ( value ) {
+			this.shadow.camera.fov = value;
+		}
 	},
-
-	tangentSpline: function ( t, p0, p1, p2, p3 ) {
-
-		// To check if my formulas are correct
-
-		var h00 = 6 * t * t - 6 * t; 	// derived from 2t^3 − 3t^2 + 1
-		var h10 = 3 * t * t - 4 * t + 1; // t^3 − 2t^2 + t
-		var h01 = - 6 * t * t + 6 * t; 	// − 2t3 + 3t2
-		var h11 = 3 * t * t - 2 * t;	// t3 − t2
-
-		return h00 + h10 + h01 + h11;
-
+	shadowCameraLeft: {
+		set: function ( value ) {
+			this.shadow.camera.left = value;
+		}
 	},
-
-	// Catmull-Rom
-
-	interpolate: function( p0, p1, p2, p3, t ) {
-
-		var v0 = ( p2 - p0 ) * 0.5;
-		var v1 = ( p3 - p1 ) * 0.5;
-		var t2 = t * t;
-		var t3 = t * t2;
-		return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
-
+	shadowCameraRight: {
+		set: function ( value ) {
+			this.shadow.camera.right = value;
+		}
+	},
+	shadowCameraTop: {
+		set: function ( value ) {
+			this.shadow.camera.top = value;
+		}
+	},
+	shadowCameraBottom: {
+		set: function ( value ) {
+			this.shadow.camera.bottom = value;
+		}
+	},
+	shadowCameraNear: {
+		set: function ( value ) {
+			this.shadow.camera.near = value;
+		}
+	},
+	shadowCameraFar: {
+		set: function ( value ) {
+			this.shadow.camera.far = value;
+		}
+	},
+	shadowCameraVisible: {
+		set: function ( value ) {
+			console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.' );
+		}
+	},
+	shadowBias: {
+		set: function ( value ) {
+			this.shadow.bias = value;
+		}
+	},
+	shadowDarkness: {
+		set: function ( value ) {
+			this.shadow.darkness = value;
+		}
+	},
+	shadowMapWidth: {
+		set: function ( value ) {
+			this.shadow.mapSize.width = value;
+		}
+	},
+	shadowMapHeight: {
+		set: function ( value ) {
+			this.shadow.mapSize.height = value;
+		}
 	}
+} );
 
-};
+//
 
-// File:src/extras/GeometryUtils.js
+Object.defineProperties( THREE.WebGLRenderer.prototype, {
+	supportsFloatTextures: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' );
+			return this.extensions.get( 'OES_texture_float' );
+		}
+	},
+	supportsHalfFloatTextures: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' );
+			return this.extensions.get( 'OES_texture_half_float' );
+		}
+	},
+	supportsStandardDerivatives: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' );
+			return this.extensions.get( 'OES_standard_derivatives' );
+		}
+	},
+	supportsCompressedTextureS3TC: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' );
+			return this.extensions.get( 'WEBGL_compressed_texture_s3tc' );
+		}
+	},
+	supportsCompressedTexturePVRTC: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' );
+			return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );
+		}
+	},
+	supportsBlendMinMax: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' );
+			return this.extensions.get( 'EXT_blend_minmax' );
+		}
+	},
+	supportsVertexTextures: {
+		value: function () {
+			return this.capabilities.vertexTextures;
+		}
+	},
+	supportsInstancedArrays: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' );
+			return this.extensions.get( 'ANGLE_instanced_arrays' );
+		}
+	},
+	initMaterial: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );
+		}
+	},
+	addPrePlugin: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );
+		}
+	},
+	addPostPlugin: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );
+		}
+	},
+	updateShadowMap: {
+		value: function () {
+			console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );
+		}
+	},
+	shadowMapEnabled: {
+		get: function () {
+			return this.shadowMap.enabled;
+		},
+		set: function ( value ) {
+			console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );
+			this.shadowMap.enabled = value;
+		}
+	},
+	shadowMapType: {
+		get: function () {
+			return this.shadowMap.type;
+		},
+		set: function ( value ) {
+			console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );
+			this.shadowMap.type = value;
+		}
+	},
+	shadowMapCullFace: {
+		get: function () {
+			return this.shadowMap.cullFace;
+		},
+		set: function ( value ) {
+			console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.' );
+			this.shadowMap.cullFace = value;
+		}
+	},
+	shadowMapDebug: {
+		get: function () {
+			return this.shadowMap.debug;
+		},
+		set: function ( value ) {
+			console.warn( 'THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.' );
+			this.shadowMap.debug = value;
+		}
+	}
+} );
 
-/**
- * @author mrdoob / http://mrdoob.com/
- */
+//
 
 THREE.GeometryUtils = {
 
@@ -31694,21 +31574,13 @@ THREE.GeometryUtils = {
 
 };
 
-// File:src/extras/ImageUtils.js
-
-/**
- * @author alteredq / http://alteredqualia.com/
- * @author mrdoob / http://mrdoob.com/
- * @author Daosheng Mu / https://github.com/DaoshengMu/
- */
-
 THREE.ImageUtils = {
 
 	crossOrigin: undefined,
 
 	loadTexture: function ( url, mapping, onLoad, onError ) {
 
-		console.warn( 'THREE.ImageUtils.loadTexture is being deprecated. Use THREE.TextureLoader() instead.' );
+		console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );
 
 		var loader = new THREE.TextureLoader();
 		loader.setCrossOrigin( this.crossOrigin );
@@ -31723,7 +31595,7 @@ THREE.ImageUtils = {
 
 	loadTextureCube: function ( urls, mapping, onLoad, onError ) {
 
-		console.warn( 'THREE.ImageUtils.loadTextureCube is being deprecated. Use THREE.CubeTextureLoader() instead.' );
+		console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );
 
 		var loader = new THREE.CubeTextureLoader();
 		loader.setCrossOrigin( this.crossOrigin );
@@ -31750,6 +31622,100 @@ THREE.ImageUtils = {
 
 };
 
+//
+
+THREE.Projector = function () {
+
+	console.error( 'THREE.Projector has been moved to /examples/js/renderers/Projector.js.' );
+
+	this.projectVector = function ( vector, camera ) {
+
+		console.warn( 'THREE.Projector: .projectVector() is now vector.project().' );
+		vector.project( camera );
+
+	};
+
+	this.unprojectVector = function ( vector, camera ) {
+
+		console.warn( 'THREE.Projector: .unprojectVector() is now vector.unproject().' );
+		vector.unproject( camera );
+
+	};
+
+	this.pickingRay = function ( vector, camera ) {
+
+		console.error( 'THREE.Projector: .pickingRay() is now raycaster.setFromCamera().' );
+
+	};
+
+};
+
+//
+
+THREE.CanvasRenderer = function () {
+
+	console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
+
+	this.domElement = document.createElement( 'canvas' );
+	this.clear = function () {};
+	this.render = function () {};
+	this.setClearColor = function () {};
+	this.setSize = function () {};
+
+};
+
+// File:src/extras/CurveUtils.js
+
+/**
+ * @author zz85 / http://www.lab4games.net/zz85/blog
+ */
+
+THREE.CurveUtils = {
+
+	tangentQuadraticBezier: function ( t, p0, p1, p2 ) {
+
+		return 2 * ( 1 - t ) * ( p1 - p0 ) + 2 * t * ( p2 - p1 );
+
+	},
+
+	// Puay Bing, thanks for helping with this derivative!
+
+	tangentCubicBezier: function ( t, p0, p1, p2, p3 ) {
+
+		return - 3 * p0 * ( 1 - t ) * ( 1 - t )  +
+			3 * p1 * ( 1 - t ) * ( 1 - t ) - 6 * t * p1 * ( 1 - t ) +
+			6 * t *  p2 * ( 1 - t ) - 3 * t * t * p2 +
+			3 * t * t * p3;
+
+	},
+
+	tangentSpline: function ( t, p0, p1, p2, p3 ) {
+
+		// To check if my formulas are correct
+
+		var h00 = 6 * t * t - 6 * t; 	// derived from 2t^3 − 3t^2 + 1
+		var h10 = 3 * t * t - 4 * t + 1; // t^3 − 2t^2 + t
+		var h01 = - 6 * t * t + 6 * t; 	// − 2t3 + 3t2
+		var h11 = 3 * t * t - 2 * t;	// t3 − t2
+
+		return h00 + h10 + h01 + h11;
+
+	},
+
+	// Catmull-Rom
+
+	interpolate: function( p0, p1, p2, p3, t ) {
+
+		var v0 = ( p2 - p0 ) * 0.5;
+		var v1 = ( p3 - p1 ) * 0.5;
+		var t2 = t * t;
+		var t3 = t * t2;
+		return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;
+
+	}
+
+};
+
 // File:src/extras/SceneUtils.js
 
 /**

+ 67 - 67
build/three.min.js

@@ -9,9 +9,7 @@ THREE.CustomBlending=5;THREE.AddEquation=100;THREE.SubtractEquation=101;THREE.Re
 THREE.LessDepth=2;THREE.LessEqualDepth=3;THREE.EqualDepth=4;THREE.GreaterEqualDepth=5;THREE.GreaterDepth=6;THREE.NotEqualDepth=7;THREE.MultiplyOperation=0;THREE.MixOperation=1;THREE.AddOperation=2;THREE.UVMapping=300;THREE.CubeReflectionMapping=301;THREE.CubeRefractionMapping=302;THREE.EquirectangularReflectionMapping=303;THREE.EquirectangularRefractionMapping=304;THREE.SphericalReflectionMapping=305;THREE.RepeatWrapping=1E3;THREE.ClampToEdgeWrapping=1001;THREE.MirroredRepeatWrapping=1002;
 THREE.NearestFilter=1003;THREE.NearestMipMapNearestFilter=1004;THREE.NearestMipMapLinearFilter=1005;THREE.LinearFilter=1006;THREE.LinearMipMapNearestFilter=1007;THREE.LinearMipMapLinearFilter=1008;THREE.UnsignedByteType=1009;THREE.ByteType=1010;THREE.ShortType=1011;THREE.UnsignedShortType=1012;THREE.IntType=1013;THREE.UnsignedIntType=1014;THREE.FloatType=1015;THREE.HalfFloatType=1025;THREE.UnsignedShort4444Type=1016;THREE.UnsignedShort5551Type=1017;THREE.UnsignedShort565Type=1018;
 THREE.AlphaFormat=1019;THREE.RGBFormat=1020;THREE.RGBAFormat=1021;THREE.LuminanceFormat=1022;THREE.LuminanceAlphaFormat=1023;THREE.RGBEFormat=THREE.RGBAFormat;THREE.RGB_S3TC_DXT1_Format=2001;THREE.RGBA_S3TC_DXT1_Format=2002;THREE.RGBA_S3TC_DXT3_Format=2003;THREE.RGBA_S3TC_DXT5_Format=2004;THREE.RGB_PVRTC_4BPPV1_Format=2100;THREE.RGB_PVRTC_2BPPV1_Format=2101;THREE.RGBA_PVRTC_4BPPV1_Format=2102;THREE.RGBA_PVRTC_2BPPV1_Format=2103;THREE.LoopOnce=2200;THREE.LoopRepeat=2201;THREE.LoopPingPong=2202;
-THREE.InterpolateDiscrete=2300;THREE.InterpolateLinear=2301;THREE.InterpolateSmooth=2302;THREE.ZeroCurvatureEnding=2400;THREE.ZeroSlopeEnding=2401;THREE.WrapAroundEnding=2402;
-THREE.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js.");this.projectVector=function(a,b){console.warn("THREE.Projector: .projectVector() is now vector.project().");a.project(b)};this.unprojectVector=function(a,b){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject().");a.unproject(b)};this.pickingRay=function(a,b){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}};
-THREE.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js");this.domElement=document.createElement("canvas");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};THREE.Color=function(a){return 3===arguments.length?this.fromArray(arguments):this.set(a)};
+THREE.InterpolateDiscrete=2300;THREE.InterpolateLinear=2301;THREE.InterpolateSmooth=2302;THREE.ZeroCurvatureEnding=2400;THREE.ZeroSlopeEnding=2401;THREE.WrapAroundEnding=2402;THREE.Color=function(a){return 3===arguments.length?this.fromArray(arguments):this.set(a)};
 THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(a){a instanceof THREE.Color?this.copy(a):"number"===typeof a?this.setHex(a):"string"===typeof a&&this.setStyle(a);return this},setHex:function(a){a=Math.floor(a);this.r=(a>>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(){function a(a,c,d){0>d&&(d+=1);1<d&&(d-=1);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=THREE.Math.euclideanModulo(b,1);c=THREE.Math.clamp(c,0,1);d=THREE.Math.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])/
@@ -346,10 +344,7 @@ THREE.OrthographicCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype
 THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype);THREE.PerspectiveCamera.prototype.constructor=THREE.PerspectiveCamera;THREE.PerspectiveCamera.prototype.setLens=function(a,b){void 0===b&&(b=24);this.fov=2*THREE.Math.radToDeg(Math.atan(b/(2*a)));this.updateProjectionMatrix()};THREE.PerspectiveCamera.prototype.setViewOffset=function(a,b,c,d,e,f){this.fullWidth=a;this.fullHeight=b;this.x=c;this.y=d;this.width=e;this.height=f;this.updateProjectionMatrix()};
 THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var a=THREE.Math.radToDeg(2*Math.atan(Math.tan(.5*THREE.Math.degToRad(this.fov))/this.zoom));if(this.fullWidth){var b=this.fullWidth/this.fullHeight,a=Math.tan(THREE.Math.degToRad(.5*a))*this.near,c=-a,d=b*c,b=Math.abs(b*a-d),c=Math.abs(a-c);this.projectionMatrix.makeFrustum(d+this.x*b/this.fullWidth,d+(this.x+this.width)*b/this.fullWidth,a-(this.y+this.height)*c/this.fullHeight,a-this.y*c/this.fullHeight,this.near,this.far)}else this.projectionMatrix.makePerspective(a,
 this.aspect,this.near,this.far)};THREE.PerspectiveCamera.prototype.copy=function(a){THREE.Camera.prototype.copy.call(this,a);this.fov=a.fov;this.aspect=a.aspect;this.near=a.near;this.far=a.far;this.zoom=a.zoom;return this};THREE.PerspectiveCamera.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.zoom=this.zoom;a.object.fov=this.fov;a.object.aspect=this.aspect;a.object.near=this.near;a.object.far=this.far;return a};
-THREE.Light=function(a){THREE.Object3D.call(this);this.type="Light";this.color=new THREE.Color(a);this.receiveShadow=void 0};THREE.Light.prototype=Object.create(THREE.Object3D.prototype);THREE.Light.prototype.constructor=THREE.Light;
-Object.defineProperties(THREE.Light.prototype,{onlyShadow:{set:function(a){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){this.shadow.camera.near=
-a}},shadowCameraFar:{set:function(a){this.shadow.camera.far=a}},shadowCameraVisible:{set:function(a){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.")}},shadowBias:{set:function(a){this.shadow.bias=a}},shadowDarkness:{set:function(a){this.shadow.darkness=a}},shadowMapWidth:{set:function(a){this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){this.shadow.mapSize.height=a}}});
-THREE.Light.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.color.copy(a.color);return this};
+THREE.Light=function(a){THREE.Object3D.call(this);this.type="Light";this.color=new THREE.Color(a);this.receiveShadow=void 0};THREE.Light.prototype=Object.create(THREE.Object3D.prototype);THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.color.copy(a.color);return this};
 THREE.Light.prototype.toJSON=function(a){a=THREE.Object3D.prototype.toJSON.call(this,a);a.object.color=this.color.getHex();void 0!==this.groundColor&&(a.object.groundColor=this.groundColor.getHex());void 0!==this.intensity&&(a.object.intensity=this.intensity);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.exponent&&(a.object.exponent=this.exponent);return a};
 THREE.LightShadow=function(a){this.camera=a;this.bias=0;this.darkness=1;this.mapSize=new THREE.Vector2(512,512);this.matrix=this.map=null};THREE.LightShadow.prototype={constructor:THREE.LightShadow,copy:function(a){this.camera=a.camera.clone();this.bias=a.bias;this.darkness=a.darkness;this.mapSize.copy(a.mapSize)},clone:function(){return(new this.constructor).copy(this)}};THREE.AmbientLight=function(a){THREE.Light.call(this,a);this.type="AmbientLight";this.castShadow=void 0};
 THREE.AmbientLight.prototype=Object.create(THREE.Light.prototype);THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;THREE.DirectionalLight=function(a,b){THREE.Light.call(this,a);this.type="DirectionalLight";this.position.set(0,1,0);this.updateMatrix();this.target=new THREE.Object3D;this.intensity=void 0!==b?b:1;this.shadow=new THREE.LightShadow(new THREE.OrthographicCamera(-500,500,500,-500,50,5E3))};THREE.DirectionalLight.prototype=Object.create(THREE.Light.prototype);
@@ -487,7 +482,7 @@ THREE.Mesh.prototype.raycast=function(){function a(a,b,c,d,e,f,g){THREE.Triangle
 object:a}}function c(c,d,e,f,k,n,p,u){g.fromArray(f,3*n);h.fromArray(f,3*p);l.fromArray(f,3*u);if(c=b(c,d,e,g,h,l,v))k&&(m.fromArray(k,2*n),q.fromArray(k,2*p),s.fromArray(k,2*u),c.uv=a(v,g,h,l,m,q,s)),c.face=new THREE.Face3(n,p,u,THREE.Triangle.normal(g,h,l)),c.faceIndex=n;return c}var d=new THREE.Matrix4,e=new THREE.Ray,f=new THREE.Sphere,g=new THREE.Vector3,h=new THREE.Vector3,l=new THREE.Vector3,k=new THREE.Vector3,n=new THREE.Vector3,p=new THREE.Vector3,m=new THREE.Vector2,q=new THREE.Vector2,
 s=new THREE.Vector2,t=new THREE.Vector3,v=new THREE.Vector3,u=new THREE.Vector3;return function(u,t){var x=this.geometry,B=this.material;if(void 0!==B){null===x.boundingSphere&&x.computeBoundingSphere();var z=this.matrixWorld;f.copy(x.boundingSphere);f.applyMatrix4(z);if(!1!==u.ray.intersectsSphere(f)&&(d.getInverse(z),e.copy(u.ray).applyMatrix4(d),null===x.boundingBox||!1!==e.intersectsBox(x.boundingBox))){var A,y;if(x instanceof THREE.BufferGeometry){var H,G,B=x.index,z=x.attributes,x=z.position.array;
 void 0!==z.uv&&(A=z.uv.array);if(null!==B)for(var z=B.array,E=0,N=z.length;E<N;E+=3){if(B=z[E],H=z[E+1],G=z[E+2],y=c(this,u,e,x,A,B,H,G))y.faceIndex=Math.floor(E/3),t.push(y)}else for(E=0,N=x.length;E<N;E+=9)if(B=E/3,H=B+1,G=B+2,y=c(this,u,e,x,A,B,H,G))y.index=B,t.push(y)}else if(x instanceof THREE.Geometry){var L,P,z=B instanceof THREE.MeshFaceMaterial,E=!0===z?B.materials:null,N=x.vertices;H=x.faces;G=x.faceVertexUvs[0];0<G.length&&(A=G);for(var I=0,K=H.length;I<K;I++){var F=H[I];y=!0===z?E[F.materialIndex]:
-B;if(void 0!==y){G=N[F.a];L=N[F.b];P=N[F.c];if(!0===y.morphTargets){y=x.morphTargets;var Q=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);l.set(0,0,0);for(var T=0,R=y.length;T<R;T++){var M=Q[T];if(0!==M){var C=y[T].vertices;g.addScaledVector(k.subVectors(C[F.a],G),M);h.addScaledVector(n.subVectors(C[F.b],L),M);l.addScaledVector(p.subVectors(C[F.c],P),M)}}g.add(G);h.add(L);l.add(P);G=g;L=h;P=l}if(y=b(this,u,e,G,L,P,v))A&&(Q=A[I],m.copy(Q[0]),q.copy(Q[1]),s.copy(Q[2]),y.uv=a(v,G,L,P,m,q,s)),y.face=
+B;if(void 0!==y){G=N[F.a];L=N[F.b];P=N[F.c];if(!0===y.morphTargets){y=x.morphTargets;var Q=this.morphTargetInfluences;g.set(0,0,0);h.set(0,0,0);l.set(0,0,0);for(var S=0,R=y.length;S<R;S++){var M=Q[S];if(0!==M){var C=y[S].vertices;g.addScaledVector(k.subVectors(C[F.a],G),M);h.addScaledVector(n.subVectors(C[F.b],L),M);l.addScaledVector(p.subVectors(C[F.c],P),M)}}g.add(G);h.add(L);l.add(P);G=g;L=h;P=l}if(y=b(this,u,e,G,L,P,v))A&&(Q=A[I],m.copy(Q[0]),q.copy(Q[1]),s.copy(Q[2]),y.uv=a(v,G,L,P,m,q,s)),y.face=
 F,y.faceIndex=I,t.push(y)}}}}}}}();THREE.Mesh.prototype.clone=function(){return(new this.constructor(this.geometry,this.material)).copy(this)};THREE.Bone=function(a){THREE.Object3D.call(this);this.type="Bone";this.skin=a};THREE.Bone.prototype=Object.create(THREE.Object3D.prototype);THREE.Bone.prototype.constructor=THREE.Bone;THREE.Bone.prototype.copy=function(a){THREE.Object3D.prototype.copy.call(this,a);this.skin=a.skin;return this};
 THREE.Skeleton=function(a,b,c){this.useVertexTexture=void 0!==c?c:!0;this.identityMatrix=new THREE.Matrix4;a=a||[];this.bones=a.slice(0);this.useVertexTexture?(a=Math.sqrt(4*this.bones.length),a=THREE.Math.nextPowerOfTwo(Math.ceil(a)),this.boneTextureHeight=this.boneTextureWidth=a=Math.max(a,4),this.boneMatrices=new Float32Array(this.boneTextureWidth*this.boneTextureHeight*4),this.boneTexture=new THREE.DataTexture(this.boneMatrices,this.boneTextureWidth,this.boneTextureHeight,THREE.RGBAFormat,THREE.FloatType)):
 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 for(console.warn("THREE.Skeleton bonInverses is the wrong length."),this.boneInverses=[],b=0,a=this.bones.length;b<a;b++)this.boneInverses.push(new THREE.Matrix4)};
@@ -587,30 +582,30 @@ THREE.ShaderChunk.logdepthbuf_vertex,"}"].join("\n"),fragmentShader:["uniform sa
 "vec4 pack_depth( const in float depth ) {\n\tconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = mod( depth * bit_shift * vec4( 255 ), vec4( 256 ) ) / vec4( 255 );\n\tres -= res.xxyz * bit_mask;\n\treturn res;\n}\nvoid main() {",THREE.ShaderChunk.logdepthbuf_fragment,"\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragDepthEXT );\n\t#else\n\t\tgl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n\t#endif\n}"].join("\n")},
 distanceRGBA:{uniforms:{lightPos:{type:"v3",value:new THREE.Vector3(0,0,0)}},vertexShader:["varying vec4 vWorldPosition;",THREE.ShaderChunk.common,THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.begin_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.project_vertex,THREE.ShaderChunk.worldpos_vertex,"vWorldPosition = worldPosition;\n}"].join("\n"),fragmentShader:["uniform vec3 lightPos;\nvarying vec4 vWorldPosition;",
 THREE.ShaderChunk.common,"vec4 pack1K ( float depth ) {\n   depth /= 1000.0;\n   const vec4 bitSh = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\n\tconst vec4 bitMsk = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\n\tvec4 res = fract( depth * bitSh );\n\tres -= res.xxyz * bitMsk;\n\treturn res; \n}\nfloat unpack1K ( vec4 color ) {\n\tconst vec4 bitSh = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\n\treturn dot( color, bitSh ) * 1000.0;\n}\nvoid main () {\n\tgl_FragColor = pack1K( length( vWorldPosition.xyz - lightPos.xyz ) );\n}"].join("\n")}};
-THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===C&&(a*=d,b*=d,c*=d);r.clearColor(a,b,c,d)}function c(){J.init();r.viewport(na,oa,pa,qa);b(U.r,U.g,U.b,X)}function d(){ra=Aa=null;sa="";ta=-1;wa=!0;J.reset()}function e(a){a.preventDefault();d();c();W.clear()}function f(a){a=a.target;a.removeEventListener("dispose",f);a:{var b=W.get(a);if(a.image&&b.__image__webglTextureCube)r.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;r.deleteTexture(b.__webglTexture)}W.delete(a)}la.textures--}
-function g(a){a=a.target;a.removeEventListener("dispose",g);var b=W.get(a),c=W.get(a.texture);if(a&&void 0!==c.__webglTexture){r.deleteTexture(c.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(c=0;6>c;c++)r.deleteFramebuffer(b.__webglFramebuffer[c]),r.deleteRenderbuffer(b.__webglRenderbuffer[c]);else r.deleteFramebuffer(b.__webglFramebuffer),r.deleteRenderbuffer(b.__webglRenderbuffer);W.delete(a.texture);W.delete(a)}la.textures--}function h(a){a=a.target;a.removeEventListener("dispose",
-h);l(a);W.delete(a)}function l(a){var b=W.get(a).program;a.program=void 0;void 0!==b&&ua.releaseProgram(b)}function k(a,b){return b[0]-a[0]}function n(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a,b,c,d,e){var f;c.transparent?
-(d=da,f=++Y):(d=ca,f=++fa);f=d[f];void 0!==f?(f.id=a.id,f.object=a,f.geometry=b,f.material=c,f.z=V.z,f.group=e):(f={id:a.id,object:a,geometry:b,material:c,z:V.z,group:e},d.push(f))}function q(a,b){if(!1!==a.visible){if(a.layers.test(b.layers))if(a instanceof THREE.Light)ea.push(a);else if(a instanceof THREE.Sprite)!1!==a.frustumCulled&&!0!==Ba.intersectsObject(a)||ha.push(a);else if(a instanceof THREE.LensFlare)ja.push(a);else if(a instanceof THREE.ImmediateRenderObject)!0===aa.sortObjects&&(V.setFromMatrixPosition(a.matrixWorld),
-V.applyProjection(xa)),m(a,null,a.material,V.z,null);else if(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.Points)if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),!1===a.frustumCulled||!0===Ba.intersectsObject(a)){var c=a.material;if(!0===c.visible){!0===aa.sortObjects&&(V.setFromMatrixPosition(a.matrixWorld),V.applyProjection(xa));var d=va.update(a);if(c instanceof THREE.MeshFaceMaterial)for(var e=d.groups,f=c.materials,c=0,g=e.length;c<g;c++){var h=e[c],l=f[h.materialIndex];
-!0===l.visible&&m(a,d,l,V.z,h)}else m(a,d,c,V.z,null)}}d=a.children;c=0;for(g=d.length;c<g;c++)q(d[c],b)}}function s(a,b,c,d,e){for(var f=0,g=a.length;f<g;f++){var h=a[f],l=h.object,k=h.geometry,m=void 0===e?h.material:e,h=h.group;l.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,l.matrixWorld);l.normalMatrix.getNormalMatrix(l.modelViewMatrix);if(l instanceof THREE.ImmediateRenderObject){t(m);var n=v(b,c,d,m,l);sa="";l.render(function(a){aa.renderBufferImmediate(a,n,m)})}else aa.renderBufferDirect(b,
+THREE.WebGLRenderer=function(a){function b(a,b,c,d){!0===C&&(a*=d,b*=d,c*=d);r.clearColor(a,b,c,d)}function c(){J.init();r.viewport(ma,na,oa,pa);b(U.r,U.g,U.b,X)}function d(){qa=za=null;ra="";sa=-1;va=!0;J.reset()}function e(a){a.preventDefault();d();c();W.clear()}function f(a){a=a.target;a.removeEventListener("dispose",f);a:{var b=W.get(a);if(a.image&&b.__image__webglTextureCube)r.deleteTexture(b.__image__webglTextureCube);else{if(void 0===b.__webglInit)break a;r.deleteTexture(b.__webglTexture)}W.delete(a)}ka.textures--}
+function g(a){a=a.target;a.removeEventListener("dispose",g);var b=W.get(a),c=W.get(a.texture);if(a&&void 0!==c.__webglTexture){r.deleteTexture(c.__webglTexture);if(a instanceof THREE.WebGLRenderTargetCube)for(c=0;6>c;c++)r.deleteFramebuffer(b.__webglFramebuffer[c]),r.deleteRenderbuffer(b.__webglRenderbuffer[c]);else r.deleteFramebuffer(b.__webglFramebuffer),r.deleteRenderbuffer(b.__webglRenderbuffer);W.delete(a.texture);W.delete(a)}ka.textures--}function h(a){a=a.target;a.removeEventListener("dispose",
+h);l(a);W.delete(a)}function l(a){var b=W.get(a).program;a.program=void 0;void 0!==b&&ta.releaseProgram(b)}function k(a,b){return b[0]-a[0]}function n(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.material.id!==b.material.id?a.material.id-b.material.id:a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return a.object.renderOrder!==b.object.renderOrder?a.object.renderOrder-b.object.renderOrder:a.z!==b.z?b.z-a.z:a.id-b.id}function m(a,b,c,d,e){var f;c.transparent?
+(d=da,f=++$):(d=ca,f=++ga);f=d[f];void 0!==f?(f.id=a.id,f.object=a,f.geometry=b,f.material=c,f.z=V.z,f.group=e):(f={id:a.id,object:a,geometry:b,material:c,z:V.z,group:e},d.push(f))}function q(a,b){if(!1!==a.visible){if(a.layers.test(b.layers))if(a instanceof THREE.Light)ea.push(a);else if(a instanceof THREE.Sprite)!1!==a.frustumCulled&&!0!==Aa.intersectsObject(a)||fa.push(a);else if(a instanceof THREE.LensFlare)ia.push(a);else if(a instanceof THREE.ImmediateRenderObject)!0===aa.sortObjects&&(V.setFromMatrixPosition(a.matrixWorld),
+V.applyProjection(wa)),m(a,null,a.material,V.z,null);else if(a instanceof THREE.Mesh||a instanceof THREE.Line||a instanceof THREE.Points)if(a instanceof THREE.SkinnedMesh&&a.skeleton.update(),!1===a.frustumCulled||!0===Aa.intersectsObject(a)){var c=a.material;if(!0===c.visible){!0===aa.sortObjects&&(V.setFromMatrixPosition(a.matrixWorld),V.applyProjection(wa));var d=ua.update(a);if(c instanceof THREE.MeshFaceMaterial)for(var e=d.groups,f=c.materials,c=0,g=e.length;c<g;c++){var h=e[c],l=f[h.materialIndex];
+!0===l.visible&&m(a,d,l,V.z,h)}else m(a,d,c,V.z,null)}}d=a.children;c=0;for(g=d.length;c<g;c++)q(d[c],b)}}function s(a,b,c,d,e){for(var f=0,g=a.length;f<g;f++){var h=a[f],l=h.object,k=h.geometry,m=void 0===e?h.material:e,h=h.group;l.modelViewMatrix.multiplyMatrices(b.matrixWorldInverse,l.matrixWorld);l.normalMatrix.getNormalMatrix(l.modelViewMatrix);if(l instanceof THREE.ImmediateRenderObject){t(m);var n=v(b,c,d,m,l);ra="";l.render(function(a){aa.renderBufferImmediate(a,n,m)})}else aa.renderBufferDirect(b,
 c,d,k,m,l,h)}}function t(a){a.side!==THREE.DoubleSide?J.enable(r.CULL_FACE):J.disable(r.CULL_FACE);J.setFlipSided(a.side===THREE.BackSide);!0===a.transparent?J.setBlending(a.blending,a.blendEquation,a.blendSrc,a.blendDst,a.blendEquationAlpha,a.blendSrcAlpha,a.blendDstAlpha):J.setBlending(THREE.NoBlending);J.setDepthFunc(a.depthFunc);J.setDepthTest(a.depthTest);J.setDepthWrite(a.depthWrite);J.setColorWrite(a.colorWrite);J.setPolygonOffset(a.polygonOffset,a.polygonOffsetFactor,a.polygonOffsetUnits)}
-function v(a,b,c,d,e){ya=0;var f=W.get(d);if(d.needsUpdate||!f.program){a:{var g=W.get(d),k=ua.getParameters(d,b,c,e),m=ua.getProgramCode(d,k),n=g.program,q=!0;if(void 0===n)d.addEventListener("dispose",h);else if(n.code!==m)l(d);else if(void 0!==k.shaderID)break a;else q=!1;q&&(k.shaderID?(n=THREE.ShaderLib[k.shaderID],g.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader}):g.__webglShader={name:d.type,uniforms:d.uniforms,
-vertexShader:d.vertexShader,fragmentShader:d.fragmentShader},d.__webglShader=g.__webglShader,n=ua.acquireProgram(d,k,m),g.program=n,d.program=n);k=n.getAttributes();if(d.morphTargets)for(m=d.numSupportedMorphTargets=0;m<aa.maxMorphTargets;m++)0<=k["morphTarget"+m]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(m=d.numSupportedMorphNormals=0;m<aa.maxMorphNormals;m++)0<=k["morphNormal"+m]&&d.numSupportedMorphNormals++;g.uniformsList=[];var k=g.program.getUniforms(),p;for(p in g.__webglShader.uniforms)(m=
-k[p])&&g.uniformsList.push([g.__webglShader.uniforms[p],m])}d.needsUpdate=!1}m=n=q=!1;g=f.program;p=g.getUniforms();k=f.__webglShader.uniforms;g.id!==Aa&&(r.useProgram(g.program),Aa=g.id,m=n=q=!0);d.id!==ta&&(-1===ta&&(m=!0),ta=d.id,n=!0);if(q||a!==ra)r.uniformMatrix4fv(p.projectionMatrix,!1,a.projectionMatrix.elements),ia.logarithmicDepthBuffer&&r.uniform1f(p.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==ra&&(ra=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d instanceof
+function v(a,b,c,d,e){xa=0;var f=W.get(d);if(d.needsUpdate||!f.program){a:{var g=W.get(d),k=ta.getParameters(d,b,c,e),m=ta.getProgramCode(d,k),n=g.program,q=!0;if(void 0===n)d.addEventListener("dispose",h);else if(n.code!==m)l(d);else if(void 0!==k.shaderID)break a;else q=!1;q&&(k.shaderID?(n=THREE.ShaderLib[k.shaderID],g.__webglShader={name:d.type,uniforms:THREE.UniformsUtils.clone(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader}):g.__webglShader={name:d.type,uniforms:d.uniforms,
+vertexShader:d.vertexShader,fragmentShader:d.fragmentShader},d.__webglShader=g.__webglShader,n=ta.acquireProgram(d,k,m),g.program=n,d.program=n);k=n.getAttributes();if(d.morphTargets)for(m=d.numSupportedMorphTargets=0;m<aa.maxMorphTargets;m++)0<=k["morphTarget"+m]&&d.numSupportedMorphTargets++;if(d.morphNormals)for(m=d.numSupportedMorphNormals=0;m<aa.maxMorphNormals;m++)0<=k["morphNormal"+m]&&d.numSupportedMorphNormals++;g.uniformsList=[];var k=g.program.getUniforms(),p;for(p in g.__webglShader.uniforms)(m=
+k[p])&&g.uniformsList.push([g.__webglShader.uniforms[p],m])}d.needsUpdate=!1}m=n=q=!1;g=f.program;p=g.getUniforms();k=f.__webglShader.uniforms;g.id!==za&&(r.useProgram(g.program),za=g.id,m=n=q=!0);d.id!==sa&&(-1===sa&&(m=!0),sa=d.id,n=!0);if(q||a!==qa)r.uniformMatrix4fv(p.projectionMatrix,!1,a.projectionMatrix.elements),ha.logarithmicDepthBuffer&&r.uniform1f(p.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==qa&&(qa=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d instanceof
 THREE.MeshPhysicalMaterial||d.envMap)&&void 0!==p.cameraPosition&&(V.setFromMatrixPosition(a.matrixWorld),r.uniform3f(p.cameraPosition,V.x,V.y,V.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshPhysicalMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==p.viewMatrix&&r.uniformMatrix4fv(p.viewMatrix,!1,a.matrixWorldInverse.elements);d.skinning&&(e.bindMatrix&&void 0!==p.bindMatrix&&r.uniformMatrix4fv(p.bindMatrix,
-!1,e.bindMatrix.elements),e.bindMatrixInverse&&void 0!==p.bindMatrixInverse&&r.uniformMatrix4fv(p.bindMatrixInverse,!1,e.bindMatrixInverse.elements),ia.floatVertexTextures&&e.skeleton&&e.skeleton.useVertexTexture?(void 0!==p.boneTexture&&(q=w(),r.uniform1i(p.boneTexture,q),aa.setTexture(e.skeleton.boneTexture,q)),void 0!==p.boneTextureWidth&&r.uniform1i(p.boneTextureWidth,e.skeleton.boneTextureWidth),void 0!==p.boneTextureHeight&&r.uniform1i(p.boneTextureHeight,e.skeleton.boneTextureHeight)):e.skeleton&&
-e.skeleton.boneMatrices&&void 0!==p.boneGlobalMatrices&&r.uniformMatrix4fv(p.boneGlobalMatrices,!1,e.skeleton.boneMatrices));if(n){c&&d.fog&&(k.fogColor.value=c.color,c instanceof THREE.Fog?(k.fogNear.value=c.near,k.fogFar.value=c.far):c instanceof THREE.FogExp2&&(k.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhysicalMaterial||d.lights){if(wa){var m=!0,s,t=q=0,x=0,v,G,E,z=Ca,B=a.matrixWorldInverse,F=z.directional.colors,
-K=z.directional.positions,I=z.point.colors,N=z.point.positions,Q=z.point.distances,C=z.point.decays,H=z.spot.colors,P=z.spot.positions,T=z.spot.distances,R=z.spot.directions,J=z.spot.anglesCos,ea=z.spot.exponents,M=z.spot.decays,da=z.hemi.skyColors,ca=z.hemi.groundColors,S=z.hemi.positions,fa=0,Y=0,U=0,ha=0,ja=0,X=0,ma=0,$=0,ba=s=0;c=E=ba=0;for(n=b.length;c<n;c++)s=b[c],v=s.color,G=s.intensity,E=s.distance,s instanceof THREE.AmbientLight?s.visible&&(q+=v.r,t+=v.g,x+=v.b):s instanceof THREE.DirectionalLight?
-(ja+=1,s.visible&&(Z.setFromMatrixPosition(s.matrixWorld),V.setFromMatrixPosition(s.target.matrixWorld),Z.sub(V),Z.transformDirection(B),s=3*fa,K[s+0]=Z.x,K[s+1]=Z.y,K[s+2]=Z.z,D(F,s,v,G),fa+=1)):s instanceof THREE.PointLight?(X+=1,s.visible&&(ba=3*Y,D(I,ba,v,G),V.setFromMatrixPosition(s.matrixWorld),V.applyMatrix4(B),N[ba+0]=V.x,N[ba+1]=V.y,N[ba+2]=V.z,Q[Y]=E,C[Y]=0===s.distance?0:s.decay,Y+=1)):s instanceof THREE.SpotLight?(ma+=1,s.visible&&(ba=3*U,D(H,ba,v,G),Z.setFromMatrixPosition(s.matrixWorld),
-V.copy(Z).applyMatrix4(B),P[ba+0]=V.x,P[ba+1]=V.y,P[ba+2]=V.z,T[U]=E,V.setFromMatrixPosition(s.target.matrixWorld),Z.sub(V),Z.transformDirection(B),R[ba+0]=Z.x,R[ba+1]=Z.y,R[ba+2]=Z.z,J[U]=Math.cos(s.angle),ea[U]=s.exponent,M[U]=0===s.distance?0:s.decay,U+=1)):s instanceof THREE.HemisphereLight&&($+=1,s.visible&&(Z.setFromMatrixPosition(s.matrixWorld),Z.transformDirection(B),E=3*ha,S[E+0]=Z.x,S[E+1]=Z.y,S[E+2]=Z.z,v=s.color,s=s.groundColor,D(da,E,v,G),D(ca,E,s,G),ha+=1));c=3*fa;for(n=Math.max(F.length,
-3*ja);c<n;c++)F[c]=0;c=3*Y;for(n=Math.max(I.length,3*X);c<n;c++)I[c]=0;c=3*U;for(n=Math.max(H.length,3*ma);c<n;c++)H[c]=0;c=3*ha;for(n=Math.max(da.length,3*$);c<n;c++)da[c]=0;c=3*ha;for(n=Math.max(ca.length,3*$);c<n;c++)ca[c]=0;z.directional.length=fa;z.point.length=Y;z.spot.length=U;z.hemi.length=ha;z.ambient[0]=q;z.ambient[1]=t;z.ambient[2]=x;wa=!1}m?(m=Ca,k.ambientLightColor.value=m.ambient,k.directionalLightColor.value=m.directional.colors,k.directionalLightDirection.value=m.directional.positions,
+!1,e.bindMatrix.elements),e.bindMatrixInverse&&void 0!==p.bindMatrixInverse&&r.uniformMatrix4fv(p.bindMatrixInverse,!1,e.bindMatrixInverse.elements),ha.floatVertexTextures&&e.skeleton&&e.skeleton.useVertexTexture?(void 0!==p.boneTexture&&(q=w(),r.uniform1i(p.boneTexture,q),aa.setTexture(e.skeleton.boneTexture,q)),void 0!==p.boneTextureWidth&&r.uniform1i(p.boneTextureWidth,e.skeleton.boneTextureWidth),void 0!==p.boneTextureHeight&&r.uniform1i(p.boneTextureHeight,e.skeleton.boneTextureHeight)):e.skeleton&&
+e.skeleton.boneMatrices&&void 0!==p.boneGlobalMatrices&&r.uniformMatrix4fv(p.boneGlobalMatrices,!1,e.skeleton.boneMatrices));if(n){c&&d.fog&&(k.fogColor.value=c.color,c instanceof THREE.Fog?(k.fogNear.value=c.near,k.fogFar.value=c.far):c instanceof THREE.FogExp2&&(k.fogDensity.value=c.density));if(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhysicalMaterial||d.lights){if(va){var m=!0,s,t=q=0,x=0,v,G,E,z=Ca,B=a.matrixWorldInverse,F=z.directional.colors,
+K=z.directional.positions,I=z.point.colors,N=z.point.positions,Q=z.point.distances,C=z.point.decays,H=z.spot.colors,P=z.spot.positions,S=z.spot.distances,R=z.spot.directions,J=z.spot.anglesCos,ea=z.spot.exponents,M=z.spot.decays,da=z.hemi.skyColors,ca=z.hemi.groundColors,ga=z.hemi.positions,$=0,U=0,T=0,fa=0,ia=0,X=0,la=0,Z=0,ba=s=0;c=E=ba=0;for(n=b.length;c<n;c++)s=b[c],v=s.color,G=s.intensity,E=s.distance,s instanceof THREE.AmbientLight?s.visible&&(q+=v.r,t+=v.g,x+=v.b):s instanceof THREE.DirectionalLight?
+(ia+=1,s.visible&&(Y.setFromMatrixPosition(s.matrixWorld),V.setFromMatrixPosition(s.target.matrixWorld),Y.sub(V),Y.transformDirection(B),s=3*$,K[s+0]=Y.x,K[s+1]=Y.y,K[s+2]=Y.z,D(F,s,v,G),$+=1)):s instanceof THREE.PointLight?(X+=1,s.visible&&(ba=3*U,D(I,ba,v,G),V.setFromMatrixPosition(s.matrixWorld),V.applyMatrix4(B),N[ba+0]=V.x,N[ba+1]=V.y,N[ba+2]=V.z,Q[U]=E,C[U]=0===s.distance?0:s.decay,U+=1)):s instanceof THREE.SpotLight?(la+=1,s.visible&&(ba=3*T,D(H,ba,v,G),Y.setFromMatrixPosition(s.matrixWorld),
+V.copy(Y).applyMatrix4(B),P[ba+0]=V.x,P[ba+1]=V.y,P[ba+2]=V.z,S[T]=E,V.setFromMatrixPosition(s.target.matrixWorld),Y.sub(V),Y.transformDirection(B),R[ba+0]=Y.x,R[ba+1]=Y.y,R[ba+2]=Y.z,J[T]=Math.cos(s.angle),ea[T]=s.exponent,M[T]=0===s.distance?0:s.decay,T+=1)):s instanceof THREE.HemisphereLight&&(Z+=1,s.visible&&(Y.setFromMatrixPosition(s.matrixWorld),Y.transformDirection(B),E=3*fa,ga[E+0]=Y.x,ga[E+1]=Y.y,ga[E+2]=Y.z,v=s.color,s=s.groundColor,D(da,E,v,G),D(ca,E,s,G),fa+=1));c=3*$;for(n=Math.max(F.length,
+3*ia);c<n;c++)F[c]=0;c=3*U;for(n=Math.max(I.length,3*X);c<n;c++)I[c]=0;c=3*T;for(n=Math.max(H.length,3*la);c<n;c++)H[c]=0;c=3*fa;for(n=Math.max(da.length,3*Z);c<n;c++)da[c]=0;c=3*fa;for(n=Math.max(ca.length,3*Z);c<n;c++)ca[c]=0;z.directional.length=$;z.point.length=U;z.spot.length=T;z.hemi.length=fa;z.ambient[0]=q;z.ambient[1]=t;z.ambient[2]=x;va=!1}m?(m=Ca,k.ambientLightColor.value=m.ambient,k.directionalLightColor.value=m.directional.colors,k.directionalLightDirection.value=m.directional.positions,
 k.pointLightColor.value=m.point.colors,k.pointLightPosition.value=m.point.positions,k.pointLightDistance.value=m.point.distances,k.pointLightDecay.value=m.point.decays,k.spotLightColor.value=m.spot.colors,k.spotLightPosition.value=m.spot.positions,k.spotLightDistance.value=m.spot.distances,k.spotLightDirection.value=m.spot.directions,k.spotLightAngleCos.value=m.spot.anglesCos,k.spotLightExponent.value=m.spot.exponents,k.spotLightDecay.value=m.spot.decays,k.hemisphereLightSkyColor.value=m.hemi.skyColors,
 k.hemisphereLightGroundColor.value=m.hemi.groundColors,k.hemisphereLightDirection.value=m.hemi.positions,u(k,!0)):u(k,!1)}if(d instanceof THREE.MeshBasicMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshPhysicalMaterial){k.opacity.value=d.opacity;k.diffuse.value=d.color;d.emissive&&(k.emissive.value=d.emissive);k.map.value=d.map;k.specularMap.value=d.specularMap;k.alphaMap.value=d.alphaMap;d.aoMap&&(k.aoMap.value=d.aoMap,k.aoMapIntensity.value=
 d.aoMapIntensity);var O;d.map?O=d.map:d.specularMap?O=d.specularMap:d.displacementMap?O=d.displacementMap:d.normalMap?O=d.normalMap:d.bumpMap?O=d.bumpMap:d.alphaMap?O=d.alphaMap:d.emissiveMap&&(O=d.emissiveMap);void 0!==O&&(O instanceof THREE.WebGLRenderTarget&&(O=O.texture),m=O.offset,O=O.repeat,k.offsetRepeat.value.set(m.x,m.y,O.x,O.y));k.envMap.value=d.envMap;k.flipEnvMap.value=d.envMap instanceof THREE.WebGLRenderTargetCube?1:-1;k.reflectivity.value=d.reflectivity;k.refractionRatio.value=d.refractionRatio}d instanceof
 THREE.LineBasicMaterial?(k.diffuse.value=d.color,k.opacity.value=d.opacity):d instanceof THREE.LineDashedMaterial?(k.diffuse.value=d.color,k.opacity.value=d.opacity,k.dashSize.value=d.dashSize,k.totalSize.value=d.dashSize+d.gapSize,k.scale.value=d.scale):d instanceof THREE.PointsMaterial?(k.psColor.value=d.color,k.opacity.value=d.opacity,k.size.value=d.size,k.scale.value=L.height/2,k.map.value=d.map,null!==d.map&&(a=d.map.offset,O=d.map.repeat,k.offsetRepeat.value.set(a.x,a.y,O.x,O.y))):d instanceof
 THREE.MeshPhongMaterial?(k.specular.value=d.specular,k.shininess.value=Math.max(d.shininess,1E-4),d.lightMap&&(k.lightMap.value=d.lightMap,k.lightMapIntensity.value=d.lightMapIntensity),d.emissiveMap&&(k.emissiveMap.value=d.emissiveMap),d.bumpMap&&(k.bumpMap.value=d.bumpMap,k.bumpScale.value=d.bumpScale),d.normalMap&&(k.normalMap.value=d.normalMap,k.normalScale.value.copy(d.normalScale)),d.displacementMap&&(k.displacementMap.value=d.displacementMap,k.displacementScale.value=d.displacementScale,k.displacementBias.value=
 d.displacementBias)):d instanceof THREE.MeshPhysicalMaterial?(k.roughness.value=d.roughness,k.metalness.value=d.metalness,d.roughnessMap&&(k.roughnessMap.value=d.roughnessMap),d.reflectivityMap&&(k.reflectivityMap.value=d.reflectivityMap),d.metalnessMap&&(k.metalnessMap.value=d.metalnessMap),d.lightMap&&(k.lightMap.value=d.lightMap,k.lightMapIntensity.value=d.lightMapIntensity),d.emissiveMap&&(k.emissiveMap.value=d.emissiveMap),d.bumpMap&&(k.bumpMap.value=d.bumpMap,k.bumpScale.value=d.bumpScale),
-d.normalMap&&(k.normalMap.value=d.normalMap,k.normalScale.value.copy(d.normalScale)),d.displacementMap&&(k.displacementMap.value=d.displacementMap,k.displacementScale.value=d.displacementScale,k.displacementBias.value=d.displacementBias),d.envMap&&(k.envMapIntensity.value=d.envMapIntensity)):d instanceof THREE.MeshDepthMaterial?(k.mNear.value=a.near,k.mFar.value=a.far,k.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(k.opacity.value=d.opacity);if(ga.enabled&&e.receiveShadow&&!d._shadowPass&&
+d.normalMap&&(k.normalMap.value=d.normalMap,k.normalScale.value.copy(d.normalScale)),d.displacementMap&&(k.displacementMap.value=d.displacementMap,k.displacementScale.value=d.displacementScale,k.displacementBias.value=d.displacementBias),d.envMap&&(k.envMapIntensity.value=d.envMapIntensity)):d instanceof THREE.MeshDepthMaterial?(k.mNear.value=a.near,k.mFar.value=a.far,k.opacity.value=d.opacity):d instanceof THREE.MeshNormalMaterial&&(k.opacity.value=d.opacity);if(Ba.enabled&&e.receiveShadow&&!d._shadowPass&&
 k.shadowMatrix)for(a=d=0,O=b.length;a<O;a++)m=b[a],!0===m.castShadow&&(m instanceof THREE.PointLight||m instanceof THREE.SpotLight||m instanceof THREE.DirectionalLight)&&(c=m.shadow,m instanceof THREE.PointLight?(V.setFromMatrixPosition(m.matrixWorld).negate(),c.matrix.identity().setPosition(V),k.shadowDarkness.value[d]=-c.darkness):k.shadowDarkness.value[d]=c.darkness,k.shadowMatrix.value[d]=c.matrix,k.shadowMap.value[d]=c.map,k.shadowMapSize.value[d]=c.mapSize,k.shadowBias.value[d]=c.bias,d++);
 b=f.uniformsList;f=0;for(d=b.length;f<d;f++)if(a=b[f][0],!1!==a.needsUpdate)switch(k=a.type,c=a.value,O=b[f][1],k){case "1i":r.uniform1i(O,c);break;case "1f":r.uniform1f(O,c);break;case "2f":r.uniform2f(O,c[0],c[1]);break;case "3f":r.uniform3f(O,c[0],c[1],c[2]);break;case "4f":r.uniform4f(O,c[0],c[1],c[2],c[3]);break;case "1iv":r.uniform1iv(O,c);break;case "3iv":r.uniform3iv(O,c);break;case "1fv":r.uniform1fv(O,c);break;case "2fv":r.uniform2fv(O,c);break;case "3fv":r.uniform3fv(O,c);break;case "4fv":r.uniform4fv(O,
 c);break;case "Matrix3fv":r.uniformMatrix3fv(O,!1,c);break;case "Matrix4fv":r.uniformMatrix4fv(O,!1,c);break;case "i":r.uniform1i(O,c);break;case "f":r.uniform1f(O,c);break;case "v2":r.uniform2f(O,c.x,c.y);break;case "v3":r.uniform3f(O,c.x,c.y,c.z);break;case "v4":r.uniform4f(O,c.x,c.y,c.z,c.w);break;case "c":r.uniform3f(O,c.r,c.g,c.b);break;case "iv1":r.uniform1iv(O,c);break;case "iv":r.uniform3iv(O,c);break;case "fv1":r.uniform1fv(O,c);break;case "fv":r.uniform3fv(O,c);break;case "v2v":void 0===
@@ -619,56 +614,52 @@ a._array[n+2]=c[k].z,a._array[n+3]=c[k].w;r.uniform4fv(O,a._array);break;case "m
 !1,a._array);break;case "t":n=w();r.uniform1i(O,n);if(!c)continue;c instanceof THREE.CubeTexture||Array.isArray(c.image)&&6===c.image.length?A(c,n):c instanceof THREE.WebGLRenderTargetCube?y(c.texture,n):c instanceof THREE.WebGLRenderTarget?aa.setTexture(c.texture,n):aa.setTexture(c,n);break;case "tv":void 0===a._array&&(a._array=[]);k=0;for(m=a.value.length;k<m;k++)a._array[k]=w();r.uniform1iv(O,a._array);k=0;for(m=a.value.length;k<m;k++)c=a.value[k],n=a._array[k],c&&(c instanceof THREE.CubeTexture||
 c.image instanceof Array&&6===c.image.length?A(c,n):c instanceof THREE.WebGLRenderTarget?aa.setTexture(c.texture,n):c instanceof THREE.WebGLRenderTargetCube?y(c.texture,n):aa.setTexture(c,n));break;default:console.warn("THREE.WebGLRenderer: Unknown uniform type: "+k)}}r.uniformMatrix4fv(p.modelViewMatrix,!1,e.modelViewMatrix.elements);p.normalMatrix&&r.uniformMatrix3fv(p.normalMatrix,!1,e.normalMatrix.elements);void 0!==p.modelMatrix&&r.uniformMatrix4fv(p.modelMatrix,!1,e.matrixWorld.elements);return g}
 function u(a,b){a.ambientLightColor.needsUpdate=b;a.directionalLightColor.needsUpdate=b;a.directionalLightDirection.needsUpdate=b;a.pointLightColor.needsUpdate=b;a.pointLightPosition.needsUpdate=b;a.pointLightDistance.needsUpdate=b;a.pointLightDecay.needsUpdate=b;a.spotLightColor.needsUpdate=b;a.spotLightPosition.needsUpdate=b;a.spotLightDistance.needsUpdate=b;a.spotLightDirection.needsUpdate=b;a.spotLightAngleCos.needsUpdate=b;a.spotLightExponent.needsUpdate=b;a.spotLightDecay.needsUpdate=b;a.hemisphereLightSkyColor.needsUpdate=
-b;a.hemisphereLightGroundColor.needsUpdate=b;a.hemisphereLightDirection.needsUpdate=b}function w(){var a=ya;a>=ia.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ia.maxTextures);ya+=1;return a}function D(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function x(a,b,c){c?(r.texParameteri(a,r.TEXTURE_WRAP_S,N(b.wrapS)),r.texParameteri(a,r.TEXTURE_WRAP_T,N(b.wrapT)),r.texParameteri(a,r.TEXTURE_MAG_FILTER,N(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,
+b;a.hemisphereLightGroundColor.needsUpdate=b;a.hemisphereLightDirection.needsUpdate=b}function w(){var a=xa;a>=ha.maxTextures&&console.warn("WebGLRenderer: trying to use "+a+" texture units while this GPU supports only "+ha.maxTextures);xa+=1;return a}function D(a,b,c,d){a[b+0]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function x(a,b,c){c?(r.texParameteri(a,r.TEXTURE_WRAP_S,N(b.wrapS)),r.texParameteri(a,r.TEXTURE_WRAP_T,N(b.wrapT)),r.texParameteri(a,r.TEXTURE_MAG_FILTER,N(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,
 N(b.minFilter))):(r.texParameteri(a,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(a,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),b.wrapS===THREE.ClampToEdgeWrapping&&b.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",b),r.texParameteri(a,r.TEXTURE_MAG_FILTER,E(b.magFilter)),r.texParameteri(a,r.TEXTURE_MIN_FILTER,E(b.minFilter)),b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter&&
-console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",b));!(c=S.get("EXT_texture_filter_anisotropic"))||b.type===THREE.FloatType&&null===S.get("OES_texture_float_linear")||b.type===THREE.HalfFloatType&&null===S.get("OES_texture_half_float_linear")||!(1<b.anisotropy||W.get(b).__currentAnisotropy)||(r.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,aa.getMaxAnisotropy())),W.get(b).__currentAnisotropy=
+console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",b));!(c=T.get("EXT_texture_filter_anisotropic"))||b.type===THREE.FloatType&&null===T.get("OES_texture_float_linear")||b.type===THREE.HalfFloatType&&null===T.get("OES_texture_half_float_linear")||!(1<b.anisotropy||W.get(b).__currentAnisotropy)||(r.texParameterf(a,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(b.anisotropy,aa.getMaxAnisotropy())),W.get(b).__currentAnisotropy=
 b.anisotropy)}function B(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElement("canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function z(a){return THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height)}function A(a,b){var c=
-W.get(a);if(6===a.image.length)if(0<a.version&&c.__version!==a.version){c.__image__webglTextureCube||(a.addEventListener("dispose",f),c.__image__webglTextureCube=r.createTexture(),la.textures++);J.activeTexture(r.TEXTURE0+b);J.bindTexture(r.TEXTURE_CUBE_MAP,c.__image__webglTextureCube);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);for(var d=a instanceof THREE.CompressedTexture,e=a.image[0]instanceof THREE.DataTexture,g=[],h=0;6>h;h++)g[h]=!aa.autoScaleCubemaps||d||e?e?a.image[h].image:a.image[h]:B(a.image[h],
-ia.maxCubemapSize);var k=z(g[0]),l=N(a.format),m=N(a.type);x(r.TEXTURE_CUBE_MAP,a,k);for(h=0;6>h;h++)if(d)for(var n,q=g[h].mipmaps,p=0,s=q.length;p<s;p++)n=q[p],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<J.getCompressedTextureFormats().indexOf(l)?J.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,p,l,n.width,n.height,0,n.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):J.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+
+W.get(a);if(6===a.image.length)if(0<a.version&&c.__version!==a.version){c.__image__webglTextureCube||(a.addEventListener("dispose",f),c.__image__webglTextureCube=r.createTexture(),ka.textures++);J.activeTexture(r.TEXTURE0+b);J.bindTexture(r.TEXTURE_CUBE_MAP,c.__image__webglTextureCube);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);for(var d=a instanceof THREE.CompressedTexture,e=a.image[0]instanceof THREE.DataTexture,g=[],h=0;6>h;h++)g[h]=!aa.autoScaleCubemaps||d||e?e?a.image[h].image:a.image[h]:B(a.image[h],
+ha.maxCubemapSize);var k=z(g[0]),l=N(a.format),m=N(a.type);x(r.TEXTURE_CUBE_MAP,a,k);for(h=0;6>h;h++)if(d)for(var n,q=g[h].mipmaps,p=0,s=q.length;p<s;p++)n=q[p],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<J.getCompressedTextureFormats().indexOf(l)?J.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,p,l,n.width,n.height,0,n.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):J.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+
 h,p,l,n.width,n.height,0,l,m,n.data);else e?J.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,l,g[h].width,g[h].height,0,l,m,g[h].data):J.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+h,0,l,l,m,g[h]);a.generateMipmaps&&k&&r.generateMipmap(r.TEXTURE_CUBE_MAP);c.__version=a.version;if(a.onUpdate)a.onUpdate(a)}else J.activeTexture(r.TEXTURE0+b),J.bindTexture(r.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)}function y(a,b){J.activeTexture(r.TEXTURE0+b);J.bindTexture(r.TEXTURE_CUBE_MAP,W.get(a).__webglTexture)}
 function H(a,b,c){r.bindFramebuffer(r.FRAMEBUFFER,a);r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,c,W.get(b.texture).__webglTexture,0)}function G(a,b){r.bindRenderbuffer(r.RENDERBUFFER,a);b.depthBuffer&&!b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT16,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,a)):b.depthBuffer&&b.stencilBuffer?(r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,b.width,b.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,
 r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)):r.renderbufferStorage(r.RENDERBUFFER,r.RGBA4,b.width,b.height)}function E(a){return a===THREE.NearestFilter||a===THREE.NearestMipMapNearestFilter||a===THREE.NearestMipMapLinearFilter?r.NEAREST:r.LINEAR}function N(a){var b;if(a===THREE.RepeatWrapping)return r.REPEAT;if(a===THREE.ClampToEdgeWrapping)return r.CLAMP_TO_EDGE;if(a===THREE.MirroredRepeatWrapping)return r.MIRRORED_REPEAT;if(a===THREE.NearestFilter)return r.NEAREST;if(a===THREE.NearestMipMapNearestFilter)return r.NEAREST_MIPMAP_NEAREST;
 if(a===THREE.NearestMipMapLinearFilter)return r.NEAREST_MIPMAP_LINEAR;if(a===THREE.LinearFilter)return r.LINEAR;if(a===THREE.LinearMipMapNearestFilter)return r.LINEAR_MIPMAP_NEAREST;if(a===THREE.LinearMipMapLinearFilter)return r.LINEAR_MIPMAP_LINEAR;if(a===THREE.UnsignedByteType)return r.UNSIGNED_BYTE;if(a===THREE.UnsignedShort4444Type)return r.UNSIGNED_SHORT_4_4_4_4;if(a===THREE.UnsignedShort5551Type)return r.UNSIGNED_SHORT_5_5_5_1;if(a===THREE.UnsignedShort565Type)return r.UNSIGNED_SHORT_5_6_5;
-if(a===THREE.ByteType)return r.BYTE;if(a===THREE.ShortType)return r.SHORT;if(a===THREE.UnsignedShortType)return r.UNSIGNED_SHORT;if(a===THREE.IntType)return r.INT;if(a===THREE.UnsignedIntType)return r.UNSIGNED_INT;if(a===THREE.FloatType)return r.FLOAT;b=S.get("OES_texture_half_float");if(null!==b&&a===THREE.HalfFloatType)return b.HALF_FLOAT_OES;if(a===THREE.AlphaFormat)return r.ALPHA;if(a===THREE.RGBFormat)return r.RGB;if(a===THREE.RGBAFormat)return r.RGBA;if(a===THREE.LuminanceFormat)return r.LUMINANCE;
+if(a===THREE.ByteType)return r.BYTE;if(a===THREE.ShortType)return r.SHORT;if(a===THREE.UnsignedShortType)return r.UNSIGNED_SHORT;if(a===THREE.IntType)return r.INT;if(a===THREE.UnsignedIntType)return r.UNSIGNED_INT;if(a===THREE.FloatType)return r.FLOAT;b=T.get("OES_texture_half_float");if(null!==b&&a===THREE.HalfFloatType)return b.HALF_FLOAT_OES;if(a===THREE.AlphaFormat)return r.ALPHA;if(a===THREE.RGBFormat)return r.RGB;if(a===THREE.RGBAFormat)return r.RGBA;if(a===THREE.LuminanceFormat)return r.LUMINANCE;
 if(a===THREE.LuminanceAlphaFormat)return r.LUMINANCE_ALPHA;if(a===THREE.AddEquation)return r.FUNC_ADD;if(a===THREE.SubtractEquation)return r.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return r.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return r.ZERO;if(a===THREE.OneFactor)return r.ONE;if(a===THREE.SrcColorFactor)return r.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return r.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return r.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return r.ONE_MINUS_SRC_ALPHA;
-if(a===THREE.DstAlphaFactor)return r.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return r.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return r.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return r.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return r.SRC_ALPHA_SATURATE;b=S.get("WEBGL_compressed_texture_s3tc");if(null!==b){if(a===THREE.RGB_S3TC_DXT1_Format)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;
-if(a===THREE.RGBA_S3TC_DXT5_Format)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}b=S.get("WEBGL_compressed_texture_pvrtc");if(null!==b){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}b=S.get("EXT_blend_minmax");if(null!==b){if(a===THREE.MinEquation)return b.MIN_EXT;
-if(a===THREE.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var L=void 0!==a.canvas?a.canvas:document.createElement("canvas"),P=void 0!==a.context?a.context:null,I=L.width,K=L.height,F=1,Q=void 0!==a.alpha?a.alpha:!1,T=void 0!==a.depth?a.depth:!0,R=void 0!==a.stencil?a.stencil:!0,M=void 0!==a.antialias?a.antialias:!1,C=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,$=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,U=new THREE.Color(0),
-X=0,ea=[],ca=[],fa=-1,da=[],Y=-1,ma=new Float32Array(8),ha=[],ja=[];this.domElement=L;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.gammaFactor=2;this.gammaOutput=this.gammaInput=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var aa=this,Aa=null,za=null,ta=-1,sa="",ra=null,ya=0,na=0,oa=0,pa=L.width,qa=L.height,Da=0,Ea=0,Ba=new THREE.Frustum,xa=new THREE.Matrix4,V=new THREE.Vector3,Z=new THREE.Vector3,
-wa=!0,Ca={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[],decays:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[],decays:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},la={geometries:0,textures:0},ka={calls:0,vertices:0,faces:0,points:0};this.info={render:ka,memory:la,programs:null};var r;try{Q={alpha:Q,depth:T,stencil:R,antialias:M,premultipliedAlpha:C,preserveDrawingBuffer:$};
-r=P||L.getContext("webgl",Q)||L.getContext("experimental-webgl",Q);if(null===r){if(null!==L.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}L.addEventListener("webglcontextlost",e,!1)}catch(Fa){console.error("THREE.WebGLRenderer: "+Fa)}var S=new THREE.WebGLExtensions(r);S.get("OES_texture_float");S.get("OES_texture_float_linear");S.get("OES_texture_half_float");S.get("OES_texture_half_float_linear");S.get("OES_standard_derivatives");
-S.get("ANGLE_instanced_arrays");S.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=4294967296);var ia=new THREE.WebGLCapabilities(r,S,a),J=new THREE.WebGLState(r,S,N),W=new THREE.WebGLProperties,va=new THREE.WebGLObjects(r,W,this.info),ua=new THREE.WebGLPrograms(this,ia);this.info.programs=ua.programs;var Ga=new THREE.WebGLBufferRenderer(r,S,ka),Ha=new THREE.WebGLIndexedBufferRenderer(r,S,ka);c();this.context=r;this.capabilities=ia;this.extensions=S;this.state=J;var ga=new THREE.WebGLShadowMap(this,
-ea,va);this.shadowMap=ga;var Ia=new THREE.SpritePlugin(this,ha),Ja=new THREE.LensFlarePlugin(this,ja);this.getContext=function(){return r};this.getContextAttributes=function(){return r.getContextAttributes()};this.forceContextLoss=function(){S.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){var a;return function(){if(void 0!==a)return a;var b=S.get("EXT_texture_filter_anisotropic");return a=null!==b?r.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}();this.getPrecision=
-function(){return ia.precision};this.getPixelRatio=function(){return F};this.setPixelRatio=function(a){void 0!==a&&(F=a)};this.getSize=function(){return{width:I,height:K}};this.setSize=function(a,b,c){I=a;K=b;L.width=a*F;L.height=b*F;!1!==c&&(L.style.width=a+"px",L.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){na=a*F;oa=b*F;pa=c*F;qa=d*F;r.viewport(na,oa,pa,qa)};this.getViewport=function(a){a.x=na/F;a.y=oa/F;a.z=pa/F;a.w=qa/F};this.setScissor=function(a,b,c,d){r.scissor(a*
+if(a===THREE.DstAlphaFactor)return r.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return r.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return r.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return r.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return r.SRC_ALPHA_SATURATE;b=T.get("WEBGL_compressed_texture_s3tc");if(null!==b){if(a===THREE.RGB_S3TC_DXT1_Format)return b.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT1_Format)return b.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===THREE.RGBA_S3TC_DXT3_Format)return b.COMPRESSED_RGBA_S3TC_DXT3_EXT;
+if(a===THREE.RGBA_S3TC_DXT5_Format)return b.COMPRESSED_RGBA_S3TC_DXT5_EXT}b=T.get("WEBGL_compressed_texture_pvrtc");if(null!==b){if(a===THREE.RGB_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===THREE.RGB_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===THREE.RGBA_PVRTC_4BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===THREE.RGBA_PVRTC_2BPPV1_Format)return b.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}b=T.get("EXT_blend_minmax");if(null!==b){if(a===THREE.MinEquation)return b.MIN_EXT;
+if(a===THREE.MaxEquation)return b.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION);a=a||{};var L=void 0!==a.canvas?a.canvas:document.createElement("canvas"),P=void 0!==a.context?a.context:null,I=L.width,K=L.height,F=1,Q=void 0!==a.alpha?a.alpha:!1,S=void 0!==a.depth?a.depth:!0,R=void 0!==a.stencil?a.stencil:!0,M=void 0!==a.antialias?a.antialias:!1,C=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,Z=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,U=new THREE.Color(0),
+X=0,ea=[],ca=[],ga=-1,da=[],$=-1,la=new Float32Array(8),fa=[],ia=[];this.domElement=L;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.gammaFactor=2;this.gammaOutput=this.gammaInput=!1;this.maxMorphTargets=8;this.maxMorphNormals=4;this.autoScaleCubemaps=!0;var aa=this,za=null,ya=null,sa=-1,ra="",qa=null,xa=0,ma=0,na=0,oa=L.width,pa=L.height,Da=0,Ea=0,Aa=new THREE.Frustum,wa=new THREE.Matrix4,V=new THREE.Vector3,Y=new THREE.Vector3,
+va=!0,Ca={ambient:[0,0,0],directional:{length:0,colors:[],positions:[]},point:{length:0,colors:[],positions:[],distances:[],decays:[]},spot:{length:0,colors:[],positions:[],distances:[],directions:[],anglesCos:[],exponents:[],decays:[]},hemi:{length:0,skyColors:[],groundColors:[],positions:[]}},ka={geometries:0,textures:0},ja={calls:0,vertices:0,faces:0,points:0};this.info={render:ja,memory:ka,programs:null};var r;try{Q={alpha:Q,depth:S,stencil:R,antialias:M,premultipliedAlpha:C,preserveDrawingBuffer:Z};
+r=P||L.getContext("webgl",Q)||L.getContext("experimental-webgl",Q);if(null===r){if(null!==L.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";}L.addEventListener("webglcontextlost",e,!1)}catch(Fa){console.error("THREE.WebGLRenderer: "+Fa)}var T=new THREE.WebGLExtensions(r);T.get("OES_texture_float");T.get("OES_texture_float_linear");T.get("OES_texture_half_float");T.get("OES_texture_half_float_linear");T.get("OES_standard_derivatives");
+T.get("ANGLE_instanced_arrays");T.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=4294967296);var ha=new THREE.WebGLCapabilities(r,T,a),J=new THREE.WebGLState(r,T,N),W=new THREE.WebGLProperties,ua=new THREE.WebGLObjects(r,W,this.info),ta=new THREE.WebGLPrograms(this,ha);this.info.programs=ta.programs;var Ga=new THREE.WebGLBufferRenderer(r,T,ja),Ha=new THREE.WebGLIndexedBufferRenderer(r,T,ja);c();this.context=r;this.capabilities=ha;this.extensions=T;this.state=J;var Ba=new THREE.WebGLShadowMap(this,
+ea,ua);this.shadowMap=Ba;var Ia=new THREE.SpritePlugin(this,fa),Ja=new THREE.LensFlarePlugin(this,ia);this.getContext=function(){return r};this.getContextAttributes=function(){return r.getContextAttributes()};this.forceContextLoss=function(){T.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){var a;return function(){if(void 0!==a)return a;var b=T.get("EXT_texture_filter_anisotropic");return a=null!==b?r.getParameter(b.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}();this.getPrecision=
+function(){return ha.precision};this.getPixelRatio=function(){return F};this.setPixelRatio=function(a){void 0!==a&&(F=a)};this.getSize=function(){return{width:I,height:K}};this.setSize=function(a,b,c){I=a;K=b;L.width=a*F;L.height=b*F;!1!==c&&(L.style.width=a+"px",L.style.height=b+"px");this.setViewport(0,0,a,b)};this.setViewport=function(a,b,c,d){ma=a*F;na=b*F;oa=c*F;pa=d*F;r.viewport(ma,na,oa,pa)};this.getViewport=function(a){a.x=ma/F;a.y=na/F;a.z=oa/F;a.w=pa/F};this.setScissor=function(a,b,c,d){r.scissor(a*
 F,b*F,c*F,d*F)};this.enableScissorTest=function(a){J.setScissorTest(a)};this.getClearColor=function(){return U};this.setClearColor=function(a,c){U.set(a);X=void 0!==c?c:1;b(U.r,U.g,U.b,X)};this.getClearAlpha=function(){return X};this.setClearAlpha=function(a){X=a;b(U.r,U.g,U.b,X)};this.clear=function(a,b,c){var d=0;if(void 0===a||a)d|=r.COLOR_BUFFER_BIT;if(void 0===b||b)d|=r.DEPTH_BUFFER_BIT;if(void 0===c||c)d|=r.STENCIL_BUFFER_BIT;r.clear(d)};this.clearColor=function(){r.clear(r.COLOR_BUFFER_BIT)};
 this.clearDepth=function(){r.clear(r.DEPTH_BUFFER_BIT)};this.clearStencil=function(){r.clear(r.STENCIL_BUFFER_BIT)};this.clearTarget=function(a,b,c,d){this.setRenderTarget(a);this.clear(b,c,d)};this.resetGLState=d;this.dispose=function(){L.removeEventListener("webglcontextlost",e,!1)};this.renderBufferImmediate=function(a,b,c){J.initAttributes();var d=W.get(a);a.hasPositions&&!d.position&&(d.position=r.createBuffer());a.hasNormals&&!d.normal&&(d.normal=r.createBuffer());a.hasUvs&&!d.uv&&(d.uv=r.createBuffer());
 a.hasColors&&!d.color&&(d.color=r.createBuffer());b=b.getAttributes();a.hasPositions&&(r.bindBuffer(r.ARRAY_BUFFER,d.position),r.bufferData(r.ARRAY_BUFFER,a.positionArray,r.DYNAMIC_DRAW),J.enableAttribute(b.position),r.vertexAttribPointer(b.position,3,r.FLOAT,!1,0,0));if(a.hasNormals){r.bindBuffer(r.ARRAY_BUFFER,d.normal);if("MeshPhongMaterial"!==c.type&&"MeshPhysicalMaterial"!==c.type&&c.shading===THREE.FlatShading)for(var e=0,f=3*a.count;e<f;e+=9){var g=a.normalArray,h=(g[e+0]+g[e+3]+g[e+6])/3,
 k=(g[e+1]+g[e+4]+g[e+7])/3,l=(g[e+2]+g[e+5]+g[e+8])/3;g[e+0]=h;g[e+1]=k;g[e+2]=l;g[e+3]=h;g[e+4]=k;g[e+5]=l;g[e+6]=h;g[e+7]=k;g[e+8]=l}r.bufferData(r.ARRAY_BUFFER,a.normalArray,r.DYNAMIC_DRAW);J.enableAttribute(b.normal);r.vertexAttribPointer(b.normal,3,r.FLOAT,!1,0,0)}a.hasUvs&&c.map&&(r.bindBuffer(r.ARRAY_BUFFER,d.uv),r.bufferData(r.ARRAY_BUFFER,a.uvArray,r.DYNAMIC_DRAW),J.enableAttribute(b.uv),r.vertexAttribPointer(b.uv,2,r.FLOAT,!1,0,0));a.hasColors&&c.vertexColors!==THREE.NoColors&&(r.bindBuffer(r.ARRAY_BUFFER,
-d.color),r.bufferData(r.ARRAY_BUFFER,a.colorArray,r.DYNAMIC_DRAW),J.enableAttribute(b.color),r.vertexAttribPointer(b.color,3,r.FLOAT,!1,0,0));J.disableUnusedAttributes();r.drawArrays(r.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,g,f){t(e);var h=v(a,b,c,e,g),l=!1;a=d.id+"_"+h.id+"_"+e.wireframe;a!==sa&&(sa=a,l=!0);b=g.morphTargetInfluences;if(void 0!==b){a=[];c=0;for(l=b.length;c<l;c++){var m=b[c];a.push([m,c])}a.sort(k);8<a.length&&(a.length=8);var n=d.morphAttributes;
-c=0;for(l=a.length;c<l;c++)m=a[c],ma[c]=m[0],0!==m[0]?(b=m[1],!0===e.morphTargets&&n.position&&d.addAttribute("morphTarget"+c,n.position[b]),!0===e.morphNormals&&n.normal&&d.addAttribute("morphNormal"+c,n.normal[b])):(!0===e.morphTargets&&d.removeAttribute("morphTarget"+c),!0===e.morphNormals&&d.removeAttribute("morphNormal"+c));a=h.getUniforms();null!==a.morphTargetInfluences&&r.uniform1fv(a.morphTargetInfluences,ma);l=!0}b=d.index;c=d.attributes.position;!0===e.wireframe&&(b=va.getWireframeAttribute(d));
-null!==b?(a=Ha,a.setIndex(b)):a=Ga;if(l){a:{var l=void 0,q;if(d instanceof THREE.InstancedBufferGeometry&&(q=S.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);J.initAttributes();var m=d.attributes,h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var s=h[p];if(0<=s){var u=m[p];if(void 0!==u){var w=u.itemSize,x=
-va.getAttributeBuffer(u);if(u instanceof THREE.InterleavedBufferAttribute){var G=u.data,D=G.stride,u=u.offset;G instanceof THREE.InstancedInterleavedBuffer?(J.enableAttributeAndDivisor(s,G.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=G.meshPerAttribute*G.count)):J.enableAttribute(s);r.bindBuffer(r.ARRAY_BUFFER,x);r.vertexAttribPointer(s,w,r.FLOAT,!1,D*G.array.BYTES_PER_ELEMENT,(l*D+u)*G.array.BYTES_PER_ELEMENT)}else u instanceof THREE.InstancedBufferAttribute?(J.enableAttributeAndDivisor(s,
-u.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):J.enableAttribute(s),r.bindBuffer(r.ARRAY_BUFFER,x),r.vertexAttribPointer(s,w,r.FLOAT,!1,0,l*w*4)}else if(void 0!==n&&(w=n[p],void 0!==w))switch(w.length){case 2:r.vertexAttrib2fv(s,w);break;case 3:r.vertexAttrib3fv(s,w);break;case 4:r.vertexAttrib4fv(s,w);break;default:r.vertexAttrib1fv(s,w)}}}J.disableUnusedAttributes()}null!==b&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,va.getAttributeBuffer(b))}q=Infinity;
+d.color),r.bufferData(r.ARRAY_BUFFER,a.colorArray,r.DYNAMIC_DRAW),J.enableAttribute(b.color),r.vertexAttribPointer(b.color,3,r.FLOAT,!1,0,0));J.disableUnusedAttributes();r.drawArrays(r.TRIANGLES,0,a.count);a.count=0};this.renderBufferDirect=function(a,b,c,d,e,g,f){t(e);var h=v(a,b,c,e,g),l=!1;a=d.id+"_"+h.id+"_"+e.wireframe;a!==ra&&(ra=a,l=!0);b=g.morphTargetInfluences;if(void 0!==b){a=[];c=0;for(l=b.length;c<l;c++){var m=b[c];a.push([m,c])}a.sort(k);8<a.length&&(a.length=8);var n=d.morphAttributes;
+c=0;for(l=a.length;c<l;c++)m=a[c],la[c]=m[0],0!==m[0]?(b=m[1],!0===e.morphTargets&&n.position&&d.addAttribute("morphTarget"+c,n.position[b]),!0===e.morphNormals&&n.normal&&d.addAttribute("morphNormal"+c,n.normal[b])):(!0===e.morphTargets&&d.removeAttribute("morphTarget"+c),!0===e.morphNormals&&d.removeAttribute("morphNormal"+c));a=h.getUniforms();null!==a.morphTargetInfluences&&r.uniform1fv(a.morphTargetInfluences,la);l=!0}b=d.index;c=d.attributes.position;!0===e.wireframe&&(b=ua.getWireframeAttribute(d));
+null!==b?(a=Ha,a.setIndex(b)):a=Ga;if(l){a:{var l=void 0,q;if(d instanceof THREE.InstancedBufferGeometry&&(q=T.get("ANGLE_instanced_arrays"),null===q)){console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");break a}void 0===l&&(l=0);J.initAttributes();var m=d.attributes,h=h.getAttributes(),n=e.defaultAttributeValues,p;for(p in h){var s=h[p];if(0<=s){var u=m[p];if(void 0!==u){var w=u.itemSize,x=
+ua.getAttributeBuffer(u);if(u instanceof THREE.InterleavedBufferAttribute){var G=u.data,D=G.stride,u=u.offset;G instanceof THREE.InstancedInterleavedBuffer?(J.enableAttributeAndDivisor(s,G.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=G.meshPerAttribute*G.count)):J.enableAttribute(s);r.bindBuffer(r.ARRAY_BUFFER,x);r.vertexAttribPointer(s,w,r.FLOAT,!1,D*G.array.BYTES_PER_ELEMENT,(l*D+u)*G.array.BYTES_PER_ELEMENT)}else u instanceof THREE.InstancedBufferAttribute?(J.enableAttributeAndDivisor(s,
+u.meshPerAttribute,q),void 0===d.maxInstancedCount&&(d.maxInstancedCount=u.meshPerAttribute*u.count)):J.enableAttribute(s),r.bindBuffer(r.ARRAY_BUFFER,x),r.vertexAttribPointer(s,w,r.FLOAT,!1,0,l*w*4)}else if(void 0!==n&&(w=n[p],void 0!==w))switch(w.length){case 2:r.vertexAttrib2fv(s,w);break;case 3:r.vertexAttrib3fv(s,w);break;case 4:r.vertexAttrib4fv(s,w);break;default:r.vertexAttrib1fv(s,w)}}}J.disableUnusedAttributes()}null!==b&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,ua.getAttributeBuffer(b))}q=Infinity;
 null!==b?q=b.count:void 0!==c&&(q=c.count);p=d.drawRange.start;b=d.drawRange.count;c=null!==f?f.start:0;l=null!==f?f.count:Infinity;f=Math.max(0,p,c);q=Math.min(0+q,p+b,c+l)-1;q=Math.max(0,q-f+1);g instanceof THREE.Mesh?(!0===e.wireframe?(J.setLineWidth(e.wireframeLinewidth*F),a.setMode(r.LINES)):a.setMode(r.TRIANGLES),d instanceof THREE.InstancedBufferGeometry&&0<d.maxInstancedCount?a.renderInstances(d):a.render(f,q)):g instanceof THREE.Line?(d=e.linewidth,void 0===d&&(d=1),J.setLineWidth(d*F),g instanceof
-THREE.LineSegments?a.setMode(r.LINES):a.setMode(r.LINE_STRIP),a.render(f,q)):g instanceof THREE.Points&&(a.setMode(r.POINTS),a.render(f,q))};this.render=function(a,b,c,d){if(!1===b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;sa="";ta=-1;ra=null;wa=!0;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);xa.multiplyMatrices(b.projectionMatrix,
-b.matrixWorldInverse);Ba.setFromMatrix(xa);ea.length=0;Y=fa=-1;ha.length=0;ja.length=0;q(a,b);ca.length=fa+1;da.length=Y+1;!0===aa.sortObjects&&(ca.sort(n),da.sort(p));ga.render(a,b);ka.calls=0;ka.vertices=0;ka.faces=0;ka.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,s(ca,b,ea,e,d),s(da,b,ea,e,d)):(J.setBlending(THREE.NoBlending),s(ca,b,ea,e),s(da,b,ea,e));Ia.render(a,b);Ja.render(a,
+THREE.LineSegments?a.setMode(r.LINES):a.setMode(r.LINE_STRIP),a.render(f,q)):g instanceof THREE.Points&&(a.setMode(r.POINTS),a.render(f,q))};this.render=function(a,b,c,d){if(!1===b instanceof THREE.Camera)console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");else{var e=a.fog;ra="";sa=-1;qa=null;va=!0;!0===a.autoUpdate&&a.updateMatrixWorld();null===b.parent&&b.updateMatrixWorld();b.matrixWorldInverse.getInverse(b.matrixWorld);wa.multiplyMatrices(b.projectionMatrix,
+b.matrixWorldInverse);Aa.setFromMatrix(wa);ea.length=0;$=ga=-1;fa.length=0;ia.length=0;q(a,b);ca.length=ga+1;da.length=$+1;!0===aa.sortObjects&&(ca.sort(n),da.sort(p));Ba.render(a,b);ja.calls=0;ja.vertices=0;ja.faces=0;ja.points=0;this.setRenderTarget(c);(this.autoClear||d)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil);a.overrideMaterial?(d=a.overrideMaterial,s(ca,b,ea,e,d),s(da,b,ea,e,d)):(J.setBlending(THREE.NoBlending),s(ca,b,ea,e),s(da,b,ea,e));Ia.render(a,b);Ja.render(a,
 b,Da,Ea);c&&(a=c.texture,b=z(c),a.generateMipmaps&&b&&a.minFilter!==THREE.NearestFilter&&a.minFilter!==THREE.LinearFilter&&(a=c instanceof THREE.WebGLRenderTargetCube?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,c=W.get(c.texture).__webglTexture,J.bindTexture(a,c),r.generateMipmap(a),J.bindTexture(a,null)));J.setDepthTest(!0);J.setDepthWrite(!0);J.setColorWrite(!0)}};this.setFaceCulling=function(a,b){a===THREE.CullFaceNone?J.disable(r.CULL_FACE):(b===THREE.FrontFaceDirectionCW?r.frontFace(r.CW):r.frontFace(r.CCW),
 a===THREE.CullFaceBack?r.cullFace(r.BACK):a===THREE.CullFaceFront?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK),J.enable(r.CULL_FACE))};this.setTexture=function(a,b){var c=W.get(a);if(0<a.version&&c.__version!==a.version){var d=a.image;if(void 0===d)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",a);else if(!1===d.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",a);else{void 0===c.__webglInit&&(c.__webglInit=!0,
-a.addEventListener("dispose",f),c.__webglTexture=r.createTexture(),la.textures++);J.activeTexture(r.TEXTURE0+b);J.bindTexture(r.TEXTURE_2D,c.__webglTexture);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);r.pixelStorei(r.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=B(a.image,ia.maxTextureSize);if((a.wrapS!==THREE.ClampToEdgeWrapping||a.wrapT!==THREE.ClampToEdgeWrapping||a.minFilter!==THREE.NearestFilter&&a.minFilter!==THREE.LinearFilter)&&
+a.addEventListener("dispose",f),c.__webglTexture=r.createTexture(),ka.textures++);J.activeTexture(r.TEXTURE0+b);J.bindTexture(r.TEXTURE_2D,c.__webglTexture);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,a.flipY);r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha);r.pixelStorei(r.UNPACK_ALIGNMENT,a.unpackAlignment);a.image=B(a.image,ha.maxTextureSize);if((a.wrapS!==THREE.ClampToEdgeWrapping||a.wrapT!==THREE.ClampToEdgeWrapping||a.minFilter!==THREE.NearestFilter&&a.minFilter!==THREE.LinearFilter)&&
 !1===z(a.image)){d=a.image;if(d instanceof HTMLImageElement||d instanceof HTMLCanvasElement){var e=document.createElement("canvas");e.width=THREE.Math.nearestPowerOfTwo(d.width);e.height=THREE.Math.nearestPowerOfTwo(d.height);e.getContext("2d").drawImage(d,0,0,e.width,e.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+d.width+"x"+d.height+"). Resized to "+e.width+"x"+e.height,d);d=e}a.image=d}var g=a.image,d=z(g),e=N(a.format),h=N(a.type);x(r.TEXTURE_2D,a,d);var l=a.mipmaps;
 if(a instanceof THREE.DataTexture)if(0<l.length&&d){for(var k=0,m=l.length;k<m;k++)g=l[k],J.texImage2D(r.TEXTURE_2D,k,e,g.width,g.height,0,e,h,g.data);a.generateMipmaps=!1}else J.texImage2D(r.TEXTURE_2D,0,e,g.width,g.height,0,e,h,g.data);else if(a instanceof THREE.CompressedTexture)for(k=0,m=l.length;k<m;k++)g=l[k],a.format!==THREE.RGBAFormat&&a.format!==THREE.RGBFormat?-1<J.getCompressedTextureFormats().indexOf(e)?J.compressedTexImage2D(r.TEXTURE_2D,k,e,g.width,g.height,0,g.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
 J.texImage2D(r.TEXTURE_2D,k,e,g.width,g.height,0,e,h,g.data);else if(0<l.length&&d){k=0;for(m=l.length;k<m;k++)g=l[k],J.texImage2D(r.TEXTURE_2D,k,e,e,h,g);a.generateMipmaps=!1}else J.texImage2D(r.TEXTURE_2D,0,e,e,h,a.image);a.generateMipmaps&&d&&r.generateMipmap(r.TEXTURE_2D);c.__version=a.version;if(a.onUpdate)a.onUpdate(a)}}else J.activeTexture(r.TEXTURE0+b),J.bindTexture(r.TEXTURE_2D,c.__webglTexture)};this.setRenderTarget=function(a){var b=a instanceof THREE.WebGLRenderTargetCube;if(a&&void 0===
-W.get(a).__webglFramebuffer){var c=W.get(a),d=W.get(a.texture);void 0===a.depthBuffer&&(a.depthBuffer=!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",g);d.__webglTexture=r.createTexture();la.textures++;var e=z(a),f=N(a.texture.format),h=N(a.texture.type);if(b){c.__webglFramebuffer=[];c.__webglRenderbuffer=[];J.bindTexture(r.TEXTURE_CUBE_MAP,d.__webglTexture);x(r.TEXTURE_CUBE_MAP,a.texture,e);for(d=0;6>d;d++)c.__webglFramebuffer[d]=r.createFramebuffer(),c.__webglRenderbuffer[d]=
+W.get(a).__webglFramebuffer){var c=W.get(a),d=W.get(a.texture);void 0===a.depthBuffer&&(a.depthBuffer=!0);void 0===a.stencilBuffer&&(a.stencilBuffer=!0);a.addEventListener("dispose",g);d.__webglTexture=r.createTexture();ka.textures++;var e=z(a),f=N(a.texture.format),h=N(a.texture.type);if(b){c.__webglFramebuffer=[];c.__webglRenderbuffer=[];J.bindTexture(r.TEXTURE_CUBE_MAP,d.__webglTexture);x(r.TEXTURE_CUBE_MAP,a.texture,e);for(d=0;6>d;d++)c.__webglFramebuffer[d]=r.createFramebuffer(),c.__webglRenderbuffer[d]=
 r.createRenderbuffer(),J.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+d,0,f,a.width,a.height,0,f,h,null),H(c.__webglFramebuffer[d],a,r.TEXTURE_CUBE_MAP_POSITIVE_X+d),G(c.__webglRenderbuffer[d],a);a.texture.generateMipmaps&&e&&r.generateMipmap(r.TEXTURE_CUBE_MAP)}else c.__webglFramebuffer=r.createFramebuffer(),c.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:r.createRenderbuffer(),J.bindTexture(r.TEXTURE_2D,d.__webglTexture),x(r.TEXTURE_2D,a.texture,e),J.texImage2D(r.TEXTURE_2D,
 0,f,a.width,a.height,0,f,h,null),H(c.__webglFramebuffer,a,r.TEXTURE_2D),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,c.__webglRenderbuffer):G(c.__webglRenderbuffer,a),a.texture.generateMipmaps&&e&&r.generateMipmap(r.TEXTURE_2D);b?J.bindTexture(r.TEXTURE_CUBE_MAP,null):J.bindTexture(r.TEXTURE_2D,
-null);r.bindRenderbuffer(r.RENDERBUFFER,null);r.bindFramebuffer(r.FRAMEBUFFER,null)}a?(c=W.get(a),d=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,e=a.height,h=f=0):(d=null,c=pa,e=qa,f=na,h=oa);d!==za&&(r.bindFramebuffer(r.FRAMEBUFFER,d),r.viewport(f,h,c,e),za=d);b&&(d=W.get(a.texture),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,d.__webglTexture,0));Da=c;Ea=e};this.readRenderTargetPixels=function(a,b,c,d,e,g){if(!1===
-a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var f=W.get(a).__webglFramebuffer;if(f){var h=!1;f!==za&&(r.bindFramebuffer(r.FRAMEBUFFER,f),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&N(k.format)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):k.type===THREE.UnsignedByteType||
-N(k.type)===r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)||k.type===THREE.FloatType&&S.get("WEBGL_color_buffer_float")||k.type===THREE.HalfFloatType&&S.get("EXT_color_buffer_half_float")?r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE?r.readPixels(b,c,d,e,N(k.format),N(k.type),g):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&&
-r.bindFramebuffer(r.FRAMEBUFFER,za)}}}};this.supportsFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");return S.get("OES_texture_float")};this.supportsHalfFloatTextures=function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return S.get("OES_texture_half_float")};this.supportsStandardDerivatives=function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");
-return S.get("OES_standard_derivatives")};this.supportsCompressedTextureS3TC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");return S.get("WEBGL_compressed_texture_s3tc")};this.supportsCompressedTexturePVRTC=function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return S.get("WEBGL_compressed_texture_pvrtc")};this.supportsBlendMinMax=
-function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return S.get("EXT_blend_minmax")};this.supportsVertexTextures=function(){return ia.vertexTextures};this.supportsInstancedArrays=function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return S.get("ANGLE_instanced_arrays")};this.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};
-this.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};this.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};this.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};Object.defineProperties(this,{shadowMapEnabled:{get:function(){return ga.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");ga.enabled=
-a}},shadowMapType:{get:function(){return ga.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");ga.type=a}},shadowMapCullFace:{get:function(){return ga.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");ga.cullFace=a}},shadowMapDebug:{get:function(){return ga.debug},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.");ga.debug=a}}})};
+null);r.bindRenderbuffer(r.RENDERBUFFER,null);r.bindFramebuffer(r.FRAMEBUFFER,null)}a?(c=W.get(a),d=b?c.__webglFramebuffer[a.activeCubeFace]:c.__webglFramebuffer,c=a.width,e=a.height,h=f=0):(d=null,c=oa,e=pa,f=ma,h=na);d!==ya&&(r.bindFramebuffer(r.FRAMEBUFFER,d),r.viewport(f,h,c,e),ya=d);b&&(d=W.get(a.texture),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+a.activeCubeFace,d.__webglTexture,0));Da=c;Ea=e};this.readRenderTargetPixels=function(a,b,c,d,e,g){if(!1===
+a instanceof THREE.WebGLRenderTarget)console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");else{var f=W.get(a).__webglFramebuffer;if(f){var h=!1;f!==ya&&(r.bindFramebuffer(r.FRAMEBUFFER,f),h=!0);try{var k=a.texture;k.format!==THREE.RGBAFormat&&N(k.format)!==r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)?console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format."):k.type===THREE.UnsignedByteType||
+N(k.type)===r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)||k.type===THREE.FloatType&&T.get("WEBGL_color_buffer_float")||k.type===THREE.HalfFloatType&&T.get("EXT_color_buffer_half_float")?r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE?r.readPixels(b,c,d,e,N(k.format),N(k.type),g):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&&
+r.bindFramebuffer(r.FRAMEBUFFER,ya)}}}}};
 THREE.WebGLRenderTarget=function(a,b,c){this.uuid=THREE.Math.generateUUID();this.width=a;this.height=b;c=c||{};void 0===c.minFilter&&(c.minFilter=THREE.LinearFilter);this.texture=new THREE.Texture(void 0,void 0,c.wrapS,c.wrapT,c.magFilter,c.minFilter,c.format,c.type,c.anisotropy);this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.shareDepthFrom=void 0!==c.shareDepthFrom?c.shareDepthFrom:null};
 THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,get wrapS(){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");return this.texture.wrapS},set wrapS(a){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.");this.texture.wrapS=a},get wrapT(){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");return this.texture.wrapT},set wrapT(a){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.");this.texture.wrapT=a},
 get magFilter(){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");return this.texture.magFilter},set magFilter(a){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.");this.texture.magFilter=a},get minFilter(){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");return this.texture.minFilter},set minFilter(a){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.");this.texture.minFilter=a},get anisotropy(){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.");
@@ -721,8 +712,8 @@ THREE.WebGLShadowMap=function(a,b,c){function d(a,b,c,d){var e=a.geometry,f=null
 B=THREE.UniformsUtils.clone(x.uniforms),z=0;4!==z;++z){var A=0!==(z&1),y=0!==(z&2),H=new THREE.ShaderMaterial({uniforms:D,vertexShader:w.vertexShader,fragmentShader:w.fragmentShader,morphTargets:A,skinning:y});H._shadowPass=!0;m[z]=H;A=new THREE.ShaderMaterial({uniforms:B,vertexShader:x.vertexShader,fragmentShader:x.fragmentShader,morphTargets:A,skinning:y});A._shadowPass=!0;q[z]=A}var G=this;this.enabled=!1;this.autoUpdate=!0;this.needsUpdate=!1;this.type=THREE.PCFShadowMap;this.cullFace=THREE.CullFaceFront;
 this.render=function(m,q){var w,x;if(!1!==G.enabled&&(!1!==G.autoUpdate||!1!==G.needsUpdate)){f.clearColor(1,1,1,1);g.disable(f.BLEND);g.enable(f.CULL_FACE);f.frontFace(f.CCW);f.cullFace(G.cullFace===THREE.CullFaceFront?f.FRONT:f.BACK);g.setDepthTest(!0);a.getViewport(u);for(var D=0,z=b.length;D<z;D++){var A=b[D];if(!0===A.castShadow){var B=A.shadow,y=B.camera,H=B.mapSize;if(A instanceof THREE.PointLight){w=6;x=!0;var M=H.x/4,C=H.y/2;v[0].set(2*M,C,M,C);v[1].set(0,C,M,C);v[2].set(3*M,C,M,C);v[3].set(M,
 C,M,C);v[4].set(3*M,0,M,C);v[5].set(M,0,M,C)}else w=1,x=!1;null===B.map&&(M=THREE.LinearFilter,G.type===THREE.PCFSoftShadowMap&&(M=THREE.NearestFilter),B.map=new THREE.WebGLRenderTarget(H.x,H.y,{minFilter:M,magFilter:M,format:THREE.RGBAFormat}),B.matrix=new THREE.Matrix4,A instanceof THREE.SpotLight&&(y.aspect=H.x/H.y),y.updateProjectionMatrix());H=B.map;B=B.matrix;n.setFromMatrixPosition(A.matrixWorld);y.position.copy(n);a.setRenderTarget(H);a.clear();for(H=0;H<w;H++)for(x?(k.copy(y.position),k.add(s[H]),
-y.up.copy(t[H]),y.lookAt(k),M=v[H],a.setViewport(M.x,M.y,M.z,M.w)):(k.setFromMatrixPosition(A.target.matrixWorld),y.lookAt(k)),y.updateMatrixWorld(),y.matrixWorldInverse.getInverse(y.matrixWorld),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(y.projectionMatrix),B.multiply(y.matrixWorldInverse),l.multiplyMatrices(y.projectionMatrix,y.matrixWorldInverse),h.setFromMatrix(l),p.length=0,e(m,q,y),M=0,C=p.length;M<C;M++){var $=p[M],U=c.update($),X=$.material;if(X instanceof THREE.MeshFaceMaterial)for(var ea=
-U.groups,X=X.materials,ca=0,fa=ea.length;ca<fa;ca++){var da=ea[ca],Y=X[da.materialIndex];!0===Y.visible&&(Y=d($,Y,x,n),a.renderBufferDirect(y,b,null,U,Y,$,da))}else Y=d($,X,x,n),a.renderBufferDirect(y,b,null,U,Y,$,null)}a.resetGLState()}}a.setViewport(u.x,u.y,u.z,u.w);w=a.getClearColor();x=a.getClearAlpha();a.setClearColor(w,x);g.enable(f.BLEND);G.cullFace===THREE.CullFaceFront&&f.cullFace(f.BACK);a.resetGLState();G.needsUpdate=!1}}};
+y.up.copy(t[H]),y.lookAt(k),M=v[H],a.setViewport(M.x,M.y,M.z,M.w)):(k.setFromMatrixPosition(A.target.matrixWorld),y.lookAt(k)),y.updateMatrixWorld(),y.matrixWorldInverse.getInverse(y.matrixWorld),B.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),B.multiply(y.projectionMatrix),B.multiply(y.matrixWorldInverse),l.multiplyMatrices(y.projectionMatrix,y.matrixWorldInverse),h.setFromMatrix(l),p.length=0,e(m,q,y),M=0,C=p.length;M<C;M++){var Z=p[M],U=c.update(Z),X=Z.material;if(X instanceof THREE.MeshFaceMaterial)for(var ea=
+U.groups,X=X.materials,ca=0,ga=ea.length;ca<ga;ca++){var da=ea[ca],$=X[da.materialIndex];!0===$.visible&&($=d(Z,$,x,n),a.renderBufferDirect(y,b,null,U,$,Z,da))}else $=d(Z,X,x,n),a.renderBufferDirect(y,b,null,U,$,Z,null)}a.resetGLState()}}a.setViewport(u.x,u.y,u.z,u.w);w=a.getClearColor();x=a.getClearAlpha();a.setClearColor(w,x);g.enable(f.BLEND);G.cullFace===THREE.CullFaceFront&&f.cullFace(f.BACK);a.resetGLState();G.needsUpdate=!1}}};
 THREE.WebGLState=function(a,b,c){var d=this,e=new Uint8Array(16),f=new Uint8Array(16),g=new Uint8Array(16),h={},l=null,k=null,n=null,p=null,m=null,q=null,s=null,t=null,v=null,u=null,w=null,D=null,x=null,B=null,z=null,A=a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS),y=void 0,H={};this.init=function(){a.clearColor(0,0,0,1);a.clearDepth(1);a.clearStencil(0);this.enable(a.DEPTH_TEST);a.depthFunc(a.LEQUAL);a.frontFace(a.CCW);a.cullFace(a.BACK);this.enable(a.CULL_FACE);this.enable(a.BLEND);a.blendEquation(a.FUNC_ADD);
 a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA)};this.initAttributes=function(){for(var a=0,b=e.length;a<b;a++)e[a]=0};this.enableAttribute=function(c){e[c]=1;0===f[c]&&(a.enableVertexAttribArray(c),f[c]=1);0!==g[c]&&(b.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(c,0),g[c]=0)};this.enableAttributeAndDivisor=function(b,c,d){e[b]=1;0===f[b]&&(a.enableVertexAttribArray(b),f[b]=1);g[b]!==c&&(d.vertexAttribDivisorANGLE(b,c),g[b]=c)};this.disableUnusedAttributes=function(){for(var b=0,c=f.length;b<
 c;b++)f[b]!==e[b]&&(a.disableVertexAttribArray(b),f[b]=0)};this.enable=function(b){!0!==h[b]&&(a.enable(b),h[b]=!0)};this.disable=function(b){!1!==h[b]&&(a.disable(b),h[b]=!1)};this.getCompressedTextureFormats=function(){if(null===l&&(l=[],b.get("WEBGL_compressed_texture_pvrtc")||b.get("WEBGL_compressed_texture_s3tc")))for(var c=a.getParameter(a.COMPRESSED_TEXTURE_FORMATS),d=0;d<c.length;d++)l.push(c[d]);return l};this.setBlending=function(b,d,e,f,g,h,l){b!==k&&(b===THREE.NoBlending?this.disable(a.BLEND):
@@ -740,19 +731,28 @@ I=m.createProgram(),K=m.createShader(m.FRAGMENT_SHADER),F=m.createShader(m.VERTE
 "opacity");g=m.getUniformLocation(v,"color");h=m.getUniformLocation(v,"scale");l=m.getUniformLocation(v,"rotation");k=m.getUniformLocation(v,"screenPosition")}m.useProgram(v);q.initAttributes();q.enableAttribute(n);q.enableAttribute(p);q.disableUnusedAttributes();m.uniform1i(e,0);m.uniform1i(d,1);m.bindBuffer(m.ARRAY_BUFFER,s);m.vertexAttribPointer(n,2,m.FLOAT,!1,16,0);m.vertexAttribPointer(p,2,m.FLOAT,!1,16,8);m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,t);q.disable(m.CULL_FACE);m.depthMask(!1);I=0;for(K=
 b.length;I<K;I++)if(E=16/A,N.set(E*y,E),F=b[I],x.set(F.matrixWorld.elements[12],F.matrixWorld.elements[13],F.matrixWorld.elements[14]),x.applyMatrix4(B.matrixWorldInverse),x.applyProjection(B.projectionMatrix),L.copy(x),P.x=L.x*H+H,P.y=L.y*G+G,u||0<P.x&&P.x<z&&0<P.y&&P.y<A){q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,null);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,w);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGB,P.x-8,P.y-8,16,16,0);m.uniform1i(c,0);m.uniform2f(h,N.x,N.y);m.uniform3f(k,
 L.x,L.y,L.z);q.disable(m.BLEND);q.enable(m.DEPTH_TEST);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);q.activeTexture(m.TEXTURE0);q.bindTexture(m.TEXTURE_2D,D);m.copyTexImage2D(m.TEXTURE_2D,0,m.RGBA,P.x-8,P.y-8,16,16,0);m.uniform1i(c,1);q.disable(m.DEPTH_TEST);q.activeTexture(m.TEXTURE1);q.bindTexture(m.TEXTURE_2D,w);m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0);F.positionScreen.copy(L);F.customUpdateCallback?F.customUpdateCallback(F):F.updateLensFlares();m.uniform1i(c,2);q.enable(m.BLEND);for(var Q=
-0,T=F.lensFlares.length;Q<T;Q++){var R=F.lensFlares[Q];.001<R.opacity&&.001<R.scale&&(L.x=R.x,L.y=R.y,L.z=R.z,E=R.size*R.scale/A,N.x=E*y,N.y=E,m.uniform3f(k,L.x,L.y,L.z),m.uniform2f(h,N.x,N.y),m.uniform1f(l,R.rotation),m.uniform1f(f,R.opacity),m.uniform3f(g,R.color.r,R.color.g,R.color.b),q.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),a.setTexture(R.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}q.enable(m.CULL_FACE);q.enable(m.DEPTH_TEST);m.depthMask(!0);a.resetGLState()}}};
+0,S=F.lensFlares.length;Q<S;Q++){var R=F.lensFlares[Q];.001<R.opacity&&.001<R.scale&&(L.x=R.x,L.y=R.y,L.z=R.z,E=R.size*R.scale/A,N.x=E*y,N.y=E,m.uniform3f(k,L.x,L.y,L.z),m.uniform2f(h,N.x,N.y),m.uniform1f(l,R.rotation),m.uniform1f(f,R.opacity),m.uniform3f(g,R.color.r,R.color.g,R.color.b),q.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst),a.setTexture(R.texture,1),m.drawElements(m.TRIANGLES,6,m.UNSIGNED_SHORT,0))}}q.enable(m.CULL_FACE);q.enable(m.DEPTH_TEST);m.depthMask(!0);a.resetGLState()}}};
 THREE.SpritePlugin=function(a,b){var c,d,e,f,g,h,l,k,n,p,m,q,s,t,v,u,w;function D(a,b){return a.z!==b.z?b.z-a.z:b.id-a.id}var x=a.context,B=a.state,z,A,y,H,G=new THREE.Vector3,E=new THREE.Quaternion,N=new THREE.Vector3;this.render=function(L,P){if(0!==b.length){if(void 0===y){var I=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),K=new Uint16Array([0,1,2,0,2,3]);z=x.createBuffer();A=x.createBuffer();x.bindBuffer(x.ARRAY_BUFFER,z);x.bufferData(x.ARRAY_BUFFER,I,x.STATIC_DRAW);x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,
 A);x.bufferData(x.ELEMENT_ARRAY_BUFFER,K,x.STATIC_DRAW);var I=x.createProgram(),K=x.createShader(x.VERTEX_SHADER),F=x.createShader(x.FRAGMENT_SHADER);x.shaderSource(K,["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"));
 x.shaderSource(F,["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"));
 x.compileShader(K);x.compileShader(F);x.attachShader(I,K);x.attachShader(I,F);x.linkProgram(I);y=I;u=x.getAttribLocation(y,"position");w=x.getAttribLocation(y,"uv");c=x.getUniformLocation(y,"uvOffset");d=x.getUniformLocation(y,"uvScale");e=x.getUniformLocation(y,"rotation");f=x.getUniformLocation(y,"scale");g=x.getUniformLocation(y,"color");h=x.getUniformLocation(y,"map");l=x.getUniformLocation(y,"opacity");k=x.getUniformLocation(y,"modelViewMatrix");n=x.getUniformLocation(y,"projectionMatrix");p=
 x.getUniformLocation(y,"fogType");m=x.getUniformLocation(y,"fogDensity");q=x.getUniformLocation(y,"fogNear");s=x.getUniformLocation(y,"fogFar");t=x.getUniformLocation(y,"fogColor");v=x.getUniformLocation(y,"alphaTest");I=document.createElement("canvas");I.width=8;I.height=8;K=I.getContext("2d");K.fillStyle="white";K.fillRect(0,0,8,8);H=new THREE.Texture(I);H.needsUpdate=!0}x.useProgram(y);B.initAttributes();B.enableAttribute(u);B.enableAttribute(w);B.disableUnusedAttributes();B.disable(x.CULL_FACE);
 B.enable(x.BLEND);x.bindBuffer(x.ARRAY_BUFFER,z);x.vertexAttribPointer(u,2,x.FLOAT,!1,16,0);x.vertexAttribPointer(w,2,x.FLOAT,!1,16,8);x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,A);x.uniformMatrix4fv(n,!1,P.projectionMatrix.elements);B.activeTexture(x.TEXTURE0);x.uniform1i(h,0);K=I=0;(F=L.fog)?(x.uniform3f(t,F.color.r,F.color.g,F.color.b),F instanceof THREE.Fog?(x.uniform1f(q,F.near),x.uniform1f(s,F.far),x.uniform1i(p,1),K=I=1):F instanceof THREE.FogExp2&&(x.uniform1f(m,F.density),x.uniform1i(p,2),K=I=2)):
-(x.uniform1i(p,0),K=I=0);for(var F=0,Q=b.length;F<Q;F++){var T=b[F];T.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,T.matrixWorld);T.z=-T.modelViewMatrix.elements[14]}b.sort(D);for(var R=[],F=0,Q=b.length;F<Q;F++){var T=b[F],M=T.material;x.uniform1f(v,M.alphaTest);x.uniformMatrix4fv(k,!1,T.modelViewMatrix.elements);T.matrixWorld.decompose(G,E,N);R[0]=N.x;R[1]=N.y;T=0;L.fog&&M.fog&&(T=K);I!==T&&(x.uniform1i(p,T),I=T);null!==M.map?(x.uniform2f(c,M.map.offset.x,M.map.offset.y),x.uniform2f(d,
+(x.uniform1i(p,0),K=I=0);for(var F=0,Q=b.length;F<Q;F++){var S=b[F];S.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,S.matrixWorld);S.z=-S.modelViewMatrix.elements[14]}b.sort(D);for(var R=[],F=0,Q=b.length;F<Q;F++){var S=b[F],M=S.material;x.uniform1f(v,M.alphaTest);x.uniformMatrix4fv(k,!1,S.modelViewMatrix.elements);S.matrixWorld.decompose(G,E,N);R[0]=N.x;R[1]=N.y;S=0;L.fog&&M.fog&&(S=K);I!==S&&(x.uniform1i(p,S),I=S);null!==M.map?(x.uniform2f(c,M.map.offset.x,M.map.offset.y),x.uniform2f(d,
 M.map.repeat.x,M.map.repeat.y)):(x.uniform2f(c,0,0),x.uniform2f(d,1,1));x.uniform1f(l,M.opacity);x.uniform3f(g,M.color.r,M.color.g,M.color.b);x.uniform1f(e,M.rotation);x.uniform2fv(f,R);B.setBlending(M.blending,M.blendEquation,M.blendSrc,M.blendDst);B.setDepthTest(M.depthTest);B.setDepthWrite(M.depthWrite);M.map&&M.map.image&&M.map.image.width?a.setTexture(M.map,0):a.setTexture(H,0);x.drawElements(x.TRIANGLES,6,x.UNSIGNED_SHORT,0)}B.enable(x.CULL_FACE);a.resetGLState()}}};
-THREE.CurveUtils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-c)},tangentCubicBezier:function(a,b,c,d,e){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*e},tangentSpline:function(a,b,c,d,e){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,e){a=.5*(c-a);d=.5*(d-b);var f=e*e;return(2*b-2*c+a+d)*e*f+(-3*b+3*c-2*a-d)*f+a*e+b}};
-THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
-THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture is being deprecated. Use THREE.TextureLoader() instead.");var e=new THREE.TextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a},loadTextureCube:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube is being deprecated. Use THREE.CubeTextureLoader() instead.");var e=new THREE.CubeTextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,
+Object.defineProperties(THREE.Light.prototype,{onlyShadow:{set:function(a){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(a){this.shadow.camera.fov=a}},shadowCameraLeft:{set:function(a){this.shadow.camera.left=a}},shadowCameraRight:{set:function(a){this.shadow.camera.right=a}},shadowCameraTop:{set:function(a){this.shadow.camera.top=a}},shadowCameraBottom:{set:function(a){this.shadow.camera.bottom=a}},shadowCameraNear:{set:function(a){this.shadow.camera.near=
+a}},shadowCameraFar:{set:function(a){this.shadow.camera.far=a}},shadowCameraVisible:{set:function(a){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow ) instead.")}},shadowBias:{set:function(a){this.shadow.bias=a}},shadowDarkness:{set:function(a){this.shadow.darkness=a}},shadowMapWidth:{set:function(a){this.shadow.mapSize.width=a}},shadowMapHeight:{set:function(a){this.shadow.mapSize.height=a}}});
+Object.defineProperties(THREE.WebGLRenderer.prototype,{supportsFloatTextures:{value:function(){console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' ).");return this.extensions.get("OES_texture_float")}},supportsHalfFloatTextures:{value:function(){console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' ).");return this.extensions.get("OES_texture_half_float")}},supportsStandardDerivatives:{value:function(){console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' ).");
+return this.extensions.get("OES_standard_derivatives")}},supportsCompressedTextureS3TC:{value:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' ).");return this.extensions.get("WEBGL_compressed_texture_s3tc")}},supportsCompressedTexturePVRTC:{value:function(){console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' ).");return this.extensions.get("WEBGL_compressed_texture_pvrtc")}},
+supportsBlendMinMax:{value:function(){console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' ).");return this.extensions.get("EXT_blend_minmax")}},supportsVertexTextures:{value:function(){return this.capabilities.vertexTextures}},supportsInstancedArrays:{value:function(){console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' ).");return this.extensions.get("ANGLE_instanced_arrays")}},initMaterial:{value:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")}},
+addPrePlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")}},addPostPlugin:{value:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")}},updateShadowMap:{value:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")}},shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.");this.shadowMap.enabled=
+a}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.");this.shadowMap.type=a}},shadowMapCullFace:{get:function(){return this.shadowMap.cullFace},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapCullFace is now .shadowMap.cullFace.");this.shadowMap.cullFace=a}},shadowMapDebug:{get:function(){return this.shadowMap.debug},set:function(a){console.warn("THREE.WebGLRenderer: .shadowMapDebug is now .shadowMap.debug.");
+this.shadowMap.debug=a}}});THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
+THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var e=new THREE.TextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,c,void 0,d);b&&(a.mapping=b);return a},loadTextureCube:function(a,b,c,d){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var e=new THREE.CubeTextureLoader;e.setCrossOrigin(this.crossOrigin);a=e.load(a,
 c,void 0,d);b&&(a.mapping=b);return a},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")}};
+THREE.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js.");this.projectVector=function(a,b){console.warn("THREE.Projector: .projectVector() is now vector.project().");a.project(b)};this.unprojectVector=function(a,b){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject().");a.unproject(b)};this.pickingRay=function(a,b){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}};
+THREE.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js");this.domElement=document.createElement("canvas");this.clear=function(){};this.render=function(){};this.setClearColor=function(){};this.setSize=function(){}};
+THREE.CurveUtils={tangentQuadraticBezier:function(a,b,c,d){return 2*(1-a)*(c-b)+2*a*(d-c)},tangentCubicBezier:function(a,b,c,d,e){return-3*b*(1-a)*(1-a)+3*c*(1-a)*(1-a)-6*a*c*(1-a)+6*a*d*(1-a)-3*a*a*d+3*a*a*e},tangentSpline:function(a,b,c,d,e){return 6*a*a-6*a+(3*a*a-4*a+1)+(-6*a*a+6*a)+(3*a*a-2*a)},interpolate:function(a,b,c,d,e){a=.5*(c-a);d=.5*(d-b);var f=e*e;return(2*b-2*c+a+d)*e*f+(-3*b+3*c-2*a-d)*f+a*e+b}};
 THREE.SceneUtils={createMultiMaterialObject:function(a,b){for(var c=new THREE.Group,d=0,e=b.length;d<e;d++)c.add(new THREE.Mesh(a,b[d]));return c},detach:function(a,b,c){a.applyMatrix(b.matrixWorld);b.remove(a);c.add(a)},attach:function(a,b,c){var d=new THREE.Matrix4;d.getInverse(c.matrixWorld);a.applyMatrix(d);b.remove(a);c.add(a)}};
 THREE.ShapeUtils={area:function(a){for(var b=a.length,c=0,d=b-1,e=0;e<b;d=e++)c+=a[d].x*a[e].y-a[e].x*a[d].y;return.5*c},triangulate:function(){return function(a,b){var c=a.length;if(3>c)return null;var d=[],e=[],f=[],g,h,l;if(0<THREE.ShapeUtils.area(a))for(h=0;h<c;h++)e[h]=h;else for(h=0;h<c;h++)e[h]=c-1-h;var k=2*c;for(h=c-1;2<c;){if(0>=k--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);l=h+1;c<=l&&(l=0);var n;a:{var p=
 n=void 0,m=void 0,q=void 0,s=void 0,t=void 0,v=void 0,u=void 0,w=void 0,p=a[e[g]].x,m=a[e[g]].y,q=a[e[h]].x,s=a[e[h]].y,t=a[e[l]].x,v=a[e[l]].y;if(Number.EPSILON>(q-p)*(v-m)-(s-m)*(t-p))n=!1;else{var D=void 0,x=void 0,B=void 0,z=void 0,A=void 0,y=void 0,H=void 0,G=void 0,E=void 0,N=void 0,E=G=H=w=u=void 0,D=t-q,x=v-s,B=p-t,z=m-v,A=q-p,y=s-m;for(n=0;n<c;n++)if(u=a[e[n]].x,w=a[e[n]].y,!(u===p&&w===m||u===q&&w===s||u===t&&w===v)&&(H=u-p,G=w-m,E=u-q,N=w-s,u-=t,w-=v,E=D*N-x*E,H=A*G-y*H,G=B*w-z*u,E>=-Number.EPSILON&&
@@ -823,13 +823,13 @@ THREE.EdgesGeometry=function(a,b){function c(a,b){return a-b}THREE.BufferGeometr
 face2:void 0}:f[q].face2=k}e=[];for(q in f)if(g=f[q],void 0===g.face2||h[g.face1].normal.dot(h[g.face2].normal)<=d)k=l[g.vert1],e.push(k.x),e.push(k.y),e.push(k.z),k=l[g.vert2],e.push(k.x),e.push(k.y),e.push(k.z);this.addAttribute("position",new THREE.BufferAttribute(new Float32Array(e),3))};THREE.EdgesGeometry.prototype=Object.create(THREE.BufferGeometry.prototype);THREE.EdgesGeometry.prototype.constructor=THREE.EdgesGeometry;
 THREE.ExtrudeGeometry=function(a,b){"undefined"!==typeof a&&(THREE.Geometry.call(this),this.type="ExtrudeGeometry",a=Array.isArray(a)?a:[a],this.addShapeList(a,b),this.computeFaceNormals())};THREE.ExtrudeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ExtrudeGeometry.prototype.constructor=THREE.ExtrudeGeometry;THREE.ExtrudeGeometry.prototype.addShapeList=function(a,b){for(var c=a.length,d=0;d<c;d++)this.addShape(a[d],b)};
 THREE.ExtrudeGeometry.prototype.addShape=function(a,b){function c(a,b,c){b||console.error("THREE.ExtrudeGeometry: vec does not exist");return b.clone().multiplyScalar(c).add(a)}function d(a,b,c){var d=1,d=a.x-b.x,e=a.y-b.y,f=c.x-a.x,g=c.y-a.y,h=d*d+e*e;if(Math.abs(d*g-e*f)>Number.EPSILON){var k=Math.sqrt(h),l=Math.sqrt(f*f+g*g),h=b.x-e/k;b=b.y+d/k;f=((c.x-g/l-h)*g-(c.y+f/l-b)*f)/(d*g-e*f);c=h+d*f-a.x;a=b+e*f-a.y;d=c*c+a*a;if(2>=d)return new THREE.Vector2(c,a);d=Math.sqrt(d/2)}else a=!1,d>Number.EPSILON?
-f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(C=a.length;0<=--C;){c=C;d=C-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*n,e=0;e<f;e++){var g=T*e,h=T*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+G,g=g+G,l=l+G,h=h+G;H.faces.push(new THREE.Face3(k,g,h,null,null,1));H.faces.push(new THREE.Face3(g,l,h,null,null,1));k=u.generateSideWallUV(H,
+f>Number.EPSILON&&(a=!0):d<-Number.EPSILON?f<-Number.EPSILON&&(a=!0):Math.sign(e)===Math.sign(g)&&(a=!0),a?(c=-e,a=d,d=Math.sqrt(h)):(c=d,a=e,d=Math.sqrt(h/2));return new THREE.Vector2(c/d,a/d)}function e(a,b){var c,d;for(C=a.length;0<=--C;){c=C;d=C-1;0>d&&(d=a.length-1);for(var e=0,f=q+2*n,e=0;e<f;e++){var g=S*e,h=S*(e+1),k=b+c+g,g=b+d+g,l=b+d+h,h=b+c+h,k=k+G,g=g+G,l=l+G,h=h+G;H.faces.push(new THREE.Face3(k,g,h,null,null,1));H.faces.push(new THREE.Face3(g,l,h,null,null,1));k=u.generateSideWallUV(H,
 k,g,l,h);H.faceVertexUvs[0].push([k[0],k[1],k[3]]);H.faceVertexUvs[0].push([k[1],k[2],k[3]])}}}function f(a,b,c){H.vertices.push(new THREE.Vector3(a,b,c))}function g(a,b,c){a+=G;b+=G;c+=G;H.faces.push(new THREE.Face3(a,b,c,null,null,0));a=u.generateTopUV(H,a,b,c);H.faceVertexUvs[0].push(a)}var h=void 0!==b.amount?b.amount:100,l=void 0!==b.bevelThickness?b.bevelThickness:6,k=void 0!==b.bevelSize?b.bevelSize:l-2,n=void 0!==b.bevelSegments?b.bevelSegments:3,p=void 0!==b.bevelEnabled?b.bevelEnabled:!0,
 m=void 0!==b.curveSegments?b.curveSegments:12,q=void 0!==b.steps?b.steps:1,s=b.extrudePath,t,v=!1,u=void 0!==b.UVGenerator?b.UVGenerator:THREE.ExtrudeGeometry.WorldUVGenerator,w,D,x,B;s&&(t=s.getSpacedPoints(q),v=!0,p=!1,w=void 0!==b.frames?b.frames:new THREE.TubeGeometry.FrenetFrames(s,q,!1),D=new THREE.Vector3,x=new THREE.Vector3,B=new THREE.Vector3);p||(k=l=n=0);var z,A,y,H=this,G=this.vertices.length,s=a.extractPoints(m),m=s.shape,E=s.holes;if(s=!THREE.ShapeUtils.isClockWise(m)){m=m.reverse();
-A=0;for(y=E.length;A<y;A++)z=E[A],THREE.ShapeUtils.isClockWise(z)&&(E[A]=z.reverse());s=!1}var N=THREE.ShapeUtils.triangulateShape(m,E),L=m;A=0;for(y=E.length;A<y;A++)z=E[A],m=m.concat(z);var P,I,K,F,Q,T=m.length,R,M=N.length,s=[],C=0;K=L.length;P=K-1;for(I=C+1;C<K;C++,P++,I++)P===K&&(P=0),I===K&&(I=0),s[C]=d(L[C],L[P],L[I]);var $=[],U,X=s.concat();A=0;for(y=E.length;A<y;A++){z=E[A];U=[];C=0;K=z.length;P=K-1;for(I=C+1;C<K;C++,P++,I++)P===K&&(P=0),I===K&&(I=0),U[C]=d(z[C],z[P],z[I]);$.push(U);X=X.concat(U)}for(P=
-0;P<n;P++){K=P/n;F=l*(1-K);I=k*Math.sin(K*Math.PI/2);C=0;for(K=L.length;C<K;C++)Q=c(L[C],s[C],I),f(Q.x,Q.y,-F);A=0;for(y=E.length;A<y;A++)for(z=E[A],U=$[A],C=0,K=z.length;C<K;C++)Q=c(z[C],U[C],I),f(Q.x,Q.y,-F)}I=k;for(C=0;C<T;C++)Q=p?c(m[C],X[C],I):m[C],v?(x.copy(w.normals[0]).multiplyScalar(Q.x),D.copy(w.binormals[0]).multiplyScalar(Q.y),B.copy(t[0]).add(x).add(D),f(B.x,B.y,B.z)):f(Q.x,Q.y,0);for(K=1;K<=q;K++)for(C=0;C<T;C++)Q=p?c(m[C],X[C],I):m[C],v?(x.copy(w.normals[K]).multiplyScalar(Q.x),D.copy(w.binormals[K]).multiplyScalar(Q.y),
-B.copy(t[K]).add(x).add(D),f(B.x,B.y,B.z)):f(Q.x,Q.y,h/q*K);for(P=n-1;0<=P;P--){K=P/n;F=l*(1-K);I=k*Math.sin(K*Math.PI/2);C=0;for(K=L.length;C<K;C++)Q=c(L[C],s[C],I),f(Q.x,Q.y,h+F);A=0;for(y=E.length;A<y;A++)for(z=E[A],U=$[A],C=0,K=z.length;C<K;C++)Q=c(z[C],U[C],I),v?f(Q.x,Q.y+t[q-1].y,t[q-1].x+F):f(Q.x,Q.y,h+F)}(function(){if(p){var a;a=0*T;for(C=0;C<M;C++)R=N[C],g(R[2]+a,R[1]+a,R[0]+a);a=q+2*n;a*=T;for(C=0;C<M;C++)R=N[C],g(R[0]+a,R[1]+a,R[2]+a)}else{for(C=0;C<M;C++)R=N[C],g(R[2],R[1],R[0]);for(C=
-0;C<M;C++)R=N[C],g(R[0]+T*q,R[1]+T*q,R[2]+T*q)}})();(function(){var a=0;e(L,a);a+=L.length;A=0;for(y=E.length;A<y;A++)z=E[A],e(z,a),a+=z.length})()};
+A=0;for(y=E.length;A<y;A++)z=E[A],THREE.ShapeUtils.isClockWise(z)&&(E[A]=z.reverse());s=!1}var N=THREE.ShapeUtils.triangulateShape(m,E),L=m;A=0;for(y=E.length;A<y;A++)z=E[A],m=m.concat(z);var P,I,K,F,Q,S=m.length,R,M=N.length,s=[],C=0;K=L.length;P=K-1;for(I=C+1;C<K;C++,P++,I++)P===K&&(P=0),I===K&&(I=0),s[C]=d(L[C],L[P],L[I]);var Z=[],U,X=s.concat();A=0;for(y=E.length;A<y;A++){z=E[A];U=[];C=0;K=z.length;P=K-1;for(I=C+1;C<K;C++,P++,I++)P===K&&(P=0),I===K&&(I=0),U[C]=d(z[C],z[P],z[I]);Z.push(U);X=X.concat(U)}for(P=
+0;P<n;P++){K=P/n;F=l*(1-K);I=k*Math.sin(K*Math.PI/2);C=0;for(K=L.length;C<K;C++)Q=c(L[C],s[C],I),f(Q.x,Q.y,-F);A=0;for(y=E.length;A<y;A++)for(z=E[A],U=Z[A],C=0,K=z.length;C<K;C++)Q=c(z[C],U[C],I),f(Q.x,Q.y,-F)}I=k;for(C=0;C<S;C++)Q=p?c(m[C],X[C],I):m[C],v?(x.copy(w.normals[0]).multiplyScalar(Q.x),D.copy(w.binormals[0]).multiplyScalar(Q.y),B.copy(t[0]).add(x).add(D),f(B.x,B.y,B.z)):f(Q.x,Q.y,0);for(K=1;K<=q;K++)for(C=0;C<S;C++)Q=p?c(m[C],X[C],I):m[C],v?(x.copy(w.normals[K]).multiplyScalar(Q.x),D.copy(w.binormals[K]).multiplyScalar(Q.y),
+B.copy(t[K]).add(x).add(D),f(B.x,B.y,B.z)):f(Q.x,Q.y,h/q*K);for(P=n-1;0<=P;P--){K=P/n;F=l*(1-K);I=k*Math.sin(K*Math.PI/2);C=0;for(K=L.length;C<K;C++)Q=c(L[C],s[C],I),f(Q.x,Q.y,h+F);A=0;for(y=E.length;A<y;A++)for(z=E[A],U=Z[A],C=0,K=z.length;C<K;C++)Q=c(z[C],U[C],I),v?f(Q.x,Q.y+t[q-1].y,t[q-1].x+F):f(Q.x,Q.y,h+F)}(function(){if(p){var a;a=0*S;for(C=0;C<M;C++)R=N[C],g(R[2]+a,R[1]+a,R[0]+a);a=q+2*n;a*=S;for(C=0;C<M;C++)R=N[C],g(R[0]+a,R[1]+a,R[2]+a)}else{for(C=0;C<M;C++)R=N[C],g(R[2],R[1],R[0]);for(C=
+0;C<M;C++)R=N[C],g(R[0]+S*q,R[1]+S*q,R[2]+S*q)}})();(function(){var a=0;e(L,a);a+=L.length;A=0;for(y=E.length;A<y;A++)z=E[A],e(z,a),a+=z.length})()};
 THREE.ExtrudeGeometry.WorldUVGenerator={generateTopUV:function(a,b,c,d){a=a.vertices;b=a[b];c=a[c];d=a[d];return[new THREE.Vector2(b.x,b.y),new THREE.Vector2(c.x,c.y),new THREE.Vector2(d.x,d.y)]},generateSideWallUV:function(a,b,c,d,e){a=a.vertices;b=a[b];c=a[c];d=a[d];e=a[e];return.01>Math.abs(b.y-c.y)?[new THREE.Vector2(b.x,1-b.z),new THREE.Vector2(c.x,1-c.z),new THREE.Vector2(d.x,1-d.z),new THREE.Vector2(e.x,1-e.z)]:[new THREE.Vector2(b.y,1-b.z),new THREE.Vector2(c.y,1-c.z),new THREE.Vector2(d.y,
 1-d.z),new THREE.Vector2(e.y,1-e.z)]}};THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);this.type="ShapeGeometry";!1===Array.isArray(a)&&(a=[a]);this.addShapeList(a,b);this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.constructor=THREE.ShapeGeometry;THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;c<d;c++)this.addShape(a[c],b);return this};
 THREE.ShapeGeometry.prototype.addShape=function(a,b){void 0===b&&(b={});var c=b.material,d=void 0===b.UVGenerator?THREE.ExtrudeGeometry.WorldUVGenerator:b.UVGenerator,e,f,g,h=this.vertices.length;e=a.extractPoints(void 0!==b.curveSegments?b.curveSegments:12);var l=e.shape,k=e.holes;if(!THREE.ShapeUtils.isClockWise(l))for(l=l.reverse(),e=0,f=k.length;e<f;e++)g=k[e],THREE.ShapeUtils.isClockWise(g)&&(k[e]=g.reverse());var n=THREE.ShapeUtils.triangulateShape(l,k);e=0;for(f=k.length;e<f;e++)g=k[e],l=l.concat(g);