Cool project, I've only been using it for an hour or so, but it seems pretty sharp so far.
I did have a problem where I don't seem to be able to save my models. I'm using Firefox on desktop, and clicking the save as button just causes... nothing to happen.
This appears to be caused by the use of the Window.showSaveFilePicker() API, which is experimental and only available on some Chromium based browsers. The usage happens on in main.js:5756 (saveFile)
:
|
async function saveFile(blob, filename, reject) { |
|
if (!isElectron() && !isMobile) { // to show a file dialog in Chrome |
|
try { |
|
const fileHandle = await self.showSaveFilePicker({ |
|
suggestedName: filename, |
|
types: [ { description: "File" } ] |
|
}); |
|
const writeFile = async (fileHandle, contents) => { |
|
const writable = await fileHandle.createWritable(); |
|
await writable.write(contents); |
|
await writable.close(); |
|
}; |
|
writeFile(fileHandle, blob).then(() => { |
|
// |
|
}); |
|
} catch (err) { |
|
// canceled |
|
} |
|
} else { // showSaveFilePicker browser compatibility |
|
reject(); |
|
} |
|
} |
It looks like this function can already fallback in some conditions. I'm guessing the isMobile
check was done for this reason, but it would probably be more accurate to just check whether window.showSaveFilePicker
is defined. The other arm of the if block even mentions the function. I'm guessing the exception caused by calling an undefined function is getting swallowed by the empty catch block in the function. Nothing appears in the console when you press Save.
I was able to patch it until reload by running window.saveFile = async function(blob, filename, reject) { reject(); }
in the console. This is equivalent to always using the else block and causes the functions that use saveFile
to fall back to just downloading the file as a blob, which works fine in all modern browsers, as far as I know.