Klasse Easing

java.lang.Object
de.luckymcdev.foundryengine.common.easing.Easing
Bekannte direkte Unterklassen:
BezierEasing, Easing.Back, Easing.Elastic

public abstract class Easing extends Object

The Easing class holds a set of general-purpose motion tweening functions by Robert Penner. This class is essentially a port from Penner's ActionScript utility, with a few added tweaks.

Examples:

//no tween
Easing e1 = Easing.LINEAR;

//backOut tween, the overshoot is Easing.Back.DEFAULT_OVERSHOOT
Easing e2 = Easing.BACK_OUT;

//backOut tween, the overshoot is 1.85f
Easing.Back e3 = new Easing.BackOut(1.85f);
Robert Penner's Easing Functions
  • Verschachtelte Klassen - Übersicht

    Verschachtelte Klassen
    Modifikator und Typ
    Klasse
    Beschreibung
    static class 
    A base class for Back easings.
    static class 
    Back easing in - backtracking slightly, then reversing direction and moving to target.
    static class 
    Back easing in/out - backtracking slightly, then reversing direction and moving to target, then overshooting target, reversing, and finally coming back to target.
    static class 
    Back easing out - moving towards target, overshooting it slightly, then reversing and coming back to target.
    static class 
    A base class for elastic easings.
    static class 
    An Elastic easing used for ElasticIn functions.
    static class 
    An Elastic easing used for ElasticInOut functions.
    static class 
    An Elastic easing used for ElasticOut functions.
  • Feldübersicht

    Felder
    Modifikator und Typ
    Feld
    Beschreibung
    static final Easing.Back
    An instance of BackIn using the default overshoot.
    static final Easing.Back
    An instance of BackInOut using the default overshoot.
    static final Easing.Back
    An instance of BackOut using the default overshoot.
    static final Easing
    Bounce easing in.
    static final Easing
    Bounce easing in/out.
    static final Easing
    Bounce easing out.
    static final Easing
    Circular easing in - accelerating from zero velocity.
    static final Easing
    Circular easing in/out - acceleration until halfway, then deceleration.
    static final Easing
    Circular easing out - decelerating to zero velocity.
    static final com.mojang.serialization.Codec<Easing>
    Codec For Easing
    static final Easing
    Cubic easing in - accelerating from zero velocity.
    static final Easing
    Cubic easing in/out - acceleration until halfway, then deceleration.
    static final Easing
    Cubic easing out - decelerating to zero velocity.
    static final HashMap<String,Easing>
    Map of all Easings.
    static final Easing.Elastic
    An EasingIn instance using the default values.
    static final Easing.Elastic
    An ElasticInOut instance using the default values.
    static final Easing.Elastic
    An ElasticOut instance using the default values.
    static final Easing
    Exponential easing in - accelerating from zero velocity.
    static final Easing
    Exponential easing in/out - accelerating until halfway, then decelerating.
    static final Easing
    Exponential easing out - decelerating to zero velocity.
    static final Easing
    Simple linear tweening - no easing.
    final String
    Unique name of the Easing instance.
    static final Easing
    Quadratic easing in - accelerating from zero velocity.
    static final Easing
    Quadratic easing in/out - acceleration until halfway, then deceleration
    static final Easing
    Quadratic easing out - decelerating to zero velocity.
    static final Easing
    Quartic easing in - accelerating from zero velocity.
    static final Easing
    Quartic easing in/out - acceleration until halfway, then deceleration.
    static final Easing
    Quartic easing out - decelerating to zero velocity.
    static final Easing
    Quintic easing in - accelerating from zero velocity.
    static final Easing
    Quintic easing in/out - acceleration until halfway, then deceleration.
    static final Easing
    Quintic easing out - decelerating to zero velocity.
    static final Easing
    Sinusoidal easing in - accelerating from zero velocity.
    static final Easing
    Sinusoidal easing in/out - accelerating until halfway, then decelerating.
    static final Easing
    Sinusoidal easing out - decelerating to zero velocity.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Easing(String name)
    Create a new Easing from a Name.
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    float
    clamped(double value, double min, double max)
    Clamped Ease with a default duration of 1, using doubles.
    float
    clamped(double value, double min, double max, double time)
    Clamped Ease double
    float
    clamped(float value, float min, float max)
    Clamped Ease with a default duration of 1.
    float
    clamped(float value, float min, float max, float time)
    Clamped Ease
    float
    ease(double value, double min, double max)
    The basic function for easing without Time as double.
    float
    ease(double value, double min, double max, double time)
    The basic function for easing as doubles.
    float
    ease(float value, float min, float max)
    The basic function for easing without Time.
    abstract float
    ease(float value, float min, float max, float time)
    The basic function for easing.
    static Easing
    Retrieves an Easing instance by its unique name.

    Von Klasse geerbte Methoden Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • EASINGS

      public static final HashMap<String,Easing> EASINGS
      Map of all Easings.
    • CODEC

      public static final com.mojang.serialization.Codec<Easing> CODEC
      Codec For Easing
    • LINEAR

      public static final Easing LINEAR
      Simple linear tweening - no easing.
    • QUAD_IN

      public static final Easing QUAD_IN
      Quadratic easing in - accelerating from zero velocity.
    • QUAD_OUT

      public static final Easing QUAD_OUT
      Quadratic easing out - decelerating to zero velocity.
    • QUAD_IN_OUT

      public static final Easing QUAD_IN_OUT
      Quadratic easing in/out - acceleration until halfway, then deceleration
    • CUBIC_IN

      public static final Easing CUBIC_IN
      Cubic easing in - accelerating from zero velocity.
    • CUBIC_OUT

      public static final Easing CUBIC_OUT
      Cubic easing out - decelerating to zero velocity.
    • CUBIC_IN_OUT

      public static final Easing CUBIC_IN_OUT
      Cubic easing in/out - acceleration until halfway, then deceleration.
    • QUARTIC_IN

      public static final Easing QUARTIC_IN
      Quartic easing in - accelerating from zero velocity.
    • QUARTIC_OUT

      public static final Easing QUARTIC_OUT
      Quartic easing out - decelerating to zero velocity.
    • QUARTIC_IN_OUT

      public static final Easing QUARTIC_IN_OUT
      Quartic easing in/out - acceleration until halfway, then deceleration.
    • QUINTIC_IN

      public static final Easing QUINTIC_IN
      Quintic easing in - accelerating from zero velocity.
    • QUINTIC_OUT

      public static final Easing QUINTIC_OUT
      Quintic easing out - decelerating to zero velocity.
    • QUINTIC_IN_OUT

      public static final Easing QUINTIC_IN_OUT
      Quintic easing in/out - acceleration until halfway, then deceleration.
    • SINE_IN

      public static final Easing SINE_IN
      Sinusoidal easing in - accelerating from zero velocity.
    • SINE_OUT

      public static final Easing SINE_OUT
      Sinusoidal easing out - decelerating to zero velocity.
    • SINE_IN_OUT

      public static final Easing SINE_IN_OUT
      Sinusoidal easing in/out - accelerating until halfway, then decelerating.
    • EXPO_IN

      public static final Easing EXPO_IN
      Exponential easing in - accelerating from zero velocity.
    • EXPO_OUT

      public static final Easing EXPO_OUT
      Exponential easing out - decelerating to zero velocity.
    • EXPO_IN_OUT

      public static final Easing EXPO_IN_OUT
      Exponential easing in/out - accelerating until halfway, then decelerating.
    • CIRC_IN

      public static final Easing CIRC_IN
      Circular easing in - accelerating from zero velocity.
    • CIRC_OUT

      public static final Easing CIRC_OUT
      Circular easing out - decelerating to zero velocity.
    • CIRC_IN_OUT

      public static final Easing CIRC_IN_OUT
      Circular easing in/out - acceleration until halfway, then deceleration.
    • ELASTIC_IN

      public static final Easing.Elastic ELASTIC_IN
      An EasingIn instance using the default values.
    • ELASTIC_OUT

      public static final Easing.Elastic ELASTIC_OUT
      An ElasticOut instance using the default values.
    • ELASTIC_IN_OUT

      public static final Easing.Elastic ELASTIC_IN_OUT
      An ElasticInOut instance using the default values.
    • BACK_IN

      public static final Easing.Back BACK_IN
      An instance of BackIn using the default overshoot.
    • BACK_OUT

      public static final Easing.Back BACK_OUT
      An instance of BackOut using the default overshoot.
    • BACK_IN_OUT

      public static final Easing.Back BACK_IN_OUT
      An instance of BackInOut using the default overshoot.
    • BOUNCE_OUT

      public static final Easing BOUNCE_OUT
      Bounce easing out.
    • BOUNCE_IN

      public static final Easing BOUNCE_IN
      Bounce easing in.
    • BOUNCE_IN_OUT

      public static final Easing BOUNCE_IN_OUT
      Bounce easing in/out.
    • name

      public final String name
      Unique name of the Easing instance.
  • Konstruktordetails

    • Easing

      public Easing(String name)
      Create a new Easing from a Name.
      Parameter:
      name - the name of the Easing.
  • Methodendetails

    • valueOf

      public static Easing valueOf(String name)
      Retrieves an Easing instance by its unique name.
      Parameter:
      name - the name of the easing to retrieve.
      Gibt zurück:
      the matching Easing instance, or null if not found.
    • ease

      public abstract float ease(float value, float min, float max, float time)
      The basic function for easing.
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      time - the duration time
      Gibt zurück:
      the eased value
    • ease

      public float ease(double value, double min, double max, double time)
      The basic function for easing as doubles.
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      time - the duration time
      Gibt zurück:
      the eased value
    • ease

      public float ease(float value, float min, float max)
      The basic function for easing without Time.
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      Gibt zurück:
      the eased value
    • ease

      public float ease(double value, double min, double max)
      The basic function for easing without Time as double.
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      Gibt zurück:
      the eased value
    • clamped

      public float clamped(float value, float min, float max, float time)
      Clamped Ease
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      time - the duration time
      Gibt zurück:
      the eased value
    • clamped

      public float clamped(double value, double min, double max, double time)
      Clamped Ease double
      Parameter:
      value - the time (either frames or in seconds/milliseconds)
      min - the beginning value
      max - the value changed
      time - the duration time
      Gibt zurück:
      the eased value
    • clamped

      public float clamped(float value, float min, float max)
      Clamped Ease with a default duration of 1.
      Parameter:
      value - the current time
      min - the starting value
      max - the change in value
      Gibt zurück:
      the clamped eased value
    • clamped

      public float clamped(double value, double min, double max)
      Clamped Ease with a default duration of 1, using doubles.
      Parameter:
      value - the current time
      min - the starting value
      max - the change in value
      Gibt zurück:
      the clamped eased value