Skip to content

offline-first AFRAME component for syncing per-user data to localStorage/5apps/Dropbox/Gdrive via https://remotestorage.io protocol

License

Notifications You must be signed in to change notification settings

c-frame/aframe-remotestorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remoteStorage

An open protocol for per-user storage on the Web

Webfinger + OAuth + CORS + REST

Read more on the protocol and its apps

Check the online demo here

Installation

    <script src="https://aframe.io/releases/1.6.0/aframe.min.js"></script>
    <script src="build/aframe-remotestorage.min.js"></script> 
    <style type="text/css">
      #remotestorage-widget {
        z-index: 21000000;
        position: fixed;
        top: 0;
        right: 0;
      }
    </style>
  </head>
  <body>
    <a-scene remotestorage="dropbox: apikey; googledrive: apikey; logging: true; folder: myapp">

       ... see index.html for usage ...

    </a-scene>
  </body>
</html>


See index.html as an example, which demonstrates a store.js component which uses the aframe-remotestorage AFRAME component.

Where is the data stored?

Demo explanation

  1. for storage get an account on 5apps.com, dropbox, gdrive or ideally selfhost armadietto
  2. open the online demo
  3. click the 'connect storage'-widget
  4. enter your account address

Once you're connected try modifying the scene:

  1. launch the AFRAME designer by pressing 'editor'-button (or ctrl+shift+i)
  2. modify some objects
  3. optional: run $('a-sphere').setAttribute("scale","0.2 0.2 0.2")
  4. now reload the page

Profit! the scene is now saved/loaded to/from your storage.

  1. verify whether a myapp-folder was written to your storage

Where can I view/edit the data?

Simple! With other webapps which support remotestorage :)

Developer docs

Developers can use/access the remoteStorage-object (initialized in the aframe-remotestorage.js component).
Then, they can do various operations (demonstrated in load() and save() of store.js) which are documented here:

About

offline-first AFRAME component for syncing per-user data to localStorage/5apps/Dropbox/Gdrive via https://remotestorage.io protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published