Although our example is enough to introduce most of the aspects of using WebGL in 3D, we need something slightly more realistic to demonstrate the possibilities. The usual first example is a 3D cube.
This book has so far been about 2D graphics with Canvas using the standard graphics context. You will hear people say that if you want to do 2D graphics then a good way is to use WebGL. The reason is ...