Open-source HTML5 application development framework

Source: Internet
Author: User

With the development of HTML5, more and more HTML5-based Web development frameworks are emerging. In today's article, we will introduce iio Engine, it is an open-source web framework for creating HTML5 applications.

The entire framework is very lightweight, only 45 KB in size, and is integrated with the debug system and supported across platforms.

Does not rely on any third-party class library, can support Box2D, with complete documentation support. Supports quick development.

To use this class library, you only need to use more than 10 lines of code to generate an tic-tac game. The Code is as follows:

TicTacToe = function (io ){

Var grid = io. addObj (new iio. ioGrid (120)
. SetStrokeStyle ('white '));
Var xTurn = true;
Io. canvas. addEventListener ('mousedown ', function (event ){
Var c = grid. getCellAt (io. getEventPosition (event), true );
If (typeof grid. cells [c. x] [c. y]. taken = 'undefined '){
If (xTurn)
Io. addObj (new iio. ioX (grid. getCellCenter (c), 80)
. SetStrokeStyle ('red', 2 ));
Else
Io. addObj (new iio. ioCircle (grid. getCellCenter (c), 40)
. SetStrokeStyle ('# 00baff', 2 ));
Grid. cells [c. x] [c. y]. taken = true;
XTurn =! XTurn;
}
});
}; Iio. start (TicTacToe, 'canvasid ');

Related Article

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.