Create a canvas animation engine from scratch

Source: Internet
Author: User

 

Currently, there is no mature tool for canvas development. If you want to make an animation, you need to write the original script to achieve it. Learn to start from 0 as an animation engine

Resource, as shown in the following figure.

-------------------------------- My cute split line --------------------------------------

This simple animation engine is mainly intended for canvas development. Development can implement element nesting like DIV at ordinary times. I use a bitmap. js class to do something similar to IMG,

Another Sprite. js class is used to play movie frames similar to moveclip in flash. Sprite achieves different frame rates. In the demo below, you can see two running rates

Different penguins. But now there is a bug that the two geese occasionally pause while the animation is running. If you are interested, you can check it out. Alas, put the demo andCodeRight.

 

 

Download the code here

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.