O'Reilly logo

Foundation HTML5 Animation with JavaScript by Billy Lamberta

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

images

Chapter 18

Matrix Math

What we'll cover in this chapter:

  • Matrix basics
  • Matrix operations
  • Canvas transforms

Although this chapter does not introduce any new types of motion or methods of rendering graphics, it does introduce matrices, which provide an alternative way of applying visual transformations, something we've done throughout the book.

Matrices are used quite often in 3D systems for rotating, scaling, and translating (moving) 3D points. They are also used quite a bit in various 2D graphics transformations. In this chapter, you see how to create a system of matrices to manipulate objects and look at several methods built into the canvas ...

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