mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
bug: style to have texture info
This commit is contained in:
parent
8579ae7bff
commit
c72c998eaf
18 changed files with 150 additions and 51 deletions
|
|
@ -237,9 +237,23 @@ async function getMapURL(type, options = {}) {
|
|||
}
|
||||
|
||||
// replace ocean pattern href to base64
|
||||
if (location.hostname && cloneEl.getElementById("oceanicPattern")) {
|
||||
if (location.hostname) {
|
||||
const el = cloneEl.getElementById("oceanicPattern");
|
||||
const url = el.getAttribute("href");
|
||||
const url = el?.getAttribute("href");
|
||||
if (url) {
|
||||
await new Promise(resolve => {
|
||||
getBase64(url, base64 => {
|
||||
el.setAttribute("href", base64);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// replace texture href to base64
|
||||
if (location.hostname) {
|
||||
const el = cloneEl.getElementById("textureImage");
|
||||
const url = el?.getAttribute("href");
|
||||
if (url) {
|
||||
await new Promise(resolve => {
|
||||
getBase64(url, base64 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue