update with proper scene setup

This commit is contained in:
Hartmut Seichter 2022-12-17 20:57:35 +01:00
parent 714be06192
commit fda3502870
6 changed files with 111 additions and 88 deletions

View file

@ -9,13 +9,14 @@ pub fn build_scene(
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Plane { size: 4.0 })),
material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()),
transform: Transform::from_xyz(0.0, -0.5, 0.0),
..default()
});
// cube
commands.spawn(PbrBundle {
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })),
mesh: meshes.add(Mesh::from(shape::Cube { size: 1.5 })),
material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()),
transform: Transform::from_xyz(0.0, 0.5, 0.0),
transform: Transform::from_xyz(0.0, 0.5, -3.0),
..default()
});
// light