stalgiag / p5.xr

a library that helps turn p5.js sketches into immersive experiences using WebXR
GNU Lesser General Public License v2.1
117 stars 25 forks source link

add: requests immersive, clicking Enter VR launches inline #171

Closed smrghsh closed 1 year ago

smrghsh commented 2 years ago

Changes to p5xr, p5xrButton, and p5vr so the sketch launches in inline XR, and clicking Enter VR launches immersive. iss169 base

smrghsh commented 2 years ago

@stalgiag I'm getting a bug where headtracking is not working in immersive-vr. This pull request is trying to fix #169

smrghsh commented 2 years ago

Headtracking resolved through fetching a more recent repo version. I'm receiving Run failed: test - iss160 messages. What does this mean, and how do I resolve them?

smrghsh commented 2 years ago

Currently getting the following error on quest after quitting the immersive environment. Uncaught DOMException: Failed to execute 'getViewerPose' on 'XRFrame': XRSpace and XRFrame sessions do not match. It seems to be an issue that the AFrame project had while working on the same feature: On Quest, after launching the immersive view and quitting, it returns to the inline session, however, I cannot use the raycaster to click and drag to look around.

stalgiag commented 2 years ago

Headtracking resolved through fetching a more recent repo version. I'm receiving Run failed: test - iss160 messages. What does this mean, and how do I resolve them?

Certain unit tests are failing. I am unable to see which ones because this PR was made before the GH Actions was updated to test during PR. I can pull your working branch and run unit tests tomorrow.

stalgiag commented 2 years ago

Currently getting the following error on quest after quitting the immersive environment. Uncaught DOMException: Failed to execute 'getViewerPose' on 'XRFrame': XRSpace and XRFrame sessions do not match. It seems to be an issue that the AFrame project had while working on the same feature: On Quest, after launching the immersive view and quitting, it returns to the inline session, however, I cannot use the raycaster to click and drag to look around.

Looks like AFrame was able to fix it by resetting the reference space after exiting the immersive session.

For rotation, the click to drag event listeners may need to be readded because the initial domElement in this.canvas has been replaced (or is possibly now null after exiting). See the addInlineViewListeners() function in p5vr.js for more info. It is possible that this will need to be called again after ensuring that this.canvas is correct after exit.

stalgiag commented 2 years ago

Headtracking resolved through fetching a more recent repo version. I'm receiving Run failed: test - iss160 messages. What does this mean, and how do I resolve them?

I am not getting any failed unit tests. I need more information about your 'run failed' messages. It sounds like these might be from outdated commits but if you are still receiving them, let me know more info about the messages.

smrghsh commented 2 years ago

It may be from an outdated commi, I haven't received any failure notifications as I've kept working

On Tue, Jul 19, 2022 at 8:52 AM Stalgia Grigg @.***> wrote:

Headtracking resolved through fetching a more recent repo version. I'm receiving Run failed: test - iss160 messages. What does this mean, and how do I resolve them?

I am not getting any failed unit tests. I need more information about your 'run failed' messages. It sounds like these might be from outdated commits but if you are still receiving them, let me know more info about the messages.

— Reply to this email directly, view it on GitHub https://github.com/stalgiag/p5.xr/pull/171#issuecomment-1189226024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFNSQU6QAPA4OQXEOR3DMMLVU3FMZANCNFSM533FTL3Q . You are receiving this because you authored the thread.Message ID: @.***>

smrghsh commented 2 years ago

Can now use the raycaster to drag to look around. However, I'm unable to resolve Uncaught DOMException: Failed to execute 'getViewerPose' on 'XRFrame': XRSpace and XRFrame sessions do not match. at Zr.onXRFrame at this time Will proceed to updating the styling of the VR button to match this new functionality.

smrghsh commented 1 year ago

Resolved the bug by tracking down where there should be a reset.