Package nl.colorize.util.animation
Interface Interpolation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interpolation methods. Some of these were converted from Flash ActionScript
implementations explained in the article
http://gizma.com/easing/.
The JavaDoc for each interpolation method includes a graphical example in ASCII art to visualize the interpolation curve.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Interpolation
Cubic easing interpolation.static final Interpolation
Discrete interpolation.static final Interpolation
Easing interpolation.static final Interpolation
Linear interpolation.static final Interpolation
Quadratic easing interpolation. -
Method Summary
Modifier and TypeMethodDescriptionfloat
interpolate
(float x0, float x1, float delta) Returns the interpolated value betweenx0
andx1
.
-
Field Details
-
DISCRETE
Discrete interpolation.. . . . . . . . x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x x x x x x x x .
-
LINEAR
Linear interpolation.. . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . x . . . . . . . .
-
EASE
Easing interpolation.. . . . . . . x x . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . x x . . . . . . .
-
CUBIC
Cubic easing interpolation.. . . . . . x x x . . . . . . . . . . . . . . x . . . . . . . . . . . . . . . . . . . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . x x x . . . . . .
-
QUADRATIC
Quadratic easing interpolation.. . . . . . . x x . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . x . . . . . . . . . . . . . . . . x . . . . . . . . . . . . . . x x x . . . . . .
-
-
Method Details
-
interpolate
float interpolate(float x0, float x1, float delta) Returns the interpolated value betweenx0
andx1
. The value ofdelta
is a number between 0 and 1 describing how much of the animation has been completed.
-