xcal
基于 C++23 的现代图形渲染引擎
载入中...
搜索中...
未找到
timelinedriver.cc
浏览该文件的文档.
3 animation_drivers_.clear();
4 for (auto &animation : timeline_->animations()) {
5 animation_drivers_.emplace_back(
6 std::make_unique<AnimationDriver>(animation.get(), frame_rate_));
7 duration_ =
8 std::max(duration_, animation->start_time + animation->duration);
9 }
10}
12 for (auto &animation_driver : animation_drivers_) {
13 if (animation_driver->start_time() <= current_time_) {
14 animation_driver->next();
15 }
16 }
17 animation_drivers_.erase(
18 std::remove_if(animation_drivers_.begin(), animation_drivers_.end(),
19 [](const auto &ptr) { return ptr->finished(); }),
20 animation_drivers_.end());
21 current_time_ += 1.0f / frame_rate_;
22}
std::vector< std::unique_ptr< AnimationHandle > > & animations()
Definition timeline.hpp:22