Last active
August 29, 2015 14:17
-
-
Save ginlime/dfc6cbc17c46782ce22b to your computer and use it in GitHub Desktop.
jQuery で使う easing を cubic bezier で追加する
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
// jQuery easing に ease を追加 | |
$.extend( $.easing, | |
{ | |
ease: function(x, t, b, c, d){ | |
var easing = BezierEasing.css.ease; | |
return easing(t/d); | |
} | |
}); | |
// jQuery easing に超適当に作った cubic bezier を tekitou という名前で追加 | |
// cubic bezier は http://cubic-bezier.com/ を利用すると簡単 | |
$.extend( $.easing, | |
{ | |
tekitou: function(x, t, b, c, d){ | |
var easing = BezierEasing(0.24,0.94,0.65,0.09); | |
return easing(t/d); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment