hack to enter vr until resolve aframe vrdisplayactivate issues
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
AFRAME.registerComponent('hack', {
|
||||
play: function () {
|
||||
setTimeout(() => {
|
||||
this.el.sceneEl.exitVR();
|
||||
setTimeout(() => {
|
||||
const interval = setInterval(() => {
|
||||
if (!this.el.sceneEl.is('vr-mode')) {
|
||||
this.el.sceneEl.enterVR();
|
||||
}, 100);
|
||||
}, 250);
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user