diff --git a/app/src/main.rs b/app/src/main.rs index 304eb2e..c9dd56c 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -1,7 +1,21 @@ -use bevy::prelude::*; +use bevy::color::palettes::basic::RED; +use bevy::prelude::*; // Core Bevy types + fn main() { App::new() .add_plugins(DefaultPlugins) + .add_systems(Startup, setup) .run(); } + +fn setup(mut commands: Commands, mut meshes: ResMut>, mut materials: ResMut>) { + + commands.spawn(Camera2d); + + let shape =meshes.add(Circle::new(50.0)); + + commands.spawn((Mesh2d(shape.clone()), MeshMaterial2d(materials.add(Color::from(RED))), Transform::from_xyz(100.0, 0.0, 0.0))); + + commands.spawn((Mesh2d(shape.clone()), MeshMaterial2d(materials.add(Color::from(RED))), Transform::from_xyz(0.0, 0.0, 0.0))); +} \ No newline at end of file