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

Offersession support #213

Open TiborUdvari opened 3 months ago

TiborUdvari commented 3 months ago

Nature of issue?

Which area does this problem relate to?

Feature enhancement details:

navigator.xr.offerSession adds a better integrated button to advertise XR capabilities. It currently only works on Meta devices I think. I first saw it in Three JS. I'll open a PR for this one later.

Here is an example implementation: https://github.com/cabanier/webxr-samples-1/blob/d7d6050e15e0b06aae1cac452d30eb8c628fdb4e/input-selection-2.html#L95

How it looks in the Three JS examples: WhatsApp Image 2024-03-25 at 19 30 16

I couldn't find any documentation, except the meeting notes and Three JS code. Probably not a good sign. https://www.w3.org/2023/04/25-immersive-web-minutes.html#t04