Skip to content

Ease

Type module

Sources

Items from Ease can be imported/included and used via following ways.

/**
* Import via main package
* Access items like: am5.ease.myVariable
*/
import * as am5 from "@amcharts/amcharts5";
/**
* Import via: Ease.ts
* Access items like: $ease.myVariable
*/
import * as $ease from "@amcharts/amcharts5/Ease";

Variables

Ease does not have any variables.

Functions

bounce(t: Time)

Returns Time

Bounces at the start before heading to the end. out(bounce) bounces at the end instead, like a dropped ball.

byName(name?: undefined | string,
mode?: "in" | "out" | "inOut"
)

Returns EasingSince 5.20.8

Returns the easing function called name ("linear", "quad", "cubic", "exp", "sine", "circle", "bounce" or "elastic"), eased in, out or both ways. An unknown name gives linear.

circle(t: Time)

Returns Time

Starts slowly and speeds up steeply near the end, following a quarter circle.

cubic(t: Time)

Returns Time

Starts slowly and speeds up, more sharply than quad (progress cubed).

easingInfo(easing: Easing | undefined)

Returns IEasingInfo | undefinedSince 5.20.8

Returns what an easing function is, by name, or undefined for one that was not made from the functions here.

elastic(t: Time)

Returns Time

Swings back and forth with growing swings before reaching the end, like a spring. out(elastic) springs past the end and settles instead.

exp(t: Time)

Returns Time

Barely moves at first, then speeds up sharply (exponential).

inOut(ease: Easing)

Returns Easing

Applies an easing at both ends: it eases in for the first half and out for the second.

linear(t: Time)

Returns Time

No easing: the animation runs at a constant speed.

named(easing: Easing,
info: IEasingInfo
)

Returns Easing

out(ease: Easing)

Returns Easing

Turns an easing around, so it starts fast and ends slowly. The easings here ease in (start slowly) unless wrapped in out() or inOut().

pow(t: Time,
e: number
)

Returns Time

Raises progress to the power e: 2 is the same as quad, 3 as cubic.

quad(t: Time)

Returns Time

Starts slowly and speeds up (progress squared).

sine(t: Time)

Returns Time

Starts gently and speeds up, following a sine curve.

yoyo(ease: Easing)

Returns Easing

Makes an easing go there and back: it reaches the end halfway through and returns to the start.