aframe: Document how to enter/exit VR



And also document how to when <iframe>-ing content.

  • A-Frame Version: any
  • Platform/Device: all

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 29 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Well, no one is against #705. Though I might also just recommend creating a scene component. They have the advantage that you don’t have to worry about query selecting, waiting for events. Just write JS and attach:

AFRAME.registerComponent('auto-enter-vr', {
  init: function () {
<a-scene auto-enter-vr>

Nice section here, but for some reason waiting for loaded doesn’t work. you have to add a setTimeout. gotta figure out why:

   (function () {
       // switch to stereoscopic mode directly on page load, this needs to be after the a-scene loads.
       var scene = document.querySelector('a-scene');
       if (scene.hasLoaded) {
       } else {
           scene.addEventListener('loaded', function () {
               setTimeout(function () {
               }, 1000);

Also, not exactly specific to this issue, but still think we should support #705.