Easing Functions

ease_linear

Returns a linear ease

ease_poly

Returns a polynomial ease

ease_quad

Returns a quadratic ease

ease_cubic

Returns a cubic ease

ease_quart

Returns a quartic ease

ease_quint

Returns a quintic ease

ease_sin

Returns a sine ease

ease_exp

Returns an exponential ease

ease_circle

Returns a circular ease

ease_back

Returns a back ease

ease_elastic

Returns an elastic ease

ease_bounce

Returns a bounce ease


Easing Function Graphs

../../_images/all.png

Combine Easing Functions

combine_easing(easing1: EasingType, easing2: EasingType) Callable[[float], float]

Combines 2 easing functions together.

The 1st easing function is used for t values below 0.5 and the 2nd easing function is used for t values above 0.5

Parameters
  • easing1 (EasingType) – the 1st easing function for t < 0.5

  • easing2 (EasingType) – the 2nd easing function for t ≥ 0.5

Raises

TypeErroreasing1 and easing2 must be easing functions

Examples

>>> ease1 = gp.ease_elastic_in()
>>> ease2 = gp.ease_bounce_out()
>>> new_ease = combine_easing(ease1, ease2)
Return type

Callable[[float], float]

../../_images/combine_easing.png