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

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