Skip to content

Commit

Permalink
Add from_color to StandardMaterial
Browse files Browse the repository at this point in the history
  • Loading branch information
Brezak committed Jun 10, 2024
1 parent 25fb05a commit d41c570
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/bevy_pbr/src/pbr_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,11 @@ impl StandardMaterial {
self.flip(horizontal, vertical);
self
}

/// Creates a new material from a given color
pub fn from_color(color: impl Into<Color>) -> Self {
Self::from(color.into())
}
}

impl Default for StandardMaterial {
Expand Down

0 comments on commit d41c570

Please sign in to comment.