easings

Types

An Easing function maps a float from 0..1 into a float

pub type Easing =
  fn(Float) -> Float

Values

pub fn back_in(t: Float) -> Float

Eases away from the goal before accelerating toward it.

pub fn back_in_out(t: Float) -> Float

Eases away from the goal, and then beyond it.

pub fn back_out(t: Float) -> Float

Eases quickly past the goal before settling toward it.

pub fn bounce_in(t: Float) -> Float

Eases in by “bouncing” around the start.

pub fn bounce_in_out(t: Float) -> Float

Eases in and out by “bouncing” around the start and the end.

pub fn bounce_out(t: Float) -> Float

Eases out by “bouncing” around the end.

pub fn circular_in(t: Float) -> Float

Eases in on an elliptic arc.

pub fn circular_in_out(t: Float) -> Float

Eases in and out on elliptic arcs.

pub fn circular_out(t: Float) -> Float

Eases out on an elliptic arc.

pub fn cubic_in(t: Float) -> Float

Eases in cubically.

pub fn cubic_in_out(t: Float) -> Float

Eases in and out cubically.

pub fn cubic_out(t: Float) -> Float

Eases out cubically.

pub fn elastic_in(t: Float) -> Float

Eases by oscillating with increasing amplitude around the start.

pub fn elastic_in_out(t: Float) -> Float

Eases by oscillating with increasing amplitude around the start, and decreasing around the end.

pub fn elastic_out(t: Float) -> Float

Eases by oscillating with decreasing amplitude around the end.

pub fn exponential_in(t: Float) -> Float

Eases in exponentially.

pub fn exponential_in_out(t: Float) -> Float

Eases in and out exponentially.

pub fn exponential_out(t: Float) -> Float

Eases out exponentially.

pub fn linear(t: Float) -> Float

Linear easing is an identity transformation, time is not skewed.

pub fn quadratic_in(t: Float) -> Float

Eases in quadratically.

pub fn quadratic_in_out(t: Float) -> Float

Eases in and out quadratically.

pub fn quadratic_out(t: Float) -> Float

Eases out quadratically.

pub fn quartic_in(t: Float) -> Float

Eases in quartically.

pub fn quartic_in_out(t: Float) -> Float

Eases in and out quartically.

pub fn quartic_out(t: Float) -> Float

Eases out quartically.

pub fn quintic_in(t: Float) -> Float

Eases in quintically.

pub fn quintic_in_out(t: Float) -> Float

Eases in and out quintically.

pub fn quintic_out(t: Float) -> Float

Eases out quintically.

pub fn sine_in(t: Float) -> Float

Eases in with a sine function.

pub fn sine_in_out(t: Float) -> Float

Eases in and out with a sine function.

pub fn sine_out(t: Float) -> Float

Eases out with a sine function.

Search Document