开发者

Has anyone got a basic example of HTML5 <canvas> animation? [closed]

开发者 https://www.devze.com 2023-01-20 06:50 出处:网络
It开发者_C百科's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. Fo
It开发者_C百科's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

I am looking for a basic example of HTML5 <canvas> animation. For example, making a ball bounce, etc.

If someone has one I would be very grateful.


Here’s a (very) basic bouncing ball animation example:

  • http://html5.litten.com/simple-animation-in-the-html5-canvas-element/

Here’s a less basic example: a <canvas> cartoon:

  • http://www.canvasdemos.com/2009/10/09/html-5-canvas-animation/

There’s a tutorial over at Mozilla too, which includes an explanation of basic animation:

  • https://developer.mozilla.org/En/Canvas_tutorial

I think <canvas> is just a drawing surface, rather than something that has any animation capabilities built in. So I think you’re going to have to do a lot of the heavy lifting yourself (with the caveat that I don’t know anything about animation, so I don’t know which bits qualify as heavy lifting).

0

精彩评论

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

关注公众号