diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4bc457e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.kra filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index ea8c4bf..dbb9fb4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ +# rust compiler output /target + +# krita temporary files +*.kra~ +*.png~ diff --git a/art/grid-texture.kra b/art/grid-texture.kra new file mode 100644 index 0000000..7cf9c26 --- /dev/null +++ b/art/grid-texture.kra @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f2bc4cff9cf48fb41167c4dae3108d48a70e792c4cca050fae1a842ee655488 +size 60851 diff --git a/assets/grid-texture.png b/assets/grid-texture.png new file mode 100644 index 0000000..218262a --- /dev/null +++ b/assets/grid-texture.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e717a7702c313fc37c838d2073360d44ac88f3188208974d336c2f8778a1350 +size 2272 diff --git a/readme.md b/readme.md index e69de29..37b7bc1 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1 @@ +# a cube diff --git a/src/main.rs b/src/main.rs index e8cc841..192fcc3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,13 +2,26 @@ use bevy::prelude::*; fn startup( mut commands: Commands, + assets: Res, mut meshes: ResMut>, mut materials: ResMut>, ) { + // + let texture = assets.load("grid-texture.png"); + + // + let material = materials.add(StandardMaterial { + base_color_texture: Some(texture), + alpha_mode: AlphaMode::Opaque, + unlit: true, + ..default() + }); + // ground plane commands.spawn(PbrBundle { mesh: meshes.add(shape::Plane::from_size(5.0).into()), - material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()), + material, + // material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()), ..default() }); @@ -20,6 +33,7 @@ fn startup( ..default() }); + // single light source commands.spawn(PointLightBundle { point_light: PointLight { intensity: 1500.0, @@ -30,6 +44,7 @@ fn startup( ..default() }); + // put a camera in the scene commands.spawn(Camera3dBundle { transform: Transform::from_xyz(-2.0, 2.5, 5.0).looking_at(Vec3::ZERO, Vec3::Y), ..default()