Explorar o código

Merge pull request #19329 from DsRQuicke/fix_stopallactions_stop_diff

AnimationMixer: Restore original binding states in stopAllAction().
Mr.doob %!s(int64=5) %!d(string=hai) anos
pai
achega
5b2d692cbc
Modificáronse 1 ficheiros con 3 adicións e 14 borrados
  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();
 
 		}