pub struct Camera2D {
pub position: Vec2,
pub zoom: f32,
pub shake: Vec2,
}Expand description
The view of the world: what is at the centre of the screen, and how large.
Fields§
§position: Vec2The world point at the centre of the view.
zoom: f32Virtual pixels per world unit. Pixel-perfect rendering rounds it to a whole number, at least 1.
shake: Vec2An offset added to the position, for screen shake.
Trait Implementations§
impl Copy for Camera2D
impl StructuralPartialEq for Camera2D
Auto Trait Implementations§
impl Forget for Camera2D
impl Freeze for Camera2D
impl Move for Camera2D
impl RefUnwindSafe for Camera2D
impl Send for Camera2D
impl Sync for Camera2D
impl Unpin for Camera2D
impl UnsafeUnpin for Camera2D
impl UnwindSafe for Camera2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more