diff --git a/app/xrfragments.js b/app/xrfragments.js index be56025..2aae5ce 100644 --- a/app/xrfragments.js +++ b/app/xrfragments.js @@ -15,6 +15,13 @@ AFRAME.registerComponent('xrfragments', { // requires are loaded ready: function(e){ this.el.setAttribute("xrf","https://coderofsalvation.github.io/xrsh-media/assets/background.glb") + + let ARbutton = document.querySelector('.a-enter-ar-button') + if( ARbutton ){ + ARbutton.addEventListener('click', () => { + AFRAME.XRF.reset() + }) + } }, launcher: function(){