HTML and CSS Reference
In-Depth Information
Chapter 2
Basics of JavaScript for Animation
What we'll cover in this chapter:
B ic im ti n
An i t ti n to HTM 5
A im ti g with e
aS i t j ts
U r i t ti n
If the first chapter is a somewhat philosophical overview of animation, this one is a technical overview of
what it takes to create an HTML5 document and how to animate using a canvas element and JavaScript.
This chapter covers the essentials of document structure, animation loops, JavaScript objects, and user
interaction. The techniques you learn here are used throughout the rest of the topic.
Basic animation
To start off, let's review what Chapter 1 covers:
A im ti n is m e with f am , d h f ame is li tly iff t in ti g t e ill i n f
motion.
am f ame im ti n t i s n im e r a i ti n f n im e f r h f am .
D amic im ti n t i s n i iti l i ti n f n im e d l s t t e li d to lt r
the description on each frame.
 
Search WWH ::




Custom Search