Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add from_color to StandardMaterial and ColorMaterial #13791

Merged
merged 2 commits into from
Jun 10, 2024

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
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
28 checks passed
@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