Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XR code to use rigid transforms and new pose/transform stuff from the spec #23159

Merged
merged 13 commits into from Apr 4, 2019

Add empty XRPose interface

  • Loading branch information
Manishearth committed Apr 4, 2019
commit e1f0ad7b7ce2022d0e61c15bfa6b476e1a265605
@@ -537,6 +537,7 @@ pub mod xmlserializer;
pub mod xr;
pub mod xrframe;
pub mod xrlayer;
pub mod xrpose;
pub mod xrreferencespace;
pub mod xrrenderstate;
pub mod xrrigidtransform;
@@ -0,0 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// https://immersive-web.github.io/webxr/#xrpose-interface

[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
interface XRPose {
// readonly attribute XRRigidTransform transform;
// readonly attribute boolean emulatedPosition;
};
@@ -0,0 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

use crate::dom::bindings::reflector::Reflector;
use dom_struct::dom_struct;

#[dom_struct]
pub struct XRPose {
reflector_: Reflector,
}

impl XRPose {
pub fn new_inherited() -> XRPose {
XRPose {
reflector_: Reflector::new(),
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.