From 8d49c19e5da582b795315abd9cc816d56d22d143 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Fri, 7 Mar 2014 21:48:09 -0500 Subject: [PATCH] Updated builds. --- build/three.js | 37 ++++++++++++++++--------------------- build/three.min.js | 3 +-- 2 files changed, 17 insertions(+), 23 deletions(-) diff --git a/build/three.js b/build/three.js index bc8bd95a0d..8ec6870966 100644 --- a/build/three.js +++ b/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 ); } - }; + } - }() + } }; diff --git a/build/three.min.js b/build/three.min.js index de5ca95208..91ddeeed72 100644 --- a/build/three.min.js +++ b/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;ef.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;ef.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;Dn.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;pn.far||r.push({distance:t,point:I, -- GitLab