Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

NetWorkRepositories/AlloyRenderingEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

54 Commits

Repository files navigation

AlloyRenderingEngine

Super fast HTML 5 2D rendering engine , supporting Canvas and WebGL rendering

Demos

Tutorials

Usage

To achieve this effect:

usage

You need to use the following code:

var bmp, stage = new Stage("#ourCanvas");
bmp = new Bitmap("img/atLogo.png");
//(0.5,0.5)==〉The center is the point of rotation
bmp.originX = 0.5;
bmp.originY = 0.5;
//bind click event, the event monitor can be accurate to pixel
bmp.onClick(function () {
 //apply a random filter to the bmp
 bmp.setFilter(Math.random(), Math.random(), Math.random(), 1);
});
//add object to stage
stage.add(bmp);
var step = 0.01;
//loop
stage.onTick(function () {
 bmp.rotation += 0.5;
 if (bmp.scaleX > 1.5 || bmp.scaleX < 0.5) {
 step *= -1;
 }
 bmp.scaleX += step;
 bmp.scaleY += step;
});

This content is released under the (http://opensource.org/licenses/MIT) MIT License.

About

Super fast HTML 5 2D rendering engine , supporting Canvas and WebGL rendering

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • JavaScript 97.5%
  • HTML 2.5%

AltStyle によって変換されたページ (->オリジナル) /