Fix orientation getter in XRRigidTransform

This commit is contained in:
Manish Goregaokar 2019-05-03 13:52:23 -07:00 committed by Simon Sapin
parent 0756923e52
commit f17f066495

View file

@ -93,7 +93,7 @@ impl XRRigidTransformMethods for XRRigidTransform {
}
// https://immersive-web.github.io/webxr/#dom-xrrigidtransform-orientation
fn Orientation(&self) -> DomRoot<DOMPointReadOnly> {
self.position.or_init(|| {
self.orientation.or_init(|| {
let r = &self.transform.rotation;
DOMPointReadOnly::new(&self.global(), r.i, r.j, r.k, r.r)
})