|
Tweeny 4.1.0
A Tweening library for modern C++
|
◆ bounceOut
Bounce easing simulating a ball dropping and bouncing to rest. The bounceOut easing function creates the classic ball-drop effect where an object bounces several times with decreasing height before coming to rest. This mimics real-world physics of an inelastic collision and is one of the most recognizable easing patterns. Characteristics:
This easing excels at:
BounceOut is more popular than elasticOut when you want discrete impacts rather than smooth oscillation. It conveys weight and physicality better than spring-based easings. The bouncing creates natural emphasis on the final position, making it excellent for drawing attention to where something lands. // Notification dropping in from above
auto y = tweeny::from(-100.0f)
.to(0.0f)
.during(45U)
.build();
// Button that bounces into place
auto scale = tweeny::from(0.0f)
.to(1.0f)
.during(40U)
.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::bounceOutEasing bounceOut Bounce easing simulating a ball dropping and bouncing to rest. Definition easing.h:259 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
|