Closed raviramachandra closed 4 years ago
Yes, we need to add these, I'm currently working on examples matching the proposed spec.
In the meantime, I have some simple examples that originally worked with the older prototype API as currently implemented in Chrome, but I've added support for the proposed spec's API also. This isn't ideal as a reference due to the mix of APIs, but may be useful for testing:
The examples at https://storage.googleapis.com/chromium-webxr-test/latest.html?target=proposals/index.html now include DOM Overlay support for "AR Hit Test" and "AR Plane Detection & Anchors", including a visualization of XR input events when using this link.
These are intended to exercise the recently updated APIs as of Chrome Canary 81.0.4029.2 which should match the current draft spec, and won't work as expected on older Chrome versions.
(The two examples from my previous comment should continue to work, though they have some backwards compatibility code as well to work with the previous API.)
I'll keep this issue open since I think it would still be useful to have a very basic standalone example.
I modified the "XR barebones" sample to work with AR mode and an optional DOM Overlay.
@toji - as a more general question, how would you feel about adding some basic AR samples such as this one on https://immersive-web.github.io/webxr-samples/ ? The current "proposals/" directory is a bit confusing, it started out as tests for inline AR on phones and the names reflect that, while they are actually using "immersive-ar" and could also work on AR headsets. Maybe delete ones using less-stable APIs (they aren't actively maintained at that location and likely don't currently work), but keep some basic ones using reasonably-stable APIs?
I'd be happy to move the this sample and the rest of the AR samples to the main samples page, since they have definitely moved beyond what I had envisioned the proposals directory to be used for.
Can we have a hello world DOM Overlay example ?