mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
pump version to 1.8
This commit is contained in:
parent
53dc9a452d
commit
12e84b85a6
4 changed files with 18 additions and 15 deletions
|
|
@ -274,7 +274,7 @@
|
|||
<div id="loading">
|
||||
<div id="titleName"><t data-t="titleName">Azgaar's</t></div>
|
||||
<div id="title"><t data-t="title">Fantasy Map Generator</t></div>
|
||||
<div id="version"><t data-t="version">v. </t>1.73</div>
|
||||
<div id="version"><t data-t="version">v. </t>1.8</div>
|
||||
<p id="loading-text"><t data-t="loading">LOADING</t><span>.</span><span>.</span><span>.</span></p>
|
||||
</div>
|
||||
|
||||
|
|
@ -1727,9 +1727,9 @@
|
|||
</div>
|
||||
|
||||
<p>Click to create a new map:</p>
|
||||
<div id="resamplers">
|
||||
<button data-tip="Click to generate new (sub)map from the current viewport" onclick="UISubmap.openSubmapOptions()">Submap</button>
|
||||
<button data-tip="Click to resample (transform) your map to different cellcount" onclick="UISubmap.openRemapOptions()">Resample</button>
|
||||
<div>
|
||||
<button id="openSubmapMenu" data-tip="Click to generate a submap from the current viewport">Submap</button>
|
||||
<button id="openResampleMenu" data-tip="Click to transform the map" onclick="UISubmap.openRemapOptions()">Resample</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
6
main.js
6
main.js
|
|
@ -2,7 +2,7 @@
|
|||
// https://github.com/Azgaar/Fantasy-Map-Generator
|
||||
|
||||
"use strict";
|
||||
const version = "1.732"; // generator version
|
||||
const version = "1.8"; // generator version
|
||||
document.title += " v" + version;
|
||||
|
||||
// switches to disable/enable logging features
|
||||
|
|
@ -458,6 +458,8 @@ function showWelcomeMessage() {
|
|||
alertMessage.innerHTML = `The Fantasy Map Generator is updated up to version <strong>${version}</strong>.
|
||||
This version is compatible with ${changelog}, loaded <i>.map</i> files will be auto-updated.
|
||||
<ul><strong>Latest changes:</strong>
|
||||
<li>Submap tool by Goteguru</li>
|
||||
<li>Resample tool by Goteguru</li>
|
||||
<li>Pre-defined heightmaps</li>
|
||||
<li>Advanced notes editor</li>
|
||||
<li>Zones editor: filter by type</li>
|
||||
|
|
@ -465,8 +467,6 @@ function showWelcomeMessage() {
|
|||
<li>New style presets: Cyberpunk and Atlas</li>
|
||||
<li>Burg temperature graph</li>
|
||||
<li>4 new textures</li>
|
||||
<li>Province capture logic rework</li>
|
||||
<li>Button to release all provinces</li>
|
||||
</ul>
|
||||
|
||||
<p>Join our ${discord} and ${reddit} to ask questions, share maps, discuss the Generator and Worlbuilding, report bugs and propose new features.</p>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ window.UISubmap = (function () {
|
|||
rescaleStyles: checked("submapRescaleStyles"),
|
||||
smoothHeightMap: scale > 2,
|
||||
inverse: (x, y) => [x / origScale + x0, y / origScale + y0],
|
||||
projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale],
|
||||
projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale]
|
||||
};
|
||||
|
||||
// converting map position on the planet
|
||||
|
|
@ -146,17 +146,17 @@ window.UISubmap = (function () {
|
|||
// resize burgIcons
|
||||
const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")];
|
||||
for (const bi of burgIcons) {
|
||||
const newRadius = rn(minmax(bi.getAttribute('size') * scale, 0.2, 10), 2);
|
||||
const newRadius = rn(minmax(bi.getAttribute("size") * scale, 0.2, 10), 2);
|
||||
changeRadius(newRadius, bi.id);
|
||||
const swAttr = bi.attributes['stroke-width'];
|
||||
const swAttr = bi.attributes["stroke-width"];
|
||||
swAttr.value = +swAttr.value * scale;
|
||||
}
|
||||
|
||||
// burglabels
|
||||
const burgLabels = [...document.getElementById("burgLabels").querySelectorAll("g")];
|
||||
for (const bl of burgLabels) {
|
||||
const size = +bl.dataset['size'];
|
||||
bl.dataset['size'] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale;
|
||||
const size = +bl.dataset["size"];
|
||||
bl.dataset["size"] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale;
|
||||
}
|
||||
|
||||
// emblems
|
||||
|
|
@ -187,5 +187,5 @@ window.UISubmap = (function () {
|
|||
});
|
||||
}
|
||||
|
||||
return {openSubmapOptions, openRemapOptions}
|
||||
return {openSubmapOptions, openRemapOptions};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ toolsContent.addEventListener("click", function (event) {
|
|||
else if (button === "addRiver") toggleAddRiver();
|
||||
else if (button === "addRoute") toggleAddRoute();
|
||||
else if (button === "addMarker") toggleAddMarker();
|
||||
// click to create a new map buttons
|
||||
else if (button === "openSubmapMenu") UISubmap.openSubmapOptions();
|
||||
else if (button === "openResampleMenu") UISubmap.openRemapOptions();
|
||||
});
|
||||
|
||||
function processFeatureRegeneration(event, button) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue