Instructions:  
Click and drag the cube to rotate it.
Click and drag outside the cube to rotate it on one axis.
Theory:  
Projecting the three-dimensional points of a cube onto a two-dimensional
screen (called perspective projection) is simple. The concept of perspective
relies on the fact that objects that are further away appear smaller. More
precisely, point (x/z, y/z) is a projection of point (x, y, z) where z is the axis
going away from the viewer. This animation uses that simple method.
No WebGL needed!