diff --git a/animate2.cpp b/animate2.cpp index 98a1d1f..97167f6 100644 --- a/animate2.cpp +++ b/animate2.cpp @@ -55,7 +55,7 @@ namespace animate2 { if($sequence.subframe > 0.9) $sequence.subframe = 0.0f; frame_change = true; } else { - $sequence.subframe = std::lerp($sequence.subframe, 1.0, $sequence.timer.alpha * $transform.ease_rate); + $sequence.subframe = std::lerp($sequence.subframe, 1.0, $sequence.timer.DELTA * $transform.ease_rate); fmt::println("subframe: {}, alpha: {}", $sequence.subframe, $sequence.timer.alpha); } @@ -70,7 +70,6 @@ namespace animate2 { } void Animate2::update() { - // $sequence.subframe += $transform.speed; update_frame(); } diff --git a/animate2.hpp b/animate2.hpp index d13d9e0..2e7436f 100644 --- a/animate2.hpp +++ b/animate2.hpp @@ -52,7 +52,6 @@ namespace animate2 { bool simple{true}; bool flipped{false}; float ease_rate{0.5f}; - float speed{0.1f}; bool scaled{false}; bool stationary{false}; // these can handled by the onLoop, same as ganim8 does it diff --git a/tests/animate2.cpp b/tests/animate2.cpp index a065067..db3a5c8 100644 --- a/tests/animate2.cpp +++ b/tests/animate2.cpp @@ -39,7 +39,6 @@ Animate2 crafter() { .simple{false}, .flipped{false}, .ease_rate{0.5f}, - .speed{0.02f}, .scaled{true}, .stationary{true}, .toggled{false}, diff --git a/tools/animator.cpp b/tools/animator.cpp index 6da0ca9..6ec5c8a 100644 --- a/tools/animator.cpp +++ b/tools/animator.cpp @@ -157,7 +157,7 @@ animate2::Sheet sheet{ animate2::Sequence sequence{ .frames{0,1,0,1}, - .durations{166ms, 266ms, 166ms, 266ms} + .durations{500ms, 266ms, 100ms, 100ms} }; animate2::Transform scale_tr{ @@ -167,13 +167,12 @@ animate2::Transform scale_tr{ .max_y{0.8f}, .simple{false}, .flipped{false}, - .ease_rate{0.5f}, - .speed{0.02f}, + .ease_rate{1.0f/0.2f}, .scaled{true}, .stationary{true}, .toggled{false}, .looped{true}, - .easing = ease2::out_circle, + .easing = ease2::in_out_back, .motion = ease2::move_rush, }; @@ -185,7 +184,6 @@ animate2::Transform move_tr{ .simple{false}, .flipped{false}, .ease_rate{2.5f}, - .speed{0.02f}, .scaled{true}, .stationary{true}, .toggled{false},