bugfix: mouse outside of terminal now controls aframe scene again

This commit is contained in:
Leon van Kammen 2025-02-07 20:38:20 +01:00
parent e00b403dfc
commit d2f60bd055
1 changed files with 4 additions and 1 deletions

View File

@ -66,8 +66,11 @@ if( !AFRAME.components.dom ){
if( !overlay ){ if( !overlay ){
overlay = document.createElement('div') overlay = document.createElement('div')
overlay.id = "overlay" overlay.id = "overlay"
overlay.setAttribute('style','position:fixed;top:0px;left:0px;right:0px;bottom:0px') overlay.setAttribute('style','position:fixed;top:0px;left:0px;right:0px;bottom:0px;pointer-events:none')
document.body.appendChild(overlay) document.body.appendChild(overlay)
document.head.innerHTML += `
<style type="text/css">#overlay * { pointer-events:all }</style>
`
// sceneEl.setAttribute("webxr","overlayElement:#overlay") // sceneEl.setAttribute("webxr","overlayElement:#overlay")
} }
return this return this