O'Reilly logo

Foundation HTML5 Canvas by Rob Hawkes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Learning the Basics of Canvas

By now you should already have a good idea about what canvas is and why it's a fantastic part of HTML5. In this chapter, we will take a proper look at the features of canvas, from learning how to actually get it into a HTML document to drawing shapes and other kinds of objects on it. We will also look at how to change how shapes and objects are drawn on canvas, as well as finding out how to erase it. Finally, we'll end with an example showing you how to make canvas the same size as the browser window, an integral skill to have for developing immersive games. I hope by the end of this chapter that you feel even more excited about HTML5 canvas and the possibilities that it opens up in front of you.

Getting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required