Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Utopiah/aframe-persist-component
Persisting Aframe attribute data using localStorage
https://github.com/Utopiah/aframe-persist-component
aframe component localstorage virtual-reality webvr
Last synced: 3 months ago
JSON representation
Persisting Aframe attribute data using localStorage
- Host: GitHub
- URL: https://github.com/Utopiah/aframe-persist-component
- Owner: Utopiah
- Created: 2017-01-17T16:12:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-24T11:26:45.000Z (about 8 years ago)
- Last Synced: 2024-09-28T06:35:04.909Z (4 months ago)
- Topics: aframe, component, localstorage, virtual-reality, webvr
- Language: JavaScript
- Homepage: http://vatelier.net/MyDemo/aframe-persist-component/
- Size: 275 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aframe-persist-component
Use localStorage to make data persist over experiences.Tro try the example http://vatelier.net/MyDemo/aframe-persist-component/ move the camera around then refresh. You can also move the cube around using the inspector.
![preview](https://utopiah.github.io/aframe-persist-component/preview.gif)
## Properties
| Property | Description | Default Value |
| -------- | -------------------------------------------------------------------- | ------------- |
|attribute | specify which attributes of an entity should be saved | position |
|debug | console.log() when attributes are loaded, saved and with what values | true |## Installation
### Browser
Install and use by directly including the component:
```html
```
## Basic usage
```html
```
## Example
```htmllocal state save
```
## Limitations
- There is no traversal, each attribute to be saved has to be explicitely defined as such.
- Each entity *requires* to have its unique ID, if not a warning message will de displayed then nothing will be saved.
- Simple attributes like visible work but composed attributes (e.g. color or material) do not work.