refactor heightmap generator - separate templates to file

This commit is contained in:
Azgaar 2021-07-29 23:50:01 +03:00
parent fe63206b35
commit dc10a0b6cb
5 changed files with 190 additions and 261 deletions

View file

@ -1,4 +1,3 @@
// heightmap-editor module. To be added to window as for now
"use strict";
function editHeightmap() {

View file

@ -541,17 +541,18 @@ function randomizeOptions() {
// select heightmap template pseudo-randomly
function randomizeHeightmapTemplate() {
const templates = {
Volcano: 3,
"High Island": 22,
"Low Island": 9,
Continents: 20,
Archipelago: 25,
Mediterranean: 3,
Peninsula: 3,
Pangea: 5,
Isthmus: 2,
Atoll: 1,
Shattered: 7
volcano: 3,
highIsland: 22,
lowIsland: 9,
continents: 20,
archipelago: 25,
mediterranean: 3,
peninsula: 3,
pangea: 5,
isthmus: 2,
atoll: 1,
shattered: 7,
taklamakan: 2
};
document.getElementById("templateInput").value = rw(templates);
}