bevy-playground/src/camera.rs

16 lines
316 B
Rust
Raw Normal View History

use bevy::prelude::*;
pub struct Camera;
impl Plugin for Camera {
fn build(&self, app: &mut App) {
app.add_systems(Startup, spawn_camera);
}
}
fn spawn_camera(mut commands: Commands) {
let mut bundle = Camera2dBundle::default();
bundle.projection.scale = 1.;
commands.spawn(bundle);
}