use cgmath::Point2; #[derive(Debug, Clone, Copy)] pub struct Camera { /// Camera center pub pos: Point2, /// Camera zoom /// (How many game units tall is the viewport?) pub zoom: f32, /// Aspect ratio of viewport (width / height) pub aspect: f32, } impl Camera { pub fn new() -> Self { Self { pos: (0.0, 0.0).into(), zoom: 500.0, aspect: 1.0, } } }