Please note: I'm not actively maintaining this code. Three.js is what you should be using for your next project. Happy coding!
Thanks to Mr. doob, AlteredQualia and the guys who make Three.js. And thanks to Bartek Drozdz for the inspiration to try :)