Klasse Easing
java.lang.Object
de.luckymcdev.foundryengine.common.easing.Easing
- Bekannte direkte Unterklassen:
BezierEasing, Easing.Back, Easing.Elastic
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 KlassenModifikator und TypKlasseBeschreibungstatic classA base class for Back easings.static classBack easing in - backtracking slightly, then reversing direction and moving to target.static classBack easing in/out - backtracking slightly, then reversing direction and moving to target, then overshooting target, reversing, and finally coming back to target.static classBack easing out - moving towards target, overshooting it slightly, then reversing and coming back to target.static classA base class for elastic easings.static classAn Elastic easing used for ElasticIn functions.static classAn Elastic easing used for ElasticInOut functions.static classAn Elastic easing used for ElasticOut functions. -
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final Easing.BackAn instance of BackIn using the default overshoot.static final Easing.BackAn instance of BackInOut using the default overshoot.static final Easing.BackAn instance of BackOut using the default overshoot.static final EasingBounce easing in.static final EasingBounce easing in/out.static final EasingBounce easing out.static final EasingCircular easing in - accelerating from zero velocity.static final EasingCircular easing in/out - acceleration until halfway, then deceleration.static final EasingCircular easing out - decelerating to zero velocity.static final com.mojang.serialization.Codec<Easing> Codec ForEasingstatic final EasingCubic easing in - accelerating from zero velocity.static final EasingCubic easing in/out - acceleration until halfway, then deceleration.static final EasingCubic easing out - decelerating to zero velocity.Map of all Easings.static final Easing.ElasticAn EasingIn instance using the default values.static final Easing.ElasticAn ElasticInOut instance using the default values.static final Easing.ElasticAn ElasticOut instance using the default values.static final EasingExponential easing in - accelerating from zero velocity.static final EasingExponential easing in/out - accelerating until halfway, then decelerating.static final EasingExponential easing out - decelerating to zero velocity.static final EasingSimple linear tweening - no easing.final StringUnique name of the Easing instance.static final EasingQuadratic easing in - accelerating from zero velocity.static final EasingQuadratic easing in/out - acceleration until halfway, then decelerationstatic final EasingQuadratic easing out - decelerating to zero velocity.static final EasingQuartic easing in - accelerating from zero velocity.static final EasingQuartic easing in/out - acceleration until halfway, then deceleration.static final EasingQuartic easing out - decelerating to zero velocity.static final EasingQuintic easing in - accelerating from zero velocity.static final EasingQuintic easing in/out - acceleration until halfway, then deceleration.static final EasingQuintic easing out - decelerating to zero velocity.static final EasingSinusoidal easing in - accelerating from zero velocity.static final EasingSinusoidal easing in/out - accelerating until halfway, then decelerating.static final EasingSinusoidal easing out - decelerating to zero velocity. -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfloatclamped(double value, double min, double max) Clamped Ease with a default duration of 1, using doubles.floatclamped(double value, double min, double max, double time) Clamped Ease doublefloatclamped(float value, float min, float max) Clamped Ease with a default duration of 1.floatclamped(float value, float min, float max, float time) Clamped Easefloatease(double value, double min, double max) The basic function for easing without Time as double.floatease(double value, double min, double max, double time) The basic function for easing as doubles.floatease(float value, float min, float max) The basic function for easing without Time.abstract floatease(float value, float min, float max, float time) The basic function for easing.static EasingRetrieves an Easing instance by its unique name.
-
Felddetails
-
EASINGS
-
CODEC
-
LINEAR
Simple linear tweening - no easing. -
QUAD_IN
Quadratic easing in - accelerating from zero velocity. -
QUAD_OUT
Quadratic easing out - decelerating to zero velocity. -
QUAD_IN_OUT
Quadratic easing in/out - acceleration until halfway, then deceleration -
CUBIC_IN
Cubic easing in - accelerating from zero velocity. -
CUBIC_OUT
Cubic easing out - decelerating to zero velocity. -
CUBIC_IN_OUT
Cubic easing in/out - acceleration until halfway, then deceleration. -
QUARTIC_IN
Quartic easing in - accelerating from zero velocity. -
QUARTIC_OUT
Quartic easing out - decelerating to zero velocity. -
QUARTIC_IN_OUT
Quartic easing in/out - acceleration until halfway, then deceleration. -
QUINTIC_IN
Quintic easing in - accelerating from zero velocity. -
QUINTIC_OUT
Quintic easing out - decelerating to zero velocity. -
QUINTIC_IN_OUT
Quintic easing in/out - acceleration until halfway, then deceleration. -
SINE_IN
Sinusoidal easing in - accelerating from zero velocity. -
SINE_OUT
Sinusoidal easing out - decelerating to zero velocity. -
SINE_IN_OUT
Sinusoidal easing in/out - accelerating until halfway, then decelerating. -
EXPO_IN
Exponential easing in - accelerating from zero velocity. -
EXPO_OUT
Exponential easing out - decelerating to zero velocity. -
EXPO_IN_OUT
Exponential easing in/out - accelerating until halfway, then decelerating. -
CIRC_IN
Circular easing in - accelerating from zero velocity. -
CIRC_OUT
Circular easing out - decelerating to zero velocity. -
CIRC_IN_OUT
Circular easing in/out - acceleration until halfway, then deceleration. -
ELASTIC_IN
An EasingIn instance using the default values. -
ELASTIC_OUT
An ElasticOut instance using the default values. -
ELASTIC_IN_OUT
An ElasticInOut instance using the default values. -
BACK_IN
An instance of BackIn using the default overshoot. -
BACK_OUT
An instance of BackOut using the default overshoot. -
BACK_IN_OUT
An instance of BackInOut using the default overshoot. -
BOUNCE_OUT
Bounce easing out. -
BOUNCE_IN
Bounce easing in. -
BOUNCE_IN_OUT
Bounce easing in/out. -
name
Unique name of the Easing instance.
-
-
Konstruktordetails
-
Easing
Create a new Easing from a Name.- Parameter:
name- the name of the Easing.
-
-
Methodendetails
-
valueOf
-
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 valuemax- the value changedtime- 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 valuemax- the value changedtime- 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 valuemax- 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 valuemax- 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 valuemax- the value changedtime- 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 valuemax- the value changedtime- 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 timemin- the starting valuemax- 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 timemin- the starting valuemax- the change in value- Gibt zurück:
- the clamped eased value
-