Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebXR: align the behavior of trackedAnchors & detectedPlanes
OT feedback from plane detection API yielded a good point about inconsistency between trackedAnchors and detectedPlanes behavior on an XRFrame. Changes: - detectedPlanes should now behave the same way as trackedAnchors - they will be empty even if the feature was not enabled on a session, feature detection is not intended via those attributes - clarified that anchorsData can be null coming from mojo & started returning null when the feature is not enabled (same as OpenXR impl) - null data coming from mojo for planes & anchors is treated as if the data was empty (clearing the plane_ids_to_planes_ / anchor_ids_to_anchors_ basically short-circuits the logic that would've cleared them if received data was empty) - add WPT for anchors API to ensure that the frame's `trackedAnchors` are empty irrespective of the feature status - add internal WPT for anchors API to ensure that frame's `trackedAnchors` are empty even if data coming from the device was null Plane detection spec change still pending. API feedback thread: immersive-web/real-world-geometry#30 Change-Id: Iab52176dba08df3cb64c7e581a5f6790cd4b19bb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2973587 Reviewed-by: Daniel Cheng <[email protected]> Reviewed-by: Alexander Cooper <[email protected]> Commit-Queue: Piotr Bialecki <[email protected]> Cr-Commit-Position: refs/heads/master@{#894892}
- Loading branch information