HTML5 Move Image Along Path
I'm trying to move a png or gif along a predetermin开发者_StackOverflowed path inside a <canvas>
element. Can anyone provide a few resources or code samples to get me started?
Thanks in advance!
You may want to look at this link: https://developer.mozilla.org/En/Canvas_tutorial:Basic_animations for more information, but basically your best bet is to erase the canvas, then redraw everything having moved the image, which you drew with 'drawImage'.
The x,y coordinates will change based on your path.
精彩评论