O'Reilly logo

Foundation HTML5 Canvas by Rob Hawkes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Making Things Move

In this chapter, you're going to animate shapes using nothing but the power of JavaScript and your brain. You'll start by learning how animating in canvas actually works, which you'll then put into practice by creating your very first animation loop. From there, you'll discover a method that allows you to remember everything that you want to animate, and then you'll explore a variety of ways to actually animate your shapes. The chapter ends by showing you how to give your shapes a small amount of intelligence, which enables them to bounce off the edges of the canvas instead of disappearing off, never to be seen again.

Overview of animating in canvas

Animating in canvas is really no different from animating in general, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required