pump version to 1.8

This commit is contained in:
Azgaar 2022-04-26 23:17:41 +05:00
parent 53dc9a452d
commit 12e84b85a6
4 changed files with 18 additions and 15 deletions

View file

@ -274,7 +274,7 @@
<div id="loading"> <div id="loading">
<div id="titleName"><t data-t="titleName">Azgaar's</t></div> <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="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> <p id="loading-text"><t data-t="loading">LOADING</t><span>.</span><span>.</span><span>.</span></p>
</div> </div>
@ -1727,9 +1727,9 @@
</div> </div>
<p>Click to create a new map:</p> <p>Click to create a new map:</p>
<div id="resamplers"> <div>
<button data-tip="Click to generate new (sub)map from the current viewport" onclick="UISubmap.openSubmapOptions()">Submap</button> <button id="openSubmapMenu" data-tip="Click to generate a submap from the current viewport">Submap</button>
<button data-tip="Click to resample (transform) your map to different cellcount" onclick="UISubmap.openRemapOptions()">Resample</button> <button id="openResampleMenu" data-tip="Click to transform the map" onclick="UISubmap.openRemapOptions()">Resample</button>
</div> </div>
</div> </div>

View file

@ -2,7 +2,7 @@
// https://github.com/Azgaar/Fantasy-Map-Generator // https://github.com/Azgaar/Fantasy-Map-Generator
"use strict"; "use strict";
const version = "1.732"; // generator version const version = "1.8"; // generator version
document.title += " v" + version; document.title += " v" + version;
// switches to disable/enable logging features // 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>. 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. This version is compatible with ${changelog}, loaded <i>.map</i> files will be auto-updated.
<ul><strong>Latest changes:</strong> <ul><strong>Latest changes:</strong>
<li>Submap tool by Goteguru</li>
<li>Resample tool by Goteguru</li>
<li>Pre-defined heightmaps</li> <li>Pre-defined heightmaps</li>
<li>Advanced notes editor</li> <li>Advanced notes editor</li>
<li>Zones editor: filter by type</li> <li>Zones editor: filter by type</li>
@ -465,8 +467,6 @@ function showWelcomeMessage() {
<li>New style presets: Cyberpunk and Atlas</li> <li>New style presets: Cyberpunk and Atlas</li>
<li>Burg temperature graph</li> <li>Burg temperature graph</li>
<li>4 new textures</li> <li>4 new textures</li>
<li>Province capture logic rework</li>
<li>Button to release all provinces</li>
</ul> </ul>
<p>Join our ${discord} and ${reddit} to ask questions, share maps, discuss the Generator and Worlbuilding, report bugs and propose new features.</p> <p>Join our ${discord} and ${reddit} to ask questions, share maps, discuss the Generator and Worlbuilding, report bugs and propose new features.</p>

View file

@ -87,7 +87,7 @@ window.UISubmap = (function () {
rescaleStyles: checked("submapRescaleStyles"), rescaleStyles: checked("submapRescaleStyles"),
smoothHeightMap: scale > 2, smoothHeightMap: scale > 2,
inverse: (x, y) => [x / origScale + x0, y / origScale + y0], 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 // converting map position on the planet
@ -146,17 +146,17 @@ window.UISubmap = (function () {
// resize burgIcons // resize burgIcons
const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")]; const burgIcons = [...document.getElementById("burgIcons").querySelectorAll("g")];
for (const bi of burgIcons) { 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); changeRadius(newRadius, bi.id);
const swAttr = bi.attributes['stroke-width']; const swAttr = bi.attributes["stroke-width"];
swAttr.value = +swAttr.value * scale; swAttr.value = +swAttr.value * scale;
} }
// burglabels // burglabels
const burgLabels = [...document.getElementById("burgLabels").querySelectorAll("g")]; const burgLabels = [...document.getElementById("burgLabels").querySelectorAll("g")];
for (const bl of burgLabels) { for (const bl of burgLabels) {
const size = +bl.dataset['size']; const size = +bl.dataset["size"];
bl.dataset['size'] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale; bl.dataset["size"] = Math.max(rn((size + size / scale) / 2, 2), 1) * scale;
} }
// emblems // emblems
@ -187,5 +187,5 @@ window.UISubmap = (function () {
}); });
} }
return {openSubmapOptions, openRemapOptions} return {openSubmapOptions, openRemapOptions};
})(); })();

View file

@ -72,6 +72,9 @@ toolsContent.addEventListener("click", function (event) {
else if (button === "addRiver") toggleAddRiver(); else if (button === "addRiver") toggleAddRiver();
else if (button === "addRoute") toggleAddRoute(); else if (button === "addRoute") toggleAddRoute();
else if (button === "addMarker") toggleAddMarker(); 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) { function processFeatureRegeneration(event, button) {