mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-21 19:41:23 +01:00
adding another template, working on roads export.
This commit is contained in:
parent
fff6a2d201
commit
f1f3498c71
2 changed files with 34 additions and 0 deletions
13
maps/template_vertical.txt
Normal file
13
maps/template_vertical.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
Hill 1 90-100 45-55 25-30
|
||||||
|
Hill 1 60-80 45-55 70-75
|
||||||
|
Hill 1 60-80 30-50 40-50
|
||||||
|
Hill 1 40-50 50-70 40-60
|
||||||
|
Multiply 0.6 20-100 0 0
|
||||||
|
Smooth 1 0 0 0
|
||||||
|
Range 0-2 40-50 30-60 30-60
|
||||||
|
Trough 1-3 20-40 25-75 20-80
|
||||||
|
Smooth 2 0 0 0
|
||||||
|
Pit 3-5 10-30 15-85 20-80
|
||||||
|
Hill 3-5 10-30 20-80 20-80
|
||||||
|
Range 1-2 20-50 30-70 20-65
|
||||||
|
Trough 1-2 20-50 15-85 20-80
|
||||||
|
|
@ -3,7 +3,28 @@
|
||||||
|
|
||||||
// download map data as GeoJSON
|
// download map data as GeoJSON
|
||||||
function saveGeoJSON() {
|
function saveGeoJSON() {
|
||||||
|
saveGeoJSON_Cells();
|
||||||
|
//saveGeoJSON_Roads();
|
||||||
|
}
|
||||||
|
|
||||||
|
function saveGeoJSON_Roads() {
|
||||||
|
// this is work-in-progress
|
||||||
|
roads = routes.select("#roads");
|
||||||
|
trails = routes.select("#trails");
|
||||||
|
searoutes = routes.select("#searoutes");
|
||||||
|
|
||||||
|
console.log(typeof(roads));
|
||||||
|
console.log(roads);
|
||||||
|
|
||||||
|
console.log(routes._groups);
|
||||||
|
console.log(routes._groups[0]);
|
||||||
|
console.log(routes._groups[0][0]);
|
||||||
|
console.log(routes._groups[0][0].childNodes);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function saveGeoJSON_Cells() {
|
||||||
let data = "{ \"type\": \"FeatureCollection\", \"features\": [\n";
|
let data = "{ \"type\": \"FeatureCollection\", \"features\": [\n";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue