Realization of the effect of stretching elastic in canvas

I am making a simple prototype in HTML5 canvas and I want to mainly draw a slingshot. When someone presses and pulls back, I want the rubber band to stretch. It does not have to be perfect.

Any suggestions on how I can do this? I'm not too sure how to simulate the effect :)

thank

+3
source share
2 answers

It would be easier to do with SVG than with canvas, especially using a library like Raphaël . See this demo - it is not very different from what you want to do. If you use Raphaël, then it will be much more portable than canvas, because it will even work on IE 6 (using VML).

Update:

, . . , , , .

+7

All Articles