HTML5 Canvas Tileset Animation

Posted by Veyha on Game Development See other posts from Game Development or by Veyha
Published on 2012-06-10T22:34:59Z Indexed on 2012/06/10 22:48 UTC
Read the original article Hit count: 195

Filed under:
|
|

How to do in HTML5 canvas Image animating?

I am have this code now: http://jsfiddle.net/WnjB6/1/

In here I am can add animations something like -> Animation.add('stand', [0, 1, 2, 3, 4, 5]);

But how to play this animation? My image drawing function is -> drawTile(canvasX, canvasY, tile, tileWidth, tileHeight);

Animation['stand']; return 0, 1, 2, 3, 4, 5

I am need something like when I am run Animation.play('stand') run animation from 'stand' array.

I am try to do this something like one day, but no have more idea how. :(

Thanks and sorry for my bad English language.

© Game Development or respective owner

Related posts about JavaScript

Related posts about html5