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

Define a prelude for bevy_color, and add it to bevy_internal #12158

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

alice-i-cecile
Copy link
Member

Objective

As we start to migrate to bevy_color in earnest (#12056), we should make it visible to Bevy users, and usable in examples.

Solution

  1. Add a prelude to bevy_color: I've only excluded the rarely used ColorRange type and the testing-focused color distance module. I definitely think that some color spaces are less useful than others to end users, but at the same time the types used there are very unlikely to conflict with user-facing types.
  2. Add bevy_color to bevy_internal as an optional crate.
  3. Re-export bevy_color's prelude as part of bevy::prelude.

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use labels Feb 27, 2024
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Feb 27, 2024
Copy link
Contributor

@AxiomaticSemantics AxiomaticSemantics left a comment

Choose a reason for hiding this comment

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

There should be entries in the root workspace Cargo.toml or is this meant as a follow-up.

@alice-i-cecile
Copy link
Member Author

There should be entries in the root workspace Cargo.toml or is this meant as a follow-up.

Good catch! Added; please take a look to verify that I did this correctly.

Copy link
Contributor

@AxiomaticSemantics AxiomaticSemantics left a comment

Choose a reason for hiding this comment

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

bevy_render = ["bevy_internal/bevy_render", "bevy_color"]

Copy link
Contributor

You added a new feature but didn't update the readme. Please run cargo run -p build-templated-pages -- update features to update it, and commit the file change.

Copy link
Contributor

@AxiomaticSemantics AxiomaticSemantics left a comment

Choose a reason for hiding this comment

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

I'm thinking even more enabling on features in the root, such as bevy_ui and bevy_sprite possibly.

Copy link
Contributor

You added a new feature but didn't update the readme. Please run cargo run -p build-templated-pages -- update features to update it, and commit the file change.

@alice-i-cecile
Copy link
Member Author

I'm thinking even more enabling on features in the root, such as bevy_ui and bevy_sprite possibly.

I think this is it :) Technically it was already enabled transitively via bevy_render, but this is more explicit and will be more robust to refactors.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 27, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 27, 2024
Merged via the queue into bevyengine:main with commit 2fbb4c6 Feb 27, 2024
28 of 30 checks passed
@BD103 BD103 added A-Core Common functionality for all bevy apps A-Color Color spaces and color math and removed A-Core Common functionality for all bevy apps labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Color Color spaces and color math A-Rendering Drawing game state to the screen C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants