瀏覽代碼

Updated builds.

Mr.doob 9 年之前
父節點
當前提交
36f4f45ab4
共有 2 個文件被更改,包括 99 次插入197 次删除
  1. 84 181
      build/three.js
  2. 15 16
      build/three.min.js

+ 84 - 181
build/three.js

@@ -14339,16 +14339,16 @@ THREE.Loader.prototype = {
 
 				if ( repeat !== undefined ) {
 
-					texture.repeat.set( repeat[ 0 ], repeat[ 1 ] );
+					texture.repeat.fromArray( repeat );
 
-					if ( repeat[ 0 ] > 1 ) texture.wrapS = THREE.RepeatWrapping;
-					if ( repeat[ 1 ] > 1 ) texture.wrapT = THREE.RepeatWrapping;
+					if ( repeat[ 0 ] !== 1 ) texture.wrapS = THREE.RepeatWrapping;
+					if ( repeat[ 1 ] !== 1 ) texture.wrapT = THREE.RepeatWrapping;
 
 				}
 
 				if ( offset !== undefined ) {
 
-					texture.offset.set( offset[ 0 ], offset[ 1 ] );
+					texture.offset.fromArray( offset );
 
 				}
 
@@ -14419,7 +14419,7 @@ THREE.Loader.prototype = {
 						if ( value.toLowerCase() === 'phong' ) json.type = 'MeshPhongMaterial';
 						break;
 					case 'mapDiffuse':
-						json.map = loadTexture( value, json.mapDiffuseRepeat, json.mapDiffuseOffset, json.mapDiffuseWrap, json.mapDiffuseAnisotropy );
+						json.map = loadTexture( value, m.mapDiffuseRepeat, m.mapDiffuseOffset, m.mapDiffuseWrap, m.mapDiffuseAnisotropy );
 						break;
 					case 'mapDiffuseRepeat':
 					case 'mapDiffuseOffset':
@@ -14427,7 +14427,7 @@ THREE.Loader.prototype = {
 					case 'mapDiffuseAnisotropy':
 						break;
 					case 'mapLight':
-						json.lightMap = loadTexture( value, json.mapLightRepeat, json.mapLightOffset, json.mapLightWrap, json.mapLightAnisotropy );
+						json.lightMap = loadTexture( value, m.mapLightRepeat, m.mapLightOffset, m.mapLightWrap, m.mapLightAnisotropy );
 						break;
 					case 'mapLightRepeat':
 					case 'mapLightOffset':
@@ -14435,7 +14435,7 @@ THREE.Loader.prototype = {
 					case 'mapLightAnisotropy':
 						break;
 					case 'mapAO':
-						json.aoMap = loadTexture( value, json.mapAORepeat, json.mapAOOffset, json.mapAOWrap, json.mapAOAnisotropy );
+						json.aoMap = loadTexture( value, m.mapAORepeat, m.mapAOOffset, m.mapAOWrap, m.mapAOAnisotropy );
 						break;
 					case 'mapAORepeat':
 					case 'mapAOOffset':
@@ -14443,7 +14443,7 @@ THREE.Loader.prototype = {
 					case 'mapAOAnisotropy':
 						break;
 					case 'mapBump':
-						json.bumpMap = loadTexture( value, json.mapBumpRepeat, json.mapBumpOffset, json.mapBumpWrap, json.mapBumpAnisotropy );
+						json.bumpMap = loadTexture( value, m.mapBumpRepeat, m.mapBumpOffset, m.mapBumpWrap, m.mapBumpAnisotropy );
 						break;
 					case 'mapBumpScale':
 						json.bumpScale = value;
@@ -14454,7 +14454,7 @@ THREE.Loader.prototype = {
 					case 'mapBumpAnisotropy':
 						break;
 					case 'mapNormal':
-						json.normalMap = loadTexture( value, json.mapNormalRepeat, json.mapNormalOffset, json.mapNormalWrap, json.mapNormalAnisotropy );
+						json.normalMap = loadTexture( value, m.mapNormalRepeat, m.mapNormalOffset, m.mapNormalWrap, m.mapNormalAnisotropy );
 						break;
 					case 'mapNormalFactor':
 						json.normalScale = [ value, value ];
@@ -14465,7 +14465,7 @@ THREE.Loader.prototype = {
 					case 'mapNormalAnisotropy':
 						break;
 					case 'mapSpecular':
-						json.specularMap = loadTexture( value, json.mapSpecularRepeat, json.mapSpecularOffset, json.mapSpecularWrap, json.mapSpecularAnisotropy );
+						json.specularMap = loadTexture( value, m.mapSpecularRepeat, m.mapSpecularOffset, m.mapSpecularWrap, m.mapSpecularAnisotropy );
 						break;
 					case 'mapSpecularRepeat':
 					case 'mapSpecularOffset':
@@ -14473,7 +14473,7 @@ THREE.Loader.prototype = {
 					case 'mapSpecularAnisotropy':
 						break;
 					case 'mapAlpha':
-						json.alphaMap = loadTexture( value, json.mapAlphaRepeat, json.mapAlphaOffset, json.mapAlphaWrap, json.mapAlphaAnisotropy );
+						json.alphaMap = loadTexture( value, m.mapAlphaRepeat, m.mapAlphaOffset, m.mapAlphaWrap, m.mapAlphaAnisotropy );
 						break;
 					case 'mapAlphaRepeat':
 					case 'mapAlphaOffset':
@@ -16260,11 +16260,9 @@ THREE.TextureLoader.prototype = {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
-		var scope = this;
-
 		var texture = new THREE.Texture();
 
-		var loader = new THREE.ImageLoader( scope.manager );
+		var loader = new THREE.ImageLoader( this.manager );
 		loader.setCrossOrigin( this.crossOrigin );
 		loader.load( url, function ( image ) {
 
@@ -16291,6 +16289,69 @@ THREE.TextureLoader.prototype = {
 
 };
 
+// File:src/loaders/CubeTextureLoader.js
+
+/**
+ * @author mrdoob / http://mrdoob.com/
+ */
+
+THREE.CubeTextureLoader = function ( manager ) {
+
+	this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;
+
+};
+
+THREE.CubeTextureLoader.prototype = {
+
+	constructor: THREE.CubeTextureLoader,
+
+	load: function ( urls, onLoad, onProgress, onError ) {
+
+		var texture = new THREE.CubeTexture( [] );
+
+		var loader = new THREE.ImageLoader();
+		loader.setCrossOrigin( this.crossOrigin );
+
+		var loaded = 0;
+
+		function loadTexture( i ) {
+
+			loader.load( urls[ i ], function ( image ) {
+
+				texture.images[ i ] = image;
+
+				loaded ++;
+
+				if ( loaded === 6 ) {
+
+					texture.needsUpdate = true;
+
+					if ( onLoad ) onLoad( texture );
+
+				}
+
+			}, undefined, onError );
+
+		}
+
+		for ( var i = 0; i < urls.length; ++ i ) {
+
+			loadTexture( i );
+
+		}
+
+		return texture;
+
+	},
+
+	setCrossOrigin: function ( value ) {
+
+		this.crossOrigin = value;
+
+	}
+
+};
+
 // File:src/loaders/BinaryTextureLoader.js
 
 /**
@@ -28207,58 +28268,27 @@ THREE.ImageUtils = {
 
 	loadTexture: function ( url, mapping, onLoad, onError ) {
 
+		console.warn( 'THREE.ImageUtils.loadTexture is being deprecated. Use THREE.TextureLoader() instead.' );
+
 		var loader = new THREE.TextureLoader();
 		loader.setCrossOrigin( this.crossOrigin );
 
-		var texture = loader.load( url, function ( texture ) {
-
-			if ( onLoad ) onLoad( texture );
-
-		}, undefined, onError );
-
+		var texture = loader.load( url, onLoad, undefined, onError );
 		texture.mapping = mapping;
-		texture.sourceFile = url;
 
 		return texture;
 
 	},
 
-	loadTextureCube: function ( array, mapping, onLoad, onError ) {
-
-		var images = [];
-
-		var loader = new THREE.ImageLoader();
-		loader.crossOrigin = this.crossOrigin;
-
-		var texture = new THREE.CubeTexture( images, mapping );
-
-		var loaded = 0;
-
-		function loadTexture( i ) {
-
-			loader.load( array[ i ], function ( image ) {
-
-				texture.images[ i ] = image;
-
-				loaded += 1;
-
-				if ( loaded === 6 ) {
-
-					texture.needsUpdate = true;
-
-					if ( onLoad ) onLoad( texture );
+	loadTextureCube: function ( urls, mapping, onLoad, onError ) {
 
-				}
-
-			}, undefined, onError );
-
-		}
+		console.warn( 'THREE.ImageUtils.loadTextureCube is being deprecated. Use THREE.CubeTextureLoader() instead.' );
 
-		for ( var i = 0, il = array.length; i < il; ++ i ) {
-
-			loadTexture( i );
+		var loader = new THREE.CubeTextureLoader();
+		loader.setCrossOrigin( this.crossOrigin );
 
-		}
+		var texture = loader.load( urls, onLoad, undefined, onError );
+		texture.mapping = mapping;
 
 		return texture;
 
@@ -28274,133 +28304,6 @@ THREE.ImageUtils = {
 
 		console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' )
 
-	},
-
-	getNormalMap: function ( image, depth ) {
-
-		// Adapted from http://www.paulbrunt.co.uk/lab/heightnormal/
-
-		function cross( a, b ) {
-
-			return [ a[ 1 ] * b[ 2 ] - a[ 2 ] * b[ 1 ], a[ 2 ] * b[ 0 ] - a[ 0 ] * b[ 2 ], a[ 0 ] * b[ 1 ] - a[ 1 ] * b[ 0 ] ];
-
-		}
-
-		function subtract( a, b ) {
-
-			return [ a[ 0 ] - b[ 0 ], a[ 1 ] - b[ 1 ], a[ 2 ] - b[ 2 ] ];
-
-		}
-
-		function normalize( a ) {
-
-			var l = Math.sqrt( a[ 0 ] * a[ 0 ] + a[ 1 ] * a[ 1 ] + a[ 2 ] * a[ 2 ] );
-			return [ a[ 0 ] / l, a[ 1 ] / l, a[ 2 ] / l ];
-
-		}
-
-		depth = depth | 1;
-
-		var width = image.width;
-		var height = image.height;
-
-		var canvas = document.createElement( 'canvas' );
-		canvas.width = width;
-		canvas.height = height;
-
-		var context = canvas.getContext( '2d' );
-		context.drawImage( image, 0, 0 );
-
-		var data = context.getImageData( 0, 0, width, height ).data;
-		var imageData = context.createImageData( width, height );
-		var output = imageData.data;
-
-		for ( var x = 0; x < width; x ++ ) {
-
-			for ( var y = 0; y < height; y ++ ) {
-
-				var ly = y - 1 < 0 ? 0 : y - 1;
-				var uy = y + 1 > height - 1 ? height - 1 : y + 1;
-				var lx = x - 1 < 0 ? 0 : x - 1;
-				var ux = x + 1 > width - 1 ? width - 1 : x + 1;
-
-				var points = [];
-				var origin = [ 0, 0, data[ ( y * width + x ) * 4 ] / 255 * depth ];
-				points.push( [ - 1, 0, data[ ( y * width + lx ) * 4 ] / 255 * depth ] );
-				points.push( [ - 1, - 1, data[ ( ly * width + lx ) * 4 ] / 255 * depth ] );
-				points.push( [ 0, - 1, data[ ( ly * width + x ) * 4 ] / 255 * depth ] );
-				points.push( [ 1, - 1, data[ ( ly * width + ux ) * 4 ] / 255 * depth ] );
-				points.push( [ 1, 0, data[ ( y * width + ux ) * 4 ] / 255 * depth ] );
-				points.push( [ 1, 1, data[ ( uy * width + ux ) * 4 ] / 255 * depth ] );
-				points.push( [ 0, 1, data[ ( uy * width + x ) * 4 ] / 255 * depth ] );
-				points.push( [ - 1, 1, data[ ( uy * width + lx ) * 4 ] / 255 * depth ] );
-
-				var normals = [];
-				var num_points = points.length;
-
-				for ( var i = 0; i < num_points; i ++ ) {
-
-					var v1 = points[ i ];
-					var v2 = points[ ( i + 1 ) % num_points ];
-					v1 = subtract( v1, origin );
-					v2 = subtract( v2, origin );
-					normals.push( normalize( cross( v1, v2 ) ) );
-
-				}
-
-				var normal = [ 0, 0, 0 ];
-
-				for ( var i = 0; i < normals.length; i ++ ) {
-
-					normal[ 0 ] += normals[ i ][ 0 ];
-					normal[ 1 ] += normals[ i ][ 1 ];
-					normal[ 2 ] += normals[ i ][ 2 ];
-
-				}
-
-				normal[ 0 ] /= normals.length;
-				normal[ 1 ] /= normals.length;
-				normal[ 2 ] /= normals.length;
-
-				var idx = ( y * width + x ) * 4;
-
-				output[ idx ] = ( ( normal[ 0 ] + 1.0 ) / 2.0 * 255 ) | 0;
-				output[ idx + 1 ] = ( ( normal[ 1 ] + 1.0 ) / 2.0 * 255 ) | 0;
-				output[ idx + 2 ] = ( normal[ 2 ] * 255 ) | 0;
-				output[ idx + 3 ] = 255;
-
-			}
-
-		}
-
-		context.putImageData( imageData, 0, 0 );
-
-		return canvas;
-
-	},
-
-	generateDataTexture: function ( width, height, color ) {
-
-		var size = width * height;
-		var data = new Uint8Array( 3 * size );
-
-		var r = Math.floor( color.r * 255 );
-		var g = Math.floor( color.g * 255 );
-		var b = Math.floor( color.b * 255 );
-
-		for ( var i = 0; i < size; i ++ ) {
-
-			data[ i * 3 ] 	   = r;
-			data[ i * 3 + 1 ] = g;
-			data[ i * 3 + 2 ] = b;
-
-		}
-
-		var texture = new THREE.DataTexture( data, width, height, THREE.RGBFormat );
-		texture.needsUpdate = true;
-
-		return texture;
-
 	}
 
 };

+ 15 - 16
build/three.min.js

@@ -320,12 +320,12 @@ THREE.PointLight.prototype=Object.create(THREE.Light.prototype);THREE.PointLight
 THREE.SpotLight=function(a,b,c,d,e,g){THREE.Light.call(this,a);this.type="SpotLight";this.position.set(0,1,0);this.updateMatrix();this.target=new THREE.Object3D;this.intensity=void 0!==b?b:1;this.distance=void 0!==c?c:0;this.angle=void 0!==d?d:Math.PI/3;this.exponent=void 0!==e?e:10;this.decay=void 0!==g?g:1;this.shadow=new THREE.LightShadow(new THREE.PerspectiveCamera(50,1,50,5E3))};THREE.SpotLight.prototype=Object.create(THREE.Light.prototype);THREE.SpotLight.prototype.constructor=THREE.SpotLight;
 THREE.SpotLight.prototype.copy=function(a){THREE.Light.prototype.copy.call(this,a);this.intensity=a.intensity;this.distance=a.distance;this.angle=a.angle;this.exponent=a.exponent;this.decay=a.decay;this.target=a.target.clone();this.shadow=a.shadow.clone();return this};THREE.Cache={enabled:!1,files:{},add:function(a,b){!1!==this.enabled&&(this.files[a]=b)},get:function(a){if(!1!==this.enabled)return this.files[a]},remove:function(a){delete this.files[a]},clear:function(){this.files={}}};
 THREE.Loader=function(){this.onLoadStart=function(){};this.onLoadProgress=function(){};this.onLoadComplete=function(){}};
-THREE.Loader.prototype={constructor:THREE.Loader,crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a,b,c;return function(d,e,g){function f(a,c,d,f,l){a=e+a;var k=THREE.Loader.Handlers.get(a);null!==k?a=k.load(a):(b.setCrossOrigin(g),a=b.load(a));void 0!==c&&(a.repeat.set(c[0],c[1]),1<c[0]&&(a.wrapS=
-THREE.RepeatWrapping),1<c[1]&&(a.wrapT=THREE.RepeatWrapping));void 0!==d&&a.offset.set(d[0],d[1]);void 0!==f&&("repeat"===f[0]&&(a.wrapS=THREE.RepeatWrapping),"mirror"===f[0]&&(a.wrapS=THREE.MirroredRepeatWrapping),"repeat"===f[1]&&(a.wrapT=THREE.RepeatWrapping),"mirror"===f[1]&&(a.wrapT=THREE.MirroredRepeatWrapping));void 0!==l&&(a.anisotropy=l);c=THREE.Math.generateUUID();h[c]=a;return c}void 0===a&&(a=new THREE.Color);void 0===b&&(b=new THREE.TextureLoader);void 0===c&&(c=new THREE.MaterialLoader);
+THREE.Loader.prototype={constructor:THREE.Loader,crossOrigin:void 0,extractUrlBase:function(a){a=a.split("/");if(1===a.length)return"./";a.pop();return a.join("/")+"/"},initMaterials:function(a,b,c){for(var d=[],e=0;e<a.length;++e)d[e]=this.createMaterial(a[e],b,c);return d},createMaterial:function(){var a,b,c;return function(d,e,g){function f(a,c,d,f,l){a=e+a;var k=THREE.Loader.Handlers.get(a);null!==k?a=k.load(a):(b.setCrossOrigin(g),a=b.load(a));void 0!==c&&(a.repeat.fromArray(c),1!==c[0]&&(a.wrapS=
+THREE.RepeatWrapping),1!==c[1]&&(a.wrapT=THREE.RepeatWrapping));void 0!==d&&a.offset.fromArray(d);void 0!==f&&("repeat"===f[0]&&(a.wrapS=THREE.RepeatWrapping),"mirror"===f[0]&&(a.wrapS=THREE.MirroredRepeatWrapping),"repeat"===f[1]&&(a.wrapT=THREE.RepeatWrapping),"mirror"===f[1]&&(a.wrapT=THREE.MirroredRepeatWrapping));void 0!==l&&(a.anisotropy=l);c=THREE.Math.generateUUID();h[c]=a;return c}void 0===a&&(a=new THREE.Color);void 0===b&&(b=new THREE.TextureLoader);void 0===c&&(c=new THREE.MaterialLoader);
 var h={},l={uuid:THREE.Math.generateUUID(),type:"MeshLambertMaterial"},k;for(k in d){var n=d[k];switch(k){case "DbgColor":l.color=n;break;case "DbgIndex":case "opticalDensity":case "illumination":break;case "DbgName":l.name=n;break;case "blending":l.blending=THREE[n];break;case "colorDiffuse":l.color=a.fromArray(n).getHex();break;case "colorSpecular":l.specular=a.fromArray(n).getHex();break;case "colorEmissive":l.emissive=a.fromArray(n).getHex();break;case "specularCoef":l.shininess=n;break;case "shading":"basic"===
-n.toLowerCase()&&(l.type="MeshBasicMaterial");"phong"===n.toLowerCase()&&(l.type="MeshPhongMaterial");break;case "mapDiffuse":l.map=f(n,l.mapDiffuseRepeat,l.mapDiffuseOffset,l.mapDiffuseWrap,l.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;case "mapLight":l.lightMap=f(n,l.mapLightRepeat,l.mapLightOffset,l.mapLightWrap,l.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;
-case "mapAO":l.aoMap=f(n,l.mapAORepeat,l.mapAOOffset,l.mapAOWrap,l.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":l.bumpMap=f(n,l.mapBumpRepeat,l.mapBumpOffset,l.mapBumpWrap,l.mapBumpAnisotropy);break;case "mapBumpScale":l.bumpScale=n;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":l.normalMap=f(n,l.mapNormalRepeat,l.mapNormalOffset,l.mapNormalWrap,l.mapNormalAnisotropy);
-break;case "mapNormalFactor":l.normalScale=[n,n];break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":l.specularMap=f(n,l.mapSpecularRepeat,l.mapSpecularOffset,l.mapSpecularWrap,l.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapAlpha":l.alphaMap=f(n,l.mapAlphaRepeat,l.mapAlphaOffset,l.mapAlphaWrap,l.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;
+n.toLowerCase()&&(l.type="MeshBasicMaterial");"phong"===n.toLowerCase()&&(l.type="MeshPhongMaterial");break;case "mapDiffuse":l.map=f(n,d.mapDiffuseRepeat,d.mapDiffuseOffset,d.mapDiffuseWrap,d.mapDiffuseAnisotropy);break;case "mapDiffuseRepeat":case "mapDiffuseOffset":case "mapDiffuseWrap":case "mapDiffuseAnisotropy":break;case "mapLight":l.lightMap=f(n,d.mapLightRepeat,d.mapLightOffset,d.mapLightWrap,d.mapLightAnisotropy);break;case "mapLightRepeat":case "mapLightOffset":case "mapLightWrap":case "mapLightAnisotropy":break;
+case "mapAO":l.aoMap=f(n,d.mapAORepeat,d.mapAOOffset,d.mapAOWrap,d.mapAOAnisotropy);break;case "mapAORepeat":case "mapAOOffset":case "mapAOWrap":case "mapAOAnisotropy":break;case "mapBump":l.bumpMap=f(n,d.mapBumpRepeat,d.mapBumpOffset,d.mapBumpWrap,d.mapBumpAnisotropy);break;case "mapBumpScale":l.bumpScale=n;break;case "mapBumpRepeat":case "mapBumpOffset":case "mapBumpWrap":case "mapBumpAnisotropy":break;case "mapNormal":l.normalMap=f(n,d.mapNormalRepeat,d.mapNormalOffset,d.mapNormalWrap,d.mapNormalAnisotropy);
+break;case "mapNormalFactor":l.normalScale=[n,n];break;case "mapNormalRepeat":case "mapNormalOffset":case "mapNormalWrap":case "mapNormalAnisotropy":break;case "mapSpecular":l.specularMap=f(n,d.mapSpecularRepeat,d.mapSpecularOffset,d.mapSpecularWrap,d.mapSpecularAnisotropy);break;case "mapSpecularRepeat":case "mapSpecularOffset":case "mapSpecularWrap":case "mapSpecularAnisotropy":break;case "mapAlpha":l.alphaMap=f(n,d.mapAlphaRepeat,d.mapAlphaOffset,d.mapAlphaWrap,d.mapAlphaAnisotropy);break;case "mapAlphaRepeat":case "mapAlphaOffset":case "mapAlphaWrap":case "mapAlphaAnisotropy":break;
 case "flipSided":l.side=THREE.BackSide;break;case "doubleSided":l.side=THREE.DoubleSide;break;case "transparency":console.warn("THREE.Loader: transparency has been renamed to opacity");l.opacity=n;break;case "opacity":case "transparent":case "depthTest":case "depthWrite":case "transparent":case "visible":case "wireframe":l[k]=n;break;case "vertexColors":!0===n&&(l.vertexColors=THREE.VertexColors);"face"===n&&(l.vertexColors=THREE.FaceColors);break;default:console.error("Loader.createMaterial: Unsupported",
 k,n)}}"MeshPhongMaterial"!==l.type&&delete l.specular;1>l.opacity&&(l.transparent=!0);c.setTextures(h);return c.parse(l)}}()};THREE.Loader.Handlers={handlers:[],add:function(a,b){this.handlers.push(a,b)},get:function(a){for(var b=this.handlers,c=0,d=b.length;c<d;c+=2){var e=b[c+1];if(b[c].test(a))return e}return null}};THREE.XHRLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
 THREE.XHRLoader.prototype={constructor:THREE.XHRLoader,load:function(a,b,c,d){var e=this,g=THREE.Cache.get(a);if(void 0!==g)return b&&setTimeout(function(){b(g)},0),g;var f=new XMLHttpRequest;f.open("GET",a,!0);f.addEventListener("load",function(c){c=c.target.response;THREE.Cache.add(a,c);b&&b(c);e.manager.itemEnd(a)},!1);void 0!==c&&f.addEventListener("progress",function(a){c(a)},!1);f.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.crossOrigin&&(f.crossOrigin=
@@ -365,7 +365,8 @@ new THREE.Matrix4;return function(b,c,d){function e(a){void 0===c[a]&&console.wa
 case "AmbientLight":f=new THREE.AmbientLight(b.color);break;case "DirectionalLight":f=new THREE.DirectionalLight(b.color,b.intensity);break;case "PointLight":f=new THREE.PointLight(b.color,b.intensity,b.distance,b.decay);break;case "SpotLight":f=new THREE.SpotLight(b.color,b.intensity,b.distance,b.angle,b.exponent,b.decay);break;case "HemisphereLight":f=new THREE.HemisphereLight(b.color,b.groundColor,b.intensity);break;case "Mesh":f=new THREE.Mesh(e(b.geometry),g(b.material));break;case "LOD":f=new THREE.LOD;
 break;case "Line":f=new THREE.Line(e(b.geometry),g(b.material),b.mode);break;case "PointCloud":case "Points":f=new THREE.Points(e(b.geometry),g(b.material));break;case "Sprite":f=new THREE.Sprite(g(b.material));break;case "Group":f=new THREE.Group;break;default:f=new THREE.Object3D}f.uuid=b.uuid;void 0!==b.name&&(f.name=b.name);void 0!==b.matrix?(a.fromArray(b.matrix),a.decompose(f.position,f.quaternion,f.scale)):(void 0!==b.position&&f.position.fromArray(b.position),void 0!==b.rotation&&f.rotation.fromArray(b.rotation),
 void 0!==b.scale&&f.scale.fromArray(b.scale));void 0!==b.castShadow&&(f.castShadow=b.castShadow);void 0!==b.receiveShadow&&(f.receiveShadow=b.receiveShadow);void 0!==b.visible&&(f.visible=b.visible);void 0!==b.userData&&(f.userData=b.userData);if(void 0!==b.children)for(var h in b.children)f.add(this.parseObject(b.children[h],c,d));if("LOD"===b.type){b=b.levels;for(var l=0;l<b.length;l++){var k=b[l];h=f.getObjectByProperty("uuid",k.object);void 0!==h&&f.addLevel(h,k.distance)}}return f}}()};
-THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b,c,d){var e=new THREE.Texture,g=new THREE.ImageLoader(this.manager);g.setCrossOrigin(this.crossOrigin);g.load(a,function(a){e.image=a;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a}};
+THREE.TextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};THREE.TextureLoader.prototype={constructor:THREE.TextureLoader,load:function(a,b,c,d){var e=new THREE.Texture,g=new THREE.ImageLoader(this.manager);g.setCrossOrigin(this.crossOrigin);g.load(a,function(a){e.image=a;e.needsUpdate=!0;void 0!==b&&b(e)},c,d);return e},setCrossOrigin:function(a){this.crossOrigin=a}};THREE.CubeTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
+THREE.CubeTextureLoader.prototype={constructor:THREE.CubeTextureLoader,load:function(a,b,c,d){function e(c){f.load(a[c],function(a){g.images[c]=a;h++;6===h&&(g.needsUpdate=!0,b&&b(g))},void 0,d)}var g=new THREE.CubeTexture([]),f=new THREE.ImageLoader;f.setCrossOrigin(this.crossOrigin);var h=0;for(c=0;c<a.length;++c)e(c);return g},setCrossOrigin:function(a){this.crossOrigin=a}};
 THREE.DataTextureLoader=THREE.BinaryTextureLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this._parser=null};
 THREE.BinaryTextureLoader.prototype={constructor:THREE.BinaryTextureLoader,load:function(a,b,c,d){var e=this,g=new THREE.DataTexture,f=new THREE.XHRLoader(this.manager);f.setCrossOrigin(this.crossOrigin);f.setResponseType("arraybuffer");f.load(a,function(a){if(a=e._parser(a))void 0!==a.image?g.image=a.image:void 0!==a.data&&(g.image.width=a.width,g.image.height=a.height,g.image.data=a.data),g.wrapS=void 0!==a.wrapS?a.wrapS:THREE.ClampToEdgeWrapping,g.wrapT=void 0!==a.wrapT?a.wrapT:THREE.ClampToEdgeWrapping,
 g.magFilter=void 0!==a.magFilter?a.magFilter:THREE.LinearFilter,g.minFilter=void 0!==a.minFilter?a.minFilter:THREE.LinearMipMapLinearFilter,g.anisotropy=void 0!==a.anisotropy?a.anisotropy:1,void 0!==a.format&&(g.format=a.format),void 0!==a.type&&(g.type=a.type),void 0!==a.mipmaps&&(g.mipmaps=a.mipmaps),1===a.mipmapCount&&(g.minFilter=THREE.LinearFilter),g.needsUpdate=!0,b&&b(g,a)},c,d);return g},setCrossOrigin:function(a){this.crossOrigin=a}};
@@ -540,11 +541,11 @@ d.__webglShader=g.__webglShader,n=ua.acquireProgram(d,k,m),g.program=n,d.program
 m])}d.needsUpdate=!1}m=n=p=!1;g=f.program;q=g.getUniforms();k=f.__webglShader.uniforms;g.id!==za&&(r.useProgram(g.program),za=g.id,m=n=p=!0);d.id!==ta&&(-1===ta&&(m=!0),ta=d.id,n=!0);if(p||a!==sa)r.uniformMatrix4fv(q.projectionMatrix,!1,a.projectionMatrix.elements),ha.logarithmicDepthBuffer&&r.uniform1f(q.logDepthBufFC,2/(Math.log(a.far+1)/Math.LN2)),a!==sa&&(sa=a),(d instanceof THREE.ShaderMaterial||d instanceof THREE.MeshPhongMaterial||d.envMap)&&void 0!==q.cameraPosition&&(W.setFromMatrixPosition(a.matrixWorld),
 r.uniform3f(q.cameraPosition,W.x,W.y,W.z)),(d instanceof THREE.MeshPhongMaterial||d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshBasicMaterial||d instanceof THREE.ShaderMaterial||d.skinning)&&void 0!==q.viewMatrix&&r.uniformMatrix4fv(q.viewMatrix,!1,a.matrixWorldInverse.elements);d.skinning&&(e.bindMatrix&&void 0!==q.bindMatrix&&r.uniformMatrix4fv(q.bindMatrix,!1,e.bindMatrix.elements),e.bindMatrixInverse&&void 0!==q.bindMatrixInverse&&r.uniformMatrix4fv(q.bindMatrixInverse,!1,e.bindMatrixInverse.elements),
 ha.floatVertexTextures&&e.skeleton&&e.skeleton.useVertexTexture?(void 0!==q.boneTexture&&(p=x(),r.uniform1i(q.boneTexture,p),ba.setTexture(e.skeleton.boneTexture,p)),void 0!==q.boneTextureWidth&&r.uniform1i(q.boneTextureWidth,e.skeleton.boneTextureWidth),void 0!==q.boneTextureHeight&&r.uniform1i(q.boneTextureHeight,e.skeleton.boneTextureHeight)):e.skeleton&&e.skeleton.boneMatrices&&void 0!==q.boneGlobalMatrices&&r.uniformMatrix4fv(q.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.lights){if(wa){var m=!0,s,t=p=0,u=0,v,F,C,y=Ba,D=a.matrixWorldInverse,B=y.directional.colors,I=y.directional.positions,L=y.point.colors,K=y.point.positions,H=y.point.distances,P=y.point.decays,G=y.spot.colors,N=y.spot.positions,J=y.spot.distances,Q=y.spot.directions,
-U=y.spot.anglesCos,fa=y.spot.exponents,R=y.spot.decays,aa=y.hemi.skyColors,S=y.hemi.groundColors,T=y.hemi.positions,ka=0,ia=0,V=0,da=0,la=0,Y=0,Z=0,ea=0,ca=s=0;c=C=ca=0;for(n=b.length;c<n;c++)s=b[c],v=s.color,F=s.intensity,C=s.distance,s instanceof THREE.AmbientLight?s.visible&&(p+=v.r,t+=v.g,u+=v.b):s instanceof THREE.DirectionalLight?(la+=1,s.visible&&($.setFromMatrixPosition(s.matrixWorld),W.setFromMatrixPosition(s.target.matrixWorld),$.sub(W),$.transformDirection(D),s=3*ka,I[s+0]=$.x,I[s+1]=$.y,
-I[s+2]=$.z,E(B,s,v,F),ka+=1)):s instanceof THREE.PointLight?(Y+=1,s.visible&&(ca=3*ia,E(L,ca,v,F),W.setFromMatrixPosition(s.matrixWorld),W.applyMatrix4(D),K[ca+0]=W.x,K[ca+1]=W.y,K[ca+2]=W.z,H[ia]=C,P[ia]=0===s.distance?0:s.decay,ia+=1)):s instanceof THREE.SpotLight?(Z+=1,s.visible&&(ca=3*V,E(G,ca,v,F),$.setFromMatrixPosition(s.matrixWorld),W.copy($).applyMatrix4(D),N[ca+0]=W.x,N[ca+1]=W.y,N[ca+2]=W.z,J[V]=C,W.setFromMatrixPosition(s.target.matrixWorld),$.sub(W),$.transformDirection(D),Q[ca+0]=$.x,
-Q[ca+1]=$.y,Q[ca+2]=$.z,U[V]=Math.cos(s.angle),fa[V]=s.exponent,R[V]=0===s.distance?0:s.decay,V+=1)):s instanceof THREE.HemisphereLight&&(ea+=1,s.visible&&($.setFromMatrixPosition(s.matrixWorld),$.transformDirection(D),C=3*da,T[C+0]=$.x,T[C+1]=$.y,T[C+2]=$.z,v=s.color,s=s.groundColor,E(aa,C,v,F),E(S,C,s,F),da+=1));c=3*ka;for(n=Math.max(B.length,3*la);c<n;c++)B[c]=0;c=3*ia;for(n=Math.max(L.length,3*Y);c<n;c++)L[c]=0;c=3*V;for(n=Math.max(G.length,3*Z);c<n;c++)G[c]=0;c=3*da;for(n=Math.max(aa.length,
-3*ea);c<n;c++)aa[c]=0;c=3*da;for(n=Math.max(S.length,3*ea);c<n;c++)S[c]=0;y.directional.length=ka;y.point.length=ia;y.spot.length=V;y.hemi.length=da;y.ambient[0]=p;y.ambient[1]=t;y.ambient[2]=u;wa=!1}m?(m=Ba,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=
+(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.lights){if(wa){var m=!0,s,t=p=0,v=0,u,F,C,y=Ba,D=a.matrixWorldInverse,B=y.directional.colors,I=y.directional.positions,L=y.point.colors,K=y.point.positions,H=y.point.distances,P=y.point.decays,G=y.spot.colors,N=y.spot.positions,J=y.spot.distances,Q=y.spot.directions,
+U=y.spot.anglesCos,fa=y.spot.exponents,R=y.spot.decays,aa=y.hemi.skyColors,S=y.hemi.groundColors,T=y.hemi.positions,ka=0,ia=0,V=0,da=0,la=0,Y=0,Z=0,ea=0,ca=s=0;c=C=ca=0;for(n=b.length;c<n;c++)s=b[c],u=s.color,F=s.intensity,C=s.distance,s instanceof THREE.AmbientLight?s.visible&&(p+=u.r,t+=u.g,v+=u.b):s instanceof THREE.DirectionalLight?(la+=1,s.visible&&($.setFromMatrixPosition(s.matrixWorld),W.setFromMatrixPosition(s.target.matrixWorld),$.sub(W),$.transformDirection(D),s=3*ka,I[s+0]=$.x,I[s+1]=$.y,
+I[s+2]=$.z,E(B,s,u,F),ka+=1)):s instanceof THREE.PointLight?(Y+=1,s.visible&&(ca=3*ia,E(L,ca,u,F),W.setFromMatrixPosition(s.matrixWorld),W.applyMatrix4(D),K[ca+0]=W.x,K[ca+1]=W.y,K[ca+2]=W.z,H[ia]=C,P[ia]=0===s.distance?0:s.decay,ia+=1)):s instanceof THREE.SpotLight?(Z+=1,s.visible&&(ca=3*V,E(G,ca,u,F),$.setFromMatrixPosition(s.matrixWorld),W.copy($).applyMatrix4(D),N[ca+0]=W.x,N[ca+1]=W.y,N[ca+2]=W.z,J[V]=C,W.setFromMatrixPosition(s.target.matrixWorld),$.sub(W),$.transformDirection(D),Q[ca+0]=$.x,
+Q[ca+1]=$.y,Q[ca+2]=$.z,U[V]=Math.cos(s.angle),fa[V]=s.exponent,R[V]=0===s.distance?0:s.decay,V+=1)):s instanceof THREE.HemisphereLight&&(ea+=1,s.visible&&($.setFromMatrixPosition(s.matrixWorld),$.transformDirection(D),C=3*da,T[C+0]=$.x,T[C+1]=$.y,T[C+2]=$.z,u=s.color,s=s.groundColor,E(aa,C,u,F),E(S,C,s,F),da+=1));c=3*ka;for(n=Math.max(B.length,3*la);c<n;c++)B[c]=0;c=3*ia;for(n=Math.max(L.length,3*Y);c<n;c++)L[c]=0;c=3*V;for(n=Math.max(G.length,3*Z);c<n;c++)G[c]=0;c=3*da;for(n=Math.max(aa.length,
+3*ea);c<n;c++)aa[c]=0;c=3*da;for(n=Math.max(S.length,3*ea);c<n;c++)S[c]=0;y.directional.length=ka;y.point.length=ia;y.spot.length=V;y.hemi.length=da;y.ambient[0]=p;y.ambient[1]=t;y.ambient[2]=v;wa=!1}m?(m=Ba,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,w(k,!0)):w(k,!1)}if(d instanceof THREE.MeshBasicMaterial||
 d instanceof THREE.MeshLambertMaterial||d instanceof THREE.MeshPhongMaterial){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=
@@ -688,11 +689,9 @@ B.enable(v.BLEND);v.bindBuffer(v.ARRAY_BUFFER,A);v.vertexAttribPointer(w,2,v.FLO
 (v.uniform1i(p,0),I=N=0);for(var D=0,L=b.length;D<L;D++){var U=b[D];U.modelViewMatrix.multiplyMatrices(Q.matrixWorldInverse,U.matrixWorld);U.z=-U.modelViewMatrix.elements[14]}b.sort(E);for(var P=[],D=0,L=b.length;D<L;D++){var U=b[D],R=U.material;v.uniform1f(u,R.alphaTest);v.uniformMatrix4fv(k,!1,U.modelViewMatrix.elements);U.matrixWorld.decompose(F,C,M);P[0]=M.x;P[1]=M.y;U=0;K.fog&&R.fog&&(U=I);N!==U&&(v.uniform1i(p,U),N=U);null!==R.map?(v.uniform2f(c,R.map.offset.x,R.map.offset.y),v.uniform2f(d,
 R.map.repeat.x,R.map.repeat.y)):(v.uniform2f(c,0,0),v.uniform2f(d,1,1));v.uniform1f(l,R.opacity);v.uniform3f(f,R.color.r,R.color.g,R.color.b);v.uniform1f(e,R.rotation);v.uniform2fv(g,P);B.setBlending(R.blending,R.blendEquation,R.blendSrc,R.blendDst);B.setDepthTest(R.depthTest);B.setDepthWrite(R.depthWrite);R.map&&R.map.image&&R.map.image.width?a.setTexture(R.map,0):a.setTexture(H,0);v.drawElements(v.TRIANGLES,6,v.UNSIGNED_SHORT,0)}B.enable(v.CULL_FACE);a.resetGLState()}}};
 THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.");var d;b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,b=b.geometry);a.merge(b,d,c)},center:function(a){console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.");return a.center()}};
-THREE.ImageUtils={crossOrigin:void 0,loadTexture:function(a,b,c,d){var e=new THREE.TextureLoader;e.setCrossOrigin(this.crossOrigin);d=e.load(a,function(a){c&&c(a)},void 0,d);d.mapping=b;d.sourceFile=a;return d},loadTextureCube:function(a,b,c,d){function e(b){g.load(a[b],function(a){f.images[b]=a;h+=1;6===h&&(f.needsUpdate=!0,c&&c(f))},void 0,d)}var g=new THREE.ImageLoader;g.crossOrigin=this.crossOrigin;var f=new THREE.CubeTexture([],b),h=0;b=0;for(var l=a.length;b<l;++b)e(b);return f},loadCompressedTexture:function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},
-loadCompressedTextureCube:function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},getNormalMap:function(a,b){function c(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);return[a[0]/b,a[1]/b,a[2]/b]}b|=1;var d=a.width,e=a.height,g=document.createElement("canvas");g.width=d;g.height=e;var f=g.getContext("2d");f.drawImage(a,0,0);for(var h=f.getImageData(0,0,d,e).data,l=f.createImageData(d,e),k=l.data,n=0;n<d;n++)for(var p=0;p<e;p++){var m=
-0>p-1?0:p-1,q=p+1>e-1?e-1:p+1,t=0>n-1?0:n-1,s=n+1>d-1?d-1:n+1,u=[],w=[0,0,h[4*(p*d+n)]/255*b];u.push([-1,0,h[4*(p*d+t)]/255*b]);u.push([-1,-1,h[4*(m*d+t)]/255*b]);u.push([0,-1,h[4*(m*d+n)]/255*b]);u.push([1,-1,h[4*(m*d+s)]/255*b]);u.push([1,0,h[4*(p*d+s)]/255*b]);u.push([1,1,h[4*(q*d+s)]/255*b]);u.push([0,1,h[4*(q*d+n)]/255*b]);u.push([-1,1,h[4*(q*d+t)]/255*b]);m=[];t=u.length;for(q=0;q<t;q++){var s=u[q],x=u[(q+1)%t],s=[s[0]-w[0],s[1]-w[1],s[2]-w[2]],x=[x[0]-w[0],x[1]-w[1],x[2]-w[2]];m.push(c([s[1]*
-x[2]-s[2]*x[1],s[2]*x[0]-s[0]*x[2],s[0]*x[1]-s[1]*x[0]]))}u=[0,0,0];for(q=0;q<m.length;q++)u[0]+=m[q][0],u[1]+=m[q][1],u[2]+=m[q][2];u[0]/=m.length;u[1]/=m.length;u[2]/=m.length;w=4*(p*d+n);k[w]=(u[0]+1)/2*255|0;k[w+1]=(u[1]+1)/2*255|0;k[w+2]=255*u[2]|0;k[w+3]=255}f.putImageData(l,0,0);return g},generateDataTexture:function(a,b,c){var d=a*b,e=new Uint8Array(3*d),g=Math.floor(255*c.r),f=Math.floor(255*c.g);c=Math.floor(255*c.b);for(var h=0;h<d;h++)e[3*h]=g,e[3*h+1]=f,e[3*h+2]=c;a=new THREE.DataTexture(e,
-a,b,THREE.RGBFormat);a.needsUpdate=!0;return a}};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.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);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,
+c,void 0,d);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.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.FontUtils={faces:{},face:"helvetiker",weight:"normal",style:"normal",size:150,divisions:10,getFace:function(){try{return this.faces[this.face.toLowerCase()][this.weight][this.style]}catch(a){throw"The font "+this.face+" with "+this.weight+" weight and "+this.style+" style is missing.";}},loadFace:function(a){var b=a.familyName.toLowerCase();this.faces[b]=this.faces[b]||{};this.faces[b][a.cssFontWeight]=this.faces[b][a.cssFontWeight]||{};this.faces[b][a.cssFontWeight][a.cssFontStyle]=a;return this.faces[b][a.cssFontWeight][a.cssFontStyle]=
 a},drawText:function(a){var b=this.getFace(),c=this.size/b.resolution,d=0,e=String(a).split(""),g=e.length,f=[];for(a=0;a<g;a++){var h=new THREE.Path,h=this.extractGlyphPoints(e[a],b,c,d,h),d=d+h.offset;f.push(h.path)}return{paths:f,offset:d/2}},extractGlyphPoints:function(a,b,c,d,e){var g=[],f,h,l,k,n,p,m,q,t,s,u,w=b.glyphs[a]||b.glyphs["?"];if(w){if(w.o)for(b=w._cachedOutline||(w._cachedOutline=w.o.split(" ")),k=b.length,a=0;a<k;)switch(l=b[a++],l){case "m":l=b[a++]*c+d;n=b[a++]*c;e.moveTo(l,n);
 break;case "l":l=b[a++]*c+d;n=b[a++]*c;e.lineTo(l,n);break;case "q":l=b[a++]*c+d;n=b[a++]*c;q=b[a++]*c+d;t=b[a++]*c;e.quadraticCurveTo(q,t,l,n);if(f=g[g.length-1])for(p=f.x,m=f.y,f=1,h=this.divisions;f<=h;f++){var x=f/h;THREE.Shape.Utils.b2(x,p,q,l);THREE.Shape.Utils.b2(x,m,t,n)}break;case "b":if(l=b[a++]*c+d,n=b[a++]*c,q=b[a++]*c+d,t=b[a++]*c,s=b[a++]*c+d,u=b[a++]*c,e.bezierCurveTo(q,t,s,u,l,n),f=g[g.length-1])for(p=f.x,m=f.y,f=1,h=this.divisions;f<=h;f++)x=f/h,THREE.Shape.Utils.b3(x,p,q,s,l),THREE.Shape.Utils.b3(x,