Browse Source

Updated builds.

Mr.doob 9 years ago
parent
commit
9d6fe41be9
2 changed files with 21 additions and 21 deletions
  1. 7 7
      build/three.js
  2. 14 14
      build/three.min.js

+ 7 - 7
build/three.js

@@ -18414,7 +18414,7 @@ Object.assign( THREE.ImageLoader.prototype, {
 
 	load: function ( url, onLoad, onProgress, onError ) {
 
-		var image = document.createElement( 'img' );
+		var image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );
 		image.onload = function () {
 
 			URL.revokeObjectURL( image.src );
@@ -21921,7 +21921,7 @@ THREE.Texture.prototype = {
 
 			} else {
 
-				canvas = document.createElement( 'canvas' );
+				canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 				canvas.width = image.width;
 				canvas.height = image.height;
 
@@ -24669,7 +24669,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	parameters = parameters || {};
 
-	var _canvas = parameters.canvas !== undefined ? parameters.canvas : document.createElement( 'canvas' ),
+	var _canvas = parameters.canvas !== undefined ? parameters.canvas : document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' ),
 	_context = parameters.context !== undefined ? parameters.context : null,
 
 	_alpha = parameters.alpha !== undefined ? parameters.alpha : false,
@@ -30776,7 +30776,7 @@ THREE.WebGLTextures = function ( _gl, extensions, state, properties, capabilitie
 
 			var scale = maxSize / Math.max( image.width, image.height );
 
-			var canvas = document.createElement( 'canvas' );
+			var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 			canvas.width = Math.floor( image.width * scale );
 			canvas.height = Math.floor( image.height * scale );
 
@@ -30803,7 +30803,7 @@ THREE.WebGLTextures = function ( _gl, extensions, state, properties, capabilitie
 
 		if ( image instanceof HTMLImageElement || image instanceof HTMLCanvasElement ) {
 
-			var canvas = document.createElement( 'canvas' );
+			var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 			canvas.width = THREE.Math.nearestPowerOfTwo( image.width );
 			canvas.height = THREE.Math.nearestPowerOfTwo( image.height );
 
@@ -32561,7 +32561,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 			alphaTest:			gl.getUniformLocation( program, 'alphaTest' )
 		};
 
-		var canvas = document.createElement( 'canvas' );
+		var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 		canvas.width = 8;
 		canvas.height = 8;
 
@@ -33631,7 +33631,7 @@ THREE.CanvasRenderer = function () {
 
 	console.error( 'THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js' );
 
-	this.domElement = document.createElement( 'canvas' );
+	this.domElement = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 	this.clear = function () {};
 	this.render = function () {};
 	this.setClearColor = function () {};

+ 14 - 14
build/three.min.js

@@ -384,7 +384,7 @@ Object.assign(THREE.XHRLoader.prototype,{load:function(a,b,c,d){void 0!==this.pa
 (d&&d(c),e.manager.itemError(a))},!1);void 0!==c&&g.addEventListener("progress",function(a){c(a)},!1);g.addEventListener("error",function(b){d&&d(b);e.manager.itemError(a)},!1);void 0!==this.responseType&&(g.responseType=this.responseType);void 0!==this.withCredentials&&(g.withCredentials=this.withCredentials);g.send(null);e.manager.itemStart(a);return g},setPath:function(a){this.path=a},setResponseType:function(a){this.responseType=a},setWithCredentials:function(a){this.withCredentials=a}});
 THREE.FontLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};Object.assign(THREE.FontLoader.prototype,{load:function(a,b,c,d){var e=this;(new THREE.XHRLoader(this.manager)).load(a,function(a){var c;try{c=JSON.parse(a)}catch(d){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),c=JSON.parse(a.substring(65,a.length-2))}a=e.parse(c);b&&b(a)},c,d)},parse:function(a){return new THREE.Font(a)}});
 THREE.ImageLoader=function(a){this.manager=void 0!==a?a:THREE.DefaultLoadingManager};
-Object.assign(THREE.ImageLoader.prototype,{load:function(a,b,c,d){var e=document.createElement("img");e.onload=function(){URL.revokeObjectURL(e.src);b&&b(e)};if(0===a.indexOf("data:"))e.src=a;else{var f=new THREE.XHRLoader(this.manager);f.setPath(this.path);f.setResponseType("blob");f.load(a,function(a){e.src=URL.createObjectURL(a)},c,d)}return e},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}});
+Object.assign(THREE.ImageLoader.prototype,{load:function(a,b,c,d){var e=document.createElementNS("http://www.w3.org/1999/xhtml","img");e.onload=function(){URL.revokeObjectURL(e.src);b&&b(e)};if(0===a.indexOf("data:"))e.src=a;else{var f=new THREE.XHRLoader(this.manager);f.setPath(this.path);f.setResponseType("blob");f.load(a,function(a){e.src=URL.createObjectURL(a)},c,d)}return e},setCrossOrigin:function(a){this.crossOrigin=a},setPath:function(a){this.path=a}});
 THREE.JSONLoader=function(a){"boolean"===typeof a&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),a=void 0);this.manager=void 0!==a?a:THREE.DefaultLoadingManager;this.withCredentials=!1};
 Object.assign(THREE.JSONLoader.prototype,{load:function(a,b,c,d){var e=this,f=this.texturePath&&"string"===typeof this.texturePath?this.texturePath:THREE.Loader.prototype.extractUrlBase(a),g=new THREE.XHRLoader(this.manager);g.setWithCredentials(this.withCredentials);g.load(a,function(c){c=JSON.parse(c);var d=c.metadata;if(void 0!==d&&(d=d.type,void 0!==d)){if("object"===d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.ObjectLoader instead.");return}if("scene"===
 d.toLowerCase()){console.error("THREE.JSONLoader: "+a+" should be loaded with THREE.SceneLoader instead.");return}}c=e.parse(c,f);b(c.geometry,c.materials)},c,d)},setTexturePath:function(a){this.texturePath=a},parse:function(a,b){var c=new THREE.Geometry,d=void 0!==a.scale?1/a.scale:1;(function(b){var d,g,h,k,l,n,p,m,q,r,s,t,u,v=a.faces;n=a.vertices;var A=a.normals,w=a.colors,E=0;if(void 0!==a.uvs){for(d=0;d<a.uvs.length;d++)a.uvs[d].length&&E++;for(d=0;d<E;d++)c.faceVertexUvs[d]=[]}k=0;for(l=n.length;k<
@@ -478,7 +478,7 @@ THREE.Texture=function(a,b,c,d,e,f,g,h,k,l){Object.defineProperty(this,"id",{val
 this.anisotropy=void 0!==k?k:1;this.format=void 0!==g?g:THREE.RGBAFormat;this.type=void 0!==h?h:THREE.UnsignedByteType;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.generateMipmaps=!0;this.premultiplyAlpha=!1;this.flipY=!0;this.unpackAlignment=4;this.encoding=void 0!==l?l:THREE.LinearEncoding;this.version=0;this.onUpdate=null};THREE.Texture.DEFAULT_IMAGE=void 0;THREE.Texture.DEFAULT_MAPPING=THREE.UVMapping;
 THREE.Texture.prototype={constructor:THREE.Texture,set needsUpdate(a){!0===a&&this.version++},clone:function(){return(new this.constructor).copy(this)},copy:function(a){this.image=a.image;this.mipmaps=a.mipmaps.slice(0);this.mapping=a.mapping;this.wrapS=a.wrapS;this.wrapT=a.wrapT;this.magFilter=a.magFilter;this.minFilter=a.minFilter;this.anisotropy=a.anisotropy;this.format=a.format;this.type=a.type;this.offset.copy(a.offset);this.repeat.copy(a.repeat);this.generateMipmaps=a.generateMipmaps;this.premultiplyAlpha=
 a.premultiplyAlpha;this.flipY=a.flipY;this.unpackAlignment=a.unpackAlignment;this.encoding=a.encoding;return this},toJSON:function(a){if(void 0!==a.textures[this.uuid])return a.textures[this.uuid];var b={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy};
-if(void 0!==this.image){var c=this.image;void 0===c.uuid&&(c.uuid=THREE.Math.generateUUID());if(void 0===a.images[c.uuid]){var d=a.images,e=c.uuid,f=c.uuid,g;void 0!==c.toDataURL?g=c:(g=document.createElement("canvas"),g.width=c.width,g.height=c.height,g.getContext("2d").drawImage(c,0,0,c.width,c.height));g=2048<g.width||2048<g.height?g.toDataURL("image/jpeg",.6):g.toDataURL("image/png");d[e]={uuid:f,url:g}}b.image=c.uuid}return a.textures[this.uuid]=b},dispose:function(){this.dispatchEvent({type:"dispose"})},
+if(void 0!==this.image){var c=this.image;void 0===c.uuid&&(c.uuid=THREE.Math.generateUUID());if(void 0===a.images[c.uuid]){var d=a.images,e=c.uuid,f=c.uuid,g;void 0!==c.toDataURL?g=c:(g=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),g.width=c.width,g.height=c.height,g.getContext("2d").drawImage(c,0,0,c.width,c.height));g=2048<g.width||2048<g.height?g.toDataURL("image/jpeg",.6):g.toDataURL("image/png");d[e]={uuid:f,url:g}}b.image=c.uuid}return a.textures[this.uuid]=b},dispose:function(){this.dispatchEvent({type:"dispose"})},
 transformUv:function(a){if(this.mapping===THREE.UVMapping){a.multiply(this.repeat);a.add(this.offset);if(0>a.x||1<a.x)switch(this.wrapS){case THREE.RepeatWrapping:a.x-=Math.floor(a.x);break;case THREE.ClampToEdgeWrapping:a.x=0>a.x?0:1;break;case THREE.MirroredRepeatWrapping:1===Math.abs(Math.floor(a.x)%2)?a.x=Math.ceil(a.x)-a.x:a.x-=Math.floor(a.x)}if(0>a.y||1<a.y)switch(this.wrapT){case THREE.RepeatWrapping:a.y-=Math.floor(a.y);break;case THREE.ClampToEdgeWrapping:a.y=0>a.y?0:1;break;case THREE.MirroredRepeatWrapping:1===
 Math.abs(Math.floor(a.y)%2)?a.y=Math.ceil(a.y)-a.y:a.y-=Math.floor(a.y)}this.flipY&&(a.y=1-a.y)}}};Object.assign(THREE.Texture.prototype,THREE.EventDispatcher.prototype);THREE.TextureIdCount=0;
 THREE.DepthTexture=function(a,b,c,d,e,f,g,h,k){THREE.Texture.call(this,null,d,e,f,g,h,THREE.DepthFormat,c,k);this.image={width:a,height:b};this.type=void 0!==c?c:THREE.UnsignedShortType;this.magFilter=void 0!==g?g:THREE.NearestFilter;this.minFilter=void 0!==h?h:THREE.NearestFilter;this.generateMipmaps=this.flipY=!1};THREE.DepthTexture.prototype=Object.create(THREE.Texture.prototype);THREE.DepthTexture.prototype.constructor=THREE.DepthTexture;
@@ -616,10 +616,10 @@ if(a===THREE.UnsignedShortType)return x.UNSIGNED_SHORT;if(a===THREE.IntType)retu
 THREE.DepthFormat)return x.DEPTH_COMPONENT;if(a===THREE.AddEquation)return x.FUNC_ADD;if(a===THREE.SubtractEquation)return x.FUNC_SUBTRACT;if(a===THREE.ReverseSubtractEquation)return x.FUNC_REVERSE_SUBTRACT;if(a===THREE.ZeroFactor)return x.ZERO;if(a===THREE.OneFactor)return x.ONE;if(a===THREE.SrcColorFactor)return x.SRC_COLOR;if(a===THREE.OneMinusSrcColorFactor)return x.ONE_MINUS_SRC_COLOR;if(a===THREE.SrcAlphaFactor)return x.SRC_ALPHA;if(a===THREE.OneMinusSrcAlphaFactor)return x.ONE_MINUS_SRC_ALPHA;
 if(a===THREE.DstAlphaFactor)return x.DST_ALPHA;if(a===THREE.OneMinusDstAlphaFactor)return x.ONE_MINUS_DST_ALPHA;if(a===THREE.DstColorFactor)return x.DST_COLOR;if(a===THREE.OneMinusDstColorFactor)return x.ONE_MINUS_DST_COLOR;if(a===THREE.SrcAlphaSaturateFactor)return x.SRC_ALPHA_SATURATE;b=U.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=U.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=U.get("WEBGL_compressed_texture_etc1");if(null!==b&&a===
-THREE.RGB_ETC1_Format)return b.COMPRESSED_RGB_ETC1_WEBGL;b=U.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 v=void 0!==a.canvas?a.canvas:document.createElement("canvas"),A=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,E=void 0!==a.depth?a.depth:!0,z=void 0!==a.stencil?a.stencil:!0,y=void 0!==a.antialias?a.antialias:!1,C=void 0!==a.premultipliedAlpha?
-a.premultipliedAlpha:!0,I=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,B=[],F=[],K=-1,P=[],M=-1,H=new Float32Array(8),L=[],N=[];this.domElement=v;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMapping=THREE.LinearToneMapping;this.toneMappingWhitePoint=this.toneMappingExposure=
-1;this.maxMorphTargets=8;this.maxMorphNormals=4;var O=this,Q=null,J=null,D=null,G=-1,aa="",T=null,W=new THREE.Vector4,ha=null,ba=new THREE.Vector4,ga=0,X=new THREE.Color(0),Y=0,oa=v.width,pa=v.height,$=1,ra=new THREE.Vector4(0,0,oa,pa),ua=!1,ja=new THREE.Vector4(0,0,oa,pa),ta=new THREE.Frustum,ca=new THREE.WebGLClipping,na=!1,sa=!1,fa=new THREE.Sphere,ma=new THREE.Matrix4,V=new THREE.Vector3,S={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],
-spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},ea={calls:0,vertices:0,faces:0,points:0};this.info={render:ea,memory:{geometries:0,textures:0},programs:null};var x;try{w={alpha:w,depth:E,stencil:z,antialias:y,premultipliedAlpha:C,preserveDrawingBuffer:I};x=A||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===x){if(null!==v.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";
+THREE.RGB_ETC1_Format)return b.COMPRESSED_RGB_ETC1_WEBGL;b=U.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 v=void 0!==a.canvas?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),A=void 0!==a.context?a.context:null,w=void 0!==a.alpha?a.alpha:!1,E=void 0!==a.depth?a.depth:!0,z=void 0!==a.stencil?a.stencil:!0,y=void 0!==a.antialias?
+a.antialias:!1,C=void 0!==a.premultipliedAlpha?a.premultipliedAlpha:!0,I=void 0!==a.preserveDrawingBuffer?a.preserveDrawingBuffer:!1,B=[],F=[],K=-1,P=[],M=-1,H=new Float32Array(8),L=[],N=[];this.domElement=v;this.context=null;this.sortObjects=this.autoClearStencil=this.autoClearDepth=this.autoClearColor=this.autoClear=!0;this.clippingPlanes=[];this.localClippingEnabled=!1;this.gammaFactor=2;this.physicallyCorrectLights=this.gammaOutput=this.gammaInput=!1;this.toneMapping=THREE.LinearToneMapping;this.toneMappingWhitePoint=
+this.toneMappingExposure=1;this.maxMorphTargets=8;this.maxMorphNormals=4;var O=this,Q=null,J=null,D=null,G=-1,aa="",T=null,W=new THREE.Vector4,ha=null,ba=new THREE.Vector4,ga=0,X=new THREE.Color(0),Y=0,oa=v.width,pa=v.height,$=1,ra=new THREE.Vector4(0,0,oa,pa),ua=!1,ja=new THREE.Vector4(0,0,oa,pa),ta=new THREE.Frustum,ca=new THREE.WebGLClipping,na=!1,sa=!1,fa=new THREE.Sphere,ma=new THREE.Matrix4,V=new THREE.Vector3,S={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],
+spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],shadows:[]},ea={calls:0,vertices:0,faces:0,points:0};this.info={render:ea,memory:{geometries:0,textures:0},programs:null};var x;try{w={alpha:w,depth:E,stencil:z,antialias:y,premultipliedAlpha:C,preserveDrawingBuffer:I};x=A||v.getContext("webgl",w)||v.getContext("experimental-webgl",w);if(null===x){if(null!==v.getContext("webgl"))throw"Error creating WebGL context with your selected attributes.";throw"Error creating WebGL context.";
 }void 0===x.getShaderPrecisionFormat&&(x.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}});v.addEventListener("webglcontextlost",e,!1)}catch(wa){console.error("THREE.WebGLRenderer: "+wa)}var U=new THREE.WebGLExtensions(x);U.get("WEBGL_depth_texture");U.get("OES_texture_float");U.get("OES_texture_float_linear");U.get("OES_texture_half_float");U.get("OES_texture_half_float_linear");U.get("OES_standard_derivatives");U.get("ANGLE_instanced_arrays");U.get("OES_element_index_uint")&&
 (THREE.BufferGeometry.MaxIndex=4294967296);var da=new THREE.WebGLCapabilities(x,U,a),R=new THREE.WebGLState(x,U,u),Z=new THREE.WebGLProperties,ia=new THREE.WebGLTextures(x,U,R,Z,da,u,this.info),la=new THREE.WebGLObjects(x,Z,this.info),ka=new THREE.WebGLPrograms(this,da),qa=new THREE.WebGLLights;this.info.programs=ka.programs;var xa=new THREE.WebGLBufferRenderer(x,U,ea),ya=new THREE.WebGLIndexedBufferRenderer(x,U,ea);c();this.context=x;this.capabilities=da;this.extensions=U;this.properties=Z;this.state=
 R;var va=new THREE.WebGLShadowMap(this,S,la);this.shadowMap=va;var za=new THREE.SpritePlugin(this,L),Aa=new THREE.LensFlarePlugin(this,N);this.getContext=function(){return x};this.getContextAttributes=function(){return x.getContextAttributes()};this.forceContextLoss=function(){U.get("WEBGL_lose_context").loseContext()};this.getMaxAnisotropy=function(){return da.getMaxAnisotropy()};this.getPrecision=function(){return da.precision};this.getPixelRatio=function(){return $};this.setPixelRatio=function(a){void 0!==
@@ -727,12 +727,12 @@ THREE.WebGLDepthBuffer=function(a,b){var c=!1,d=null,e=null,f=null;this.setTest=
 break;case THREE.GreaterDepth:a.depthFunc(a.GREATER);break;case THREE.NotEqualDepth:a.depthFunc(a.NOTEQUAL);break;default:a.depthFunc(a.LEQUAL)}else a.depthFunc(a.LEQUAL);e=b}};this.setLocked=function(a){c=a};this.setClear=function(b){f!==b&&(a.clearDepth(b),f=b)};this.reset=function(){c=!1;f=e=d=null}};
 THREE.WebGLStencilBuffer=function(a,b){var c=!1,d=null,e=null,f=null,g=null,h=null,k=null,l=null,n=null;this.setTest=function(c){c?b.enable(a.STENCIL_TEST):b.disable(a.STENCIL_TEST)};this.setMask=function(b){d===b||c||(a.stencilMask(b),d=b)};this.setFunc=function(b,c,d){if(e!==b||f!==c||g!==d)a.stencilFunc(b,c,d),e=b,f=c,g=d};this.setOp=function(b,c,d){if(h!==b||k!==c||l!==d)a.stencilOp(b,c,d),h=b,k=c,l=d};this.setLocked=function(a){c=a};this.setClear=function(b){n!==b&&(a.clearStencil(b),n=b)};this.reset=
 function(){c=!1;n=l=k=h=g=f=e=d=null}};
-THREE.WebGLTextures=function(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.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 k(a){return THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height)}
+THREE.WebGLTextures=function(a,b,c,d,e,f,g){function h(a,b){if(a.width>b||a.height>b){var c=b/Math.max(a.width,a.height),d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=Math.floor(a.width*c);d.height=Math.floor(a.height*c);d.getContext("2d").drawImage(a,0,0,a.width,a.height,0,0,d.width,d.height);console.warn("THREE.WebGLRenderer: image is too big ("+a.width+"x"+a.height+"). Resized to "+d.width+"x"+d.height,a);return d}return a}function k(a){return THREE.Math.isPowerOfTwo(a.width)&&THREE.Math.isPowerOfTwo(a.height)}
 function l(b){return b===THREE.NearestFilter||b===THREE.NearestMipMapNearestFilter||b===THREE.NearestMipMapLinearFilter?a.NEAREST:a.LINEAR}function n(b){b=b.target;b.removeEventListener("dispose",n);a:{var c=d.get(b);if(b.image&&c.__image__webglTextureCube)a.deleteTexture(c.__image__webglTextureCube);else{if(void 0===c.__webglInit)break a;a.deleteTexture(c.__webglTexture)}d.delete(b)}t.textures--}function p(b){b=b.target;b.removeEventListener("dispose",p);var c=d.get(b),e=d.get(b.texture);if(b){void 0!==
 e.__webglTexture&&a.deleteTexture(e.__webglTexture);b.depthTexture&&b.depthTexture.dispose();if(b instanceof THREE.WebGLRenderTargetCube)for(e=0;6>e;e++)a.deleteFramebuffer(c.__webglFramebuffer[e]),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer[e]);else a.deleteFramebuffer(c.__webglFramebuffer),c.__webglDepthbuffer&&a.deleteRenderbuffer(c.__webglDepthbuffer);d.delete(b.texture);d.delete(b)}t.textures--}function m(b,g){var m=d.get(b);if(0<b.version&&m.__version!==b.version){var l=
 b.image;if(void 0===l)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",b);else if(!1===l.complete)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",b);else{void 0===m.__webglInit&&(m.__webglInit=!0,b.addEventListener("dispose",n),m.__webglTexture=a.createTexture(),t.textures++);c.activeTexture(a.TEXTURE0+g);c.bindTexture(a.TEXTURE_2D,m.__webglTexture);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.flipY);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
-b.premultiplyAlpha);a.pixelStorei(a.UNPACK_ALIGNMENT,b.unpackAlignment);var p=h(b.image,e.maxTextureSize);if((b.wrapS!==THREE.ClampToEdgeWrapping||b.wrapT!==THREE.ClampToEdgeWrapping||b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter)&&!1===k(p))if(l=p,l instanceof HTMLImageElement||l instanceof HTMLCanvasElement){var r=document.createElement("canvas");r.width=THREE.Math.nearestPowerOfTwo(l.width);r.height=THREE.Math.nearestPowerOfTwo(l.height);r.getContext("2d").drawImage(l,0,0,
-r.width,r.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+l.width+"x"+l.height+"). Resized to "+r.width+"x"+r.height,l);p=r}else p=l;var l=k(p),r=f(b.format),s=f(b.type);q(a.TEXTURE_2D,b,l);var I=b.mipmaps;if(b instanceof THREE.DepthTexture){I=a.DEPTH_COMPONENT;if(b.type===THREE.FloatType){if(!u)throw Error("Float Depth Texture only supported in WebGL2.0");I=a.DEPTH_COMPONENT32F}else u&&(I=a.DEPTH_COMPONENT16);c.texImage2D(a.TEXTURE_2D,0,I,p.width,p.height,0,r,s,null)}else if(b instanceof
+b.premultiplyAlpha);a.pixelStorei(a.UNPACK_ALIGNMENT,b.unpackAlignment);var p=h(b.image,e.maxTextureSize);if((b.wrapS!==THREE.ClampToEdgeWrapping||b.wrapT!==THREE.ClampToEdgeWrapping||b.minFilter!==THREE.NearestFilter&&b.minFilter!==THREE.LinearFilter)&&!1===k(p))if(l=p,l instanceof HTMLImageElement||l instanceof HTMLCanvasElement){var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=THREE.Math.nearestPowerOfTwo(l.width);r.height=THREE.Math.nearestPowerOfTwo(l.height);r.getContext("2d").drawImage(l,
+0,0,r.width,r.height);console.warn("THREE.WebGLRenderer: image is not power of two ("+l.width+"x"+l.height+"). Resized to "+r.width+"x"+r.height,l);p=r}else p=l;var l=k(p),r=f(b.format),s=f(b.type);q(a.TEXTURE_2D,b,l);var I=b.mipmaps;if(b instanceof THREE.DepthTexture){I=a.DEPTH_COMPONENT;if(b.type===THREE.FloatType){if(!u)throw Error("Float Depth Texture only supported in WebGL2.0");I=a.DEPTH_COMPONENT32F}else u&&(I=a.DEPTH_COMPONENT16);c.texImage2D(a.TEXTURE_2D,0,I,p.width,p.height,0,r,s,null)}else if(b instanceof
 THREE.DataTexture)if(0<I.length&&l){for(var B=0,F=I.length;B<F;B++)p=I[B],c.texImage2D(a.TEXTURE_2D,B,r,p.width,p.height,0,r,s,p.data);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,r,p.width,p.height,0,r,s,p.data);else if(b instanceof THREE.CompressedTexture)for(B=0,F=I.length;B<F;B++)p=I[B],b.format!==THREE.RGBAFormat&&b.format!==THREE.RGBFormat?-1<c.getCompressedTextureFormats().indexOf(r)?c.compressedTexImage2D(a.TEXTURE_2D,B,r,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):
 c.texImage2D(a.TEXTURE_2D,B,r,p.width,p.height,0,r,s,p.data);else if(0<I.length&&l){B=0;for(F=I.length;B<F;B++)p=I[B],c.texImage2D(a.TEXTURE_2D,B,r,r,s,p);b.generateMipmaps=!1}else c.texImage2D(a.TEXTURE_2D,0,r,r,s,p);b.generateMipmaps&&l&&a.generateMipmap(a.TEXTURE_2D);m.__version=b.version;if(b.onUpdate)b.onUpdate(b);return}}c.activeTexture(a.TEXTURE0+g);c.bindTexture(a.TEXTURE_2D,m.__webglTexture)}function q(c,g,h){h?(a.texParameteri(c,a.TEXTURE_WRAP_S,f(g.wrapS)),a.texParameteri(c,a.TEXTURE_WRAP_T,
 f(g.wrapT)),a.texParameteri(c,a.TEXTURE_MAG_FILTER,f(g.magFilter)),a.texParameteri(c,a.TEXTURE_MIN_FILTER,f(g.minFilter))):(a.texParameteri(c,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(c,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),g.wrapS===THREE.ClampToEdgeWrapping&&g.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",g),a.texParameteri(c,a.TEXTURE_MAG_FILTER,l(g.magFilter)),
@@ -769,10 +769,10 @@ THREE.SpritePlugin=function(a,b){var c,d,e,f,g,h,k,l,n,p,m,q,r,s,t,u,v;function
 z);w.bufferData(w.ARRAY_BUFFER,H,w.STATIC_DRAW);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,y);w.bufferData(w.ELEMENT_ARRAY_BUFFER,L,w.STATIC_DRAW);var H=w.createProgram(),L=w.createShader(w.VERTEX_SHADER),N=w.createShader(w.FRAGMENT_SHADER);w.shaderSource(L,["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"));
 w.shaderSource(N,["precision "+a.getPrecision()+" float;","uniform vec3 color;\nuniform sampler2D map;\nuniform float opacity;\nuniform int fogType;\nuniform vec3 fogColor;\nuniform float fogDensity;\nuniform float fogNear;\nuniform float fogFar;\nuniform float alphaTest;\nvarying vec2 vUV;\nvoid main() {\nvec4 texture = texture2D( map, vUV );\nif ( texture.a < alphaTest ) discard;\ngl_FragColor = vec4( color * texture.xyz, texture.a * opacity );\nif ( fogType > 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"].join("\n"));
 w.compileShader(L);w.compileShader(N);w.attachShader(H,L);w.attachShader(H,N);w.linkProgram(H);C=H;u=w.getAttribLocation(C,"position");v=w.getAttribLocation(C,"uv");c=w.getUniformLocation(C,"uvOffset");d=w.getUniformLocation(C,"uvScale");e=w.getUniformLocation(C,"rotation");f=w.getUniformLocation(C,"scale");g=w.getUniformLocation(C,"color");h=w.getUniformLocation(C,"map");k=w.getUniformLocation(C,"opacity");l=w.getUniformLocation(C,"modelViewMatrix");n=w.getUniformLocation(C,"projectionMatrix");p=
-w.getUniformLocation(C,"fogType");m=w.getUniformLocation(C,"fogDensity");q=w.getUniformLocation(C,"fogNear");r=w.getUniformLocation(C,"fogFar");s=w.getUniformLocation(C,"fogColor");t=w.getUniformLocation(C,"alphaTest");H=document.createElement("canvas");H.width=8;H.height=8;L=H.getContext("2d");L.fillStyle="white";L.fillRect(0,0,8,8);I=new THREE.Texture(H);I.needsUpdate=!0}w.useProgram(C);E.initAttributes();E.enableAttribute(u);E.enableAttribute(v);E.disableUnusedAttributes();E.disable(w.CULL_FACE);
-E.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,z);w.vertexAttribPointer(u,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(v,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,y);w.uniformMatrix4fv(n,!1,M.projectionMatrix.elements);E.activeTexture(w.TEXTURE0);w.uniform1i(h,0);L=H=0;(N=P.fog)?(w.uniform3f(s,N.color.r,N.color.g,N.color.b),N instanceof THREE.Fog?(w.uniform1f(q,N.near),w.uniform1f(r,N.far),w.uniform1i(p,1),L=H=1):N instanceof THREE.FogExp2&&(w.uniform1f(m,N.density),w.uniform1i(p,2),L=H=2)):
-(w.uniform1i(p,0),L=H=0);for(var N=0,O=b.length;N<O;N++){var Q=b[N];Q.modelViewMatrix.multiplyMatrices(M.matrixWorldInverse,Q.matrixWorld);Q.z=-Q.modelViewMatrix.elements[14]}b.sort(A);for(var J=[],N=0,O=b.length;N<O;N++){var Q=b[N],D=Q.material;w.uniform1f(t,D.alphaTest);w.uniformMatrix4fv(l,!1,Q.modelViewMatrix.elements);Q.matrixWorld.decompose(B,F,K);J[0]=K.x;J[1]=K.y;Q=0;P.fog&&D.fog&&(Q=L);H!==Q&&(w.uniform1i(p,Q),H=Q);null!==D.map?(w.uniform2f(c,D.map.offset.x,D.map.offset.y),w.uniform2f(d,
-D.map.repeat.x,D.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,D.opacity);w.uniform3f(g,D.color.r,D.color.g,D.color.b);w.uniform1f(e,D.rotation);w.uniform2fv(f,J);E.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst);E.setDepthTest(D.depthTest);E.setDepthWrite(D.depthWrite);D.map?a.setTexture2D(D.map,0):a.setTexture2D(I,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}E.enable(w.CULL_FACE);a.resetGLState()}}};
+w.getUniformLocation(C,"fogType");m=w.getUniformLocation(C,"fogDensity");q=w.getUniformLocation(C,"fogNear");r=w.getUniformLocation(C,"fogFar");s=w.getUniformLocation(C,"fogColor");t=w.getUniformLocation(C,"alphaTest");H=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");H.width=8;H.height=8;L=H.getContext("2d");L.fillStyle="white";L.fillRect(0,0,8,8);I=new THREE.Texture(H);I.needsUpdate=!0}w.useProgram(C);E.initAttributes();E.enableAttribute(u);E.enableAttribute(v);E.disableUnusedAttributes();
+E.disable(w.CULL_FACE);E.enable(w.BLEND);w.bindBuffer(w.ARRAY_BUFFER,z);w.vertexAttribPointer(u,2,w.FLOAT,!1,16,0);w.vertexAttribPointer(v,2,w.FLOAT,!1,16,8);w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,y);w.uniformMatrix4fv(n,!1,M.projectionMatrix.elements);E.activeTexture(w.TEXTURE0);w.uniform1i(h,0);L=H=0;(N=P.fog)?(w.uniform3f(s,N.color.r,N.color.g,N.color.b),N instanceof THREE.Fog?(w.uniform1f(q,N.near),w.uniform1f(r,N.far),w.uniform1i(p,1),L=H=1):N instanceof THREE.FogExp2&&(w.uniform1f(m,N.density),
+w.uniform1i(p,2),L=H=2)):(w.uniform1i(p,0),L=H=0);for(var N=0,O=b.length;N<O;N++){var Q=b[N];Q.modelViewMatrix.multiplyMatrices(M.matrixWorldInverse,Q.matrixWorld);Q.z=-Q.modelViewMatrix.elements[14]}b.sort(A);for(var J=[],N=0,O=b.length;N<O;N++){var Q=b[N],D=Q.material;w.uniform1f(t,D.alphaTest);w.uniformMatrix4fv(l,!1,Q.modelViewMatrix.elements);Q.matrixWorld.decompose(B,F,K);J[0]=K.x;J[1]=K.y;Q=0;P.fog&&D.fog&&(Q=L);H!==Q&&(w.uniform1i(p,Q),H=Q);null!==D.map?(w.uniform2f(c,D.map.offset.x,D.map.offset.y),
+w.uniform2f(d,D.map.repeat.x,D.map.repeat.y)):(w.uniform2f(c,0,0),w.uniform2f(d,1,1));w.uniform1f(k,D.opacity);w.uniform3f(g,D.color.r,D.color.g,D.color.b);w.uniform1f(e,D.rotation);w.uniform2fv(f,J);E.setBlending(D.blending,D.blendEquation,D.blendSrc,D.blendDst);E.setDepthTest(D.depthTest);E.setDepthWrite(D.depthWrite);D.map?a.setTexture2D(D.map,0):a.setTexture2D(I,0);w.drawElements(w.TRIANGLES,6,w.UNSIGNED_SHORT,0)}E.enable(w.CULL_FACE);a.resetGLState()}}};
 Object.assign(THREE,{Face4:function(a,b,c,d,e,f,g){console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead.");return new THREE.Face3(a,b,c,e,f,g)},LineStrip:0,LinePieces:1,MeshFaceMaterial:THREE.MultiMaterial,PointCloud:function(a,b){console.warn("THREE.PointCloud has been renamed to THREE.Points.");return new THREE.Points(a,b)},Particle:THREE.Sprite,ParticleSystem:function(a,b){console.warn("THREE.ParticleSystem has been renamed to THREE.Points.");return new THREE.Points(a,
 b)},PointCloudMaterial:function(a){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleBasicMaterial:function(a){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},ParticleSystemMaterial:function(a){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.");return new THREE.PointsMaterial(a)},Vertex:function(a,b,c){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead.");
 return new THREE.Vector3(a,b,c)}});Object.assign(THREE.Box2.prototype,{empty:function(){console.warn("THREE.Box2: .empty() has been renamed to .isEmpty().");return this.isEmpty()},isIntersectionBox:function(a){console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().");return this.intersectsBox(a)}});
@@ -814,7 +814,7 @@ THREE.GeometryUtils={merge:function(a,b,c){console.warn("THREE.GeometryUtils: .m
 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.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js");this.domElement=document.createElementNS("http://www.w3.org/1999/xhtml","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,k;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 l=2*c;for(h=c-1;2<c;){if(0>=l--){console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()");break}g=h;c<=g&&(g=0);h=g+1;c<=h&&(h=0);k=h+1;c<=k&&(k=0);var n;a:{var p=