diff --git a/src/animation/animation.hpp b/src/animation/animation.hpp index 3f7f625..6bd1865 100644 --- a/src/animation/animation.hpp +++ b/src/animation/animation.hpp @@ -26,6 +26,7 @@ #include #include #include +#include /** * Abstract base class for animations. @@ -451,6 +452,19 @@ void animation::advance(double dt) { stopped = true; + // Call frame callback for end frame + if (frame_callback != nullptr) + { + for (std::size_t i = 0; i < channels.size(); ++i) + { + auto frames = channels[i].find_keyframes(channels[i].get_duration()); + if (frames[0] != nullptr) + { + frame_callback(static_cast(i), std::get<1>(*frames[0])); + } + } + } + // Call end callback if (end_callback) {