bevy/pipelined/bevy_sprite2/src
François a636145d90 Default image used in PipelinedSpriteBundle to be able to render without 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
2021-12-07 01:13:55 +00:00
..
render make texture from sprite pipeline filterable (#3236) 2021-12-02 23:56:44 +00:00
bundle.rs Default image used in PipelinedSpriteBundle to be able to render without loading a texture (#3270) 2021-12-07 01:13:55 +00:00
dynamic_texture_atlas_builder.rs change texture atlas sprite indexing to usize (#2887) 2021-11-01 21:28:50 +00:00
lib.rs Sprite change image (#3207) 2021-12-01 23:09:31 +00:00
rect.rs Add sprite atlases into the new renderer. (#2560) 2021-08-04 01:16:25 +00:00
sprite.rs Merge New Renderer 2021-11-22 23:57:42 -08:00
texture_atlas.rs Merge New Renderer 2021-11-22 23:57:42 -08:00
texture_atlas_builder.rs use correct size of pixel instead of 4 (#2977) 2021-10-28 23:10:45 +00:00