mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Basic XRViewerPose interface
This commit is contained in:
parent
581470016f
commit
31feb1eca2
3 changed files with 41 additions and 0 deletions
|
@ -524,4 +524,5 @@ pub mod xrreferencespace;
|
||||||
pub mod xrsession;
|
pub mod xrsession;
|
||||||
pub mod xrspace;
|
pub mod xrspace;
|
||||||
pub mod xrstationaryreferencespace;
|
pub mod xrstationaryreferencespace;
|
||||||
|
pub mod xrviewerpose;
|
||||||
pub mod xrwebgllayer;
|
pub mod xrwebgllayer;
|
||||||
|
|
10
components/script/dom/webidls/XRViewerPose.webidl
Normal file
10
components/script/dom/webidls/XRViewerPose.webidl
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
/* 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/#xrviewerpose-interface
|
||||||
|
|
||||||
|
[SecureContext, Exposed=Window] interface XRViewerPose {
|
||||||
|
// readonly attribute XRRigidTransform transform;
|
||||||
|
// readonly attribute FrozenArray<XRView> views;
|
||||||
|
};
|
30
components/script/dom/xrviewerpose.rs
Normal file
30
components/script/dom/xrviewerpose.rs
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/* 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::codegen::Bindings::XRViewerPoseBinding;
|
||||||
|
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||||
|
use crate::dom::bindings::root::DomRoot;
|
||||||
|
use crate::dom::globalscope::GlobalScope;
|
||||||
|
use dom_struct::dom_struct;
|
||||||
|
|
||||||
|
#[dom_struct]
|
||||||
|
pub struct XRViewerPose {
|
||||||
|
reflector_: Reflector,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl XRViewerPose {
|
||||||
|
fn new_inherited() -> XRViewerPose {
|
||||||
|
XRViewerPose {
|
||||||
|
reflector_: Reflector::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn new(global: &GlobalScope) -> DomRoot<XRViewerPose> {
|
||||||
|
reflect_dom_object(
|
||||||
|
Box::new(XRViewerPose::new_inherited()),
|
||||||
|
global,
|
||||||
|
XRViewerPoseBinding::Wrap,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue