mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
Fix: rework texture data format (#1017)
* fix: rework texture save format * refactor: move textures to a local folder * fix: export texture * fix: don't export empty texture * chore: pump version * fix: rescale water mask on screen size change --------- Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
This commit is contained in:
parent
958a2c6ef8
commit
ada39b47ad
47 changed files with 225 additions and 273 deletions
11
main.js
11
main.js
|
|
@ -134,13 +134,6 @@ fogging
|
|||
.attr("fill", "#e8f0f6")
|
||||
.attr("filter", "url(#splotch)");
|
||||
|
||||
texture
|
||||
.append("image")
|
||||
.attr("id", "textureImage")
|
||||
.attr("preserveAspectRatio", "xMidYMid slice")
|
||||
.attr("width", "100%")
|
||||
.attr("height", "100%");
|
||||
|
||||
// assign events separately as not a viewbox child
|
||||
scaleBar.on("mousemove", () => tip("Click to open Units Editor")).on("click", () => editUnits());
|
||||
legend
|
||||
|
|
@ -1955,7 +1948,9 @@ const regenerateMap = debounce(async function (options) {
|
|||
|
||||
// clear the map
|
||||
function undraw() {
|
||||
viewbox.selectAll("path, circle, polygon, line, text, use, #zones > g, #armies > g, #ruler > g").remove();
|
||||
viewbox
|
||||
.selectAll("path, circle, polygon, line, text, use, #texture > image, #zones > g, #armies > g, #ruler > g")
|
||||
.remove();
|
||||
document
|
||||
.getElementById("deftemp")
|
||||
.querySelectorAll("path, clipPath, svg")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue