Skip to Main Content
WebGL Beginner's Guide
book

WebGL Beginner's Guide

by Diego Cantor, Brandon Jones
June 2012
Beginner content levelBeginner
376 pages
8h 32m
English
Packt Publishing
Content preview from WebGL Beginner's Guide

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming 3D Applications with HTML5 and WebGL

Programming 3D Applications with HTML5 and WebGL

Tony Parisi

Publisher Resources

ISBN: 9781849691727Other