-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
WebXRManager: Add AR plane detection. #24855
Conversation
cdb8017
to
9a24e15
Compare
Please add the new example to https://github.com/mrdoob/three.js/blob/dev/examples/files.json so it appears at the side menu. Also create a thumbnail via |
@Mugen87 Added I think there might be a problem with that link you sent to test since this example depends upon a compiled threejs. I made a test branch here that has my change to WebXRManager compiled in. https://raw.githack.com/richardanaya/three.js/test/examples/webxr_ar_plane_detection.html |
Thanks for updating the link! How do I test this with a Quest 2? I've only used the device for VR so far. When opening the example, I see the same output like on my desktop (black screen and the "AR not supported" message). |
@Mugen87 right now there's a step you have to do for Quest:
If it works in the reference demo: it should work in: |
Thanks for the instruction! Indeed it works as expected. /cc @cabanier |
You don't need to restart the device after setting up walls and doors. They are pulled each time you start an immersive session. |
Does this mean that you get a plane event each frame? |
I wanted to say that the rendering looks as expected. Meaning the configured walls are correctly displayed. The new |
It might be nice to get an event each time the planes change. |
24a32ac
to
5779791
Compare
@Mugen87 added some new events as per @rcabanier 's recommendation and updated example and test deploy. |
dbd5ba7
to
aba3526
Compare
Fixed a small issue related to removing planes while iterating and trying to conserve allocations. Should be good to merge to my knowledge. |
b9fac3d
to
71438fb
Compare
342066c
to
3c509d2
Compare
added |
0d38a31
to
090d117
Compare
@Mugen87 I went through once more, and tried to make sure style in example and code was consistent. I think this is ready for a review. |
@Mugen87 resolved requests with name changes/deprecations and re-tested and updated test branch :) |
Added documentation. |
LGTM! |
@richardanaya Seems like you can have multiple rooms if you enter/exit XR. Should the example delete the previous generated geometry when entering XR? |
Just took care of this in #26098 |
Related #24792.
Description
Added support for Meta Quest Pro and Quest 2 support for plane detection API along with an example.