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 ...

Get Foundation HTML5 Animation with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.