Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```html

local 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.