Tweeny 4.1.0
A Tweening library for modern C++
Loading...
Searching...
No Matches

◆ step()

template<typename FirstValueType, typename... RemainingValueTypes>
auto step ( int32_t frames) -> tween_value_t

Advances or rewinds the animation by a frame delta.

Moves the tween forward (positive) or backward (negative) by the specified number of frames. Clamped to valid frame range. Triggers event::step listeners.

Parameters
framesNumber of frames to move (negative values step backward)
Returns
Interpolated value at the new frame
auto t = tweeny::from(0).to(100).during(100U).build();
t.step(10); // Advance 10 frames (value: 10)
t.step(5); // Advance 5 more frames (value: 15)
t.step(-3); // Rewind 3 frames (value: 12)
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