mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
v1.4.49
This commit is contained in:
parent
6214269a91
commit
12e2600d35
2 changed files with 6 additions and 6 deletions
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright 2018-2019 Max Ganiev (Azgaar), azgaar.fmg@yandex.by
|
Copyright 2018-2020 Max Ganiev (Azgaar), azgaar.fmg@yandex.by
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ function saveGeoJSON_Cells() {
|
||||||
const getHeight = i => parseInt(getFriendlyHeight([cells.p[i][0],cells.p[i][1]]));
|
const getHeight = i => parseInt(getFriendlyHeight([cells.p[i][0],cells.p[i][1]]));
|
||||||
|
|
||||||
cells.i.forEach(i => {
|
cells.i.forEach(i => {
|
||||||
const coordinates = getCellPoints(cells.v[i]);
|
const coordinates = getCellCoordinates(cells.v[i]);
|
||||||
const height = getHeight(i);
|
const height = getHeight(i);
|
||||||
const biome = cells.biome[i];
|
const biome = cells.biome[i];
|
||||||
const type = pack.features[cells.f[i]].type;
|
const type = pack.features[cells.f[i]].type;
|
||||||
|
|
@ -389,10 +389,10 @@ function saveGeoJSON_Markers() {
|
||||||
downloadFile(JSON.stringify(json), name, "application/json");
|
downloadFile(JSON.stringify(json), name, "application/json");
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCellPoints(vertices) {
|
function getCellCoordinates(vertices) {
|
||||||
const p = pack.vertices.p;
|
const p = pack.vertices.p;
|
||||||
const points = vertices.map(n => getQGIScoordinates(p[n][0] / graphWidth, p[n][1] / graphHeight));
|
const coordinates = vertices.map(n => getQGIScoordinates(p[n][0], p[n][1]));
|
||||||
return points.concat([points[0]]);
|
return coordinates.concat([coordinates[0]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRoutePoints(node) {
|
function getRoutePoints(node) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue