Explorar o código

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

Wouter Vanmontfort %!s(int64=5) %!d(string=hai) anos
pai
achega
4c4696dc7f
Modificáronse 1 ficheiros con 2 adicións e 14 borrados
  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,
 			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();
 
 		}