jtrivedi / Wave

Wave is a spring-based animation engine for iOS and macOS that makes it easy to create fluid, interruptible animations that feel great.
https://jtrivedi.github.io/Wave/
MIT License
2.04k stars 55 forks source link

Improve `backgroundColor` animation retargeting #19

Closed jtrivedi closed 2 years ago

jtrivedi commented 2 years ago

The current implementation of animating backgroundColor with the block-based API really isn't correct. We need to fully decompose the initial and target color values into their RGBA components, and animate each one on their own spring. That way, if you retarget a color animation, the carryover velocities will actually be correct.