Skip to content

Instantly share code, notes, and snippets.

@monsieuroeuf
monsieuroeuf / gist:3916085
Last active October 11, 2018 13:53
Proportional scale with Ease and Wizz inOutBack #easeandwizz
// Ease and Wizz 2.0.2 : inOutBack : All keyframes
// Ian Haigh (http://ianhaigh.com/easeandwizz/)
// Last built: 2012-09-26T16:53:49+10:00
// some defaults
var p = 0.8; // period for elastic
var a = 50; // amplitude for elastic
var s = 1.70158; // overshoot amount for "back"
function easeandwizz_inOutBack(t, b, c, d) {
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;