Closed toji closed 5 years ago
wow! lovely, i'll take a look :smile:
Also for mergability, removing the build/*
files from the commit and squashing will be nice :+1:
Took a bit, but I should have all the feedback addressed now. Thanks Jordan! And yes, this will absolutely be a squashed commit when all is said and done. 😄
Fixes #50, #52, #53, #54
Alright, I've tried 20 different ways to re-package this into cleaner, easier-to-review chunks, but each time it ended up a mess and at this point it's preventing the code from being made more visible, so I'm just going to post this as one big PR for the moment. Apologies to anyone that was hoping to do a detailed review.
In terms of what this change does: It pulls in the work that @jacobcdewitt has done to make the polyfill compatible with the version of WebXR that will be in Chrome 76/77. This is not the same as the "VR Complete" version of the spec, but it's not too far off. It also includes a small shim to avoid the need for applications to specify a chrome-specific WebGL layer option that can be inferred from the session mode. This gets us to a point where any code written against the VR complete standard should actually be accepted by the polyfilled API, but some values are being ignored.
To get us to VR complete on top of this set of changes, we'll need the at least the following:
requiredFeatures
andoptionalFeatures
in theXRSessionInit
. (You can pass them now, but they're ignored.)xr-standard
layout and attribute values (There's already comments in the code to indicate the needed changes here.)visibilityState
session attribute andvisibilityChange
eventOh, and we want to get the tests working again.
I'm sure there's some more minor changes in there that I've neglected to call out, but those are definitely the big ones.