A JS port of amitp/mapgen2 with canvas