 <p>Adapting basic algorithms like this from Flash to Canvas is actually not that difficult. If you need a canvas framework that's close to the AS3/Flash you can take a look at EaselJS: <a href="http://createjs.com/#!/EaselJS" rel="nofollow">http://createjs.com/#!/EaselJS</a></p> <p>Here's an article on Hexagon Tiles: <a href="http://www.emanueleferonato.com/2008/04/16/understanding-hexagonal-tiles/" rel="nofollow">http://www.emanueleferonato.com/2008/04/16/understanding-hexagonal-tiles/</a></p>