The program below uses HTML5's experimental WebGL functionality to draw a 3D scene containing a few textured rectangular boxes with some simple lighting. You can move the camera around with the keys "Q, W, E, A, S, D, X, C, V, R, F". You'll figure it out.

To see the source code, visit http://thiscouldbebetter.wordpress.com/2013/05/02/drawing-a-3d-scene-in-javascript-using-webgl/.

This code was originally inspired by similar demonstrations found at "http://learningwebgl.com". It's mutated pretty profoundly since then, though.