浏览代码

Updated builds.

Mr.doob 10 年之前
父节点
当前提交
c6c3ee89ab
共有 2 个文件被更改,包括 22 次插入43 次删除
  1. 10 31
      build/three.js
  2. 12 12
      build/three.min.js

+ 10 - 31
build/three.js

@@ -7273,8 +7273,6 @@ THREE.Object3D = function () {
 		},
 	} );
 
-	this.renderDepth = null;
-
 	this.rotationAutoUpdate = true;
 
 	this.matrix = new THREE.Matrix4();
@@ -7972,8 +7970,6 @@ THREE.Object3D.prototype = {
 		object.quaternion.copy( this.quaternion );
 		object.scale.copy( this.scale );
 
-		object.renderDepth = this.renderDepth;
-
 		object.rotationAutoUpdate = this.rotationAutoUpdate;
 
 		object.matrix.copy( this.matrix );
@@ -21065,11 +21061,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( a.material.id !== b.material.id ) {
 
-			return b.material.id - a.material.id;
+			return a.material.id - b.material.id;
 
 		} else if ( a.z !== b.z ) {
 
-			return b.z - a.z;
+			return a.z - b.z;
 
 		} else {
 
@@ -21083,7 +21079,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		if ( a.z !== b.z ) {
 
-			return a.z - b.z;
+			return b.z - a.z;
 
 		} else {
 
@@ -21289,18 +21285,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 						if ( _this.sortObjects === true ) {
 
-							if ( object.renderDepth !== null ) {
-
-								webglObject.z = object.renderDepth;
-
-							} else {
-
-								_vector3.setFromMatrixPosition( object.matrixWorld );
-								_vector3.applyProjection( _projScreenMatrix );
+							_vector3.setFromMatrixPosition( object.matrixWorld );
+							_vector3.applyProjection( _projScreenMatrix );
 
-								webglObject.z = _vector3.z;
-
-							}
+							webglObject.z = _vector3.z;
 
 						}
 
@@ -21324,7 +21312,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		var material;
 
-		for ( var i = renderList.length - 1; i !== - 1; i -- ) {
+		for ( var i = 0, l = renderList.length; i < l; i ++ ) {
 
 			var webglObject = renderList[ i ];
 
@@ -21371,7 +21359,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		var material;
 
-		for ( var i = 0, il = renderList.length; i < il; i ++ ) {
+		for ( var i = 0, l = renderList.length; i < l; i ++ ) {
 
 			var webglObject = renderList[ i ];
 			var object = webglObject.object;
@@ -23559,7 +23547,7 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 			if ( texture.minFilter !== THREE.NearestFilter && texture.minFilter !== THREE.LinearFilter ) {
 
-				console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter is set to THREE.LinearFilter or THREE.NearestFilter. ( ' + texture.sourceFile + ' )' );			
+				console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter is set to THREE.LinearFilter or THREE.NearestFilter. ( ' + texture.sourceFile + ' )' );
 
 			}
 
@@ -26044,16 +26032,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
 			var sprite = sprites[ i ];
 
 			sprite._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, sprite.matrixWorld );
-
-			if ( sprite.renderDepth === null ) {
-
-				sprite.z = - sprite._modelViewMatrix.elements[ 14 ];
-
-			} else {
-
-				sprite.z = sprite.renderDepth;
-
-			}
+			sprite.z = - sprite._modelViewMatrix.elements[ 14 ];
 
 		}
 

+ 12 - 12
build/three.min.js

@@ -153,7 +153,7 @@ c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!
 (function(a){a.Raycaster=function(b,c,f,g){this.ray=new a.Ray(b,c);this.near=f||0;this.far=g||Infinity;this.params={Sprite:{},Mesh:{},PointCloud:{threshold:1},LOD:{},Line:{}}};var b=function(a,b){return a.distance-b.distance},c=function(a,b,f,g){a.raycast(b,f);if(!0===g){a=a.children;g=0;for(var h=a.length;g<h;g++)c(a[g],b,f,!0)}};a.Raycaster.prototype={constructor:a.Raycaster,precision:1E-4,linePrecision:1,set:function(a,b){this.ray.set(a,b)},intersectObject:function(a,e){var f=[];c(a,this,f,e);
 f.sort(b);return f},intersectObjects:function(a,e){var f=[];if(!1===a instanceof Array)return console.log("THREE.Raycaster.intersectObjects: objects is not an Array."),f;for(var g=0,h=a.length;g<h;g++)c(a[g],this,f,e);f.sort(b);return f}}})(THREE);
 THREE.Object3D=function(){Object.defineProperty(this,"id",{value:THREE.Object3DIdCount++});this.uuid=THREE.Math.generateUUID();this.name="";this.type="Object3D";this.parent=void 0;this.children=[];this.up=THREE.Object3D.DefaultUp.clone();var a=new THREE.Vector3,b=new THREE.Euler,c=new THREE.Quaternion,d=new THREE.Vector3(1,1,1);b.onChange(function(){c.setFromEuler(b,!1)});c.onChange(function(){b.setFromQuaternion(c,void 0,!1)});Object.defineProperties(this,{position:{enumerable:!0,value:a},rotation:{enumerable:!0,
-value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d}});this.renderDepth=null;this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixAutoUpdate=!0;this.matrixWorldNeedsUpdate=!1;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};THREE.Object3D.DefaultUp=new THREE.Vector3(0,1,0);
+value:b},quaternion:{enumerable:!0,value:c},scale:{enumerable:!0,value:d}});this.rotationAutoUpdate=!0;this.matrix=new THREE.Matrix4;this.matrixWorld=new THREE.Matrix4;this.matrixAutoUpdate=!0;this.matrixWorldNeedsUpdate=!1;this.visible=!0;this.receiveShadow=this.castShadow=!1;this.frustumCulled=!0;this.userData={}};THREE.Object3D.DefaultUp=new THREE.Vector3(0,1,0);
 THREE.Object3D.prototype={constructor:THREE.Object3D,get eulerOrder(){console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order.");return this.rotation.order},set eulerOrder(a){console.warn("THREE.Object3D: .eulerOrder has been moved to .rotation.order.");this.rotation.order=a},get useQuaternion(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set useQuaternion(a){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},
 applyMatrix:function(a){this.matrix.multiplyMatrices(a,this.matrix);this.matrix.decompose(this.position,this.quaternion,this.scale)},setRotationFromAxisAngle:function(a,b){this.quaternion.setFromAxisAngle(a,b)},setRotationFromEuler:function(a){this.quaternion.setFromEuler(a,!0)},setRotationFromMatrix:function(a){this.quaternion.setFromRotationMatrix(a)},setRotationFromQuaternion:function(a){this.quaternion.copy(a)},rotateOnAxis:function(){var a=new THREE.Quaternion;return function(b,c){a.setFromAxisAngle(b,
 c);this.quaternion.multiply(a);return this}}(),rotateX:function(){var a=new THREE.Vector3(1,0,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateY:function(){var a=new THREE.Vector3(0,1,0);return function(b){return this.rotateOnAxis(a,b)}}(),rotateZ:function(){var a=new THREE.Vector3(0,0,1);return function(b){return this.rotateOnAxis(a,b)}}(),translateOnAxis:function(){var a=new THREE.Vector3;return function(b,c){a.copy(b).applyQuaternion(this.quaternion);this.position.add(a.multiplyScalar(c));
@@ -167,8 +167,8 @@ c;b++)this.children[b].traverseVisible(a)}},traverseAncestors:function(a){this.p
 this.matrixWorldNeedsUpdate=!1,a=!0;for(var b=0,c=this.children.length;b<c;b++)this.children[b].updateMatrixWorld(a)},toJSON:function(){var a={metadata:{version:4.3,type:"Object",generator:"ObjectExporter"}},b={},c=function(c){void 0===a.geometries&&(a.geometries=[]);if(void 0===b[c.uuid]){var d=c.toJSON();delete d.metadata;b[c.uuid]=d;a.geometries.push(d)}return c.uuid},d={},e=function(b){void 0===a.materials&&(a.materials=[]);if(void 0===d[b.uuid]){var c=b.toJSON();delete c.metadata;d[b.uuid]=c;
 a.materials.push(c)}return b.uuid},f=function(a){var b={};b.uuid=a.uuid;b.type=a.type;""!==a.name&&(b.name=a.name);"{}"!==JSON.stringify(a.userData)&&(b.userData=a.userData);!0!==a.visible&&(b.visible=a.visible);a instanceof THREE.PerspectiveCamera?(b.fov=a.fov,b.aspect=a.aspect,b.near=a.near,b.far=a.far):a instanceof THREE.OrthographicCamera?(b.left=a.left,b.right=a.right,b.top=a.top,b.bottom=a.bottom,b.near=a.near,b.far=a.far):a instanceof THREE.AmbientLight?b.color=a.color.getHex():a instanceof
 THREE.DirectionalLight?(b.color=a.color.getHex(),b.intensity=a.intensity):a instanceof THREE.PointLight?(b.color=a.color.getHex(),b.intensity=a.intensity,b.distance=a.distance):a instanceof THREE.SpotLight?(b.color=a.color.getHex(),b.intensity=a.intensity,b.distance=a.distance,b.angle=a.angle,b.exponent=a.exponent):a instanceof THREE.HemisphereLight?(b.color=a.color.getHex(),b.groundColor=a.groundColor.getHex()):a instanceof THREE.Mesh?(b.geometry=c(a.geometry),b.material=e(a.material)):a instanceof
-THREE.Line?(b.geometry=c(a.geometry),b.material=e(a.material)):a instanceof THREE.Sprite&&(b.material=e(a.material));b.matrix=a.matrix.toArray();if(0<a.children.length){b.children=[];for(var d=0;d<a.children.length;d++)b.children.push(f(a.children[d]))}return b};a.object=f(this);return a},clone:function(a,b){void 0===a&&(a=new THREE.Object3D);void 0===b&&(b=!0);a.name=this.name;a.up.copy(this.up);a.position.copy(this.position);a.quaternion.copy(this.quaternion);a.scale.copy(this.scale);a.renderDepth=
-this.renderDepth;a.rotationAutoUpdate=this.rotationAutoUpdate;a.matrix.copy(this.matrix);a.matrixWorld.copy(this.matrixWorld);a.matrixAutoUpdate=this.matrixAutoUpdate;a.matrixWorldNeedsUpdate=this.matrixWorldNeedsUpdate;a.visible=this.visible;a.castShadow=this.castShadow;a.receiveShadow=this.receiveShadow;a.frustumCulled=this.frustumCulled;a.userData=JSON.parse(JSON.stringify(this.userData));if(!0===b)for(var c=0;c<this.children.length;c++)a.add(this.children[c].clone());return a}};THREE.EventDispatcher.prototype.apply(THREE.Object3D.prototype);
+THREE.Line?(b.geometry=c(a.geometry),b.material=e(a.material)):a instanceof THREE.Sprite&&(b.material=e(a.material));b.matrix=a.matrix.toArray();if(0<a.children.length){b.children=[];for(var d=0;d<a.children.length;d++)b.children.push(f(a.children[d]))}return b};a.object=f(this);return a},clone:function(a,b){void 0===a&&(a=new THREE.Object3D);void 0===b&&(b=!0);a.name=this.name;a.up.copy(this.up);a.position.copy(this.position);a.quaternion.copy(this.quaternion);a.scale.copy(this.scale);a.rotationAutoUpdate=
+this.rotationAutoUpdate;a.matrix.copy(this.matrix);a.matrixWorld.copy(this.matrixWorld);a.matrixAutoUpdate=this.matrixAutoUpdate;a.matrixWorldNeedsUpdate=this.matrixWorldNeedsUpdate;a.visible=this.visible;a.castShadow=this.castShadow;a.receiveShadow=this.receiveShadow;a.frustumCulled=this.frustumCulled;a.userData=JSON.parse(JSON.stringify(this.userData));if(!0===b)for(var c=0;c<this.children.length;c++)a.add(this.children[c].clone());return a}};THREE.EventDispatcher.prototype.apply(THREE.Object3D.prototype);
 THREE.Object3DIdCount=0;THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=e instanceof Array?e:[];this.vertexTangents=[];this.materialIndex=void 0!==f?f:0};
 THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var a=new THREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.materialIndex=this.materialIndex;for(var b=0,c=this.vertexNormals.length;b<c;b++)a.vertexNormals[b]=this.vertexNormals[b].clone();b=0;for(c=this.vertexColors.length;b<c;b++)a.vertexColors[b]=this.vertexColors[b].clone();b=0;for(c=this.vertexTangents.length;b<c;b++)a.vertexTangents[b]=this.vertexTangents[b].clone();return a}};
 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)};THREE.BufferAttribute=function(a,b){this.array=a;this.itemSize=b;this.needsUpdate=!1};
@@ -441,17 +441,17 @@ THREE.WebGLRenderer=function(a){function b(a){var b=a.geometry;a=a.material;var
 f),a.__skinWeightArray=new Float32Array(4*f));c=null!==aa.get("OES_element_index_uint")&&21845<g?Uint32Array:Uint16Array;a.__typeArray=c;a.__faceArray=new c(3*g);a.__lineArray=new c(2*h);var k;if(a.numMorphTargets)for(a.__morphTargetsArrays=[],c=0,k=a.numMorphTargets;c<k;c++)a.__morphTargetsArrays.push(new Float32Array(3*f));if(a.numMorphNormals)for(a.__morphNormalsArrays=[],c=0,k=a.numMorphNormals;c<k;c++)a.__morphNormalsArrays.push(new Float32Array(3*f));a.__webglFaceCount=3*g;a.__webglLineCount=
 2*h;if(e.attributes){void 0===a.__webglCustomAttributesList&&(a.__webglCustomAttributesList=[]);for(var m in e.attributes){var g=e.attributes[m],h={},n;for(n in g)h[n]=g[n];if(!h.__webglInitialized||h.createUniqueBuffers)h.__webglInitialized=!0,c=1,"v2"===h.type?c=2:"v3"===h.type?c=3:"v4"===h.type?c=4:"c"===h.type&&(c=3),h.size=c,h.array=new Float32Array(f*c),h.buffer=l.createBuffer(),h.buffer.belongsToAttribute=m,g.needsUpdate=!0,h.__original=g;a.__webglCustomAttributesList.push(h)}}a.__inittedArrays=
 !0}function d(a,b){return a.material instanceof THREE.MeshFaceMaterial?a.material.materials[b.materialIndex]:a.material}function e(a,b,c,d){c=c.attributes;var e=b.attributes;b=b.attributesKeys;for(var f=0,k=b.length;f<k;f++){var m=b[f],n=e[m];if(0<=n){var p=c[m];void 0!==p?(m=p.itemSize,l.bindBuffer(l.ARRAY_BUFFER,p.buffer),g(n),l.vertexAttribPointer(n,m,l.FLOAT,!1,0,d*m*4)):void 0!==a.defaultAttributeValues&&(2===a.defaultAttributeValues[m].length?l.vertexAttrib2fv(n,a.defaultAttributeValues[m]):
-3===a.defaultAttributeValues[m].length&&l.vertexAttrib3fv(n,a.defaultAttributeValues[m]))}}h()}function f(){for(var a=0,b=ib.length;a<b;a++)ib[a]=0}function g(a){ib[a]=1;0===Ra[a]&&(l.enableVertexAttribArray(a),Ra[a]=1)}function h(){for(var a=0,b=Ra.length;a<b;a++)Ra[a]!==ib[a]&&(l.disableVertexAttribArray(a),Ra[a]=0)}function k(a,b){return a.material.id!==b.material.id?b.material.id-a.material.id:a.z!==b.z?b.z-a.z:a.id-b.id}function n(a,b){return a.z!==b.z?a.z-b.z:a.id-b.id}function p(a,b){return b[0]-
+3===a.defaultAttributeValues[m].length&&l.vertexAttrib3fv(n,a.defaultAttributeValues[m]))}}h()}function f(){for(var a=0,b=ib.length;a<b;a++)ib[a]=0}function g(a){ib[a]=1;0===Ra[a]&&(l.enableVertexAttribArray(a),Ra[a]=1)}function h(){for(var a=0,b=Ra.length;a<b;a++)Ra[a]!==ib[a]&&(l.disableVertexAttribArray(a),Ra[a]=0)}function k(a,b){return 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 n(a,b){return a.z!==b.z?b.z-a.z:a.id-b.id}function p(a,b){return b[0]-
 a[0]}function q(a){if(!1!==a.visible){if(!(a instanceof THREE.Scene||a instanceof THREE.Group)){void 0===a.__webglInit&&(a.__webglInit=!0,a._modelViewMatrix=new THREE.Matrix4,a._normalMatrix=new THREE.Matrix3,a.addEventListener("removed",hc));var c=a.geometry;if(void 0!==c&&void 0===c.__webglInit&&(c.__webglInit=!0,c.addEventListener("dispose",ic),!(c instanceof THREE.BufferGeometry)))if(a instanceof THREE.Mesh)r(a,c);else if(a instanceof THREE.Line){if(void 0===c.__webglVertexBuffer){c.__webglVertexBuffer=
 l.createBuffer();c.__webglColorBuffer=l.createBuffer();c.__webglLineDistanceBuffer=l.createBuffer();J.info.memory.geometries++;var d=c.vertices.length;c.__vertexArray=new Float32Array(3*d);c.__colorArray=new Float32Array(3*d);c.__lineDistanceArray=new Float32Array(1*d);c.__webglLineCount=d;b(a);c.verticesNeedUpdate=!0;c.colorsNeedUpdate=!0;c.lineDistancesNeedUpdate=!0}}else a instanceof THREE.PointCloud&&void 0===c.__webglVertexBuffer&&(c.__webglVertexBuffer=l.createBuffer(),c.__webglColorBuffer=
 l.createBuffer(),J.info.memory.geometries++,d=c.vertices.length,c.__vertexArray=new Float32Array(3*d),c.__colorArray=new Float32Array(3*d),c.__sortArray=[],c.__webglParticleCount=d,b(a),c.verticesNeedUpdate=!0,c.colorsNeedUpdate=!0);if(void 0===a.__webglActive)if(a.__webglActive=!0,a instanceof THREE.Mesh)if(c instanceof THREE.BufferGeometry)u(Ca,c,a);else{if(c instanceof THREE.Geometry)for(var c=jb[c.id],d=0,e=c.length;d<e;d++)u(Ca,c[d],a)}else a instanceof THREE.Line||a instanceof THREE.PointCloud?
 u(Ca,c,a):(a instanceof THREE.ImmediateRenderObject||a.immediateRenderCallback)&&Ia.push({id:null,object:a,opaque:null,transparent:null,z:0});if(a instanceof THREE.Light)oa.push(a);else if(a instanceof THREE.Sprite)eb.push(a);else if(a instanceof THREE.LensFlare)fb.push(a);else if((c=Ca[a.id])&&(!1===a.frustumCulled||!0===kb.intersectsObject(a)))for(d=0,e=c.length;d<e;d++){var f=c[d],g=f,h=g.object,k=g.buffer,m=h.geometry,h=h.material;h instanceof THREE.MeshFaceMaterial?(h=h.materials[m instanceof
-THREE.BufferGeometry?0:k.materialIndex],g.material=h,h.transparent?Sa.push(g):xa.push(g)):h&&(g.material=h,h.transparent?Sa.push(g):xa.push(g));f.render=!0;!0===J.sortObjects&&(null!==a.renderDepth?f.z=a.renderDepth:(Da.setFromMatrixPosition(a.matrixWorld),Da.applyProjection(ub),f.z=Da.z))}}d=0;for(e=a.children.length;d<e;d++)q(a.children[d])}}function m(a,b,c,d,e,f){for(var g,h=a.length-1;-1!==h;h--){g=a[h];var k=g.object,l=g.buffer;F(k,b);if(f)g=f;else{g=g.material;if(!g)continue;e&&J.setBlending(g.blending,
-g.blendEquation,g.blendSrc,g.blendDst);J.setDepthTest(g.depthTest);J.setDepthWrite(g.depthWrite);A(g.polygonOffset,g.polygonOffsetFactor,g.polygonOffsetUnits)}J.setMaterialFaces(g);l instanceof THREE.BufferGeometry?J.renderBufferDirect(b,c,d,g,l,k):J.renderBuffer(b,c,d,g,l,k)}}function t(a,b,c,d,e,f,g){for(var h,k=0,l=a.length;k<l;k++){h=a[k];var m=h.object;if(m.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&J.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);J.setDepthTest(h.depthTest);
-J.setDepthWrite(h.depthWrite);A(h.polygonOffset,h.polygonOffsetFactor,h.polygonOffsetUnits)}J.renderImmediateObject(c,d,e,h,m)}}}function s(a){var b=a.object.material;b.transparent?(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function r(a,b){var d=a.material,e=!1;if(void 0===jb[b.id]||!0===b.groupsNeedUpdate){delete Ca[a.id];for(var f=jb,g=b.id,d=d instanceof THREE.MeshFaceMaterial,h=aa.get("OES_element_index_uint")?4294967296:65535,k,e={},m=b.morphTargets.length,n=b.morphNormals.length,
-p,q={},r=[],t=0,s=b.faces.length;t<s;t++){k=b.faces[t];var v=d?k.materialIndex:0;v in e||(e[v]={hash:v,counter:0});k=e[v].hash+"_"+e[v].counter;k in q||(p={id:jc++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:m,numMorphNormals:n},q[k]=p,r.push(p));q[k].vertices+3>h&&(e[v].counter+=1,k=e[v].hash+"_"+e[v].counter,k in q||(p={id:jc++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:m,numMorphNormals:n},q[k]=p,r.push(p)));q[k].faces3.push(t);q[k].vertices+=3}f[g]=r;b.groupsNeedUpdate=!1}f=
-jb[b.id];g=0;for(d=f.length;g<d;g++){h=f[g];if(void 0===h.__webglVertexBuffer){e=h;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();n=m=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=
-[],m=0,n=e.numMorphTargets;m<n;m++)e.__webglMorphTargetsBuffers.push(l.createBuffer());if(e.numMorphNormals)for(e.__webglMorphNormalsBuffers=[],m=0,n=e.numMorphNormals;m<n;m++)e.__webglMorphNormalsBuffers.push(l.createBuffer());J.info.memory.geometries++;c(h,a);b.verticesNeedUpdate=!0;b.morphTargetsNeedUpdate=!0;b.elementsNeedUpdate=!0;b.uvsNeedUpdate=!0;b.normalsNeedUpdate=!0;b.tangentsNeedUpdate=!0;e=b.colorsNeedUpdate=!0}else e=!1;(e||void 0===a.__webglActive)&&u(Ca,h,a)}a.__webglActive=!0}function u(a,
+THREE.BufferGeometry?0:k.materialIndex],g.material=h,h.transparent?Sa.push(g):xa.push(g)):h&&(g.material=h,h.transparent?Sa.push(g):xa.push(g));f.render=!0;!0===J.sortObjects&&(Da.setFromMatrixPosition(a.matrixWorld),Da.applyProjection(ub),f.z=Da.z)}}d=0;for(e=a.children.length;d<e;d++)q(a.children[d])}}function m(a,b,c,d,e,f){for(var g,h=0,k=a.length;h<k;h++){g=a[h];var l=g.object,m=g.buffer;F(l,b);if(f)g=f;else{g=g.material;if(!g)continue;e&&J.setBlending(g.blending,g.blendEquation,g.blendSrc,g.blendDst);
+J.setDepthTest(g.depthTest);J.setDepthWrite(g.depthWrite);A(g.polygonOffset,g.polygonOffsetFactor,g.polygonOffsetUnits)}J.setMaterialFaces(g);m instanceof THREE.BufferGeometry?J.renderBufferDirect(b,c,d,g,m,l):J.renderBuffer(b,c,d,g,m,l)}}function t(a,b,c,d,e,f,g){for(var h,k=0,l=a.length;k<l;k++){h=a[k];var m=h.object;if(m.visible){if(g)h=g;else{h=h[b];if(!h)continue;f&&J.setBlending(h.blending,h.blendEquation,h.blendSrc,h.blendDst);J.setDepthTest(h.depthTest);J.setDepthWrite(h.depthWrite);A(h.polygonOffset,
+h.polygonOffsetFactor,h.polygonOffsetUnits)}J.renderImmediateObject(c,d,e,h,m)}}}function s(a){var b=a.object.material;b.transparent?(a.transparent=b,a.opaque=null):(a.opaque=b,a.transparent=null)}function r(a,b){var d=a.material,e=!1;if(void 0===jb[b.id]||!0===b.groupsNeedUpdate){delete Ca[a.id];for(var f=jb,g=b.id,d=d instanceof THREE.MeshFaceMaterial,h=aa.get("OES_element_index_uint")?4294967296:65535,k,e={},m=b.morphTargets.length,n=b.morphNormals.length,p,q={},r=[],t=0,s=b.faces.length;t<s;t++){k=
+b.faces[t];var v=d?k.materialIndex:0;v in e||(e[v]={hash:v,counter:0});k=e[v].hash+"_"+e[v].counter;k in q||(p={id:jc++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:m,numMorphNormals:n},q[k]=p,r.push(p));q[k].vertices+3>h&&(e[v].counter+=1,k=e[v].hash+"_"+e[v].counter,k in q||(p={id:jc++,faces3:[],materialIndex:v,vertices:0,numMorphTargets:m,numMorphNormals:n},q[k]=p,r.push(p)));q[k].faces3.push(t);q[k].vertices+=3}f[g]=r;b.groupsNeedUpdate=!1}f=jb[b.id];g=0;for(d=f.length;g<d;g++){h=f[g];
+if(void 0===h.__webglVertexBuffer){e=h;e.__webglVertexBuffer=l.createBuffer();e.__webglNormalBuffer=l.createBuffer();e.__webglTangentBuffer=l.createBuffer();e.__webglColorBuffer=l.createBuffer();e.__webglUVBuffer=l.createBuffer();e.__webglUV2Buffer=l.createBuffer();e.__webglSkinIndicesBuffer=l.createBuffer();e.__webglSkinWeightsBuffer=l.createBuffer();e.__webglFaceBuffer=l.createBuffer();e.__webglLineBuffer=l.createBuffer();n=m=void 0;if(e.numMorphTargets)for(e.__webglMorphTargetsBuffers=[],m=0,n=
+e.numMorphTargets;m<n;m++)e.__webglMorphTargetsBuffers.push(l.createBuffer());if(e.numMorphNormals)for(e.__webglMorphNormalsBuffers=[],m=0,n=e.numMorphNormals;m<n;m++)e.__webglMorphNormalsBuffers.push(l.createBuffer());J.info.memory.geometries++;c(h,a);b.verticesNeedUpdate=!0;b.morphTargetsNeedUpdate=!0;b.elementsNeedUpdate=!0;b.uvsNeedUpdate=!0;b.normalsNeedUpdate=!0;b.tangentsNeedUpdate=!0;e=b.colorsNeedUpdate=!0}else e=!1;(e||void 0===a.__webglActive)&&u(Ca,h,a)}a.__webglActive=!0}function u(a,
 b,c){var d=c.id;a[d]=a[d]||[];a[d].push({id:d,buffer:b,object:c,material:null,z:0})}function v(a){var b=a.geometry,e,f;if(b instanceof THREE.BufferGeometry)for(var g=b.attributes,h=b.attributesKeys,k=0,m=h.length;k<m;k++){var n=h[k],p=g[n];void 0===p.buffer&&(p.buffer=l.createBuffer(),p.needsUpdate=!0);if(!0===p.needsUpdate){var q="index"===n?l.ELEMENT_ARRAY_BUFFER:l.ARRAY_BUFFER;l.bindBuffer(q,p.buffer);l.bufferData(q,p.array,l.STATIC_DRAW);p.needsUpdate=!1}}else if(a instanceof THREE.Mesh){!0===
 b.groupsNeedUpdate&&r(a,b);for(var t=jb[b.id],k=0,s=t.length;k<s;k++){var u=t[k];f=d(a,u);!0===b.groupsNeedUpdate&&c(u,a);e=f.attributes&&y(f);if(b.verticesNeedUpdate||b.morphTargetsNeedUpdate||b.elementsNeedUpdate||b.uvsNeedUpdate||b.normalsNeedUpdate||b.colorsNeedUpdate||b.tangentsNeedUpdate||e){var v=u,x=a,z=l.DYNAMIC_DRAW,F=!b.dynamic,D=f;if(v.__inittedArrays){var C=D&&void 0!==D.shading&&D.shading===THREE.SmoothShading,w=void 0,E=void 0,J=void 0,A=void 0,P=void 0,M=void 0,I=void 0,N=void 0,T=
 void 0,Q=void 0,U=void 0,G=void 0,V=void 0,K=void 0,X=void 0,oa=void 0,Ca=void 0,db=void 0,Ia=void 0,Sa=void 0,aa=void 0,ca=void 0,xa=void 0,la=void 0,ga=void 0,O=void 0,eb=void 0,fa=void 0,fb=void 0,Y=void 0,pa=void 0,qa=void 0,Da=void 0,ya=void 0,Fa=void 0,Ba=void 0,ma=void 0,Ya=void 0,La=void 0,ka=void 0,Ma=0,Ta=0,nb=0,Wa=0,wa=0,Ua=0,Ga=0,ob=0,Na=0,ha=0,ra=0,H=0,za=void 0,Za=v.__vertexArray,vb=v.__uvArray,pb=v.__uv2Array,Oa=v.__normalArray,Aa=v.__tangentArray,$a=v.__colorArray,Ja=v.__skinIndexArray,
@@ -614,8 +614,8 @@ x.shaderSource(N,["precision "+a.getPrecision()+" float;","uniform vec3 color;\n
 x.compileShader(K);x.compileShader(N);x.attachShader(I,K);x.attachShader(I,N);x.linkProgram(I);F=I;v=x.getAttribLocation(F,"position");y=x.getAttribLocation(F,"uv");c=x.getUniformLocation(F,"uvOffset");d=x.getUniformLocation(F,"uvScale");e=x.getUniformLocation(F,"rotation");f=x.getUniformLocation(F,"scale");g=x.getUniformLocation(F,"color");h=x.getUniformLocation(F,"map");k=x.getUniformLocation(F,"opacity");n=x.getUniformLocation(F,"modelViewMatrix");p=x.getUniformLocation(F,"projectionMatrix");q=
 x.getUniformLocation(F,"fogType");m=x.getUniformLocation(F,"fogDensity");t=x.getUniformLocation(F,"fogNear");s=x.getUniformLocation(F,"fogFar");r=x.getUniformLocation(F,"fogColor");u=x.getUniformLocation(F,"alphaTest");I=document.createElement("canvas");I.width=8;I.height=8;K=I.getContext("2d");K.fillStyle="white";K.fillRect(0,0,8,8);D=new THREE.Texture(I);D.needsUpdate=!0}x.useProgram(F);x.enableVertexAttribArray(v);x.enableVertexAttribArray(y);x.disable(x.CULL_FACE);x.enable(x.BLEND);x.bindBuffer(x.ARRAY_BUFFER,
 E);x.vertexAttribPointer(v,2,x.FLOAT,!1,16,0);x.vertexAttribPointer(y,2,x.FLOAT,!1,16,8);x.bindBuffer(x.ELEMENT_ARRAY_BUFFER,z);x.uniformMatrix4fv(p,!1,M.projectionMatrix.elements);x.activeTexture(x.TEXTURE0);x.uniform1i(h,0);K=I=0;(N=U.fog)?(x.uniform3f(r,N.color.r,N.color.g,N.color.b),N instanceof THREE.Fog?(x.uniform1f(t,N.near),x.uniform1f(s,N.far),x.uniform1i(q,1),K=I=1):N instanceof THREE.FogExp2&&(x.uniform1f(m,N.density),x.uniform1i(q,2),K=I=2)):(x.uniform1i(q,0),K=I=0);for(var N=0,T=b.length;N<
-T;N++){var P=b[N];P._modelViewMatrix.multiplyMatrices(M.matrixWorldInverse,P.matrixWorld);P.z=null===P.renderDepth?-P._modelViewMatrix.elements[14]:P.renderDepth}b.sort(L);for(var X=[],N=0,T=b.length;N<T;N++){var P=b[N],Q=P.material;x.uniform1f(u,Q.alphaTest);x.uniformMatrix4fv(n,!1,P._modelViewMatrix.elements);P.matrixWorld.decompose(w,C,A);X[0]=A.x;X[1]=A.y;P=0;U.fog&&Q.fog&&(P=K);I!==P&&(x.uniform1i(q,P),I=P);null!==Q.map?(x.uniform2f(c,Q.map.offset.x,Q.map.offset.y),x.uniform2f(d,Q.map.repeat.x,
-Q.map.repeat.y)):(x.uniform2f(c,0,0),x.uniform2f(d,1,1));x.uniform1f(k,Q.opacity);x.uniform3f(g,Q.color.r,Q.color.g,Q.color.b);x.uniform1f(e,Q.rotation);x.uniform2fv(f,X);a.setBlending(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst);a.setDepthTest(Q.depthTest);a.setDepthWrite(Q.depthWrite);Q.map&&Q.map.image&&Q.map.image.width?a.setTexture(Q.map,0):a.setTexture(D,0);x.drawElements(x.TRIANGLES,6,x.UNSIGNED_SHORT,0)}x.enable(x.CULL_FACE);a.resetGLState()}}};
+T;N++){var P=b[N];P._modelViewMatrix.multiplyMatrices(M.matrixWorldInverse,P.matrixWorld);P.z=-P._modelViewMatrix.elements[14]}b.sort(L);for(var X=[],N=0,T=b.length;N<T;N++){var P=b[N],Q=P.material;x.uniform1f(u,Q.alphaTest);x.uniformMatrix4fv(n,!1,P._modelViewMatrix.elements);P.matrixWorld.decompose(w,C,A);X[0]=A.x;X[1]=A.y;P=0;U.fog&&Q.fog&&(P=K);I!==P&&(x.uniform1i(q,P),I=P);null!==Q.map?(x.uniform2f(c,Q.map.offset.x,Q.map.offset.y),x.uniform2f(d,Q.map.repeat.x,Q.map.repeat.y)):(x.uniform2f(c,
+0,0),x.uniform2f(d,1,1));x.uniform1f(k,Q.opacity);x.uniform3f(g,Q.color.r,Q.color.g,Q.color.b);x.uniform1f(e,Q.rotation);x.uniform2fv(f,X);a.setBlending(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst);a.setDepthTest(Q.depthTest);a.setDepthWrite(Q.depthWrite);Q.map&&Q.map.image&&Q.map.image.width?a.setTexture(Q.map,0):a.setTexture(D,0);x.drawElements(x.TRIANGLES,6,x.UNSIGNED_SHORT,0)}x.enable(x.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.ImageLoader;e.crossOrigin=this.crossOrigin;var f=new THREE.Texture(void 0,b);e.load(a,function(a){f.image=a;f.needsUpdate=!0;c&&c(f)},void 0,function(a){d&&d(a)});f.sourceFile=a;return f},loadTextureCube:function(a,b,c,d){var e=new THREE.ImageLoader;e.crossOrigin=this.crossOrigin;var f=new THREE.CubeTexture([],b);f.flipY=!1;var g=0;b=function(b){e.load(a[b],function(a){f.images[b]=a;g+=1;6===g&&(f.needsUpdate=!0,c&&
 c(f))})};d=0;for(var h=a.length;d<h;++d)b(d);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){var c=function(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,f=document.createElement("canvas");