set size for pre-defined maps

This commit is contained in:
Azgaar 2022-02-19 21:18:02 +03:00
parent 7f13f1c367
commit 5b6ec0cc2e
9 changed files with 26 additions and 10 deletions

View file

@ -444,7 +444,7 @@ window.HeightmapGenerator = (function () {
for (let i = 0; i < cells.i.length; i++) {
const lightness = imageData[i * 4] / 255;
const powered = lightness < 0.2 ? lightness : 0.2 + (lightness - 0.2) ** 0.8;
cells.h[i] = minmax(rn(powered * 100), 0, 100);
cells.h[i] = minmax(Math.floor(powered * 100), 0, 100);
}
}