Created
October 19, 2011 23:16
-
-
Save matharchod/1299969 to your computer and use it in GitHub Desktop.
A custom jQuery easing function called "comicSwing". I use it on my portfolio site for my jQuery scrollables.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// custom easing called "comicSwing" | |
$.easing.comicSwing = function (x, t, b, c, d) { | |
var s = 1.5; | |
if ((t/=d/2) < 1) return c/5*(t*t*(((s*=(1.525))+1)*t - s)) + b; | |
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment