basic 3d engine written in javascript