Skip to content
Snippets Groups Projects
window.rs 283 B
Newer Older
use bevy::prelude::{Rect, Vec2};

pub static VIEWPORT_WIDTH: f32 = 680.0;
pub static VIEWPORT_HEIGHT: f32 = 300.0;

pub fn window_bounds() -> Rect {
	Rect::from_center_size(
		Vec2::new(VIEWPORT_WIDTH / 2.0, VIEWPORT_HEIGHT / 2.0),
		Vec2::new(VIEWPORT_WIDTH, VIEWPORT_HEIGHT),
	)
}