HTML5 Canvas Cookbook is an excellent book for both novice and expert programmers, written by Eric Rowell (Chief editor of http://www.html5canvastutorials.com/). With plenty much good recipes, it explain us practical usages of HTML5 canvas techniques. He starts from pretty basics of canvas with small examples explained in clear and concise manner. Chapter one describes how to draw lines, curves and texts on canvas. At the end of first chapter author puts all these fragments together to draw a haunted tree.

Second chapter discusses about drawing basic shapes like circles and rectangle and composite shapes. Third chapter deals with images and videos. There are interesting recipes on image drawing and manipulations in this chapter.  Another great recipe is how to bring video in canvas frame. Fourth chapter deals with transformations. You might be aware of its importance if you ever used it in any application. Transformations can simplify complex drawing to great extend. More often instead of changing the position of objects you will be just applying some transformations to get animation effect.

Fifth chapter was the most interesting one for me, which discusses about animation. Author start with creating a simple animation class, which is the foundation for other recipes in that chapter.  Basics of user interactions like attaching mouse and touch events is well explained in the next chapter. Apart from that there are some good practical examples like image zoom, drag and drop etc.

Chapter eight was yet another interesting one , the canvas game development. Author start with creating sprites for game and proceeds through, creating controller, model and view for a game. I really wished if there was a simple and easy to implement Game as first recipe. More often it’s hard to implement such a game from the scratch and we will be making use of canvas animation libraries, which also not explained in any chapters. There are many Game development frameworks as well.

Last chapter explains some recipes on using WebGL api, including creating 3d objects, animating them etc. Author has created a WebGL wrapped to simply its usage.

Overall its a simple but very useful book on HTML5 Canvas. All recipes are explained very will mostly line by line. All recipes are crosslinked which makes it easier to find related topics.

My Rating : 7.5/10

blog comments powered by Disqus