diff --git a/.rive_head b/.rive_head index 3727ac5..1f1cfee 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -bc6c6f467b8f1e0f794be093a514768bd068088a +2504d2ab24d258621fc89a0120c794f2b53a2ffc diff --git a/lib/src/rive_core/animation/blend_state_instance.dart b/lib/src/rive_core/animation/blend_state_instance.dart index b71d895..5ba2721 100644 --- a/lib/src/rive_core/animation/blend_state_instance.dart +++ b/lib/src/rive_core/animation/blend_state_instance.dart @@ -27,18 +27,20 @@ abstract class BlendStateInstance, .toList(growable: false), super(state); - bool _keepGoing = true; @override - bool get keepGoing => _keepGoing; + bool get keepGoing => true; @mustCallSuper @override void advance(double seconds, StateMachineController controller) { - _keepGoing = false; // Advance all the animations in the blend state + // NOTE: we are intentionally ignoring the animationInstances' keepGoing + // return value. + // Blend states need to keep blending forever, as even if the animation + // does not change the mix values may for (final animation in animationInstances) { - if (animation.animationInstance.advance(seconds) && !keepGoing) { - _keepGoing = true; + if (animation.animationInstance.keepGoing) { + animation.animationInstance.advance(seconds); } } }