Book Image

Meteor Cookbook

By : Isaac Strack
Book Image

Meteor Cookbook

By: Isaac Strack

Overview of this book

Table of Contents (19 chapters)
Meteor Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 usual suspects, we will need some specialty folders to make the grouping of our code cleaner and more manageable. Open a terminal window, navigate to where you would like to create your root project, and execute the following commands:

$ meteor create...