mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.22.06
This commit is contained in:
parent
bd1200742e
commit
b5b8a48456
3 changed files with 9 additions and 5 deletions
|
|
@ -1888,7 +1888,8 @@
|
|||
Gun Metal Games, Scott Marner, Spencer Sherman, Valerii Matskevych, Alloyed Clavicle, Stewart Walsh, Ruthlyn Mollett (Javan),
|
||||
Benjamin Mair-Pratt, Diagonath, Alexander Thomas, Ashley Wilson-Savoury, William Henry, Preston Brooks, JOSHUA QUALTIERI,
|
||||
Hilton Williams, Katharina Haase, Hisham Bedri, Ian arless, Karnat, Bird, Kevin, Jessica Thomas, Steve Hyatt, Logicspren,
|
||||
Alfred García, Jonathan Killstring, John Ackley, Invad3r233, Norbert Žigmund, Jennifer, PoliticsBuff and many others!</p>
|
||||
Alfred García, Jonathan Killstring, John Ackley, Invad3r233, Norbert Žigmund, Jennifer, PoliticsBuff, _gfx_, Maggie,
|
||||
Connor McMartin, Jared McDaris, BlastWind, Franc Casanova Ferrer, Dead & Devil and many others!</p>
|
||||
|
||||
<ul class="share-buttons">
|
||||
<li><a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fazgaar.github.io%2FFantasy-Map-Generator%2F"e=" data-tip="Share on Facebook" target="_blank"><img alt="Share on Facebook" src="images/Facebook.png" /></a></li>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
(global.Rivers = factory());
|
||||
}(this, (function () {'use strict';
|
||||
|
||||
const generate = function() {
|
||||
const generate = function(changeHeights = true) {
|
||||
console.time('generateRivers');
|
||||
Math.seedrandom(seed);
|
||||
const cells = pack.cells, p = cells.p, features = pack.features;
|
||||
|
|
@ -132,6 +132,9 @@
|
|||
.attr("data-width", d => d[2]).attr("data-increment", d => d[3]);
|
||||
}()
|
||||
|
||||
// apply change heights as basic one
|
||||
if (changeHeights) cells.h = Uint8Array.from(h);
|
||||
|
||||
console.timeEnd('generateRivers');
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +151,7 @@
|
|||
const minHeight = d3.min(cells.c[i].map(c => h[c]));
|
||||
if (minHeight === 100) continue; // already max height
|
||||
if (h[i] <= minHeight) {
|
||||
h[i] = minHeight + 1;
|
||||
h[i] = Math.min(minHeight + 1, 100);
|
||||
depression++;
|
||||
depressed = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ function editHeightmap() {
|
|||
drawCoastline();
|
||||
|
||||
elevateLakes();
|
||||
Rivers.generate();
|
||||
Rivers.generate(change);
|
||||
|
||||
if (!change) {
|
||||
for (const i of pack.cells.i) {
|
||||
|
|
@ -265,7 +265,7 @@ function editHeightmap() {
|
|||
|
||||
if (changeHeights.checked) {
|
||||
elevateLakes();
|
||||
Rivers.generate();
|
||||
Rivers.generate(changeHeights.checked);
|
||||
}
|
||||
|
||||
// assign saved pack data from grid back to pack
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue