Closed cabanier closed 4 years ago
In order to support this properly we'd need to re-introduce a mechanism similar to the XRPresentationContext
that we removed a while back: Some way of indicating that a canvas (or similar element) should be explicitly used as an XR output surface, and a way to point the XRSession at it.
That was always a fairly contentious aspect of the API design (hence the reason we dropped it), and as such I'd be OK with considering rejecting all non-projection layer request for inline as a first step. Guess it depends on how important we feel it is to have rendering parity between immersive/inline.
Apart from having feature parity, I don't see much value in supporting layers for inline sessions. Unless someone strongly objects, I agree that we should reject creation of layers for non-immersive sessions
Current spec rejects layers creation on non-immersive sessions.
I was reading a bit of the spec, was surprised to see no inline support. So from my understanding in the future with the DOM layers you could say have a virtual smart TV or some sort of other object. I figured inline support would allow seamless transition between screen mode and VR mode when you exit/enter. I know for flat mode you could use some sort of CSS positioning hack though, but not sure if that'd cause issues if someone is switching back and forth.
I know back in April I posted something and you mentioned to check out this proposal. So just been checking in every so often, seems some of the stuff I'd want to do with UI for a project I've been researching is hitting a lot of road blocks but hopefully in the future! Kind of feel like I'm way too early with things I'd like to do with WebXR compared to native but seems like overtime it'll get there. Just right now it seems like a lot of reinventing the wheel, was even thinking of compiling some UI stuff using WASM even though seems sorta hacky.
I'm unsure if we will ever be able to do a seamless transition between the modes. I would be weary to have layers show up around the existing 2D browser because they could hide browser UI or other parts of the OS. Also, it wouldn't make sense for non-standalone headsets that are attached to a computer.
I know for flat mode you could use some sort of CSS positioning hack though, but not sure if that'd cause issues if someone is switching back and forth.
That proposal is taken up by @dino and @AdaRoseCannon . I'm excited to see progress but I'm unsure what UA has signed up to support it apart of Magic Leap.
Just right now it seems like a lot of reinventing the wheel, was even thinking of compiling some UI stuff using WASM even though seems sorta hacky.
I made a proposal for WebXR DOM Layers during the TPAC meeting. I will try to write it up so people can comment on it.
I would be weary to have layers show up around the existing 2D browser because they could hide browser UI or other parts of the OS.
Interesting take, unless I'm misunderstanding something but when inline couldn't you just overlay html/css with z-index and stuff already? So not sure how making it'd be integrated would matter.
Also, it wouldn't make sense for non-standalone headsets that are attached to a computer.
Yeah, I think standalone is the future. but you could enter/exit on that too.
My idea was like say you'd have a TV or a menu integrated in the world. That same interface could work in either mode, I guess if things go the way I hope with DOM Layers in VR mode use that future feature, but pancake mode just overlay the elements and position it like currently some examples of. So same TV and interface, but using 2 different methods to integrate things depending on which mode they are in.
I guess technically if you switched back and forth the UI might slightly refresh but not like someone would be constantly doing that back and forth so might not be a big deal. Then your own app would just need to track the current state of what's displayed like the screen and set it up to display in either mode if slightly different methods. So like I'd vision parts of the UI being integrated on top 3D objects using the DOM Layer idea, while some parts are just using the DOM Overlay. So combining both for different concepts.
I made a proposal for WebXR DOM Layers during the TPAC meeting. I will try to write it up so people can comment on it.
Thanks :) I wasn't part of that, was thinking more of the "Apply DOM to Face" discussion I started in the other Github for immersive-web/proposals
What should happen when we create an inline session with layers? Should we support a single projection layers or should we reject creation if layers are requested?