bevy/crates/bevy_sprite/src
JJJimbo1 d8886408bf
fix asymmetrical 9-slicing (#14148)
# Objective

Fixes #14147.

## Solution

Modify the slicing checks and algorithm to fully allow asymmetrical
textures to work.
Some opinionated code cleanup.

## Testing

Tested using the ui_texture_slice example and a custom asymmetrical
texture.

Before:

![asymmetrical_texture_slice_before](https://github.com/bevyengine/bevy/assets/88861660/00dafce1-904a-41ac-b5d9-faaf087b0681)

After:

![asymmetrical_texture_slice_after](https://github.com/bevyengine/bevy/assets/88861660/f3d742f3-6157-4d35-b383-aee4b8f6e7d0)

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-08-02 19:26:47 +02:00
..
mesh2d Add from_color to StandardMaterial and ColorMaterial (#13791) 2024-06-11 02:01:14 +02:00
render Adds back in way to convert color to u8 array, implemented for the two RGB color types, also renames Color::linear to Color::to_linear. (#13759) 2024-06-10 19:31:41 +02:00
texture_slice fix asymmetrical 9-slicing (#14148) 2024-08-02 19:26:47 +02:00
bundle.rs new example: sprite animation in response to an event (#12996) 2024-04-23 21:44:03 +00:00
dynamic_texture_atlas_builder.rs Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
lib.rs add tonemapping LUT bindings for sprite and mesh2d pipelines (#13262) 2024-05-28 12:09:26 +00:00
sprite.rs Slicing support for texture atlas (#12059) 2024-03-05 16:05:39 +00:00
texture_atlas_builder.rs More idiomatic texture atlas builder (#13238) 2024-06-03 12:43:50 +00:00
texture_atlas.rs new example: sprite animation in response to an event (#12996) 2024-04-23 21:44:03 +00:00