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.
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.
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)
: https://github.com/nimadez/voxel-builder/blob/386b977020c0a97f360ec4174c6f510cf3b6ba23/src/main.js#L5753-L5774It 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 whetherwindow.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 usesaveFile
to fall back to just downloading the file as a blob, which works fine in all modern browsers, as far as I know.