The gorious Lord Keith the Rat King can now have easing and motion functions that are defined in json and hot-reloaded.

This commit is contained in:
Zed A. Shaw 2026-02-04 00:59:26 -05:00
parent 383f839fdf
commit 07b2102f59
6 changed files with 69 additions and 18 deletions

View file

@ -7,7 +7,10 @@ namespace animate2 {
namespace ease2 {
using EaseFunc = std::function<double(double)>;
using MoveFunc = std::function<void(animate2::Transform &tr, sf::Vector2f& pos_out, sf::Vector2f& scale_out, float tick)>;
using MotionFunc = std::function<void(animate2::Transform &tr, sf::Vector2f& pos_out, sf::Vector2f& scale_out, float tick)>;
EaseFunc get_easing(const std::string& name);
MotionFunc get_motion(const std::string& name);
double sine(double x);
double out_circle(double x);