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

◆ backOut

detail::backOutEasing backOut {}
inlineconstexpr

Easing function that overshoots the target before settling back.

The backOut easing function accelerates toward and past the target value, then pulls back to settle at the final position. This creates an overshoot or "spring-back" effect that adds liveliness and energy to animations.

This easing is particularly effective for:

  • UI elements that pop into place with energy (buttons, dialogs, notifications)
  • Object arrivals that should feel bouncy and dynamic
  • Emphasizing the end state of an animation
  • Adding personality to mechanical movements

The overshoot creates a more natural, less rigid feel compared to standard easing functions. It's widely used in iOS, Android, and Material Design animation patterns to make interactions feel more responsive and playful.

Mathematically, this is the inverse of backIn, applied at the end of the transition.

Note
The animation will briefly exceed the target value before settling. Ensure your rendering or logic can handle values beyond the specified range.
// Animate a button with overshoot for a lively effect
auto scale = tweeny::from(0.0f)
.to(1.0f)
.during(30U)
.build();
// Scale will exceed 1.0f (e.g., 1.1f) before settling back to 1.0f
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 & via(EasingFunctionTypes... easing_functions)
Specifies per-component easing functions for the last keyframe segment.
Definition tweeny.h:198
constexpr detail::backOutEasing backOut
Easing function that overshoots the target before settling back.
Definition easing.h:131
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
backIn For anticipation at the start instead of overshoot at the end
backInOut For both anticipation and overshoot
elasticOut For a more pronounced oscillating overshoot effect
Visualize at https://easings.net/#easeOutBack