Interface Easing

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Easing
An easing curve: maps a normalized time t in [0,1] to an eased progress (usually in [0,1], though some curves may overshoot). The Transition feeds it t = elapsed / duration and uses the result to interpolate. Pick one to shape how an animation accelerates and decelerates, mirroring the CSS transition-timing-function.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Easing
    Settles onto the end with a few decaying bounces (bounce-out): a ball dropping onto a floor.
    static final Easing
    Slow start, fast end: ease-in (cubic).
    static final Easing
    Slow at both ends: ease-in-out (cubic).
    static final Easing
    Fast start, slow end: ease-out (cubic).
    static final Easing
    Constant speed: linear.
    static final Easing
    Overshoots past the end then settles: a springy "rubber band" (elastic-out).
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    apply(float t)
     
  • Field Details

    • LINEAR

      static final Easing LINEAR
      Constant speed: linear.
    • EASE_IN

      static final Easing EASE_IN
      Slow start, fast end: ease-in (cubic).
    • EASE_OUT

      static final Easing EASE_OUT
      Fast start, slow end: ease-out (cubic). The most natural for UI reveals.
    • EASE_IN_OUT

      static final Easing EASE_IN_OUT
      Slow at both ends: ease-in-out (cubic).
    • RUBBER

      static final Easing RUBBER
      Overshoots past the end then settles: a springy "rubber band" (elastic-out).
    • BOUNCE

      static final Easing BOUNCE
      Settles onto the end with a few decaying bounces (bounce-out): a ball dropping onto a floor.
  • Method Details

    • apply

      float apply(float t)
      Parameters:
      t - normalized time in [0,1] @return the eased progress