mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 12:31:24 +01:00
Merge branch 'upstream' into fix-submap
This commit is contained in:
commit
0487cc167a
2 changed files with 3 additions and 3 deletions
4
main.js
4
main.js
|
|
@ -760,8 +760,8 @@ function placePoints() {
|
|||
const spacing = (grid.spacing = rn(Math.sqrt((graphWidth * graphHeight) / cellsDesired), 2)); // spacing between points before jirrering
|
||||
grid.boundary = getBoundaryPoints(graphWidth, graphHeight, spacing);
|
||||
grid.points = getJitteredGrid(graphWidth, graphHeight, spacing); // jittered square grid
|
||||
grid.cellsX = Math.floor((graphWidth + 0.5 * spacing) / spacing);
|
||||
grid.cellsY = Math.floor((graphHeight + 0.5 * spacing) / spacing);
|
||||
grid.cellsX = Math.floor((graphWidth + 0.5 * spacing - 1e-10) / spacing);
|
||||
grid.cellsY = Math.floor((graphHeight + 0.5 * spacing - 1e-10) / spacing);
|
||||
TIME && console.timeEnd("placePoints");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ document.querySelectorAll("[data-locked]").forEach(function (e) {
|
|||
|
||||
// lock option
|
||||
function lock(id) {
|
||||
const input = document.querySelector("[data-stored='" + id + "']");
|
||||
const input = document.querySelector("[data-stored=\"" + id + "\"]");
|
||||
if (input) localStorage.setItem(id, input.value);
|
||||
const el = document.getElementById("lock_" + id);
|
||||
if (!el) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue