feat(bevy_image): Support tileset grids to be created through the ImageArrayLayout #24132
feat(bevy_image): Support tileset grids to be created through the ImageArrayLayout #24132Blue-Pilkinton-Ching wants to merge 2 commits intobevyengine:mainfrom
Conversation
…rayLayout struct to support tileset textures
|
Welcome, new contributor! Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨ |
|
I'm walking away from my computer but saw the PR go up :D People will love having this, and the function on Image is the right place for the functionality IMO. CI isn't passing yet but I grabbed a kenney tilemap and used the new GridCount variant to successfully get the tilemap rendering
|
alice-i-cecile
left a comment
There was a problem hiding this comment.
Could we add a few tests for this? This is the sort of "tricky math" code that would really benefit from good unit testing.
|
The name |
|
Actually what I've currently got here I think is a bit of a sloppy solution.
Do these changes sound like the right approach? I'll see if I can get to adding an option for setting padding & gaps on tiles as well. |
I think adding a function instead of making breaking changes is fine, especially this late in 0.19's cycle if you want this to get in for the rc. We can always refactor in the next cycle to deprecate/unify functions.
In the interest of landing this, IMO the only things that are necessary vs the current version of the PR are:
|



Objective
Fixes #23492.
Solution
Eg:
or
Testing
This PR could be expanded upon by supporting padding on tilesets or gaps between tiles.
This is my first contribution to open source 🫣