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";/** * Include via "index.js" * Access items like: am5.ease.myVariable */Variables
Ease does not have any variables.
Functions
bounce(t:Time)Returns
TimeBounces 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.8Returns the easing function called
name("linear","quad","cubic","exp","sine","circle","bounce"or"elastic"), eased in, out or both ways. An unknown name giveslinear.circle(t:Time)Returns
TimeStarts slowly and speeds up steeply near the end, following a quarter circle.
cubic(t:Time)Returns
TimeStarts slowly and speeds up, more sharply than
quad(progress cubed).easingInfo(easing:Easing|undefined)Returns
IEasingInfo|undefinedSince 5.20.8Returns what an easing function is, by name, or
undefinedfor one that was not made from the functions here.elastic(t:Time)Returns
TimeSwings 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
TimeBarely moves at first, then speeds up sharply (exponential).
inOut(ease:Easing)Returns
EasingApplies an easing at both ends: it eases in for the first half and out for the second.
linear(t:Time)Returns
TimeNo easing: the animation runs at a constant speed.
named(easing:Easing,
info:IEasingInfo)Returns
Easingout(ease:Easing)Returns
EasingTurns an easing around, so it starts fast and ends slowly. The easings here ease in (start slowly) unless wrapped in
out()orinOut().pow(t:Time,
e:number)Returns
TimeRaises progress to the power
e:2is the same asquad,3ascubic.quad(t:Time)Returns
TimeStarts slowly and speeds up (progress squared).
sine(t:Time)Returns
TimeStarts gently and speeds up, following a sine curve.
yoyo(ease:Easing)Returns
EasingMakes an easing go there and back: it reaches the end halfway through and returns to the start.