Have the start of an animation dev tool.
This commit is contained in:
parent
7d08e60537
commit
81cbc24064
3 changed files with 116 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue