bugfix: look-controls + device-motionsensors works again
This commit is contained in:
parent
f508d1e262
commit
b1a518bbd8
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Sat Jun 15 05:22:38 PM CEST 2024
|
||||
* v0.5.1 generated at Sat Jun 15 05:46:02 PM CEST 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
@ -4163,17 +4163,6 @@ window.AFRAME.registerComponent('xrf', {
|
|||
if( VRbutton ) VRbutton.addEventListener('click', () => AFRAME.XRF.hashbus.pub( '#VR' ) )
|
||||
})
|
||||
|
||||
// (de)active look-controls because of 'rot=' XR Fragment
|
||||
aScene.addEventListener('loaded', () => {
|
||||
// this is just for convenience (not part of spec): enforce AR + hide/show stuff based on VR tags in 3D model
|
||||
aScene.canvas.addEventListener('mousedown', () => xrf.camera.el.setAttribute("look-controls","") )
|
||||
})
|
||||
|
||||
XRF.addEventListener('rot',(e) => {
|
||||
let lookcontrols = document.querySelector('[look-controls]')
|
||||
if( lookcontrols ) lookcontrols.removeAttribute("look-controls")
|
||||
})
|
||||
|
||||
let repositionUser = (scale) => () => {
|
||||
// sometimes AFRAME resets the user position to 0,0,0 when entering VR (not sure why)
|
||||
setTimeout( () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Sat Jun 15 05:22:37 PM CEST 2024
|
||||
* v0.5.1 generated at Sat Jun 15 05:46:02 PM CEST 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
@ -4161,17 +4161,6 @@ window.AFRAME.registerComponent('xrf', {
|
|||
if( VRbutton ) VRbutton.addEventListener('click', () => AFRAME.XRF.hashbus.pub( '#VR' ) )
|
||||
})
|
||||
|
||||
// (de)active look-controls because of 'rot=' XR Fragment
|
||||
aScene.addEventListener('loaded', () => {
|
||||
// this is just for convenience (not part of spec): enforce AR + hide/show stuff based on VR tags in 3D model
|
||||
aScene.canvas.addEventListener('mousedown', () => xrf.camera.el.setAttribute("look-controls","") )
|
||||
})
|
||||
|
||||
XRF.addEventListener('rot',(e) => {
|
||||
let lookcontrols = document.querySelector('[look-controls]')
|
||||
if( lookcontrols ) lookcontrols.removeAttribute("look-controls")
|
||||
})
|
||||
|
||||
let repositionUser = (scale) => () => {
|
||||
// sometimes AFRAME resets the user position to 0,0,0 when entering VR (not sure why)
|
||||
setTimeout( () => {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Sat Jun 15 05:22:38 PM CEST 2024
|
||||
* v0.5.1 generated at Sat Jun 15 05:46:02 PM CEST 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* v0.5.1 generated at Sat Jun 15 05:22:38 PM CEST 2024
|
||||
* v0.5.1 generated at Sat Jun 15 05:46:02 PM CEST 2024
|
||||
* https://xrfragment.org
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
|
|
@ -53,17 +53,6 @@ window.AFRAME.registerComponent('xrf', {
|
|||
if( VRbutton ) VRbutton.addEventListener('click', () => AFRAME.XRF.hashbus.pub( '#VR' ) )
|
||||
})
|
||||
|
||||
// (de)active look-controls because of 'rot=' XR Fragment
|
||||
aScene.addEventListener('loaded', () => {
|
||||
// this is just for convenience (not part of spec): enforce AR + hide/show stuff based on VR tags in 3D model
|
||||
aScene.canvas.addEventListener('mousedown', () => xrf.camera.el.setAttribute("look-controls","") )
|
||||
})
|
||||
|
||||
XRF.addEventListener('rot',(e) => {
|
||||
let lookcontrols = document.querySelector('[look-controls]')
|
||||
if( lookcontrols ) lookcontrols.removeAttribute("look-controls")
|
||||
})
|
||||
|
||||
let repositionUser = (scale) => () => {
|
||||
// sometimes AFRAME resets the user position to 0,0,0 when entering VR (not sure why)
|
||||
setTimeout( () => {
|
||||
|
|
Loading…
Reference in New Issue