Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in auto enter VR #2244

Closed
caseyyee opened this issue Jan 5, 2017 · 10 comments
Closed

Add in auto enter VR #2244

caseyyee opened this issue Jan 5, 2017 · 10 comments

Comments

@caseyyee
Copy link
Contributor

caseyyee commented Jan 5, 2017

It would be nice to have the browser auto-enter VR when refreshed on changes. This would make it so that as a developer, you won't have to re-enter VR on every change and simply have the change show up in the headset.

  • A-Frame Version: 0.4
  • Platform / Device: Windows, HTC VIVE
@machenmusik
Copy link
Contributor

(that assumes the browser would allow it...)
there is already code in 0.4.0 that will auto-enter for Carmel;
the intent was to be able to provide empty string to auto-enter regardless of display,
but in practice I'm not sure that the parsing allows empty string to survive through to init

@machenmusik
Copy link
Contributor

(at present, when auto-enter fails, the button to enter VR again later does not reappear for some reason, so there is a penalty for trying but failing)

@caseyyee
Copy link
Contributor Author

caseyyee commented Jan 5, 2017

@machenmusik chrome won't allow for it, but Firefox will.

Another alternative might be to have our own sync logic that would hot-reload the a-frame scene to make refreshing and auto-entering VR unnecessary. Not sure if the work required to do that would be more difficult or not?

@machenmusik
Copy link
Contributor

so using the 0.4.0 auto-enter-vr, if you know the VR display name you want to auto-enter and can modify the display parameter for the auto-enter-vr component accordingly, that might work...

IMO not good to avoid page reload since scripts won't re-run etc.

@ngokevin
Copy link
Member

So Firefox doesn't need user interaction? Will that change? Maybe just add a one-line JS in your app to click the button.

If it's for development purposes, there is a WebVR recording tool coming out that will help with this so you don't even need to enter VR to test.

But it might be possible to do something similar to React hot loading of components. A server can send a message to the scene which component changed. A-Frame can detach, re-register, and reattach the component. But that'll probably be far off I bet.

@machenmusik
Copy link
Contributor

also see #2298

@caseyyee
Copy link
Contributor Author

caseyyee commented Jan 25, 2017

@ngokevin WebVR recording tool doesn't help here. Just being able to see changes reflected in the headset without having to reach over to click Enter VR is all i'm asking for.

Enter VR is still being specced, but it looks like user gesture will be required to enter VR for the first time, then any subsequent navigation and refreshes will be allowed to enter VR.

Hot loading sounds like the most ideal solution to me.

@machenmusik
Copy link
Contributor

@caseyyee my current working pattern is to use experimental Chromium and Rift; since that sends vrdisplayactivate, all you need to do is lift the headset up far enough for it to trigger deactivate, then let it drop back down to reactivate and bam! you are back in VR

@machenmusik
Copy link
Contributor

@ngokevin the reload should be detected as a "subsequent navigation / refresh", I would think...

@ngokevin
Copy link
Member

vrdisplayactivate is implemented and only the first enter requires the gesture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants