Line data Source code
1 : /** 2 : * The ElevationBlendingPainter sets the elevation of each point of the given area to the weighted targetHeight. 3 : */ 4 : function ElevationBlendingPainter(targetHeight, strength) 5 : { 6 0 : this.targetHeight = targetHeight; 7 0 : this.strength = strength; 8 : } 9 : 10 6 : ElevationBlendingPainter.prototype.paint = function(area) 11 : { 12 0 : for (let point of area.getPoints()) 13 0 : g_Map.setHeight(point, this.strength * this.targetHeight + (1 - this.strength) * g_Map.getHeight(point)); 14 : };