Skip to content

Commit

Permalink
Use new default shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Mar 1, 2022
1 parent b5fccff commit ffe364b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/2d/shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ fn setup(
sprite: Sprite {
color: Color::rgb(0.25, 0.25, 0.75),
custom_size: Some(Vec2::new(50.0, 100.0)),
..Default::default()
..default()
},
..Default::default()
..default()
});

// Circle
Expand All @@ -30,7 +30,7 @@ fn setup(
material: materials.add(ColorMaterial::from(Color::PURPLE)),
transform: Transform::from_translation(Vec3::new(-100., 0., 0.))
.with_scale(Vec2::splat(100.0).extend(1.)),
..Default::default()
..default()
});

// Hexagon
Expand All @@ -39,14 +39,14 @@ fn setup(
.add(
shape::RegularPolygon {
sides: 6,
..Default::default()
..default()
}
.into(),
)
.into(),
material: materials.add(ColorMaterial::from(Color::TURQUOISE)),
transform: Transform::from_translation(Vec3::new(100., 0., 0.))
.with_scale(Vec2::splat(100.0).extend(1.)),
..Default::default()
..default()
});
}

0 comments on commit ffe364b

Please sign in to comment.