Update FakeXRDevice to support updating bounds (#33271)

* Update FakeXRDevice to support updating bounds

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Add missing spec link

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Mark secondaryViews as optional in FakeXRDevice.setViews

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-09-01 11:58:32 +00:00 committed by GitHub
parent 3453d9fdad
commit 9fdaf9bf0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 56 additions and 66 deletions

View file

@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use dom_struct::dom_struct;
use euclid::{Box2D, RigidTransform3D};
use euclid::{Point2D, RigidTransform3D};
use webxr_api::{self, Floor, Frame, Space};
use crate::dom::bindings::codegen::Bindings::XRReferenceSpaceBinding::{
@ -136,7 +136,7 @@ impl XRReferenceSpace {
}
}
pub fn get_bounds(&self) -> Option<Box2D<f32, Floor>> {
pub fn get_bounds(&self) -> Option<Vec<Point2D<f32, Floor>>> {
self.upcast::<XRSpace>()
.session()
.with_session(|s| s.reference_space_bounds())