Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses issues brought up here: https://2dimensions.slack.com/archives/CLLCU09T6/p1694766559770229 - Custom properties not updating when expected. - Events not firing on first frame. One important aspect of all of this: - Custom properties on events update with LinearAnimation.apply. - Events on timelines and state machines accrue/report during StateMachine/LinearAnimation.advance These could happen when the state machine would transition to a layer with an animation. The first frame would apply with mix 0 meaning all non-mixable properties wouldn't be applied per https://github.com/rive-app/rive/pull/5960/files. I took a slightly different approach. Now apply will always try to apply values. If mix is 0, non mixing properties will apply. I think semantically this makes more sense too. If you don't want to apply, don't apply. Apply with mix 0 is effectively a no-op as we had it before, so it was just a perf suck. So I re-worked the various call sites for apply to not call it when attempting to mix in an effectively mixed-out animation. This has one caveat for blend states. Because the blend state advances all the animations in sync, .advance must still be called when mix is 0, so events will still report but custom property keyframes in mixed out animations will not update. I think that's reasonable, but may not be immediately apparent. We can opt to not report events when the mix is 0 by introducing a "reportEvents" boolean to advance, or add an option to the blend state for whether or not they should report. Diffs= 236d788ea Event fixes (#5997)
- Loading branch information