mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Basic XRViewerPose interface
This commit is contained in:
parent
581470016f
commit
31feb1eca2
3 changed files with 41 additions and 0 deletions
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