Javascript 3d Maze