mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
Changed to use downloadFile function
This commit is contained in:
parent
6861de92a0
commit
9c5805889b
1 changed files with 1 additions and 7 deletions
|
|
@ -128,13 +128,7 @@ const saveScreenshot = async function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveOBJ = async function() {
|
const saveOBJ = async function() {
|
||||||
const URL = 'data:text/plain;charset=UTF-8,' + encodeURIComponent(await getOBJ());
|
downloadFile(await getOBJ(), getFileName() + ".obj", "text/plain;charset=UTF-8");
|
||||||
const link = document.createElement("a");
|
|
||||||
link.download = getFileName() + ".obj";
|
|
||||||
link.href = URL;
|
|
||||||
link.click();
|
|
||||||
tip(`OBJ is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
|
||||||
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// start 3d view and heightmap edit preview
|
// start 3d view and heightmap edit preview
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue