This commit is contained in:
marisa 2021-05-17 18:21:13 +02:00
commit b745642054
5 changed files with 3501 additions and 0 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/target
.cargo

3453
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

10
Cargo.toml Normal file
View File

@ -0,0 +1,10 @@
[package]
name = "lily"
version = "0.1.0"
authors = ["marisa <mokou@fastmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bevy = "0.5.0"

18
src/main.rs Normal file
View File

@ -0,0 +1,18 @@
use bevy::prelude::*;
const VERSION: &'static str = "0.0-a1";
mod setup;
fn main() {
App::build()
.insert_resource(WindowDescriptor {
width: 500.,
height: 300.,
title: format!("Lily {}", VERSION),
vsync: false,
..Default::default()
})
.add_startup_system(setup::system.system())
.run();
}

17
src/setup.rs Normal file
View File

@ -0,0 +1,17 @@
use bevy::prelude::*;
pub fn system(mut commands: Commands, asset_server: Res<AssetServer>, mut materials: ResMut<Assets<ColorMaterial>) {
// ui camera
commands.spawn_bundle(UiCameraBundle::default());
// root node
commands
.spawn_bundle(NodeBundle {
style: Style {
size: Size::new(Val::Percent(100.0), Val::Percent(100)),
justify_content: JustifyContent::SpaceBetween,
..Default::default()
},
material: materials.add(Color::NONE.into()),
..Default::default()
})
}