|
Tweeny 4.1.0
A Tweening library for modern C++
|
◆ progress()
template<typename FirstValueType, typename... RemainingValueTypes>
Returns the animation completion percentage. Calculates progress as (current_frame - first_frame) / total_frames. Returns a value in the range [0.0, 1.0].
t.step(25);
printf("%.0f%% complete\n", t.progress() * 100.0f); // "25% complete"
// Check if animation is done
if (t.progress() >= 1.0f) {
printf("Animation complete!\n");
}
tweeny_builder< true, FirstValue, RemainingValues... > to(const FirstValue &firstComponent, const RemainingValues &... remainingComponents) & Adds a target keyframe to the tween. Definition tweeny.h:109 tweeny_builder & during(FrameCountsType... frame_counts) Specifies per-component frame durations for the last keyframe segment. Definition tweeny.h:245 tweeny_builder< false, FirstValue, RemainingValues... > from(FirstValue firstComponent, RemainingValues... remainingComponents) Creates a new tween builder starting from the specified value(s). Definition tweeny.h:347 |