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

◆ cubicOut

detail::cubicOutEasing cubicOut {}
inlineconstexpr

Cubic polynomial easing (t³) with moderate deceleration.

The cubicOut easing function provides smooth, balanced deceleration that's popular across many design systems. It's pronounced enough to be noticeable but not dramatic.

Characteristics:

  • Smooth, natural-feeling deceleration
  • More pronounced than quadratic, gentler than quartic
  • Industry-standard motion curve
  • Works well for most animation types

This easing excels at:

  • Web interfaces: Following CSS animation best practices
  • Mobile UI: iOS and Android design patterns
  • Content animations: Cards, lists, grids
  • Default easing choice: Safe for most situations
  • User-triggered actions: Button presses, toggles, switches

CubicOut is one of the most commonly used easings in production interfaces. It provides clear polish without drawing excessive attention to the motion itself.

Mathematically: f(t) = 1 - (1-t)³

// Button press feedback
auto scale = tweeny::from(1.0f)
.to(0.95f)
.during(10U)
.build();
// Card appearing
auto opacity = 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::cubicOutEasing cubicOut
Cubic polynomial easing (t³) with moderate deceleration.
Definition easing.h:505
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
cubicIn For cubic acceleration
cubicInOut For cubic motion at both ends
quadraticOut For gentler deceleration
quarticOut For stronger deceleration
Visualize at https://easings.net/#easeOutCubic