resize rectsngle

This commit is contained in:
vova-rs committed 2026-10-26 19:42:11 +03:00
1 parent 7283bf7ecf
commit 9852f30581
3 files changed
+66 -1

No files matched your search

+8
View File
@@ -4,3 +4,11 @@ version = "0.1.0"
edition = "2024"
[dependencies]
bevy = "0.20"
[profildev]
opt-level = 1
debug = true
[profile.dev.package."*"]
opt-level = 3
+39
View File
@@ -0,0 +1,39 @@
use bevy::prelude::*;
pub struct Cli;
impl Plugin for Cli {
fn build(&self, app: &mut App) {
app.add_systems(Startup, setup_scene);
// app.add_systems(Update, my_system);
}
}
fn setup_scene(
mut commands: Commands,
) {
commands.spawn(Camera2d);
commands.spawn((
Node {
width: Val::Percent(100.0),
height: Val::Percent(100.0),
justify_content: JustifyContent::Center,
align_items: AlignItems::Center,
..default()
},
BackgroundColor(Color::srgb(0.1, 0.1, 0.1)),
children![
(
Node {
width: Val::VMin(90.0),
height: Val::VMin(90.0),
aspect_ratio: Some(1.0),
..default()
},
BackgroundColor(Color::srgb(0.2, 0.6, 0.8)),
)
],
));
}
+19 -1
View File
@@ -4,8 +4,26 @@ use chess_api::*;
mod render_bitmask;
use render_bitmask::*;
use bevy::prelude::*;
mod game_client;
fn main() {
println!("hell");
App::new()
.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
title: "local-chess".into(),
resolution: (800, 800).into(),
resizable: true,
..default()
}),
..default()
}))
.add_plugins(game_client::Cli)
.add_systems(Startup, hello_world_system)
.run();
}
fn hello_world_system() {
println!("Hello, World!");
}