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

◆ exponentialOut

detail::exponentialOutEasing exponentialOut {}
inlineconstexpr

Exponential easing with explosive start and gradual slow-down.

The exponentialOut easing function starts with maximum velocity and decelerates exponentially, creating a smooth glide to a stop. The initial burst of speed followed by gradual settling creates a powerful, energetic feel.

Characteristics:

  • Immediate, explosive motion at the start
  • Exponentially decreasing velocity
  • Long, smooth deceleration phase
  • Settles gently to final value

This easing excels at:

  • Quick UI responses: Instant feedback that settles smoothly
  • Impact effects: Objects hitting and settling into place
  • Momentum-based motion: Thrown objects, swipe gestures
  • Energetic entrances: Elements that burst in with energy
  • Modern UI patterns: iOS-style animations with quick start

ExponentialOut is popular in modern mobile design because it provides immediate visual feedback (the fast start) while ending smoothly. Users perceive the interface as highly responsive due to the instant motion.

The long tail of deceleration gives animations a "quality feel" - nothing stops abruptly. This is gentler on the eyes than linear or even cubic deceleration.

Mathematically: f(t) = 1 - 2^(-10 * t)

// Responsive drawer that slides out quickly then settles
auto position = tweeny::from(-300.0f)
.to(0.0f)
.during(35U)
.build();
// Notification that pops in with energy
auto scale = tweeny::from(0.0f)
.to(1.0f)
.during(25U)
.build();
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::exponentialOutEasing exponentialOut
Exponential easing with explosive start and gradual slow-down.
Definition easing.h:843
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
exponentialIn For explosive acceleration at the start
exponentialInOut For explosive motion at both ends
quarticOut For strong but less extreme deceleration
Visualize at https://easings.net/#easeOutExpo