Enum Class TweenFunction

java.lang.Object
java.lang.Enum<TweenFunction>
de.gurkenlabs.litiengine.tweening.TweenFunction
All Implemented Interfaces:
Serializable, Comparable<TweenFunction>, Constable

public enum TweenFunction extends Enum<TweenFunction>
Easing equations based on Robert Penner's work: ...
  • Enum Constant Details

    • LINEAR

      public static final TweenFunction LINEAR
      Linear interpolation: f(t) = t.
    • QUAD_IN

      public static final TweenFunction QUAD_IN
      Quadratic ease-in.
    • QUAD_OUT

      public static final TweenFunction QUAD_OUT
      Quadratic ease-out.
    • QUAD_INOUT

      public static final TweenFunction QUAD_INOUT
      Quadratic ease-in / ease-out.
    • CIRCLE_IN

      public static final TweenFunction CIRCLE_IN
      Circular ease-in.
    • CIRCLE_OUT

      public static final TweenFunction CIRCLE_OUT
      Circular ease-out.
    • CIRCLE_INOUT

      public static final TweenFunction CIRCLE_INOUT
      Circular ease-in / ease-out.
    • SINE_IN

      public static final TweenFunction SINE_IN
      Sinusoidal ease-in.
    • SINE_OUT

      public static final TweenFunction SINE_OUT
      Sinusoidal ease-out.
    • SINE_INOUT

      public static final TweenFunction SINE_INOUT
      Sinusoidal ease-in / ease-out.
    • EXPO_IN

      public static final TweenFunction EXPO_IN
      Exponential ease-in.
    • EXPO_OUT

      public static final TweenFunction EXPO_OUT
      Exponential ease-out.
    • EXPO_INOUT

      public static final TweenFunction EXPO_INOUT
      Exponential ease-in / ease-out.
    • BACK_IN

      public static final TweenFunction BACK_IN
      Back ease-in (overshoots origin slightly before easing in).
    • BACK_OUT

      public static final TweenFunction BACK_OUT
      Back ease-out (overshoots target slightly before settling).
    • BACK_INOUT

      public static final TweenFunction BACK_INOUT
      Back ease-in / ease-out (overshoots on both ends).
    • BOUNCE_OUT

      public static final TweenFunction BOUNCE_OUT
      Bounce ease-out (bouncing settle to target).
    • BOUNCE_IN

      public static final TweenFunction BOUNCE_IN
      Bounce ease-in (mirror of BOUNCE_OUT).
    • BOUNCE_INOUT

      public static final TweenFunction BOUNCE_INOUT
      Bounce ease-in / ease-out.
    • ELASTIC_IN

      public static final TweenFunction ELASTIC_IN
      Elastic ease-in.
    • ELASTIC_OUT

      public static final TweenFunction ELASTIC_OUT
      Elastic ease-out.
    • ELASTIC_INOUT

      public static final TweenFunction ELASTIC_INOUT
      Elastic ease-in / ease-out.
  • Method Details

    • values

      public static TweenFunction[] 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

      public static TweenFunction valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getEquation

      public TweenEquation getEquation()
      Gets the mathematical equation.
      Returns:
      the equation
    • 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.