-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default image used in PipelinedSpriteBundle to be able to render with…
…out loading a texture (#3270) # Objective - Fix #3188 - Allow creating a `PipelinedSpriteBundle` without an image, just a plain color ```rust PipelinedSpriteBundle { sprite: Sprite { color: Color::rgba(0.8, 0.0, 0.0, 0.3), custom_size: Some(Vec2::new(500.0, 500.0)), ..Default::default() }, ..Default::default() } ``` ## Solution - The default impl for `Image` was creating a one pixel image with all values at `1`. I changed it to `255` as picking `1` for it doesn't really make sense, it should be either `0` or `255` - I created a static handle and added the default image to the assets with this handle - I changed the default impl for `PipelinedSpriteBundle` to use this handle
- Loading branch information
Showing
3 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters