Line data Source code
1 : /** 2 : * The TerrainPainter draws a given terrain texture over the given area. 3 : * When used with TERRAIN_SEPARATOR, an entity is placed on each tile. 4 : */ 5 : function TerrainPainter(terrain) 6 : { 7 0 : this.terrain = createTerrain(terrain); 8 : } 9 : 10 6 : TerrainPainter.prototype.paint = function(area) 11 : { 12 0 : for (let point of area.getPoints()) 13 0 : this.terrain.place(point); 14 : };