O'Reilly logo

WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL by Rodger Lea, Kouichi Matsuda

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 7. Toward the 3D World

In the previous chapters, we used examples based on 2D geometrical shapes to explain how the WebGL system works and how it supports the behavior of shaders, transformations such as translation and rotation, animation, and texture mapping. However, the techniques you’ve learned so far can be applied not only to 2D shapes but also to 3D objects. In this chapter you’ll take the first step into the 3D world and explore the implications of moving from 2D to 3D. In particular, you will explore:

• Representing the user’s view into the 3D world

• Controlling the volume of 3D space that is viewed

• Clipping

• Handling foreground and background objects

• Drawing a 3D object (a cube)

All these issues have a significant impact ...

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