The Future

Now that you know a little about how the canvas works, you can start thinking of other ways you might use it. You could use it to create a game using libraries like Impact or Crafty,[43][44] or create a user interface for a media player, or build a better image gallery. All you need to start painting is a little bit of JavaScript and a little bit of imagination. And as support ramps up, speed and features will improve.

But it doesn’t stop with 2D graphics. The canvas specification supports 3D graphics as well, and browser manufacturers are implementing hardware acceleration. The canvas will make it possible to create intriguing user interfaces and engaging games using only JavaScript. Dig into the excellent Three.js library to see ...

Get HTML5 and CSS3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.