Animation playback consisted of two parts. 1. The playback object which manages time for calculating elapsed time in the animation, skipping frames based on time, play/pause state. 2. Animation controller for managing and calculating frame indexing for LERP (linear interpolation). That second part used to manage everything around speeding up/down as well as playing the animation forward/reverse, and the logic was just very complicated for the primary funciton it had: to calculate the frame index and time delta for LERP. There were also many bugs and riggidness in that API that made it difficult to smoothly handle speeding up/down an animation and running an animation in reverse didn't work quite well.
So I have moved all the logic for speeding up/down and reverse playback to the playback object! Now the animation controller all it takes is the millisecond to calculate the frame index. And the playback object will continue to generate the milliseconds that animation depend on with the new functionality. This made it so that playback can just focus on generating the correct milliseconds that the animation controller uses.
Animation playback consisted of two parts. 1. The playback object which manages time for calculating elapsed time in the animation, skipping frames based on time, play/pause state. 2. Animation controller for managing and calculating frame indexing for LERP (linear interpolation). That second part used to manage everything around speeding up/down as well as playing the animation forward/reverse, and the logic was just very complicated for the primary funciton it had: to calculate the frame index and time delta for LERP. There were also many bugs and riggidness in that API that made it difficult to smoothly handle speeding up/down an animation and running an animation in reverse didn't work quite well.
So I have moved all the logic for speeding up/down and reverse playback to the playback object! Now the animation controller all it takes is the millisecond to calculate the frame index. And the playback object will continue to generate the milliseconds that animation depend on with the new functionality. This made it so that playback can just focus on generating the correct milliseconds that the animation controller uses.