O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

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

Time for action — orthographic and perspective projections

  1. Open the file ch4_ProjectiveModes.html in your HTML5 Internet browser.
  2. This exercise is very similar to the previous one. However, there are two new buttons: Perspective and Orthogonal. As you can see, Perspective is activated by default.
  3. Change the camera type to Orbiting.
  4. Change the projective mode to Orthographic.
  5. Explore the scene. Notice the lack of depth cues that is characteristic of orthogonal projections:
    Time for action — orthographic and perspective projections
  6. Now switch to Perspective mode:
    Time for action — orthographic and perspective projections
  7. Explore the source code. Go to the updateTransforms ...

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