Ease

Type module

Sources

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

/**
 * --------------------------------------------------------
 * Import via main package: core.ts
 * Access items like: am5.ease.myVariable
 *                    am5.ease.myFunction()
 * --------------------------------------------------------
 */
import * as am5 from "@amcharts/amcharts5";

/**
 * --------------------------------------------------------
 * Import via: Ease.ts
 * Access items like: $ease.myVariable
 *                    $ease.myFunction()
 * --------------------------------------------------------
 */
import * as $ease from "@amcharts/amcharts5/Ease";

/**
 * --------------------------------------------------------
 * Include via "index.js"
 * E.g.: "https://cdn.amcharts.com/lib/5/index.js"
 * Access items like: am5.ease.myVariable
 *                    am5.ease.myFunction()
 * --------------------------------------------------------
 */

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 Easing

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.

@since 5.20.8

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 | undefined

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

@since 5.20.8

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.