The WebXR API with typescript doesn't have an open types declaration file.
Some repositories including model-viewer and babylon.js have created their own, but it's not present in three.
It would really be helpful if it can be added.
Links:
It would really be helpful if it can be added.
Can you describe how it would be useful?
The documentation related to WebXR is pretty limited, so it's hard for a beginner to get around how to use the API. In the hit-test example for AR, we are using the functions getReferenceSpace, getSession, and frame.getHitTestResults which in WebXRManager.d.ts are typed as any. And there is no documentation mentioned in three that point what they are exactly and what can be done with them.
Also, the second parameter in the render function is an XRFrame object, which is just mentioned just in the r112 changelog.
If the types are mentioned in the declaration file, it gives a better way to understand what we are working with(wrt WebXR API) and what to google about further. Especially when using IDE autocomplete to explore the API.
Plus, I think these kinds of declaration files provide a good starting point to look for features to learn about.
oh right. would you like to make a PR with the changes you'd like to see in there?
Sure, will do.
Thanks!
Created a PR for this #20150
Most helpful comment
Created a PR for this #20150