mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
prototype for ice seperation
This commit is contained in:
parent
f30ffd812e
commit
7f99323d22
9 changed files with 322 additions and 106 deletions
|
|
@ -406,6 +406,7 @@ async function parseLoadedData(data, mapVersion) {
|
|||
pack.cells.province = data[27] ? Uint16Array.from(data[27].split(",")) : new Uint16Array(pack.cells.i.length);
|
||||
// data[28] had deprecated cells.crossroad
|
||||
pack.cells.routes = data[36] ? JSON.parse(data[36]) : {};
|
||||
pack.ice = data[39] ? JSON.parse(data[39]) : {glaciers: [], icebergs: []};
|
||||
|
||||
if (data[31]) {
|
||||
const namesDL = data[31].split("/");
|
||||
|
|
@ -449,7 +450,11 @@ async function parseLoadedData(data, mapVersion) {
|
|||
if (isVisible(routes) && hasChild(routes, "path")) turnOn("toggleRoutes");
|
||||
if (hasChildren(temperature)) turnOn("toggleTemperature");
|
||||
if (hasChild(population, "line")) turnOn("togglePopulation");
|
||||
if (hasChildren(ice)) turnOn("toggleIce");
|
||||
if (pack.ice?.glaciers?.length || pack.ice?.icebergs?.length) {
|
||||
ice.selectAll("*").remove(); // clear old SVG
|
||||
drawIce(); // re-render ice from data
|
||||
turnOn("toggleIce");
|
||||
}
|
||||
if (hasChild(prec, "circle")) turnOn("togglePrecipitation");
|
||||
if (isVisible(emblems) && hasChild(emblems, "use")) turnOn("toggleEmblems");
|
||||
if (isVisible(labels)) turnOn("toggleLabels");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue