Maybe using WebGL matrices, see [this library](http://blog.tojicode.com/2010/06/stupidly-fast-webgl-matricies.html).