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

◆ jump()

template<typename FirstValueType, typename... RemainingValueTypes>
auto jump ( std::size_t target_key_frame) -> tween_value_t

Jumps to a specific keyframe index.

Moves the tween to the exact position of a keyframe. Useful for resetting to known points or implementing discrete state animations. Triggers event::jump listeners.

Parameters
target_key_frameZero-based keyframe index (clamped to valid range)
Returns
Value at the target keyframe
auto t = tweeny::from(0).to(50).during(30U).to(100).during(30U).build();
t.jump(0); // Jump to first keyframe (value: 0)
t.jump(1); // Jump to second keyframe (value: 50)
t.jump(2); // Jump to third keyframe (value: 100)
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