Foundation Html5 Canvas
豆瓣
For Games and Entertainment
Rob Hawkes
简介
Foundation HTML5 Canvas begins by introducing you to HTML5 and the cool new features that it opens up for you. You are then offered a quick guide to JavaScript programming to get you up to speed. Next up you'll receive a thorough introduction to the canvas element, which teaches you how to draw objects within the browser with great ease.
Once the basics are covered you’ll move on to the more advanced features of canvas, including image and video manipulation. You’ll also learn how to create realistic animations with the help of some basic physics.
Foundation HTML5 Canvas then teaches you how to create two thrilling space-based games using all the skills you’ve learned so far. You'll find plenty of code examples and illustrations designed to help you understand even the most complex of topics.
HTML5 is already here for you, and Foundation HTML5 Canvas will provide you with all the information you need to enjoy the show.
What you’ll learn
The exciting new features that HTML5 brings and how to use them
The basics of programming in JavaScript and capturing user input
What the canvas drawing element is all about and why you’d want to use it
How to utilize both basic and advanced features of canvas
How to create realistic animations using canvas and a splash of physics
How to make interactive games using canvas, JavaScript, and other HTML5 goodies
Who this book is for
The book has been written in a friendly way that makes it approachable to beginners and experts alike. It is predominantly for Web designers who are new to HTML5 and JavaScript, and covers the absolute basics of creating interactive games and applications using the HTML5 canvas element. Experienced Web designers and programmers will also learn about all the features of canvas and how they can be used within their own projects. Flash and Silverlight developers wanting to broaden their reach across the Web and mobile devices will also benefit from the information in this book.
contents
iv
Contents at a Glance
About the Author ................................................................................................... xiii
About the Technical Reviewer .............................................................................xiv
About the Cover Image Designer .........................................................................xv
Acknowledgments..................................................................................................xvi
Preface ...................................................................................................................xvii
Chapter 1: Introducing HTML5.................................................................................. 1
Chapter 2: Foundation JavaScript ......................................................................... 23
Chapter 3: Learning the Basics of Canvas............................................................ 57
Chapter 4: Pushing Canvas Further ....................................................................... 87
Chapter 5: Manipulating Images and Video......................................................... 125
Chapter 6: Making Things Move............................................................................ 161
Chapter 7: Implementing Advanced Animation ................................................. 185
Chapter 8: Creating the Space Bowling Game................................................... 209
Chapter 9: Creating the Asteroid Avoidance Game.......................................... 245
Chapter 10: Taking Things Further and the Future of Canvas............................273