This is an example of a simple matrix transform in JS. View the source code to see how it was done and read this to learn more.