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

Should we reconsider the API shape? #53

Open
alcooper91 opened this issue Feb 24, 2025 · 2 comments
Open

Should we reconsider the API shape? #53

alcooper91 opened this issue Feb 24, 2025 · 2 comments

Comments

@alcooper91
Copy link
Contributor

In investigating #51 Raw/Smooth depth, and chatting with @bialpio offline, we began to wonder if the API shape of forcing the Depth configuration at start-up was an ideal state. We wonder if something like what is done by https://immersive-web.github.io/lighting-estimation/ and https://immersive-web.github.io/hit-test/, with a "subscription" based model would be better. Especially when you consider potentially adding #52 start/stop methods.

This would of course be a breaking change, and so we'd likely want a new feature string to opt-in to this type of behavior. Essentially, XrDepthStateInit would not be processed at session startup, and no default depth configuration would be granted. I've reposted the relevant API changes that we'd want to make from #51 below for reference (modifications based upon the outcomes of #51 and #52 would be required).

interface XRDepthConfiguration {
  readonly attribute XRDepthUsage usage;
  readonly attribute XRDepthDataFormat format;
  readonly attribute XRDepthDataType type;
 promise<void> start();
 void stop();
};

partial interface XRSession {
  promise<void> addDepthDataRequest(XRDepthType type, XRDepthSessionInit preferences);
  void removeDepthDataConfiguration(XRDepthConfiguration);
  readonly attribute sequence<XRDepthConfiguration> activeDepthConfigurations;
};
@alcooper91
Copy link
Contributor Author

@cabanier @bialpio FYI

/agenda to raise awareness

@probot-label probot-label bot added the agenda label Feb 24, 2025
@alcooper91
Copy link
Contributor Author

/facetoface

(Note that I'd also like to at least bring this up next week to prime people's thoughts)

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

2 participants