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.
Easing curves, each mapping a progress in
[0, 1] to an eased value (0 at the start, 1 at the end).
Easings names the ones here, for files and commands.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EasingPulls back a little before setting off.static final Easingstatic final EasingOvershoots the end slightly, then settles.static final EasingLands and bounces, each bounce smaller.static final Easingstatic final Easingstatic final Easingstatic final EasingSprings past the end and wobbles into place.static final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final Easingstatic final EasingHermite smoothstep: a gentle ease in and out, with no acceleration at either end.static final Easing -
Method Summary
Modifier and TypeMethodDescriptionfloatapply(float progress) Eases a progress in[0, 1].default floatapplyClamped(float progress) This curve clamped: progress outside[0, 1]is pinned to its ends.default Easingreversed()This curve played backwards: starts at the end and eases towards the start.
-
Field Details
-
LINEAR
-
STEP
-
SINE_IN
-
SINE_OUT
-
SINE_IN_OUT
-
QUAD_IN
-
QUAD_OUT
-
QUAD_IN_OUT
-
CUBIC_IN
-
CUBIC_OUT
-
CUBIC_IN_OUT
-
QUART_IN
-
QUART_OUT
-
QUART_IN_OUT
-
EXPO_IN
-
EXPO_OUT
-
EXPO_IN_OUT
-
SMOOTH
Hermite smoothstep: a gentle ease in and out, with no acceleration at either end. -
BACK_IN
Pulls back a little before setting off. -
BACK_OUT
Overshoots the end slightly, then settles. -
BACK_IN_OUT
-
ELASTIC_OUT
Springs past the end and wobbles into place. -
BOUNCE_OUT
Lands and bounces, each bounce smaller.
-
-
Method Details
-
apply
float apply(float progress) Eases a progress in[0, 1]. -
applyClamped
default float applyClamped(float progress) This curve clamped: progress outside[0, 1]is pinned to its ends. -
reversed
This curve played backwards: starts at the end and eases towards the start.
-