Publisher: O'Reilly Media Released: April 2011 Pages: 654
No matter what platform or tools you use, the HTML5 revolution will soon change the way you build web applications, if it hasn't already. HTML5 is jam-packed with features, and there's a lot to learn. This book gets you started with the Canvas element, perhaps HTML5's most exciting feature. Learn how to build interactive multimedia applications using this element to draw, render text, manipulate images, and create animation. Whether you currently use Flash, Silverlight, or just HTML and JavaScript, you'll quickly pick up the basics. Practical examples show you how to create various games and entertainment applications with Canvas as you learn. Gain valuable experience with HTML5, and discover why leading application developers rave about this specification as the future of truly innovative web development. - Create and modify 2D drawings, text, and bitmap images
- Incorporate and manipulate video, and add audio
- Build a basic framework for creating a variety of games on Canvas
- Use bitmaps and tile sheets to develop animated game graphics
- Go mobile: port Canvas applications to iPhone with PhoneGap
- Explore ways to use Canvas for 3D and multiplayer game applications
|
-
Chapter 1 Introduction to HTML5 Canvas -
The Basic HTML Page -
Basic HTML We Will Use in This Book -
The Document Object Model (DOM) and Canvas -
JavaScript and Canvas -
HTML5 Canvas “Hello World!” -
Debugging with Console.log -
The 2D Context and the Current State -
The HTML5 Canvas Object -
Another Example: Guess The Letter -
What’s Next -
Chapter 2 Drawing on the Canvas -
The Basic File Setup for This Chapter -
The Basic Rectangle Shape -
The Canvas State -
Using Paths to Create Lines -
Advanced Path Methods -
Compositing on the Canvas -
Simple Canvas Transformations -
Filling Objects with Colors and Gradients -
Filling Shapes with Patterns -
Creating Shadows on Canvas Shapes -
What’s Next -
Chapter 3 The HTML5 Canvas Text API -
Displaying Basic Text -
Setting the Text Font -
Text and the Canvas Context -
Text with Gradients and Patterns -
Width, Height, Scale, and toDataURL() Revisited -
Final Version of Text Arranger -
What’s Next -
Chapter 4 Images on the Canvas -
The Basic File Setup for This Chapter -
Image Basics -
Simple Cell-Based Sprite Animation -
Advanced Cell-Based Animation -
Applying Rotation Transformations to an Image -
Creating a Grid of Tiles -
Zooming and Panning an Image -
Pixel Manipulation -
Copying from One Canvas to Another -
What’s Next -
Chapter 5 Math, Physics, and Animation -
Moving in a Straight Line -
Bouncing Off Walls -
Curve and Circular Movement -
Simple Gravity, Elasticity, and Friction -
Easing -
What’s Next? -
Chapter 6 Mixing HTML5 Video and Canvas -
HTML5 Video Support -
Converting Video Formats -
Basic HTML5 Video Implementation -
Preloading Video in JavaScript -
Video and the Canvas -
Video on the Canvas Examples -
Animation Revisited: Moving Videos -
What’s Next? -
Chapter 7 Working with Audio -
The Basic <audio> Tag -
Audio Formats -
Audio Tag Properties, Functions, and Events -
Playing a Sound with No Audio Tag -
Creating a Canvas Audio Player -
Case Study in Audio: Space Raiders Game -
What’s Next -
Chapter 8 Canvas Game Essentials -
Why Games in HTML5? -
Our Basic Game HTML5 File -
Our Game’s Design -
Game Graphics: Drawing with Paths -
Animating on the Canvas -
Applying Transformations to Game Graphics -
Game Graphic Transformations -
Game Object Physics and Animation -
A Basic Game Framework -
Putting It All Together -
The player Object -
Geo Blaster Game Algorithms -
The Geo Blaster Basic Full Source -
Rock Object Prototype -
What’s Next -
Chapter 9 Combining Bitmaps and Sound -
Geo Blaster Extended -
Creating a Dynamic Tile Sheet at Runtime -
A Simple Tile-Based Game -
What’s Next -
Chapter 10 Mobilizing Games with PhoneGap -
Going Mobile! -
Creating the iOS Application with PhoneGap -
Beyond the Canvas -
What’s Next -
Chapter 11 Further Explorations -
3D with WebGL -
Multiplayer Applications with ElectroServer 5 -
Conclusion -
Colophon |
- Title:
- HTML5 Canvas
- By:
- Steve Fulton, Jeff Fulton
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- May 2011
- Ebook:
- April 2011
- Pages:
- 654
- Print ISBN:
- 978-1-4493-9390-8
- | ISBN 10:
- 1-4493-9390-X
- Ebook ISBN:
- 978-1-4493-9396-0
- | ISBN 10:
- 1-4493-9396-9
|
-
Steve Fulton Steve is an R.I.A. and web game developer who has been cultivating an audience for news, stories, blogs and tutorials about Flash, Silverlight, and now the HTML 5 Canvas at their own web site, http://www.8bitrocket.com, for the past 3 1/2 years. He has one of the highest Alexa rankings among Flash game developers blogs. Steve has worked as a web development manager at Mattel Toys for the past 14 years, helping to create Mattel’s extensive online presence. View Steve Fulton's full profile page. -
Jeff Fulton Jeff is an R.I.A. and web game developer who has been cultivating an audience for news, stories, blogs and tutorials about Flash, Silverlight, and now the HTML 5 Canvas at their own web site, http://www.8bitrocket.com, for the past 3 1/2 years. He has one of the highest Alexa rankings among Flash game developers blogs. Jeff has worked as a web development manager at Mattel Toys for the past 14 years, helping to create Mattel’s extensive online presence. View Jeff Fulton's full profile page. |
Colophon The animal on the cover of HTML5 Canvas is the New Zealand kaka (Nestor meridionalis), a parrot endemic to that country. The kaka’s name comes from the Maori word for parrot (a duplication of the word k?, Maori for “to screech”). It is part of the Strigopidae family, which diverged from other parrots 80–100 million years ago when the landmass that is now New Zealand broke apart from the supercontinent Gondwana. A defining characteristic of this family of parrots is the bristles on their tongues, which are used to collect nectar. A medium-sized parrot about 18 inches in length, the kaka is stocky and has a short, square tail. Its feathers are primarily olive-brown, with brighter splashes of crimson on the underwings and rump. It also has yellow-brown spots on its cheeks and a gray crown. It possesses the sharp curved beak common to many parrot species, which it uses to pry seeds loose from cones and dig up insects. The kaka also eats fruit, berries, nectar, and flowers. These birds are primarily arboreal, living in the canopies of New Zealand forests. Very social creatures, kakas live in large flocks that sometimes include other local parrot species as well. In winter, breeding pairs build nests in hollow trees, and lay a clutch of two to four eggs. Both parents help feed their young. The kaka is currently endangered due to deforestation, predators, and competition for food with non-native species. The closely related kea and kakapo parrots are facing similar challenges—and in fact, two species within the Nestor genus have already gone extinct (most recently in 1851). |
|
Description
|
Table of Contents
|
Product Details
|
About the Author
|
Colophon
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Preston Gralla
January 2011
By Jurg van Vliet, Flavia Paganelli
February 2011
Ebook: $27.99
Print & Ebook: $38.49
Print: $34.99
By David Pogue
August 2010
|
Customer Reviews

4/5/2012 4.0One of my top 3 picks! By Patric Jonsson from Malmö, Sweden - Concise
- Easy to understand
- Helpful examples
- Well-written
3/5/2012 4.0Great coverage of concepts By ockley from Copenhagen, Denmark About Me Designer, Developer, Educator - Accurate
- Concise
- Helpful examples
11/5/2011 (1 of 2 customers found this review helpful) 5.0The next step in web programming By Ben Boarder from Melbourne, Australia About Me Designer, Developer - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
10/10/2011 (1 of 2 customers found this review helpful) - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
7/16/2011 (2 of 3 customers found this review helpful) By Gary from San Diego, CA - Easy to understand
- Examples
- Not a good reference book
7/9/2011 (1 of 2 customers found this review helpful) By Mikael from Oakland, CA - Accurate
- Easy to understand
- Helpful examples
- Well-written
6/25/2011 (4 of 4 customers found this review helpful) By David from France About Me Developer, Sys Admin - Accurate
- Easy to understand
- Helpful examples
- Well-written
- Expert
- Intermediate
- Student
|
|
|