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

  1. Open the file ch8_Picking.html using your HTML5 Internet browser. You will see a screen similar to this:
    Time for action — picking

    Here you have a set of objects, each one of which has a unique diffuse color property. As in the previous exercises you can rotate the camera around the scene. Please notice that the cube has a texture and that the flat disk is translucent. As you may expect, the code in the draw function handles textures coordinates and also transparencies, so it looks a bit more complex than before (you can check it out in the source code). This is a more realistic draw function. In a real application, you will have to handle these ...

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