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

image

Chapter 16

3D Lines and Fills

What we'll cover in this chapter:

  • Creating points and lines
  • Making shapes
  • Creating 3D fills
  • Modeling 3D solids
  • Moving 3D solids

The last chapter introduced 3D, but the objects were only positioned in 3D space by calculating their size and screen position—the objects themselves were actually 2D. If you were to move your viewpoint position in this space, the object would always seem to turn and face you. However, that object is not turning. It only appears to turn because, as a 2D object, it's the only view you have of it.

In this chapter, we construct 3D models that are rendered using the canvas drawing API. In ...

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