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: requests immersive, clicking Enter VR launches inline #171

Merged
merged 16 commits into from
Aug 2, 2022

Conversation

smrghsh
Copy link
Contributor

@smrghsh smrghsh commented Jul 18, 2022

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

Changes to p5xr, p5xrButton, and p5vr so the sketch launches in inline XR, and clicking Enter VR launches immersive.
@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 18, 2022

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

@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 18, 2022

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?

initVR should createButton and not perform this.init() or this.sessionCheck() again
Getting the following error `p5xr.js:96 Uncaught DOMException: Failed to execute 'getViewerPose' on 'XRFrame': XRSpace and XRFrame sessions do not match.
    at Zr.onXRFrame `
@stalgiag stalgiag marked this pull request as ready for review July 18, 2022 22:57
@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 18, 2022

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 stalgiag marked this pull request as draft July 18, 2022 22:57
@stalgiag stalgiag marked this pull request as ready for review July 18, 2022 23:03
@stalgiag stalgiag marked this pull request as draft July 18, 2022 23:04
@stalgiag
Copy link
Owner

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Contributor Author

smrghsh commented Jul 19, 2022 via email

However, when it returns to immersive, it  does not show the correct perspective and throws an error
@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 20, 2022

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 smrghsh marked this pull request as ready for review July 22, 2022 20:17
@smrghsh smrghsh marked this pull request as draft July 22, 2022 20:17
@smrghsh
Copy link
Contributor Author

smrghsh commented Jul 28, 2022

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

@smrghsh smrghsh marked this pull request as ready for review July 28, 2022 01:28
Copy link
Owner

@stalgiag stalgiag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Small cleanup and organization requests inline.

tests/manual-test-examples/p5vr/basic/example.js Outdated Show resolved Hide resolved
src/p5xr/p5vr/p5vr.js Outdated Show resolved Hide resolved
src/p5xr/p5vr/p5vr.js Outdated Show resolved Hide resolved
src/p5xr/core/p5xrButton.js Outdated Show resolved Hide resolved
src/p5xr/core/p5xrButton.js Outdated Show resolved Hide resolved
@smrghsh smrghsh requested a review from stalgiag July 29, 2022 04:26
@stalgiag stalgiag merged commit 06eba75 into stalgiag:main Aug 2, 2022
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

Successfully merging this pull request may close these issues.

2 participants