Finally renamed animate2 to animation thus completing the refactor. There's still things to do to make the new animation actually work though.

This commit is contained in:
Zed A. Shaw 2026-02-24 11:36:57 -05:00
parent 83f62e3f45
commit 81a282d544
21 changed files with 83 additions and 339 deletions

View file

@ -7,10 +7,10 @@
#include <cstdlib>
namespace cinematic {
using animate2::Animate2, std::string, std::min, std::clamp;
using animation::Animation, std::string, std::min, std::clamp;
struct CameraManager {
std::unordered_map<string, Animate2> animations;
std::unordered_map<string, Animation> animations;
};
static CameraManager MGR;
@ -22,7 +22,7 @@ namespace cinematic {
auto data = settings::get("cameras");
for(auto [key, value] : data.json().items()) {
auto anim = components::convert<Animate2>(value);
auto anim = components::convert<Animation>(value);
MGR.animations.try_emplace(key, anim);
}
@ -122,10 +122,10 @@ namespace cinematic {
anim.forms.clear();
for(auto& [timecode, cell, transform, duration] : story.beats) {
animate2::Sequence seq{.frames={0}, .durations={std::stoi(duration)}};
animation::Sequence seq{.frames={0}, .durations={std::stoi(duration)}};
anim.sequences.try_emplace(timecode, seq);
animate2::Form form{timecode, transform};
animation::Form form{timecode, transform};
anim.forms.try_emplace(timecode, form);
}
}