2D game script for use with THREE.js