mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
reset PRNG - make points generation deterministic
This commit is contained in:
parent
a9755dacc8
commit
6a6ba96c96
2 changed files with 3 additions and 1 deletions
1
main.js
1
main.js
|
|
@ -669,6 +669,7 @@ function generateSeed() {
|
|||
// Place points to calculate Voronoi diagram
|
||||
function placePoints() {
|
||||
TIME && console.time("placePoints");
|
||||
Math.random = aleaPRNG(seed); // reset PRNG
|
||||
|
||||
const cellsDesired = +pointsInput.dataset.cells;
|
||||
const spacing = (grid.spacing = rn(Math.sqrt((graphWidth * graphHeight) / cellsDesired), 2)); // spacing between points before jirrering
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue