Fixed some of the easing functions but still not sure with RAT_GIANT doesn't move.
This commit is contained in:
parent
a53f81715d
commit
acbf384e2a
3 changed files with 13 additions and 6 deletions
|
@ -10,17 +10,19 @@ namespace components {
|
|||
}
|
||||
|
||||
float Animation::twitching() {
|
||||
float tick = ease::sine(float(frames) / subframe * ease_rate);
|
||||
|
||||
switch(easing) {
|
||||
case ease::NONE:
|
||||
return 0.0;
|
||||
case ease::SINE:
|
||||
return ease::sine(float(frames) / subframe * ease_rate);
|
||||
return tick;
|
||||
case ease::OUT_CIRC:
|
||||
return ease::out_circ(ease::sine(float(frames) / subframe * ease_rate));
|
||||
return ease::out_circ(tick);
|
||||
case ease::OUT_BOUNCE:
|
||||
return ease::out_bounce(ease::sine(float(frames) / subframe * ease_rate));
|
||||
return ease::sine(ease::out_bounce(tick));
|
||||
case ease::IN_OUT_BACK:
|
||||
return ease::in_out_back(ease::sine(float(frames) / subframe * ease_rate));
|
||||
return ease::sine(ease::in_out_back(tick));
|
||||
default:
|
||||
dbc::sentinel(
|
||||
fmt::format("Invalid easing {} given to animation",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue