开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜