Skip to content

Add from_color to StandardMaterial and ColorMaterial#13791

Merged
alice-i-cecile merged 2 commits intobevyengine:mainfrom
Brezak:standard_material_from_color
Jun 10, 2024
Merged

Add from_color to StandardMaterial and ColorMaterial#13791
alice-i-cecile merged 2 commits intobevyengine:mainfrom
Brezak:standard_material_from_color

Conversation

@Brezak
Copy link
Contributor

@Brezak Brezak commented Jun 10, 2024

Objective

Closes #13738

Solution

Added from_color to materials that would support it. Didn't add from_color to WireframeMaterial as it doesn't seem we expect users to be constructing them themselves.

Testing

None


Changelog

Added

  • from_color to StandardMaterial so you can construct this material from any color type.
  • from_color to ColorMaterial so you can construct this material from any color type.

@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Jun 10, 2024
@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy X-Contentious There are nontrivial implications that should be thought through S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Rendering Drawing game state to the screen labels Jun 10, 2024
@Brezak Brezak force-pushed the standard_material_from_color branch from 9fe7db4 to d41c570 Compare June 10, 2024 16:45
@alice-i-cecile alice-i-cecile requested a review from superdump June 10, 2024 21:23
Copy link
Contributor

@NthTensor NthTensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer than From in this case. Good addition.

@NthTensor NthTensor added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 10, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 10, 2024
Merged via the queue into bevyengine:main with commit d803adf Jun 10, 2024
@Brezak Brezak deleted the standard_material_from_color branch June 10, 2024 22:31
mockersf pushed a commit that referenced this pull request Jun 11, 2024
# Objective

Closes #13738

## Solution

Added `from_color` to materials that would support it. Didn't add
`from_color` to `WireframeMaterial` as it doesn't seem we expect users
to be constructing them themselves.

## Testing

None

---

## Changelog

### Added

- `from_color` to `StandardMaterial` so you can construct this material
from any color type.
- `from_color` to `ColorMaterial` so you can construct this material
from any color type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Contentious There are nontrivial implications that should be thought through

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color-related convenience methods should be more permissive

3 participants