spite / WebVR-Extension

Chrome DevTools extension to emulate WebVR API
MIT License
305 stars 43 forks source link

Implement vrDisplay.getLayers #18

Closed spite closed 7 years ago

spite commented 8 years ago

Return an array of VRLayer (TBD)

AVGP commented 7 years ago

That's also blocked by the wrapping rewrite, huh?

spite commented 7 years ago

Yes, on hold. Not really blocked, i haven't had time to add it yet (it has to work together with VRDisplay. requestPresent).

AVGP commented 7 years ago

I was just wondering how to go about that. I see three options in the current code:

Or am I missing a way to store the information?

Am 21.10.2016 2:58 vorm. schrieb "Jaume Sanchez" notifications@github.com:

Yes, on hold. Not really blocked, i haven't had time to add it yet (it has to work together with VRDisplay. requestPresent).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/spite/WebVR-Extension/issues/18#issuecomment-255274983, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWmRlULsWSZrOBkCcaMnfPPrJl61paEks5q2Bw2gaJpZM4KFxU1 .

spite commented 7 years ago

All these options are valid, really.

The quid here is converting from the canvas elements passed to requestPresent into a VRLayer object: that is, populate leftBounds and rightBounds correctly.

AVGP commented 7 years ago

Fun thing: I tried with the Vive and the latest Chromium build and leftBounds and rightBounds are set to null. So for emulation that's a get-out-of-jail-free card, but I wonder if that implementation is deliberately that way.

spite commented 7 years ago

That makes sense. I have a feeling the concept of layers will be useful and very powerful in future versions of the implementation, but for now, limited to a single canvas, it's pretty straightforward.

spite commented 7 years ago

Implemented on https://github.com/spite/WebVR-Extension/pull/19#issuecomment-256964223 and deployed on 1.1.2. Thanks!