immersive-web / proposals

Initial proposals for future Immersive Web work (see README)
95 stars 11 forks source link

Proposal for panel distance API in VR #83

Open brycethomas opened 1 year ago

brycethomas commented 1 year ago

From https://github.com/w3c/webappswg/issues/93 (I'm not sure if webappswg or immersive-web is a more appropriate venue, so sharing the proposal here):

I'd like to propose a new API which exposes the (virtual) distance between the viewer and the Browser panel in VR. For example, the Browser panel may open at a virtual distance of 2 meters from the viewer. The user takes one step forward, and the viewing distance is now 1.5 meters. An example use-case is transitioning a page between a summary and detailed view (e.g. today's weather vs. weekly forecast) as the user gets closer to the panel. Has anything of this sort been proposed in the past? If not, is this an appropriate venue for such a proposal?

AdaRoseCannon commented 1 year ago

It definitely seems like something worth talking about and I think there is room for discussion in this group.

I'd be worried about the user's position information being exposed to the page, so I think it would need to be pretty coarse grained. It sounds like something that would be a CSS media query rather than a JS API.

brycethomas commented 1 year ago

Tagging for potential /facetoface discussion next week if I'm not too late. Else we can continue the conversation here.

cabanier commented 1 year ago

/facetoface discuss panel distance API shape

mkeblx commented 1 year ago

Magic Leap's browser exposed the browser panel's orientation (vertical or horizontal) to Javascript: https://ml1-developer.magicleap.com/en-us/learn/guides/prismatic-page-orientation

There's also the previous discussions on a 'Magic Window' mode, where this distance API use case would be able to be implemented with. Of course Magic Window is a much bigger feature. https://github.com/immersive-web/webxr/issues/224