Skip to content

Instantly share code, notes, and snippets.

@ginlime
Last active August 29, 2015 14:17
Show Gist options
  • Save ginlime/dfc6cbc17c46782ce22b to your computer and use it in GitHub Desktop.
Save ginlime/dfc6cbc17c46782ce22b to your computer and use it in GitHub Desktop.
jQuery で使う easing を cubic bezier で追加する
// 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