diff --git a/src/state/index.js b/src/state/index.js index f7f758d..8e3c383 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -155,6 +155,7 @@ AFRAME.registerState({ }, beatloaderpreloadfinish: (state) => { + if (state.menuActive) { return; } // Cancelled. state.challenge.isBeatsPreloaded = true; }, @@ -202,6 +203,7 @@ AFRAME.registerState({ * ?debugstate=loading */ debugloading: state => { + DEBUG_CHALLENGE.id = '-1'; Object.assign(state.menuSelectedChallenge, DEBUG_CHALLENGE); Object.assign(state.challenge, DEBUG_CHALLENGE); state.menuActive = false; @@ -427,6 +429,14 @@ AFRAME.registerState({ state.isSongFetching = false; }, + songloadcancel: state => { + state.challenge.isBeatsPreloaded = false; + state.challenge.isLoading = false; + state.isSongLoading = false; + state.isSongFetching = false; + state.menuActive = true; + }, + songloadfinish: (state) => { state.isSongFetching = false; state.isSongLoading = false; diff --git a/src/templates/loading.html b/src/templates/loading.html index 918c239..36dd874 100644 --- a/src/templates/loading.html +++ b/src/templates/loading.html @@ -46,5 +46,15 @@ position="0 -0.38 0.004" visible="false"> + + + +