bug: style to have texture info

This commit is contained in:
Azgaar 2023-08-08 01:34:36 +04:00
parent 8579ae7bff
commit c72c998eaf
18 changed files with 150 additions and 51 deletions

View file

@ -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 => {