Class AnimationAPI

java.lang.Object
net.frozenblock.lib.math.api.AnimationAPI

public final class AnimationAPI extends Object
This class is used to make animations with easings.

Defining a point A(x,y) and B(x,y) you can create an animation between those two points ( A.getY() won't affect the animation).

Learn more at the README

Since:
4.0
  • Method Details

    • relativeX

      public static float relativeX(Point2D a, Point2D b, float x)
    • rawSeed

      @Deprecated public static float rawSeed(float seed)
      Deprecated.
      Use seed() instead of this!
      Generates a "random" number depending on another number.
    • seed

      public static float seed(float seed)
      Executes rawSeed(float) multiple times to make the number look more "random"
    • seed2D

      public static float seed2D(Point2D seed2d, float seed)
      Convert a 2D position with a seed in a resulting seed
    • legAnimation

      public static float legAnimation(float base, float range, float frequency, float limbAngle, float limbDistance, boolean inverted)
    • legAnimation

      public static float legAnimation(float base, float range, float frequency, float limbAngle, float limbDistance)
    • legAnimation

      public static float legAnimation(float base, float limbAngle, float limbDistance, boolean inverted)
    • legAnimation

      public static float legAnimation(float base, float limbAngle, float limbDistance)
    • sineEaseIn

      public static float sineEaseIn(Point2D a, Point2D b, float x)
      SINE EASING - Generated using Math.sin()
    • sineEaseOut

      public static float sineEaseOut(Point2D a, Point2D b, float x)
    • sineEaseInOut

      public static float sineEaseInOut(Point2D a, Point2D b, float x)
    • polyEaseIn

      public static float polyEaseIn(Point2D a, Point2D b, float x, float c)
      POLYNOMIAL EASING - Generated by elevating x at a "c" value
    • polyEaseOut

      public static float polyEaseOut(Point2D a, Point2D b, float x, float c)
    • polyEaseInOut

      public static float polyEaseInOut(Point2D a, Point2D b, float x, float c)
    • quadraticEaseIn

      public static float quadraticEaseIn(Point2D a, Point2D b, float x)
      QUADRATIC EASING - Generated using Poly and assuming c = 2
    • quadraticEaseOut

      public static float quadraticEaseOut(Point2D a, Point2D b, float x)
    • quadraticEaseInOut

      public static float quadraticEaseInOut(Point2D a, Point2D b, float x)
    • cubicEaseIn

      public static float cubicEaseIn(Point2D a, Point2D b, float x)
      CUBIC EASING - Generated using Poly and assuming c = 3
    • cubicEaseOut

      public static float cubicEaseOut(Point2D a, Point2D b, float x)
    • cubicEaseInOut

      public static float cubicEaseInOut(Point2D a, Point2D b, float x)
    • quarticEaseIn

      public static float quarticEaseIn(Point2D a, Point2D b, float x)
      QUARTIC EASING - Generated using Poly and assuming c = 4
    • quarticEaseOut

      public static float quarticEaseOut(Point2D a, Point2D b, float x)
    • quarticEaseInOut

      public static float quarticEaseInOut(Point2D a, Point2D b, float x)
    • quinticEaseIn

      public static float quinticEaseIn(Point2D a, Point2D b, float x)
      QUINTIC EASING - Generated using Poly and assuming c = 5
    • quinticEaseOut

      public static float quinticEaseOut(Point2D a, Point2D b, float x)
    • quinticEaseInOut

      public static float quinticEaseInOut(Point2D a, Point2D b, float x)
    • expoEaseIn

      public static float expoEaseIn(Point2D a, Point2D b, float x)
      EXPONENTIAL EASING - Generated by 2^x
    • expoEaseOut

      public static float expoEaseOut(Point2D a, Point2D b, float x)
    • expoEaseInOut

      public static float expoEaseInOut(Point2D a, Point2D b, float x)
    • circEaseIn

      public static float circEaseIn(Point2D a, Point2D b, float x, int roundness)
      CICRULAR EASING - Uses Roots and Powers to make curves
    • circEaseOut

      public static float circEaseOut(Point2D a, Point2D b, float x, int roundness)
    • circEaseInOut

      public static float circEaseInOut(Point2D a, Point2D b, float x, int roundness)
    • circEaseIn

      public static float circEaseIn(Point2D a, Point2D b, float x)
    • circEaseOut

      public static float circEaseOut(Point2D a, Point2D b, float x)
    • circEaseInOut

      public static float circEaseInOut(Point2D a, Point2D b, float x)
    • elasticEaseIn

      public static float elasticEaseIn(Point2D a, Point2D b, float x, int c)
      ELASTIC EASING - Generated by Cosine and a variable "c" of the curves intensity
    • elasticEaseOut

      public static float elasticEaseOut(Point2D a, Point2D b, float x, int c)
    • elasticEaseInOut

      public static float elasticEaseInOut(Point2D a, Point2D b, float x, int c)
    • elasticEaseIn

      public static float elasticEaseIn(Point2D a, Point2D b, float x)
    • elasticEaseOut

      public static float elasticEaseOut(Point2D a, Point2D b, float x)
    • elasticEaseInOut

      public static float elasticEaseInOut(Point2D a, Point2D b, float x)
    • bounceEaseIn

      public static float bounceEaseIn(Point2D a, Point2D b, float x, int c)
      BOUNCE EASING - Generated by an elastic absoluted
    • bounceEaseOut

      public static float bounceEaseOut(Point2D a, Point2D b, float x, int c)
    • bounceEaseInOut

      public static float bounceEaseInOut(Point2D a, Point2D b, float x, int c)
    • bounceEaseIn

      public static float bounceEaseIn(Point2D a, Point2D b, float x)
    • bounceEaseOut

      public static float bounceEaseOut(Point2D a, Point2D b, float x)
    • bounceEaseInOut

      public static float bounceEaseInOut(Point2D a, Point2D b, float x)
    • backEaseIn

      public static float backEaseIn(Point2D a, Point2D b, float x, float c1)
      BACK EASING - Generates a curve that comes back a little at the end (defined by an amount a >= 0)
    • backEaseOut

      public static float backEaseOut(Point2D a, Point2D b, float x, float c1)
    • backEaseInOut

      public static float backEaseInOut(Point2D a, Point2D b, float x, float c1)
    • backEaseIn

      public static float backEaseIn(Point2D a, Point2D b, float x)
    • backEaseOut

      public static float backEaseOut(Point2D a, Point2D b, float x)
    • backEaseInOut

      public static float backEaseInOut(Point2D a, Point2D b, float x)
    • line

      public static float line(Point2D a, Point2D b, float x)
      LOOP SYSTEM Loop: defines A and B and always repeat between these two values Boomerang: creates a loop but instead of repeating it from start, it comes back and THEN loop
    • flat

      public static float flat(Point2D a, Point2D b, float x)
    • flat2

      public static float flat2(Point2D a, Point2D b, float x)
    • inverse

      public static float inverse(Point2D a, Point2D b, float x)
    • boomerang

      public static float boomerang(Point2D a, Point2D b, float x)
    • loop

      public static float loop(Point2D a, Point2D b, float x)