Skip to content

Slicing support for texture atlas#12059

Merged
alice-i-cecile merged 13 commits intobevyengine:mainfrom
ManevilleF:feat/texture_atlas_slicing
Mar 5, 2024
Merged

Slicing support for texture atlas#12059
alice-i-cecile merged 13 commits intobevyengine:mainfrom
ManevilleF:feat/texture_atlas_slicing

Conversation

@ManevilleF
Copy link
Contributor

@ManevilleF ManevilleF commented Feb 23, 2024

Objective

Follow up to #11600 and #10588
#11944 made clear that some people want to use slicing with texture atlases

Changelog

  • Added support for TextureAtlas slicing and tiling.
    SpriteSheetBundle and AtlasImageBundle can now use ImageScaleMode
  • Added new ui_texture_atlas_slice example using a texture sheet
Screenshot 2024-02-23 at 11 58 35

@ManevilleF ManevilleF marked this pull request as ready for review February 23, 2024 11:04
@github-actions
Copy link
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

2 similar comments
@github-actions
Copy link
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

@github-actions
Copy link
Contributor

You added a new example but didn't add metadata for it. Please update the root Cargo.toml file.

@github-actions
Copy link
Contributor

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels Feb 23, 2024
@alice-i-cecile alice-i-cecile added this to the 0.14 milestone Feb 23, 2024
@ManevilleF ManevilleF force-pushed the feat/texture_atlas_slicing branch from 56dca72 to 510ed67 Compare February 26, 2024 10:12
Copy link
Member

@Aceeri Aceeri left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link
Contributor

@pablo-lua pablo-lua left a comment

Choose a reason for hiding this comment

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

I don't really like the fact that there is a duplicate code between ui slice and sprite slice, but that can be a follow up in the future.
Just a couple mispelling here, LGTM

@james7132 james7132 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 Mar 3, 2024
alice-i-cecile and others added 2 commits March 4, 2024 14:09
Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
@alice-i-cecile alice-i-cecile enabled auto-merge March 4, 2024 19:10
@alice-i-cecile
Copy link
Member

@ManevilleF can you format this when you get a chance?

auto-merge was automatically disabled March 5, 2024 09:01

Head branch was pushed to by a user without write access

@ManevilleF
Copy link
Contributor Author

@alice-i-cecile Done !

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 5, 2024
Merged via the queue into bevyengine:main with commit fc202f2 Mar 5, 2024
@ManevilleF ManevilleF deleted the feat/texture_atlas_slicing branch March 5, 2024 17:48
github-merge-queue bot pushed a commit that referenced this pull request Mar 5, 2024
# Objective

The docs say that atlas and slicing are incompatible, but they are now
compatible after #12059.

## Solution

Update the docs.
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective

Follow up to bevyengine#11600 and bevyengine#10588 
bevyengine#11944 made clear that some
people want to use slicing with texture atlases

## Changelog

* Added support for `TextureAtlas` slicing and tiling.
`SpriteSheetBundle` and `AtlasImageBundle` can now use `ImageScaleMode`
* Added new `ui_texture_atlas_slice` example using a texture sheet

<img width="798" alt="Screenshot 2024-02-23 at 11 58 35"
src="https://github.com/bevyengine/bevy/assets/26703856/47a8b764-127c-4a06-893f-181703777501">

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
spectria-limina pushed a commit to spectria-limina/bevy that referenced this pull request Mar 9, 2024
# Objective

The docs say that atlas and slicing are incompatible, but they are now
compatible after bevyengine#12059.

## Solution

Update the docs.
msvbg pushed a commit to msvbg/bevy that referenced this pull request Jun 11, 2024
Follow up to bevyengine#11600 and bevyengine#10588
bevyengine#11944 made clear that some
people want to use slicing with texture atlases

* Added support for `TextureAtlas` slicing and tiling.
`SpriteSheetBundle` and `AtlasImageBundle` can now use `ImageScaleMode`
* Added new `ui_texture_atlas_slice` example using a texture sheet

<img width="798" alt="Screenshot 2024-02-23 at 11 58 35"
src="https://github.com/bevyengine/bevy/assets/26703856/47a8b764-127c-4a06-893f-181703777501">

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
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 C-Feature A new feature, making something new possible 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.

5 participants