diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-07-22 12:49:39 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2019-07-23 23:09:55 +0200 |
commit | 3d57c22e9cda982923dd184152d3f187910d7b46 (patch) | |
tree | 51d07653ebd19e68626a5a0b442e8dde98c9dbd0 /components/script/dom/xrrigidtransform.rs | |
parent | 2ff7cb5a3749d65bb7b7a8f637d8196e316179c9 (diff) | |
download | servo-3d57c22e9cda982923dd184152d3f187910d7b46.tar.gz servo-3d57c22e9cda982923dd184152d3f187910d7b46.zip |
Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.
Given the size of this patch, I think it's useful to get this landed as-is.
Diffstat (limited to 'components/script/dom/xrrigidtransform.rs')
-rw-r--r-- | components/script/dom/xrrigidtransform.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/xrrigidtransform.rs b/components/script/dom/xrrigidtransform.rs index ca73121d931..887b54f688c 100644 --- a/components/script/dom/xrrigidtransform.rs +++ b/components/script/dom/xrrigidtransform.rs @@ -16,7 +16,7 @@ use crate::dom::vrframedata::create_typed_array; use crate::dom::window::Window; use crate::dom::xrsession::ApiRigidTransform; use dom_struct::dom_struct; -use euclid::{TypedRigidTransform3D, TypedRotation3D, TypedVector3D}; +use euclid::{RigidTransform3D, Rotation3D, Vector3D}; use js::jsapi::{Heap, JSContext, JSObject}; use std::ptr::NonNull; @@ -53,7 +53,7 @@ impl XRRigidTransform { } pub fn identity(window: &GlobalScope) -> DomRoot<XRRigidTransform> { - let transform = TypedRigidTransform3D::identity(); + let transform = RigidTransform3D::identity(); XRRigidTransform::new(window, transform) } @@ -70,8 +70,8 @@ impl XRRigidTransform { ))); } - let translate = TypedVector3D::new(position.x as f32, position.y as f32, position.z as f32); - let rotate = TypedRotation3D::unit_quaternion( + let translate = Vector3D::new(position.x as f32, position.y as f32, position.z as f32); + let rotate = Rotation3D::unit_quaternion( orientation.x as f32, orientation.y as f32, orientation.z as f32, @@ -83,7 +83,7 @@ impl XRRigidTransform { // value for each element. This is preferable to checking for zero. return Err(Error::InvalidState); } - let transform = TypedRigidTransform3D::new(rotate, translate); + let transform = RigidTransform3D::new(rotate, translate); Ok(XRRigidTransform::new(&window.global(), transform)) } } |