瀏覽代碼

Merge pull request #19329 from DsRQuicke/fix_stopallactions_stop_diff

AnimationMixer: Restore original binding states in stopAllAction().
Mr.doob 5 年之前
父節點
當前提交
5b2d692cbc
共有 1 個文件被更改,包括 3 次插入14 次删除
  1. 3 14
      src/animation/AnimationMixer.js

+ 3 - 14
src/animation/AnimationMixer.js

@@ -607,22 +607,11 @@ AnimationMixer.prototype = Object.assign( Object.create( EventDispatcher.prototy
 	stopAllAction: function () {
 
 		var actions = this._actions,
-			nActions = this._nActiveActions,
-			bindings = this._bindings,
-			nBindings = this._nActiveBindings;
-
-		this._nActiveActions = 0;
-		this._nActiveBindings = 0;
+			nActions = this._nActiveActions;
 
-		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 ].useCount = 0;
+			actions[ i ].stop();
 
 		}