mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Add XRReferenceSpace::identity
This commit is contained in:
parent
8f14007979
commit
f2a6164a52
1 changed files with 10 additions and 0 deletions
|
@ -34,6 +34,16 @@ impl XRReferenceSpace {
|
||||||
position: &DOMPointReadOnly,
|
position: &DOMPointReadOnly,
|
||||||
orientation: &DOMPointReadOnly,
|
orientation: &DOMPointReadOnly,
|
||||||
) -> DomRoot<XRReferenceSpace> {
|
) -> DomRoot<XRReferenceSpace> {
|
||||||
|
let transform = XRRigidTransform::new(global, position, orientation);
|
||||||
|
reflect_dom_object(
|
||||||
|
Box::new(XRReferenceSpace::new_inherited(session, &transform)),
|
||||||
|
global,
|
||||||
|
XRReferenceSpaceBinding::Wrap,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
pub fn identity(global: &Window, session: &XRSession) -> DomRoot<XRReferenceSpace> {
|
||||||
let transform = XRRigidTransform::identity(global);
|
let transform = XRRigidTransform::identity(global);
|
||||||
reflect_dom_object(
|
reflect_dom_object(
|
||||||
Box::new(XRReferenceSpace::new_inherited(session, &transform)),
|
Box::new(XRReferenceSpace::new_inherited(session, &transform)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue