|
Tweeny 4.1.0
A Tweening library for modern C++
|
◆ elasticOut
Elastic easing with spring-like oscillation at the end. The elasticOut easing function creates a natural spring or rubber band effect that overshoots and oscillates around the target value before settling. This is one of the most visually distinctive and playful easings, mimicking real-world elastic physics. The oscillation characteristics:
This easing excels at:
ElasticOut is widely used in modern mobile UI design to add energy and delight to interactions. It's more pronounced than backOut but smoother than bounceOut. The spring feel makes animations memorable and adds perceived responsiveness, making interfaces feel "alive" rather than mechanical. Mathematically, this uses a decaying sine wave with exponentially decreasing amplitude.
// Springy button press feedback
auto scale = tweeny::from(1.0f)
.to(1.2f)
.during(40U)
.build();
// Scale will overshoot 1.2f (maybe 1.3f) then oscillate
// down and up before settling at exactly 1.2f
// Modal dialog with playful entrance
auto opacity = tweeny::from(0.0f)
.to(1.0f)
.during(50U)
.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::elasticOutEasing elasticOut Elastic easing with spring-like oscillation at the end. Definition easing.h:678 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
|