Time for action – orthographic and perspective projections
- Open the file
ch4_ProjectiveModes.html
in your HTML5 Internet browser. - 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.
- Change the camera type to Orbiting.
- Change the projective mode to Orthographic.
- Explore the scene. Notice the lack of depth cues that is characteristic of orthogonal projections:
- Now switch to Perspective mode:
- Explore the source code. Go to the
updateTransforms ...
Get WebGL Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.