1
0

add timeline for anime loader

This commit is contained in:
2026-01-10 20:29:50 +08:00
parent 2379a23477
commit 9c70ea9b6d
3 changed files with 78 additions and 45 deletions

View File

@@ -19,17 +19,18 @@ public:
virtual void load(AnimeLoaderConfig&& config) override {
IAnimeLoader::load(std::move(config));
this->frames.emplace(60 * 0, KeyFrame{.position = {F(0), F(-10), F(10)}, .rotation = {F(0.382683), F(0), F(0), F(0.92388)}});
this->frames.emplace(60 * 1,
KeyFrame{.position = {F(-10), F(0), F(10)},
.rotation = {F(0.270598), F(-0.270598), F(-0.653282), F(0.653282)}});
this->frames.emplace(60 * 2, KeyFrame{.position = {F(0), F(10), F(10)}, .rotation = {F(0), F(-0.382683), F(-0.92388), F(0)}});
this->frames.emplace(60 * 3,
KeyFrame{.position = {F(10), F(0), F(10)},
.rotation = {F(-0.270598), F(-0.270598), F(-0.653282), F(-0.653282)}});
this->frames.emplace(60 * 4,
KeyFrame{.position = {F(0), F(-10), F(10)},
.rotation = {F(0.382683), F(0), F(0), F(0.92388)}}); // Same as the first
this->timeline.add_key_frame(60 * 0, KeyFrame{.position = {F(0), F(-10), F(10)}, .rotation = {F(0.382683), F(0), F(0), F(0.92388)}});
this->timeline.add_key_frame(60 * 1,
KeyFrame{.position = {F(-10), F(0), F(10)},
.rotation = {F(0.270598), F(-0.270598), F(-0.653282), F(0.653282)}});
this->timeline.add_key_frame(60 * 2,
KeyFrame{.position = {F(0), F(10), F(10)}, .rotation = {F(0), F(-0.382683), F(-0.92388), F(0)}});
this->timeline.add_key_frame(60 * 3,
KeyFrame{.position = {F(10), F(0), F(10)},
.rotation = {F(-0.270598), F(-0.270598), F(-0.653282), F(-0.653282)}});
this->timeline.add_key_frame(60 * 4,
KeyFrame{.position = {F(0), F(-10), F(10)},
.rotation = {F(0.382683), F(0), F(0), F(0.92388)}}); // Same as the first
}
};