All of the original features now work: simple, flipped, scaled, toggled, looped and stationary is replaced by ease2::scale_only.

This commit is contained in:
Zed A. Shaw 2026-01-31 11:40:45 -05:00
parent 34e4a34f65
commit ca335d21e5
4 changed files with 25 additions and 11 deletions

View file

@ -53,8 +53,8 @@ namespace animate2 {
bool flipped{false};
float ease_rate{0.5f};
bool scaled{false};
bool stationary{false};
// these can handled by the onLoop, same as ganim8 does it
// handled by onLoop
bool toggled{false};
bool looped{false};
@ -71,7 +71,12 @@ namespace animate2 {
using OnFrameHandler = std::function<void()>;
inline bool DefaultOnLoop(Sequence& seq, Transform& tr) {
seq.current = 0;
if(tr.toggled) {
seq.current = seq.frame_count - 1;
} else {
seq.current = 0;
}
return tr.looped;
}