Three.js rewrite in C++ to be compiled to asm.js