Skip to content

XRViews should be marked as inactive after the frame that produced them ends #1092

Closed

Description

@cabanier

With the addition of the first person observer, some views might always be in the current list of views.
Currently, there's is no checking to see if the XRView was from a previous frame but no longer in the list of views. Should this be added to the getViewPort algorithm?

Activity

  1. toji commented on Jun 29, 2020

    @toji
    Member

    The https://immersive-web.github.io/webxr/#dom-xrwebgllayer-getviewport algorithm does currently check to ensure that the XRFrame which produced the XRView is valid:

    1. Let frame be view’s frame.
    2. ...
    3. If frame’s active boolean is false, throw an InvalidStateError and abort these steps.
    

    So that's been covered previously. However, I think that this pattern breaks down now that #1088 has landed, in that the same XRFrame object is able to be re-used every frame. As a result we'll want to update this to have each XRView track its own "active" state.

  2. cabanier commented on Jun 29, 2020

    @cabanier
    MemberAuthor

    @toji Should I close this one and let you open another issue to move the active boolean to the view?
    This will also cause changes in the WebXR Layers spec.

  3. changed the title [-]Should `getViewPort` check if the XRView is current?[/-] [+]XRViews should be marked as inactive after the frame that produced them ends[/+] on Jun 29, 2020
  4. toji commented on Jun 29, 2020

    @toji
    Member

    No need for a new issue. I just changed the title of this one to better reflect what needs to happen.

  5. Manishearth commented on Jun 29, 2020

    @Manishearth
    Contributor

    I suspect this can be fixed with the same stuff that fixes #1090 , if done right

  6. self-assigned this
    on Jun 30, 2020
  7. Manishearth commented on Jun 30, 2020

    @Manishearth
    Contributor

    I'll take a crack at both these issues

  8. added a commit that references this issue on Jun 30, 2020
    c8f246f
  9. added a commit that references this issue on Aug 7, 2020
    856afd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions