Ever notice that, even with jQuery’s Easing plugin and CSS3 transforms, it’s not really easy to make sine effects in your frontend projects? Being a game designer, I’m a sucker for sine, so this has been bothering me for awhile. Sooo… I finally decided to do something about it. This is an extremely simple jQuery plugin that allows you to add bobbing effects (horizontal or vertical), sine fades, sine scaling, sine rotating, and rotoscaling. Example usage is as follows:
Default vertical bobbing effect:
Alternate bobbing effect (a simpler implementation with better timing control but less accuracy):
Rotoscaling (both rotation and scale):
NEW! Text sinewave scroller (beta):
I threw this together in a day, and it is my first attempt at a jQuery plugin, so go easy on me.
Downloads (COMING SOON):
jQuery.SineBob.js v1.1 (minified)