Skip to content

Commit

Permalink
looks like the setTimeout is still needed for the VREffect to be avai…
Browse files Browse the repository at this point in the history
…lable
  • Loading branch information
machenmusik committed Aug 25, 2017
1 parent 8eef22a commit 4df1a9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,6 @@ module.exports = window.AFRAME = {
// Enter VR on `vrdisplayactivate`, to handle in-VR traversal much earlier in the lifecycle.
// This event may also fire in other circumstances (e.g. putting on the Rift headset).
window.addEventListener('vrdisplayactivate', function (evt) {
if (window.AFRAME.scenes.length > 0) { window.AFRAME.scenes[0].enterVR(); }
var s = window.AFRAME.scenes[0];
if (s.effect) { s.enterVR(); } else { setTimeout(s.enterVRBound); }
});

0 comments on commit 4df1a9a

Please sign in to comment.