JavaScript rubber band

This is a simple Javascript rubber band funciton that I wrote. Typically an animation function moves directly from point A to point B. This gives a very mechanical feel. I wrote a very simple rubber band funciton. This animates an object with velocity. The object can overshoot the destination and bounce back. The further you drag the farther it bounces.

Grab this and drag

Tested and seems to work in FF, IE and Safari.

Post to Twitter

6 thoughts on “JavaScript rubber band

  1. Some feedback: this has near 100% cpu utilization on my Ubuntu laptop and it is quite slow, moving NOT very naturally, but in fairly large jumps.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>