Ver Fonte

Merge pull request #19329 from DsRQuicke/fix_stopallactions_stop_diff

AnimationMixer: Restore original binding states in stopAllAction().
Mr.doob há 5 anos atrás
pai
commit
5b2d692cbc
1 ficheiros alterados com 3 adições e 14 exclusões
  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 () {
 	stopAllAction: function () {
 
 
 		var actions = this._actions,
 		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();
 
 
 		}
 		}