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