d3 / d3-ease

Easing functions for smooth animation.
https://d3js.org/d3-ease
BSD 3-Clause "New" or "Revised" License
606 stars 42 forks source link

Cubic Bézier easing? #3

Open mbostock opened 9 years ago

mbostock commented 9 years ago

See mbostock/d3#1982. The only problem is that it’s kind of a pain to evaluate a cubic Bézier for y given x (rather than t), so it probably requires a numerical solution.

Fil commented 4 years ago

I've implemented a new function here https://observablehq.com/d/e7d4fef33e304f2b Compared to a reference implementation: we get the same speed, and, unless I'm mistaken, our results are more accurate for the limiting cases of x1=0 and y1=1.