exokitxr / exokit-frontend

Frontend for exokit. Turns exokit into a spatial web browser. 🦎
7 stars 3 forks source link

Save/Open menu options #31

Open avaer opened 5 years ago

avaer commented 5 years ago

We should add the ability to save/load the current DOM scene to a project directory.

This would be a precursor to something like "publish top Github", "publish to Glitch", or "upload to device", as well as actually sharing the scene code files.

chrislatorres commented 5 years ago

sharing to glitch would only be usable on studio/exokit though right? regular browsers would not use the reality layers/iframes

would this include publishing the studio index.html, three.js, example htmls, etc?

avaer commented 5 years ago

My thinking is there are two distinct modes here:

This is very similar to how Adobe Photoshop works when you do a save/export.

chrislatorres commented 5 years ago

Downloaded a basic site with a few lines of code, something more complex like a-painter does not work right away though, it has the main files but is missing some asset obj mtl png files.

Going to open a PR with this functionality, as it will feed into #42.

scrapedCapture

avaer commented 5 years ago

For saving full site contents, the main approach is to use service workers: https://github.com/exokitxr/exokit/pull/879

avaer commented 5 years ago

And the main prerequisite of that is https://github.com/modulesio/window-sw, which has a prerequisite of implementing the xhr and fetch interceptions such that they can be routed to the service worker.