Allow VR RAF loop to handle changes in the layer, support pending renderstates

This commit is contained in:
Manish Goregaokar 2019-01-15 00:22:20 -08:00
parent 401b470e90
commit e20909cf43
4 changed files with 170 additions and 44 deletions

View file

@ -5,9 +5,9 @@
// https://immersive-web.github.io/webxr/#xrrenderstate-interface
dictionary XRRenderStateInit {
double depthNear = 0.1;
double depthFar = 1000.0;
XRLayer? baseLayer = null;
double depthNear;
double depthFar;
XRLayer baseLayer;
};
[SecureContext, Exposed=Window] interface XRRenderState {

View file

@ -26,6 +26,7 @@ interface XRSession : EventTarget {
// FrozenArray<XRInputSource> getInputSources();
Promise<void> updateRenderState(optional XRRenderStateInit state);
long requestAnimationFrame(XRFrameRequestCallback callback);
void cancelAnimationFrame(long handle);