Time for action – simple animation

  1. Open ch5_SimpleAnimation.html using your WebGL-enabled Internet browser of choice.
  2. Move the camera around and see how the objects (sphere and cone) move independently of each other (local transformations) and from the camera position (global transformation).
  3. Move the camera around pressing the left mouse button and holding it while you drag the mouse.
  4. You can also dolly the camera by clicking the left mouse button while pressing the Alt key and then dragging the mouse.
  5. Now change the camera type to Tracking. If for any reason you lose your bearings, click on go home.
  6. Let's examine the source code to see how we have implemented this example. Open ch5_SimpleAnimation.html using the source code editor of your choice. ...

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.