hide environment in AR

This commit is contained in:
Leon van Kammen 2024-03-07 17:34:15 +01:00
parent 01d04455d3
commit fbd5fd4429
1 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,13 @@ AFRAME.registerComponent('xrfragments', {
// requires are loaded // requires are loaded
ready: function(e){ ready: function(e){
this.el.setAttribute("xrf","https://coderofsalvation.github.io/xrsh-media/assets/background.glb") 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(){ launcher: function(){