mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
fix: rework texture save format
This commit is contained in:
parent
958a2c6ef8
commit
a7419a299e
20 changed files with 168 additions and 169 deletions
|
|
@ -252,12 +252,12 @@ async function getMapURL(type, options = {}) {
|
|||
|
||||
// replace texture href to base64
|
||||
if (location.hostname) {
|
||||
const el = cloneEl.getElementById("textureImage");
|
||||
const url = el?.getAttribute("href");
|
||||
if (url) {
|
||||
const image = document.querySelector("#texture > image");
|
||||
if (image) {
|
||||
const url = image.getAttribute("href");
|
||||
await new Promise(resolve => {
|
||||
getBase64(url, base64 => {
|
||||
el.setAttribute("href", base64);
|
||||
image.setAttribute("href", base64);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue