GaldurEasing
classclient onlysince 0.1.0com.galdurstudio.galdurui.api.anim.GaldurEasing
Easing curves: they map a linear progress t from 0 to 1 to a progress
that speeds up or slows down. Every curve gives 0 at 0 and 1 at
1. Use them with AnimatedValue, or directly:
double t = Math.min(1, elapsed / (double) durationMs);int y = (int) Math.round(from + (to - from) * GaldurEasing.OUT_CUBIC.applyAsDouble(t));OUT_CUBIC is the default choice for UI: it starts fast, so it reacts at once, and
lands softly.
public final class GaldurEasing
PACKAGEapi.anim
SIDEclient only
THREADclient thread
Fields 7
LINEAR
staticpublic static final DoubleUnaryOperator LINEAR
Constant speed.
IN_QUAD
staticpublic static final DoubleUnaryOperator IN_QUAD
Starts slow, ends fast.
OUT_QUAD
staticpublic static final DoubleUnaryOperator OUT_QUAD
Starts fast, ends slow; subtler than OUT_CUBIC.
IN_OUT_QUAD
staticpublic static final DoubleUnaryOperator IN_OUT_QUAD
Slow at both ends.
OUT_CUBIC
staticpublic static final DoubleUnaryOperator OUT_CUBIC
Starts fast, lands softly: the default choice.
IN_OUT_CUBIC
staticpublic static final DoubleUnaryOperator IN_OUT_CUBIC
Slow at both ends, stronger than IN_OUT_QUAD.
OUT_BACK
staticpublic static final DoubleUnaryOperator OUT_BACK
Slightly overshoots the target before settling: a small bounce.
See alsoGuide : Animations · Discord ↗