Browse Source

Animation: Remove loops for forward branches.

tschw 9 years ago
parent
commit
f3a9598aaf
2 changed files with 4 additions and 7 deletions
  1. 1 3
      src/animation/AnimationMixer.js
  2. 3 4
      src/animation/Interpolant.js

+ 1 - 3
src/animation/AnimationMixer.js

@@ -400,13 +400,11 @@ THREE.AnimationMixer.prototype = {
 
 
 			if ( mapChanged ) {
 			if ( mapChanged ) {
 
 
-				remove_empty_map: for (;;) {
+				remove_empty_map: {
 
 
-					// unless not empty...
 					for ( var k in bindingsMap ) break remove_empty_map;
 					for ( var k in bindingsMap ) break remove_empty_map;
 
 
 					delete bindingsMaps[ rootUuid ];
 					delete bindingsMaps[ rootUuid ];
-					break;
 
 
 				}
 				}
 
 

+ 3 - 4
src/animation/Interpolant.js

@@ -33,7 +33,7 @@ THREE.Interpolant.prototype = {
 		var keyTime = times[ index ];
 		var keyTime = times[ index ];
 		var prevKeyTime = times[ index - 1 ];
 		var prevKeyTime = times[ index - 1 ];
 
 
-		change_interval: for (;;) {
+		validate_interval: {
 
 
 			seek: for (;;) {
 			seek: for (;;) {
 
 
@@ -118,9 +118,9 @@ THREE.Interpolant.prototype = {
 
 
 				} else {
 				} else {
 
 
-					// the current interval is still valid
+					// the interval is valid
 
 
-					break change_interval;
+					break validate_interval;
 
 
 				}
 				}
 
 
@@ -152,7 +152,6 @@ THREE.Interpolant.prototype = {
 			this.cachedIndex = index;
 			this.cachedIndex = index;
 
 
 			this._intervalChanged( index, prevKeyTime, keyTime );
 			this._intervalChanged( index, prevKeyTime, keyTime );
-			break;
 
 
 		}
 		}