O'Reilly logo

Meteor Cookbook by Isaac Strack

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

Creating a coloring book with the Canvas element

There are now multiple ways to display graphics on a web page. DOM elements, SVG, WebGL, and, perhaps the most user-friendly, the Canvas element. Using JavaScript, the Canvas element provides a flexible graphics area where you can paint, erase, color, cut and paste to your heart's content. A good representation of what you can do with the Canvas element is found in this recipe, where you will learn how to build a coloring book app from scratch.

Getting ready

Get your crayons! Okay, maybe those won't be needed (don't use them on your monitor!) but what we're about to create is the next best thing, so let's get the app structure and packages out of the way, so we can start coloring!

In addition to the ...

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