Cubic Bezier Approximations for Robert Penner Easing Equations
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
compare_curve.js
easing.js
fit_curve.js
test_curves.html

README.md

Cubic Bezier Approximations for Robert Penner Easing Equations

A "better" set of Cubic Bezier approximations for Robert Penner Easing Equations using bruteforce. Please excuse the rawness of this project. The idea was conceived and hacked out on Christmas night. Merry Christmas!

Read more

Demo

here

Usage

node compare_curve.js

Sample Output

at 0.98 0.76 0.52 0.24
compute: 53232ms
Number of permutations: 6632550
CONGRATS DONE!
QuadIn: [ 0.26, 0, 0.6, 0.2 ] ,
QuadOut: [ 0.4, 0.8, 0.74, 1 ] ,
QuadInOut: [ 0.48, 0.04, 0.52, 0.96 ] ,
CubicIn: [ 0.4, 0, 0.68, 0.06 ] ,
CubicOut: [ 0.32, 0.94, 0.6, 1 ] ,
CubicInOut: [ 0.66, 0, 0.34, 1 ] ,
QuartIn: [ 0.52, 0, 0.74, 0 ] ,
QuartOut: [ 0.26, 1, 0.48, 1 ] ,
QuartInOut: [ 0.76, 0, 0.24, 1 ] ,
QuintIn: [ 0.64, 0, 0.78, 0 ] ,
QuintOut: [ 0.22, 1, 0.36, 1 ] ,
QuintInOut: [ 0.84, 0, 0.16, 1 ] ,
SineIn: [ 0.32, 0, 0.6, 0.36 ] ,
SineOut: [ 0.4, 0.64, 0.68, 1 ] ,
SineInOut: [ 0.36, 0, 0.64, 1 ] ,
ExpoIn: [ 0.66, 0, 0.86, 0 ] ,
ExpoOut: [ 0.14, 1, 0.34, 1 ] ,
ExpoInOut: [ 0.9, 0, 0.1, 1 ] ,
CircIn: [ 0.54, 0, 1, 0.44 ] ,
CircOut: [ 0, 0.56, 0.46, 1 ] ,
CircInOut: [ 0.88, 0.14, 0.12, 0.86 ] ,