ease(t)
Given the specified normalized time t, typically in the range [0,1], returns the “eased” time tʹ, also typically in [0,1]. 0 represents the start of the animation and 1 represents the end. A good implementation returns 0 if t = 0 and 1 if t = 1. See the easing explorer for a visual demonstration. For example, to apply cubic easing:
var te = d3.easeCubic(t);
Similarly, to apply custom elastic easing:
// Before the animation starts, create your easing function. var customElastic = d3.easeElastic.period(0.4); // During the animation, apply the easing function. var te = customElastic(t);
Please login to continue.