immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
386 stars 86 forks source link

WebGL2RenderingContext extension breaks polyfill on iOS #32

Closed TrevorFSmith closed 6 years ago

TrevorFSmith commented 6 years ago

@jsantell @Squareys The recent addition of WebGL2RenderingContext to the required partials on the WebXRPolyfill global value breaks our usage of the polyfill in the WebXR Viewer on iOS, since the WKWebView doesn't offer that class.

One fix would be to remove WebGL2RenderingContext as a requirement and then testing for its existence in the code that uses it but I wanted to check with you two before submitting a PR to make sure that this won't break anything else.

jsantell commented 6 years ago

:+1: on WebGL2RenderingContext not being necessary, but polyfilling if it is available

TrevorFSmith commented 6 years ago

Ok, I'm testing a fix now and will submit a PR.

TrevorFSmith commented 6 years ago

Fixed by #33