|
Tweeny 4.1.0
A Tweening library for modern C++
|
◆ backIn
Easing function that creates anticipation by pulling back before moving forward. The backIn easing function begins by moving backwards slightly (overshooting in the negative direction), then reverses and accelerates toward the target value. This creates an anticipation effect similar to pulling back a slingshot or winding up before a throw. The backward motion at the start makes this easing particularly effective for animations that benefit from telegraphing or anticipation, such as:
Mathematically, this easing uses the formula: c * t * t * ((s + 1) * t - s) + b where s controls the overshoot amount (typically 1.70158).
// Create a tween with back-in easing for anticipation effect
.to(100.0f)
.during(60U)
.build();
// The animation will dip below 0.0f briefly before accelerating to 100.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::backInEasing backIn Easing function that creates anticipation by pulling back before moving forward. Definition easing.h:91 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
|