Browse Source

some light cleanup

rchadwic 11 years ago
parent
commit
c12e74b612
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/extras/animation/Animation.js

+ 2 - 2
src/extras/animation/Animation.js

@@ -155,7 +155,7 @@ THREE.Animation.prototype.update = function ( deltaTimeMS ) {
 			nextKey = animationCache.nextKey[ type ];
 
 			// switch keys?
-			if(!nextKey) debugger;
+			
 			if ( nextKey.time <= unloopedCurrentTime ) {
 
 				// did we loop?
@@ -168,7 +168,7 @@ THREE.Animation.prototype.update = function ( deltaTimeMS ) {
 						nextKey = this.getNextKeyWith( type, h, 1 );
 
 						//if(nextKey.index < prevKey.index ) then we have wrapped over the end, and nextKey.time < currentTime will loop forever
-						while( nextKey && nextKey.time < currentTime  && nextKey.index > prevKey.index) {
+						while( nextKey !== null && nextKey.time < currentTime  && nextKey.index > prevKey.index) {
 
 							prevKey = nextKey;
 							nextKey = this.getNextKeyWith( type, h, nextKey.index + 1 );