Have the start of an animation dev tool.

This commit is contained in:
Zed A. Shaw 2026-01-17 23:43:44 -05:00
parent 7d08e60537
commit 81cbc24064
3 changed files with 116 additions and 4 deletions

View file

@ -160,7 +160,7 @@ TEST_CASE("new animation system", "[animation-new]") {
PLAY_TEST(anim);
bool onLoop_ran = false;
anim.onLoop = [&](auto& seq, auto &tr) -> bool {
anim.onLoop = [&](auto& seq, auto& tr) -> bool {
seq.current = 0;
onLoop_ran = true;
return tr.looped;
@ -170,7 +170,7 @@ TEST_CASE("new animation system", "[animation-new]") {
REQUIRE(onLoop_ran == true);
// only runs twice
anim.onLoop = [](auto &seq, auto &tr) -> bool {
anim.onLoop = [](auto& seq, auto& tr) -> bool {
if(seq.loop_count == 2) {
seq.current = 0;
return false;
@ -184,7 +184,7 @@ TEST_CASE("new animation system", "[animation-new]") {
REQUIRE(anim.$sequence.loop_count == 2);
// stops at end
anim.onLoop = [](auto &seq, auto &tr) -> bool {
anim.onLoop = [](auto& seq, auto& tr) -> bool {
if(seq.loop_count == 1) {
seq.current = seq.frame_count - 1;
return false;
@ -194,7 +194,9 @@ TEST_CASE("new animation system", "[animation-new]") {
};
}
TEST_CASE("easing functions in animate2", "[animation-new]") {
auto anim = crafter();
}
TEST_CASE("animation easing tests", "[animation]") {
Animation anim;