mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.22.14
This commit is contained in:
parent
0b1c93b45d
commit
f5985a4374
2 changed files with 6 additions and 6 deletions
|
|
@ -515,11 +515,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
const smooth = function(fr = 2) {
|
||||
const smooth = function(fr = 2, add = 0) {
|
||||
cells.h = cells.h.map((h, i) => {
|
||||
const a = [h];
|
||||
cells.c[i].forEach(c => a.push(cells.h[c]));
|
||||
return lim((h * (fr-1) + d3.mean(a)) / fr);
|
||||
return lim((h * (fr-1) + d3.mean(a) + add) / fr);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue