aframevr / a-painter

🎨 Paint in VR in your browser.
https://aframe.io/a-painter/
MIT License
679 stars 200 forks source link

Offline development #149

Open fernandojsg opened 8 years ago

fernandojsg commented 8 years ago

Right now most of the assets are loaded from the CDN, so if you won't be able to work on the project while being offline. Maybe we could solve this by using some cache plugin (html5 app cache) on webpack? /cc @ngokevin @cvan

ngokevin commented 8 years ago

Can we move the assets into the repo? We could cache, but that seems simplest.

fernandojsg commented 8 years ago

Yeah, I think so :D What do you think @dmarcos ?

fernandojsg commented 8 years ago

@ngokevin still we have some cdn access for uploadcare, clipboardjs and so on. Should we also include them into the repo as vendor files? Or do you have any other proposal for them?

cvan commented 8 years ago

(Related to #111)

msfeldstein commented 8 years ago

Why not add them as dependencies and pull from NPM?

msfeldstein commented 8 years ago

Would make it a lot easier to modify a-frame while working on the project as well, i'm unclear how i can add features to a-frame and test them in a-painter easily

cvan commented 8 years ago

Offline meaning be able to load https://aframe.io/a-painter/ and have that load withoutneeding to install npm, serve the A-Painter format locally, and so forth. Service Workers enable this kind of pattern.

cvan commented 8 years ago

FYI: I made a tool for handling a Service Worker that is versioned based on a hash of static assets in a directory:

https://github.com/cvan/sherpy https://gist.github.com/cvan/b0b373442a69b298fc05d4a8a8001d5a

Might be useful out of the box, though you may have to tweak things slightly - YMMV.