|
Tweeny 4.1.0
A Tweening library for modern C++
|
◆ exponentialIn
Exponential easing with very slow start and explosive acceleration. The exponentialIn easing function starts extremely slowly and builds to a very rapid acceleration toward the end. Based on exponential growth (2^x), this creates one of the most dramatic acceleration curves available, with velocity increasing exponentially over time. Characteristics:
This easing is ideal for:
The extreme acceleration curve makes this feel more dramatic than polynomial easings (quadratic, cubic, etc.). The motion appears to "explode" into existence rather than gradually accelerate. Use exponentialIn when you want maximum contrast between the patient start and the explosive finish. For most UI work, cubic or quartic easings provide sufficient acceleration with less extreme behavior. Mathematically: f(t) = 2^(10 * (t - 1)) // Fade in that suddenly snaps to full visibility
auto opacity = tweeny::from(0.0f)
.to(1.0f)
.during(45U)
.build();
// Rocket launch with explosive acceleration
auto velocity = tweeny::from(0.0f)
.to(1000.0f)
.during(120U)
.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::exponentialInEasing exponentialIn Exponential easing with very slow start and explosive acceleration. Definition easing.h:791 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
|