aframe-location-persistance-component
Persist camera location between refreshes or visits by storing data in localStorage.
For A-Frame.
Check out the examples here: https://jeremyruhland.github.io/aframe-location-persistance-component/
API
location-persistance
Property | Description | Default Value |
---|---|---|
N/A |
fall-arrest
If your scene has physics/gravity and you fall off the edge you'll end up trapped until you clear your browser localStorage. To solve this use fall-arrest which will reset the camera position if it travels below a specific y coordinate.
Property | Description | Default Value |
---|---|---|
floor | Passing below this y coordinate triggers location reset | 0 |
home | Location to reset to | {x: 0, y: 1.7, z: 0} |
Installation
Browser
Install and use by directly including the browser files:
My A-Frame Scene
For location-persistance:
To use fall-arrest: