Browse Source

Stop all active animations by calling their `stop()`.

Wouter Vanmontfort 5 years ago
parent
commit
4c4696dc7f
1 changed files with 2 additions and 14 deletions
  1. 2 14
      src/animation/AnimationMixer.js

+ 2 - 14
src/animation/AnimationMixer.js

@@ -608,22 +608,10 @@ AnimationMixer.prototype = Object.assign( Object.create( EventDispatcher.prototy
 
 
 		var actions = this._actions,
 		var actions = this._actions,
 			nActions = this._nActiveActions,
 			nActions = this._nActiveActions,
-			bindings = this._bindings,
-			nBindings = this._nActiveBindings;
-
-		this._nActiveActions = 0;
-		this._nActiveBindings = 0;
-
-		for ( var i = 0; i !== nActions; ++ i ) {
-
-			actions[ i ].reset();
 
 
-		}
-
-		for ( var i = 0; i !== nBindings; ++ i ) {
+		for ( var i = nActions - 1; i >= 0; -- i ) {
 
 
-			bindings[ i ].restoreOriginalState();
-			bindings[ i ].useCount = 0;
+			actions[ i ].stop();
 
 
 		}
 		}