October 2010
Beginner
373 pages
7h 28m
English

creating programmer-defined objects
using setInterval for animation
drawing images
form input and validating form input
for loops
drawing with gradients
Animation, whether at the movies, using a flipbook, or generated by computer, involves displaying a sequence of still images fast enough so that we interpret what we see as movement, as life. In this chapter, I'll show you how to produce animated scenes by simulating a ball bouncing in a 2-dimensional box, with horizontal and vertical speeds that can by changed by a player. The first iteration of our program calculates new positions for the ball at fixed intervals ...
Read now
Unlock full access