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

◆ jump

detail::event::jump_t jump {}
inlineconstexpr

Event triggered after each jump() call.

Use this event to react when the tween jumps to a specific keyframe by index. This is particularly useful for multi-point animations where keyframes represent distinct animation phases.

Common use cases:

  • Transitioning between animation states
  • Triggering phase-specific logic
  • Resetting to specific animation checkpoints
  • Implementing state machines
auto tween = tweeny::from(0).to(50).during(30U).to(100).during(30U).build();
printf("Jumped to keyframe\n");
});
tween.jump(1); // Jump to keyframe 1, triggers callback
auto jump(std::size_t target_key_frame) -> tween_value_t
Jumps to a specific keyframe index.
auto on(detail::event::step_t, Callback &&cb) -> void
Registers a callback for step() events.
A tween represents an animation between keyframes.
Definition tween.h:68
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
constexpr detail::event::jump_t jump
Event triggered after each jump() call.
Definition event.h:139
@ ok
Continue receiving events.
Definition detail/event.h:108
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
See also
keyframeEnter For detecting keyframe transitions during playback
seek For arbitrary frame jumps