mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 12:31:24 +01:00
reset PRNG - make points generation deterministic
This commit is contained in:
parent
546b1389f6
commit
6447b79c94
2 changed files with 3 additions and 1 deletions
1
main.js
1
main.js
|
|
@ -671,6 +671,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