Skip to content

Releases: d3/d3-ease

v1.0.0

14 Jun 22:51
Compare
Choose a tag to compare
  • First stable release.

Changes since D3 3.x

D3 3.x used strings, such as “cubic-in-out”, to identify easing methods; these strings could be passed to d3.ease or transition.ease. D3 4.0 uses symbols instead, such as d3.easeCubicInOut. Symbols are simpler and cleaner. They work well with Rollup to produce smaller custom bundles. You can still define your own custom easing function, too, if desired. Here’s the full list of equivalents:

¹ The -in, -out and -in-out variants of linear easing are identical, so there’s just d3.easeLinear.
² Elastic and bounce easing were inadvertently reversed in 3.x, so 4.0 eliminates -out-in easing!

For convenience, there are also default aliases for each easing method. For example, d3.easeCubic is an alias for d3.easeCubicInOut. Most default to -in-out; the exceptions are d3.easeBounce and d3.easeElastic, which default to -out.

Rather than pass optional arguments to d3.ease or transition.ease, parameterizable easing functions now have named parameters: poly.exponent, elastic.amplitude, elastic.period and back.overshoot. For example, in D3 3.x you might say:

var e = d3.ease("elastic-out-in", 1.2);

The equivalent in D3 4.0 is:

var e = d3.easeElastic.amplitude(1.2);

Many of the easing functions have been optimized for performance and accuracy. Several bugs have been fixed, as well, such as the interpretation of the overshoot parameter for back easing, and the period parameter for elastic easing. Also, d3-transition now explicitly guarantees that the last tick of the transition happens at exactly t = 1, avoiding floating point errors in some easing functions.

There’s now a nice visual reference and an animated reference to the new easing functions, too!

See CHANGES for all D3 changes since 3.x.

v0.8.0

07 Jun 23:56
Compare
Choose a tag to compare
  • Export to the global d3 in vanilla environments (d3/d3#2840).

v0.7.0

10 Feb 21:21
Compare
Choose a tag to compare
  • Revert the ease interface (#13) in favor of simplicity.

v0.6.0

01 Feb 19:53
Compare
Choose a tag to compare
  • Adopt easing interface (#13).
  • Adopt method chaining for specifying optional easing parameters.

v0.5.2

29 Jan 19:05
Compare
Choose a tag to compare
  • Generate anonymous AMD.

v0.5.1

07 Jan 21:08
Compare
Choose a tag to compare
  • Fix export of easeBind.

v0.5.0

07 Jan 21:06
Compare
Choose a tag to compare
  • Prefix exported symbols with “ease”.

v0.4.0

05 Jan 18:27
Compare
Choose a tag to compare
  • Remove non-in aliases (#12).

v0.3.1

18 Dec 21:26
Compare
Choose a tag to compare
  • Improve the README.

v0.3.0

30 Nov 17:11
Compare
Choose a tag to compare
  • Renamed ease(type[, parameters…]) to bind.