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

TPAC: Evaluate if any aspects of the API should be deprecated. #1341

Open
toji opened this issue Aug 29, 2023 · 6 comments
Open

TPAC: Evaluate if any aspects of the API should be deprecated. #1341

toji opened this issue Aug 29, 2023 · 6 comments

Comments

@toji
Copy link
Member

toji commented Aug 29, 2023

Deprecating and removing any shipped Web APIs is always a delicate issue, but removing functionality that is no longer relevant and doesn't see widespread use is also be important for the long term health of the API and the web platform. TPAC would be an excellent time to re-evaluate the API, now that we have the hindsight of being shipped for several years across multiple devices. It may be that some features are no longer relevant in the current ecosystem, conflict with newer functionality we want to expose, or simply haven't seen the type of use that we hoped, and should be considered for deprecation.

If you know of any features that may be candidates for deprecation, please note them here. The bar for deprecation of any feature is going to be fairly high, and if we earmark anything for removal then actually pulling it out of existing implementations will be a slow and steady process to give developers time to react properly. Bringing up a feature here will not automatically mark it for deprecation but instead indicate that it's worth looking into further.

I'll float the idea of deprecating inline sessions, though I happen to personally like them. They do add some complexity to API implementations, though, and don't seem to be used by any major library integrations.

@toji toji added the TPAC label Aug 29, 2023
@tangobravo
Copy link

If inline sessions supported 6-DoF tracking or AR then I suspect they would have seen much wider usage.

One of the biggest downsides of WebXR for handheld platforms is the entanglement of presentation of the content (forced fullscreen, outside of DOM) with access to these underlying tracking features.

I've written at length about the problems this causes at immersive-web/webxr-ar-module#77 and proposed an inline-ar session as one potential solution at immersive-web/webxr-ar-module#79.

I don't have particularly strong feelings on the utility of the current inline session type either way. In general my preferred solution for AR use cases within the DOM is to completely separate presentation and underlying features, as discussed in immersive-web/webxr-ar-module#78.

@Manishearth
Copy link
Contributor

Yeah I think this is probably worth discussing. They are clearly not doing their job right now and we should either make them better or remove them.

@Manishearth
Copy link
Contributor

Discussed this a little bit with Ada and Rik.

In general it seems like mono inline VR is not used much, because it exists primarily as a convenience API to allow people to use WebXR for non-XR content using the same APIs; and that's only useful if people aren't already used to doing it a different way, which is what basically all the frameworks do.

However, there are two use cases of inline sessions that are not covered here:

  • inline AR, "magic window" stuff, where you show a passthrough camera feed aligned to the real world
  • stereo inline VR in a browser, showing 3D content that depends on pose that sits on the page, diorama style

The latter is already technically possible in the API: you can request viewer/local permissions when creating the inline session. Nobody implements this but I think it would be nice. It's a good reason to keep the API around if we can get someone to implement it, and perhaps we should write an example that uses this.

Magic window stuff would probably need inline-ar (and request viewer/local permissions, as before). That wouldn't be affected by deprecating this but it makes a nice symmetric set of features if we keep it around. We probably should explore that a bit.

@tangobravo
Copy link

tangobravo commented Sep 7, 2023

In general it seems like mono inline VR is not used much, because it exists primarily as a convenience API to allow people to use WebXR for non-XR content using the same APIs; and that's only useful if people aren't already used to doing it a different way, which is what basically all the frameworks do.

Yup, sounds right to me. Looked at the other way round, it also doesn't really add any features that you can't implement with standard WebGL and doesn't have the same level of browser support so there's no compelling reason for frameworks to adopt it.

Wasn't one use case for the mono inline VR to do spectator mode on a secondary display for a PC with a connected headset? Though I suppose if you've got an immersive session already running in the same page you probably don't need anything other than a standard WebGL canvas as you can get all the required state from the immersive session callbacks.

However, there are two use cases of inline sessions that are not covered here:

  • inline AR, "magic window" stuff, where you show a passthrough camera feed aligned to the real world
  • stereo inline VR in a browser, showing 3D content that depends on pose that sits on the page, diorama style

The latter is already technically possible in the API: you can request viewer/local permissions when creating the inline session. Nobody implements this but I think it would be nice. It's a good reason to keep the API around if we can get someone to implement it, and perhaps we should write an example that uses this.

Sounds like a generalisation of the visionOS <model> element support to arbitrary content which sounds niche but potentially worth exploring.

Magic window stuff would probably need inline-ar (and request viewer/local permissions, as before). That wouldn't be affected by deprecating this but it makes a nice symmetric set of features if we keep it around. We probably should explore that a bit.

I'd be happy to remotely join a TPAC discussion [*] on the handheld AR use case again, but feel that deserves a separate timeslot from the "discuss deprecations" one.

[*] Assuming I'm able to register as a remote participant when it opens again

@NathanaelA
Copy link

NathanaelA commented Sep 9, 2023

Well, in my use case I would have totally used 'inline' if the inputs from the controllers were exposed to the XRInputSource, but apparently the implementation "standard" (why, or why not?) and on the Oculus is that the two controllers are considered non-existent to both the XRInputSource.gamepads and the standard navigator.getGamepads api's. Making the 'inline' mode useless if all you really want to do is simply show a html element fullscreen and just use the controller input's.

Instead, I'm having to wire up a massive amount of extra code, making the device do more work by copying a 2d canvas image to a 3d canvas every single frame...

I created a request detailing my issues with inline mode in #1347 with my full use case.

@Yonet Yonet removed the TPAC label Feb 6, 2024
@cabanier
Copy link
Member

/facetoface should we deprecate inline sessions?

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

No branches or pull requests

6 participants