Line data Source code
1 : /** 2 : * Sets the given height in the given Area. 3 : */ 4 : function ElevationPainter(elevation) 5 : { 6 0 : this.elevation = elevation; 7 : } 8 : 9 6 : ElevationPainter.prototype.paint = function(area) 10 : { 11 0 : for (let point of area.getPoints()) 12 0 : for (let vertex of g_TileVertices) 13 : { 14 0 : let position = Vector2D.add(point, vertex); 15 0 : if (g_Map.validHeight(position)) 16 0 : g_Map.setHeight(position, this.elevation); 17 : } 18 : };