mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v. 0.59.10b
This commit is contained in:
parent
5bfe920eed
commit
f8ce6a0ea8
3 changed files with 21 additions and 16 deletions
|
|
@ -47,7 +47,7 @@ button, select, a {
|
|||
}
|
||||
|
||||
#cults {
|
||||
stroke-width: 2;
|
||||
stroke-width: 4;
|
||||
mask: url(#shape);
|
||||
mask-mode: alpha;
|
||||
pointer-events: none;
|
||||
|
|
@ -75,6 +75,7 @@ button, select, a {
|
|||
|
||||
#regions {
|
||||
stroke-width: 0;
|
||||
stroke: none;
|
||||
fill-rule: evenodd;
|
||||
stroke-linejoin: round;
|
||||
mask: url(#shape);
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@
|
|||
<script src="libs/quantize.min.js" defer></script>
|
||||
<script src="libs/d3-hexbin.v0.2.min.js" defer></script>
|
||||
<script src="libs/jquery.ui.touch-punch.min.js" defer></script>
|
||||
<link rel="stylesheet" type="text/css" href="index.css?version=0.59.09b"/>
|
||||
<link rel="stylesheet" type="text/css" href="icons.css?version=0.59.09b"/>
|
||||
<link rel="stylesheet" type="text/css" href="index.css?version=0.59.10b"/>
|
||||
<link rel="stylesheet" type="text/css" href="icons.css?version=0.59.10b"/>
|
||||
<link rel="stylesheet" type="text/css" href="libs/jquery-ui.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -1143,5 +1143,5 @@
|
|||
<input type="file" accept=".txt" id="namesbaseToLoad">
|
||||
</div>
|
||||
|
||||
<script src="script.js?version=0.59.09b"></script>
|
||||
<script src="script.js?version=0.59.10b"></script>
|
||||
</body>
|
||||
|
|
|
|||
28
script.js
28
script.js
|
|
@ -380,11 +380,11 @@ function fantasyMap() {
|
|||
{name:"Toledi", color:"#ffd92f", base:4},
|
||||
{name:"Slovian", color:"#e5c494", base:5},
|
||||
{name:"Norse", color:"#dca3e4", base:6},
|
||||
{name:"Elladian", color:"#96d6be", base:7},
|
||||
{name:"Elladian", color:"#66c4a0", base:7},
|
||||
{name:"Latian", color:"#ff7174", base:8},
|
||||
{name:"Somi", color:"#aedff7", base:9},
|
||||
{name:"Soomi", color:"#85c8fa", base:9},
|
||||
{name:"Koryo", color:"#578880", base:10},
|
||||
{name:"Hantzu", color:"#fdface", base:11},
|
||||
{name:"Hantzu", color:"#becb8d", base:11},
|
||||
{name:"Yamoto", color:"#ffd9da", base:12}
|
||||
];
|
||||
}
|
||||
|
|
@ -854,12 +854,12 @@ function fantasyMap() {
|
|||
console.time('defineHeightmap');
|
||||
if (lockTemplateInput.getAttribute("data-locked") == 0) {
|
||||
const rnd = Math.random();
|
||||
if (rnd > 0.9) {templateInput.value = "Volcano";}
|
||||
else if (rnd > 0.7) {templateInput.value = "High Island";}
|
||||
else if (rnd > 0.5) {templateInput.value = "Low Island";}
|
||||
if (rnd > 0.95) {templateInput.value = "Volcano";}
|
||||
else if (rnd > 0.75) {templateInput.value = "High Island";}
|
||||
else if (rnd > 0.55) {templateInput.value = "Low Island";}
|
||||
else if (rnd > 0.35) {templateInput.value = "Continents";}
|
||||
else if (rnd > 0.05) {templateInput.value = "Archipelago";}
|
||||
else if (rnd > 0.03) {templateInput.value = "Mainland";}
|
||||
else if (rnd > 0.15) {templateInput.value = "Archipelago";}
|
||||
else if (rnd > 0.10) {templateInput.value = "Mainland";}
|
||||
else if (rnd > 0.01) {templateInput.value = "Peninsulas";}
|
||||
else {templateInput.value = "Atoll";}
|
||||
}
|
||||
|
|
@ -4424,10 +4424,14 @@ function fantasyMap() {
|
|||
array[array.length] = edgesOrdered.map(function(e) {return [+e.scX, +e.scY];});
|
||||
}
|
||||
var color = states[region].color;
|
||||
regions.append("path").attr("d", round(path, 1)).attr("fill", color).attr("stroke", "none").attr("class", "region"+region);
|
||||
regions.append("path").attr("d", round(path, 1)).attr("fill", color).attr("class", "region"+region);
|
||||
array.sort(function(a, b){return b.length - a.length;});
|
||||
const capitalCell = manors[states[region].capital].cell;
|
||||
array.push(polygons[capitalCell]); // add capital cell as a hole
|
||||
let capital = states[region].capital;
|
||||
// add capital cell as a hole
|
||||
if (!isNaN(capital)) {
|
||||
const capitalCell = manors[capital].cell;
|
||||
array.push(polygons[capitalCell]);
|
||||
}
|
||||
var name = states[region].name;
|
||||
var c = polylabel(array, 1.0); // pole of inaccessibility
|
||||
labels.select("#countries").append("text").attr("id", "regionLabel"+region).attr("x", rn(c[0])).attr("y", rn(c[1])).text(name).on("click", editLabel);
|
||||
|
|
@ -4461,7 +4465,7 @@ function fantasyMap() {
|
|||
path += lineGen(edgesOrdered);
|
||||
}
|
||||
var color = states[region].color;
|
||||
regions.append("path").attr("d", round(path, 1)).attr("fill", "none").attr("stroke", color).attr("stroke-width", 3).attr("class", "region"+region);
|
||||
regions.append("path").attr("d", round(path, 1)).attr("fill", "none").attr("stroke", color).attr("stroke-width", 5).attr("class", "region"+region);
|
||||
}
|
||||
|
||||
function drawBorders(edges, type) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue