Don't use js. It's garbage. Use OpenGL and C++