mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix missed explicit conversions in examples (#11261)
# Objective A few of these were missed in #10878 ## Solution Fix em
This commit is contained in:
parent
9813e39f90
commit
9c972f037e
6 changed files with 11 additions and 11 deletions
|
@ -19,7 +19,7 @@ fn setup(
|
|||
// Circle
|
||||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::Circle::new(50.)).into(),
|
||||
material: materials.add(ColorMaterial::from(Color::PURPLE)),
|
||||
material: materials.add(Color::PURPLE),
|
||||
transform: Transform::from_translation(Vec3::new(-150., 0., 0.)),
|
||||
..default()
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ fn setup(
|
|||
// Quad
|
||||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::Quad::new(Vec2::new(50., 100.))).into(),
|
||||
material: materials.add(ColorMaterial::from(Color::LIME_GREEN)),
|
||||
material: materials.add(Color::LIME_GREEN),
|
||||
transform: Transform::from_translation(Vec3::new(50., 0., 0.)),
|
||||
..default()
|
||||
});
|
||||
|
@ -46,7 +46,7 @@ fn setup(
|
|||
// Hexagon
|
||||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::RegularPolygon::new(50., 6)).into(),
|
||||
material: materials.add(ColorMaterial::from(Color::TURQUOISE)),
|
||||
material: materials.add(Color::TURQUOISE),
|
||||
transform: Transform::from_translation(Vec3::new(150., 0., 0.)),
|
||||
..default()
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ fn setup(
|
|||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::Circle::new(100.)).into(),
|
||||
// 4. Put something bright in a dark environment to see the effect
|
||||
material: materials.add(ColorMaterial::from(Color::rgb(7.5, 0.0, 7.5))),
|
||||
material: materials.add(Color::rgb(7.5, 0.0, 7.5)),
|
||||
transform: Transform::from_translation(Vec3::new(-200., 0., 0.)),
|
||||
..default()
|
||||
});
|
||||
|
@ -59,7 +59,7 @@ fn setup(
|
|||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::RegularPolygon::new(100., 6)).into(),
|
||||
// 4. Put something bright in a dark environment to see the effect
|
||||
material: materials.add(ColorMaterial::from(Color::rgb(6.25, 9.4, 9.1))),
|
||||
material: materials.add(Color::rgb(6.25, 9.4, 9.1)),
|
||||
transform: Transform::from_translation(Vec3::new(200., 0., 0.)),
|
||||
..default()
|
||||
});
|
||||
|
|
|
@ -20,7 +20,7 @@ fn setup(
|
|||
commands.spawn(MaterialMesh2dBundle {
|
||||
mesh: meshes.add(shape::Quad::default()).into(),
|
||||
transform: Transform::default().with_scale(Vec3::splat(128.)),
|
||||
material: materials.add(ColorMaterial::from(Color::PURPLE)),
|
||||
material: materials.add(Color::PURPLE),
|
||||
..default()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ fn setup(
|
|||
mesh: mesh_handle,
|
||||
transform: Transform::from_translation(Vec3::new(96., 0., 0.))
|
||||
.with_scale(Vec3::splat(128.)),
|
||||
material: materials.add(ColorMaterial::from(texture_handle)),
|
||||
material: materials.add(texture_handle),
|
||||
..default()
|
||||
});
|
||||
}
|
||||
|
|
|
@ -83,9 +83,9 @@ fn setup_mesh(
|
|||
) {
|
||||
commands.spawn((
|
||||
MaterialMesh2dBundle {
|
||||
mesh: meshes.add(Mesh::from(shape::Capsule::default())).into(),
|
||||
mesh: meshes.add(shape::Capsule::default()).into(),
|
||||
transform: Transform::from_xyz(40., 0., 2.).with_scale(Vec3::splat(32.)),
|
||||
material: materials.add(ColorMaterial::from(Color::BLACK)),
|
||||
material: materials.add(Color::BLACK),
|
||||
..default()
|
||||
},
|
||||
Rotate,
|
||||
|
|
|
@ -80,12 +80,12 @@ fn setup(
|
|||
|
||||
let plane_mesh = meshes.add(shape::Plane::from_size(2.0));
|
||||
|
||||
let cylinder_mesh = meshes.add(Mesh::from(shape::Cylinder {
|
||||
let cylinder_mesh = meshes.add(shape::Cylinder {
|
||||
radius: 0.5,
|
||||
height: 2.0,
|
||||
resolution: 50,
|
||||
segments: 1,
|
||||
}));
|
||||
});
|
||||
|
||||
// Cube #1
|
||||
commands.spawn((
|
||||
|
|
Loading…
Reference in a new issue