Giter VIP home page Giter VIP logo

voxel-builder's Introduction

voxel-builder's People

Contributors

nimadez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

voxel-builder's Issues

File > Save As does not work on non-Chromium browsers.

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):

voxel-builder/src/main.js

Lines 5753 to 5774 in 386b977

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.

Good work.

Your work on voxel-builder is insanely good.

I've been getting my ass kicked for weeks in my attempt to build an efficient, featureful voxel editor. It is a really difficult task. (I have no background with three or any 3D tools.)

I've looked at countless other repos, they're mainly all just clones of a three example with some things added, but nothing viable. But yours is the most commendable editor on Github. It is a fully working competitor to all of the big dogs in the voxel editor game.

I applaud you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.