-
Notifications
You must be signed in to change notification settings - Fork 14
Description
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;
};