Adds linear gradient support to 2D meshes in the canvas widget.

This commit is contained in:
shan 2022-09-29 10:52:58 -07:00
parent 97f385e093
commit 40f45d7b7e
40 changed files with 2041 additions and 655 deletions

View file

@ -8,7 +8,7 @@ pub struct Transformation(Mat4);
impl Transformation {
/// Get the identity transformation.
pub fn identity() -> Transformation {
Transformation(Mat4::identity())
Transformation(Mat4::IDENTITY)
}
/// Creates an orthographic projection.
@ -51,3 +51,9 @@ impl From<Transformation> for [f32; 16] {
*t.as_ref()
}
}
impl Into<Mat4> for Transformation {
fn into(self) -> Mat4 {
self.0
}
}