浏览代码

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

Wouter Vanmontfort 5 年之前
父节点
当前提交
4c4696dc7f
共有 1 个文件被更改,包括 2 次插入14 次删除
  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();
 
 		}