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

Display VR scene under Enter VR button #169

Closed
2 of 6 tasks
smrghsh opened this issue Jul 13, 2022 · 6 comments
Closed
2 of 6 tasks

Display VR scene under Enter VR button #169

smrghsh opened this issue Jul 13, 2022 · 6 comments
Labels

Comments

@smrghsh
Copy link
Contributor

smrghsh commented Jul 13, 2022

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Which area does this problem relate to?

  • VR
  • AR(ARCORE)
  • AR(MARKER)

New feature details:

Aims to start the sketch in a browser canvas before Enter VR button is clicked and display the Enter VR button over the sketch, so a user can see the scene before entering VR

The idea behind this feature request is to provide users with a preview of the VR experience that they are about to enter. This provides several advantages. This allows a user to see the initial scene, potentially giving a 'hook' or encouragement to entry, like a thumbnail. Since VR can be very intense and consuming, this also can provide a 'heads up' to the user before they enter a 3D space. For a developer, this allows for a quicker view of the starting environment, potentially speeding up iteration cycles of debugging.

beforeafter

Currently, I believe p5xr does this in order to provide a button that launches the XR experience.
current

This feature request draws inspiration from the way three.js projects often provide VR. However, it does not support inline XR or AR; it only supports immersive-vr. I have noted that it doesn't support an exit VR button.
threejs approach

It also does not support inline xr. Originally, in order to address this, I was trying to load inline XR because it functions as the 2D preview. However, this doesn't work on headset, as headset browsers inform p5xr that they are immersive, and I get errors with the refSpace. Therefore, I propose something like the following. The approach is to render the scene without XR, perform a session check and label button appropriately, and then have the button start the sketch over.
proposal

In this way, logic that handles whether the experience is VR or AR is kept out of p5vr.

The diagrams can be small without zooming in to the images, so I've included a figma link for easier viewing:
Figma Link

@stalgiag

implemented process diagram

@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 13, 2022

@stalgiag

@stalgiag stalgiag added the vr label Jul 13, 2022
@stalgiag
Copy link
Owner

Hi @smrghsh more detail would be helpful here. You could consider adding small drawings or notes about implementation. Also further explanation on why this is important, existing precedents, etc. A macro feature issue is a prime place to keep detailed notes and plans.

@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 15, 2022

@stalgiag, I've updated with more detail and a plan.

@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 15, 2022

I was able to load an inline session and then launch immersive with the immersive web inline example on desktop as well as quest. Currently studying that functionality, and will try to emulate that, because it accomplishes this goal. The process should be even simple as in almost all instances, an inline XR session should start first.

@stalgiag
Copy link
Owner

@stalgiag, I've updated with more detail and a plan.

looks great!

@stalgiag
Copy link
Owner

stalgiag commented Aug 3, 2022

closed with #171

@stalgiag stalgiag closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants