Package limn.animation
Interface Easing
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An easing curve: maps a normalized time
t in [0,1] to an eased
progress (usually in [0,1], though some curves may overshoot). The
Transition feeds it t = elapsed / duration and uses the result
to interpolate. Pick one to shape how an animation accelerates and decelerates,
mirroring the CSS transition-timing-function.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EasingSettles onto the end with a few decaying bounces (bounce-out): a ball dropping onto a floor.static final EasingSlow start, fast end:ease-in(cubic).static final EasingSlow at both ends:ease-in-out(cubic).static final EasingFast start, slow end:ease-out(cubic).static final EasingConstant speed:linear.static final EasingOvershoots past the end then settles: a springy "rubber band" (elastic-out). -
Method Summary
-
Field Details
-
LINEAR
Constant speed:linear. -
EASE_IN
Slow start, fast end:ease-in(cubic). -
EASE_OUT
Fast start, slow end:ease-out(cubic). The most natural for UI reveals. -
EASE_IN_OUT
Slow at both ends:ease-in-out(cubic). -
RUBBER
Overshoots past the end then settles: a springy "rubber band" (elastic-out). -
BOUNCE
Settles onto the end with a few decaying bounces (bounce-out): a ball dropping onto a floor.
-
-
Method Details
-
apply
float apply(float t) - Parameters:
t- normalized time in[0,1]@return the eased progress
-