tridify-rs 0.2.2

Fast wgpu render framework that aims to simplify rendering pipelines. Currently under heavy development.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use glam::*;

#[derive(Default)]
pub struct Rect {
    /// Bottom left from the rect
    pub pos: Vec2,
    pub size: Vec2,
}
impl Rect {
    pub fn new(pos: Vec2, size: Vec2) -> Self { Self { pos, size } }
    pub fn from_min_max(min: Vec2, max: Vec2) -> Self { Self::new(min, max - min) }
    pub fn center(&self) -> Vec2 { self.pos + self.size / 2.0 }
}