Browse Source

Updated builds.

Mr.doob 11 years ago
parent
commit
8d49c19e5d
2 changed files with 17 additions and 23 deletions
  1. 16 21
      build/three.js
  2. 1 2
      build/three.min.js

+ 16 - 21
build/three.js

@@ -6992,40 +6992,35 @@ THREE.EventDispatcher.prototype = {
 
 	},
 
-	dispatchEvent: function () {
-
-		var array = [];
-
-		return function ( event ) {
-
-			if ( this._listeners === undefined ) return;
+	dispatchEvent: function ( event ) {
+			
+		if ( this._listeners === undefined ) return;
 
-			var listeners = this._listeners;
-			var listenerArray = listeners[ event.type ];
+		var listeners = this._listeners;
+		var listenerArray = listeners[ event.type ];
 
-			if ( listenerArray !== undefined ) {
+		if ( listenerArray !== undefined ) {
 
-				event.target = this;
+			event.target = this;
 
-				var length = listenerArray.length;
+			var array = [];
+			var length = listenerArray.length;
 
-				for ( var i = 0; i < length; i ++ ) {
+			for ( var i = 0; i < length; i ++ ) {
 
-					array[ i ] = listenerArray[ i ];
+				array[ i ] = listenerArray[ i ];
 
-				}
-
-				for ( var i = 0; i < length; i ++ ) {
+			}
 
-					array[ i ].call( this, event );
+			for ( var i = 0; i < length; i ++ ) {
 
-				}
+				array[ i ].call( this, event );
 
 			}
 
-		};
+		}
 
-	}()
+	}
 
 };
 

+ 1 - 2
build/three.min.js

@@ -144,8 +144,7 @@ clone:function(){return(new THREE.Triangle).copy(this)}};THREE.Vertex=function(a
 THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now();this.running=!0},stop:function(){this.getElapsedTime();this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(),
 a=0.001*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){};
 THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,apply:function(a){a.addEventListener=THREE.EventDispatcher.prototype.addEventListener;a.hasEventListener=THREE.EventDispatcher.prototype.hasEventListener;a.removeEventListener=THREE.EventDispatcher.prototype.removeEventListener;a.dispatchEvent=THREE.EventDispatcher.prototype.dispatchEvent},addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&
-c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners[a];if(void 0!==c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}}},dispatchEvent:function(){var a=[];return function(b){if(void 0!==this._listeners){var c=this._listeners[b.type];if(void 0!==c){b.target=this;for(var d=c.length,e=0;e<d;e++)a[e]=c[e];for(e=0;e<d;e++)a[e].call(this,
-b)}}}}()};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray;new a.Plane;new a.Vector3;var d=new a.Vector3,e=new a.Matrix4,f=function(a,b){return a.distance-b.distance},g=new a.Vector3,h=new a.Vector3,k=new a.Vector3,l=function(f,n,r){if(f instanceof a.Sprite){d.setFromMatrixPosition(f.matrixWorld);var t=n.ray.distanceToPoint(d);if(t>f.scale.x)return r;r.push({distance:t,point:f.position,face:null,object:f})}else if(f instanceof
+c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners[a];if(void 0!==c){var d=c.indexOf(b);-1!==d&&c.splice(d,1)}}},dispatchEvent:function(a){if(void 0!==this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=[],d=b.length,e=0;e<d;e++)c[e]=b[e];for(e=0;e<d;e++)c[e].call(this,a)}}}};(function(a){a.Raycaster=function(b,c,d,e){this.ray=new a.Ray(b,c);this.near=d||0;this.far=e||Infinity};var b=new a.Sphere,c=new a.Ray;new a.Plane;new a.Vector3;var d=new a.Vector3,e=new a.Matrix4,f=function(a,b){return a.distance-b.distance},g=new a.Vector3,h=new a.Vector3,k=new a.Vector3,l=function(f,n,r){if(f instanceof a.Sprite){d.setFromMatrixPosition(f.matrixWorld);var t=n.ray.distanceToPoint(d);if(t>f.scale.x)return r;r.push({distance:t,point:f.position,face:null,object:f})}else if(f instanceof
 a.LOD)d.setFromMatrixPosition(f.matrixWorld),t=n.ray.origin.distanceTo(d),l(f.getObjectForDistance(t),n,r);else if(f instanceof a.Mesh){var p=f.geometry;null===p.boundingSphere&&p.computeBoundingSphere();b.copy(p.boundingSphere);b.applyMatrix4(f.matrixWorld);if(!1===n.ray.isIntersectionSphere(b))return r;e.getInverse(f.matrixWorld);c.copy(n.ray).applyMatrix4(e);if(null!==p.boundingBox&&!1===c.isIntersectionBox(p.boundingBox))return r;if(p instanceof a.BufferGeometry){var v=f.material;if(void 0===
 v)return r;var w=p.attributes,u,x,H=n.precision;if(void 0!==w.index)for(var G=p.offsets,P=w.index.array,F=w.position.array,D=0,K=G.length;D<K;++D)for(var w=G[D].start,y=G[D].index,p=w,E=w+G[D].count;p<E;p+=3){w=y+P[p];u=y+P[p+1];x=y+P[p+2];g.set(F[3*w],F[3*w+1],F[3*w+2]);h.set(F[3*u],F[3*u+1],F[3*u+2]);k.set(F[3*x],F[3*x+1],F[3*x+2]);var I=v.side===a.BackSide?c.intersectTriangle(k,h,g,!0):c.intersectTriangle(g,h,k,v.side!==a.DoubleSide);null!==I&&(I.applyMatrix4(f.matrixWorld),t=n.ray.origin.distanceTo(I),
 t<H||t<n.near||t>n.far||r.push({distance:t,point:I,indices:[w,u,x],face:null,faceIndex:null,object:f}))}else for(F=w.position.array,p=0,E=w.position.array.length;p<E;p+=3)w=p,u=p+1,x=p+2,g.set(F[3*w],F[3*w+1],F[3*w+2]),h.set(F[3*u],F[3*u+1],F[3*u+2]),k.set(F[3*x],F[3*x+1],F[3*x+2]),I=v.side===a.BackSide?c.intersectTriangle(k,h,g,!0):c.intersectTriangle(g,h,k,v.side!==a.DoubleSide),null!==I&&(I.applyMatrix4(f.matrixWorld),t=n.ray.origin.distanceTo(I),t<H||t<n.near||t>n.far||r.push({distance:t,point:I,