Adds linear gradient support to 2D meshes in the canvas widget.
This commit is contained in:
parent
97f385e093
commit
40f45d7b7e
40 changed files with 2041 additions and 655 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue