Sorted out the animation vs. easing contradiction I believe. Now there's a separate easing_duration that's calculated from the total duration of all frames. Then a easing_position determines where in the total the animation is, which is fed to the asing functions as a ration of easing_position / easing_duration.
This commit is contained in:
parent
0c798c9e0d
commit
1baca783fc
9 changed files with 47 additions and 75 deletions
|
|
@ -131,7 +131,6 @@ namespace scene {
|
|||
inline void this_is_stupid_refactor(std::vector<Element>& elements) {
|
||||
for(auto& element : elements) {
|
||||
if(element.anim.playing) {
|
||||
auto [ticks, alpha] = element.anim.commit();
|
||||
element.anim.update();
|
||||
element.anim.motion(*element.st.sprite, element.pos, element.scale);
|
||||
element.anim.apply(*element.st.sprite);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue