You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently pose is only ever set to null when space’s pose relative to baseSpace has never been determined, otherwise it's returned with the last known pose with emulatedPosition=true.
As we add more and more spaces, I think it's worthwhile to allow poses to be null in more situations. For example, this behavior isn't great for joint spaces: if my hand is behind me and I turn around, there will be this weird floating claw with the current spec behavior. This also applies somewhat to general input spaces. Emulation is sometimes possible, but not always, and it might be worth allowing user choice here.
Furthermore, currently we throw a SecurityError when poses may not be reported. The current conditions for that are about:
where the request comes from
document focus
user intent
whether we "know the pose is not exposing fingerprintable data"
It seems incorrect to throw an error for situations that can unpredictably change, in particular the "document focus" and "do we know if the pose is exposing fingerprintable data" should probably cause populate the pose to return null, not throw an error.
This also handles the case of input poses during visible-blurred sessions (which is discussed in #1008). We should just null them out.
It seems like overall we should be allowing poses to be null when:
the pose cannot be reported for temporary security reasons (visible-blurred, fingerprintable, document focus)
the pose is unknown and cannot be emulated, where "can I emulate this" is up to the user agent. "Report the last known value of the pose" is a valid form of emulation so user agents can continue with the current specced behavior.
Applications need to deal with null poses anyway, so it seems like this change should be fine.
I also believe that sometimes returning null poses mid-session is the current behavior in Chromium (see XRSpace::getPose returning null), and it is the current behavior in Servo.
These changes are included in #1058 : getViewerPose() never returns null, but getPose() has more flexibility in returning null. The unpredictable security check was also moved
Activity
Manishearth commentedon May 15, 2020
I also believe that sometimes returning null poses mid-session is the current behavior in Chromium (see XRSpace::getPose returning null), and it is the current behavior in Servo.
Manishearth commentedon May 22, 2020
These changes are included in #1058 :
getViewerPose()never returns null, butgetPose()has more flexibility in returning null. The unpredictable security check was also moved