-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WebXR WebIDL #1774
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
Comments
If you use the |
Thanks very much @alexcrichton. Looks like I've got the bindings now. I'll keep working on a basic example then submit a Pull Request once WebXR stabilises. |
WebXR has shipped in Chrome and for the Oculus Browser. It'd be great to see support added here, I would use it immediately! @kevthecoder it looks like your pull request is mostly ready to go, any update on this? |
To add to this it seems like some modifications need to be made to the IDL to have full WebXR support. While I didn't dig into what it means (I'm not an expert here) the WebXR IDL features a number of "FrozenArrays" that seem to be not supported. Other IDLs have examples of how to modify the FrozenArray lines, but I'm not sure what the implications are. This is something that would need to be updated in @kevthecoder 's pull request. |
@kettle11 Sorry for the delay replying. The work above was based on the "VR-complete" Working Draft. I'll look to update it to the "Candidate Recommendation" draft over the next week so we can merge it in quickly if it gets standardised. I don't think there was a massive amount of change between the drafts, so hopefully it's nearly there. From the Chrome notes, it looks like they're supporting the latest Oct 2019 draft in Chrome 79 (enabled by default, no flags required): https://docs.google.com/document/d/1R8Bz0_vK9YmY5-ZhsbLtZ9-DDJpTOgNeibFD4SdUnbw/edit#. I'm going by the link to the draft in the second paragraph, I can't seem to find any clear reference to the draft version elsewhere. |
I've closed the old Pull Request and opened #2000 which matches with the "Candidate Recommendation" version of WebXR (https://www.w3.org/TR/2019/WD-webxr-20191010/). This version of WebXR is supported by Chrome 80 without flags, but not supported by Firefox yet. There's a new example project added to the examples/ directory. It mainly works - but I'm having trouble getting |
Summary
It looks like the upcoming W3C Standard WebXR is getting some support in browsers. I've been trying to implement the Web IDL based on the Draft Spec (which is the version being implemented in browsers, I believe): https://www.w3.org/TR/2019/WD-webxr-20190521/#idl-index. However I can't seem to produce the bindings - do you know anyone who's had success with this?
Additional Details
I've been following the contribution guide for Web IDL (https://rustwasm.github.io/docs/wasm-bindgen/contributing/web-sys/supporting-more-web-apis.html) and have come up with this attempt: https://github.com/kevthecoder/wasm-bindgen/pull/1/files
I don't seem to be getting any bindings appearing in
bindings.rs
, but I'm not seeing anyUnsupported WebIDL interface
warnings when I run:I appreciate it's early days for the standard so this is probably a low priority, but thought I'd be check if anyone could spot a problem with the attempt above, or if anyone has had success implementing WebXR.
Thanks!
The text was updated successfully, but these errors were encountered: