doc: add automatic restore state
This commit is contained in:
parent
6cfeaefe01
commit
9d549454d6
1 changed files with 1 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ if( typeof emulator != 'undefined' ){
|
||||||
|
|
||||||
localforage.getItem("state", async (err,stateBase64) => {
|
localforage.getItem("state", async (err,stateBase64) => {
|
||||||
const askConfirm = () => {
|
const askConfirm = () => {
|
||||||
|
if( window.localStorage.getItem("restorestate") == "true" ) return true
|
||||||
try{
|
try{
|
||||||
const scene = document.querySelector('a-scene');
|
const scene = document.querySelector('a-scene');
|
||||||
if( scene.is('ar-mode') ) scene.exitAR()
|
if( scene.is('ar-mode') ) scene.exitAR()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue