mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
remove advanced tracking
This commit is contained in:
parent
1a2243472b
commit
b438fedf9a
6 changed files with 6 additions and 33 deletions
|
|
@ -1435,7 +1435,7 @@
|
|||
<p>Join our <a href='https://discordapp.com/invite/X7E84HU' target='_blank'>Discord server</a> and <a href="https://www.reddit.com/r/FantasyMapGenerator/" target="_blank">Reddit community</a> to ask questions, get help and share maps.</p>
|
||||
<p>The project is under active development. Creator and main maintainer: Azgaar. To track the development progress see the <a href="https://trello.com/b/7x832DG4/fantasy-map-generator" target="_blank">devboard</a>. For older versions see the <a href="https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Changelog" target="_blank">changelog</a>. Please report bugs <a href="https://github.com/Azgaar/Fantasy-Map-Generator/issues" target="_blank">here</a>. You can also contact me directly via <a href="mailto:azgaar.fmg@yandex.by" target="_blank">email</a>.</p>
|
||||
<div style="background-color: #e85b46; padding: .4em; width: max-content; margin: .6em auto 0 auto; border: 1px solid #943838">
|
||||
<a href="https://www.patreon.com/azgaar" onclick="track('click', 'patreon from about')" target="_blank" style="color: white; text-decoration: none; font-family: sans-serif">
|
||||
<a href="https://www.patreon.com/azgaar" target="_blank" style="color: white; text-decoration: none; font-family: sans-serif">
|
||||
<div>
|
||||
<div style="width: .8em; display: inline-block; padding: 0 .2em; fill: white">
|
||||
<svg viewBox="0 0 569 546">
|
||||
|
|
|
|||
5
main.js
5
main.js
|
|
@ -422,7 +422,7 @@ function showWelcomeMessage() {
|
|||
</ul>
|
||||
|
||||
<p>Join our ${discord} and ${reddit} to ask questions, share maps, discuss the Generator and Worlbuilding, report bugs and propose new features.</p>
|
||||
<span>Thanks for all supporters on <a href="https://www.patreon.com/azgaar" onclick="track('click', 'patreon from update')" target="_blank">Patreon</a>!</i></span>`;
|
||||
<span>Thanks for all supporters on <a href="https://www.patreon.com/azgaar" target="_blank">Patreon</a>!</i></span>`;
|
||||
|
||||
$("#alert").dialog({
|
||||
resizable: false,
|
||||
|
|
@ -1862,7 +1862,7 @@ function showStatistics() {
|
|||
INFO && console.log(stats);
|
||||
}
|
||||
|
||||
const regenerateMap = debounce(function (source) {
|
||||
const regenerateMap = debounce(function () {
|
||||
WARN && console.warn("Generate new random map");
|
||||
closeDialogs("#worldConfigurator, #options3d");
|
||||
customization = 0;
|
||||
|
|
@ -1872,7 +1872,6 @@ const regenerateMap = debounce(function (source) {
|
|||
restoreLayers();
|
||||
if (ThreeD.options.isOn) ThreeD.redraw();
|
||||
if ($("#worldConfigurator").is(":visible")) editWorld();
|
||||
track("regenerate", `from ${source}`);
|
||||
}, 1000);
|
||||
|
||||
// clear the map
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
// download map as SVG
|
||||
async function saveSVG() {
|
||||
TIME && console.time("saveSVG");
|
||||
track("export", "svg");
|
||||
const url = await getMapURL("svg");
|
||||
const link = document.createElement("a");
|
||||
link.download = getFileName() + ".svg";
|
||||
|
|
@ -18,7 +17,6 @@ async function saveSVG() {
|
|||
// download map as PNG
|
||||
async function savePNG() {
|
||||
TIME && console.time("savePNG");
|
||||
track("export", "png");
|
||||
const url = await getMapURL("png");
|
||||
|
||||
const link = document.createElement("a");
|
||||
|
|
@ -49,7 +47,6 @@ async function savePNG() {
|
|||
// download map as JPEG
|
||||
async function saveJPEG() {
|
||||
TIME && console.time("saveJPEG");
|
||||
track("export", "jpg");
|
||||
const url = await getMapURL("png");
|
||||
|
||||
const canvas = document.createElement("canvas");
|
||||
|
|
@ -379,7 +376,6 @@ function inlineStyle(clone) {
|
|||
}
|
||||
|
||||
function saveGeoJSON_Cells() {
|
||||
track("export", "getJSON cells");
|
||||
const json = {type: "FeatureCollection", features: []};
|
||||
const cells = pack.cells;
|
||||
const getPopulation = i => {
|
||||
|
|
@ -410,7 +406,6 @@ function saveGeoJSON_Cells() {
|
|||
}
|
||||
|
||||
function saveGeoJSON_Routes() {
|
||||
track("export", "getJSON routes");
|
||||
const json = {type: "FeatureCollection", features: []};
|
||||
|
||||
routes.selectAll("g > path").each(function () {
|
||||
|
|
@ -427,7 +422,6 @@ function saveGeoJSON_Routes() {
|
|||
}
|
||||
|
||||
function saveGeoJSON_Rivers() {
|
||||
track("export", "getJSON rivers");
|
||||
const json = {type: "FeatureCollection", features: []};
|
||||
|
||||
rivers.selectAll("path").each(function () {
|
||||
|
|
@ -450,8 +444,6 @@ function saveGeoJSON_Rivers() {
|
|||
}
|
||||
|
||||
function saveGeoJSON_Markers() {
|
||||
track("export", "getJSON markers");
|
||||
|
||||
const features = pack.markers.map(marker => {
|
||||
const {i, type, icon, x, y, size, fill, stroke} = marker;
|
||||
const coordinates = getQGIScoordinates(x, y);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ function quickLoad() {
|
|||
}
|
||||
|
||||
async function loadFromDropbox() {
|
||||
track("load", `from dropbox`);
|
||||
const mapPath = document.getElementById("loadFromDropboxSelect")?.value;
|
||||
|
||||
DEBUG && console.log("Loading map from Dropbox:", mapPath);
|
||||
|
|
@ -69,7 +68,6 @@ function loadMapPrompt(blob) {
|
|||
|
||||
function loadLastSavedMap() {
|
||||
WARN && console.warn("Load last saved map");
|
||||
track("load", `from browser storage`);
|
||||
try {
|
||||
uploadMap(blob);
|
||||
} catch (error) {
|
||||
|
|
@ -80,7 +78,6 @@ function loadMapPrompt(blob) {
|
|||
}
|
||||
|
||||
function loadMapFromURL(maplink, random) {
|
||||
track("load", `from url`);
|
||||
const URL = decodeURIComponent(maplink);
|
||||
|
||||
fetch(URL, {method: "GET", mode: "cors"})
|
||||
|
|
@ -96,7 +93,6 @@ function loadMapFromURL(maplink, random) {
|
|||
}
|
||||
|
||||
function showUploadErrorMessage(error, URL, random) {
|
||||
track("error", `map load from url`);
|
||||
ERROR && console.error(error);
|
||||
alertMessage.innerHTML = `Cannot load map from the ${link(URL, "link provided")}.
|
||||
${random ? `A new random map is generated. ` : ""}
|
||||
|
|
|
|||
|
|
@ -15,18 +15,9 @@ function editHeightmap() {
|
|||
title: "Edit Heightmap",
|
||||
width: "28em",
|
||||
buttons: {
|
||||
Erase: function () {
|
||||
track("edit", "heightmap erase");
|
||||
enterHeightmapEditMode("erase");
|
||||
},
|
||||
Keep: function () {
|
||||
track("edit", "heightmap keep");
|
||||
enterHeightmapEditMode("keep");
|
||||
},
|
||||
Risk: function () {
|
||||
track("edit", "heightmap risk");
|
||||
enterHeightmapEditMode("risk");
|
||||
},
|
||||
Erase: () => enterHeightmapEditMode("erase"),
|
||||
Keep: () => enterHeightmapEditMode("keep"),
|
||||
Risk: () => enterHeightmapEditMode("risk"),
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
}
|
||||
|
|
@ -704,7 +695,6 @@ function editHeightmap() {
|
|||
|
||||
function openTemplateEditor() {
|
||||
if ($("#templateEditor").is(":visible")) return;
|
||||
track("edit", "template editor");
|
||||
const body = document.getElementById("templateBody");
|
||||
|
||||
$("#templateEditor").dialog({
|
||||
|
|
@ -941,7 +931,6 @@ function editHeightmap() {
|
|||
|
||||
function openImageConverter() {
|
||||
if ($("#imageConverter").is(":visible")) return;
|
||||
track("edit", "convert image");
|
||||
imageToLoad.click();
|
||||
closeDialogs("#imageConverter");
|
||||
|
||||
|
|
|
|||
|
|
@ -781,7 +781,6 @@ function loadURL() {
|
|||
|
||||
// load map
|
||||
document.getElementById("mapToLoad").addEventListener("change", function () {
|
||||
track("load", `from local file`);
|
||||
const fileToLoad = this.files[0];
|
||||
this.value = "";
|
||||
closeDialogs();
|
||||
|
|
@ -804,7 +803,6 @@ function openSaveTiles() {
|
|||
width: "23em",
|
||||
buttons: {
|
||||
Download: function () {
|
||||
track("export", `tiles`);
|
||||
status.innerHTML = "Preparing for download...";
|
||||
setTimeout(() => (status.innerHTML = "Downloading. It may take some time."), 1000);
|
||||
loading = setInterval(() => (status.innerHTML += "."), 1000);
|
||||
|
|
@ -890,7 +888,6 @@ function enterStandardView() {
|
|||
}
|
||||
|
||||
async function enter3dView(type) {
|
||||
track("click", `3d mode: ${type}`);
|
||||
const canvas = document.createElement("canvas");
|
||||
canvas.id = "canvas3d";
|
||||
canvas.dataset.type = type;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue