Enum Class TweenFunction
- All Implemented Interfaces:
Serializable, Comparable<TweenFunction>, Constable
Easing equations based on Robert Penner's work: ...
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBack ease-in (overshoots origin slightly before easing in).Back ease-in / ease-out (overshoots on both ends).Back ease-out (overshoots target slightly before settling).Bounce ease-in (mirror ofBOUNCE_OUT).Bounce ease-in / ease-out.Bounce ease-out (bouncing settle to target).Circular ease-in.Circular ease-in / ease-out.Circular ease-out.Elastic ease-in.Elastic ease-in / ease-out.Elastic ease-out.Exponential ease-in.Exponential ease-in / ease-out.Exponential ease-out.Linear interpolation:f(t) = t.Quadratic ease-in.Quadratic ease-in / ease-out.Quadratic ease-out.Sinusoidal ease-in.Sinusoidal ease-in / ease-out.Sinusoidal ease-out. -
Method Summary
Modifier and TypeMethodDescriptionfloatcompute(float time) Computes the next value of the interpolation.Gets the mathematical equation.static TweenFunctionReturns the enum constant of this class with the specified name.static TweenFunction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LINEAR
Linear interpolation:f(t) = t. -
QUAD_IN
Quadratic ease-in. -
QUAD_OUT
Quadratic ease-out. -
QUAD_INOUT
Quadratic ease-in / ease-out. -
CIRCLE_IN
Circular ease-in. -
CIRCLE_OUT
Circular ease-out. -
CIRCLE_INOUT
Circular ease-in / ease-out. -
SINE_IN
Sinusoidal ease-in. -
SINE_OUT
Sinusoidal ease-out. -
SINE_INOUT
Sinusoidal ease-in / ease-out. -
EXPO_IN
Exponential ease-in. -
EXPO_OUT
Exponential ease-out. -
EXPO_INOUT
Exponential ease-in / ease-out. -
BACK_IN
Back ease-in (overshoots origin slightly before easing in). -
BACK_OUT
Back ease-out (overshoots target slightly before settling). -
BACK_INOUT
Back ease-in / ease-out (overshoots on both ends). -
BOUNCE_OUT
Bounce ease-out (bouncing settle to target). -
BOUNCE_IN
Bounce ease-in (mirror ofBOUNCE_OUT). -
BOUNCE_INOUT
Bounce ease-in / ease-out. -
ELASTIC_IN
Elastic ease-in. -
ELASTIC_OUT
Elastic ease-out. -
ELASTIC_INOUT
Elastic ease-in / ease-out.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getEquation
-
compute
public float compute(float time) Computes the next value of the interpolation.- Parameters:
time- The current progress of the tween duration, between 0 and 1.- Returns:
- The next interpolated value.
-