-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorporate AtlasSprite rework for upcoming Bevy 1.13 #15
Conversation
- Removed `AtlasSprite3d`. - Removed and partially replaced `AtlasSprite3dComponent` with `TextureAtlas3dData`. - Added a `bundle_with_atlas` method to `Sprite3d`. - Switched `Assets<TextureAtlas>` with `Assets<TextureAtlasLayout>`. - Reworked AtlasSprite3dBundle. - Added (placeholder?) `RenderAssetPersistencePolicy` since `Mesh::new` now requires it. - Updated sprite3d_system.
And make TextureAtlas3dData.keys public.
Just commenting to let you know I've not forgotten this, thanks so much for the contribution! All looks good after briefly glancing the changes, but given the size of the PR I plan to review things in a lot more depth before merging - will do so as soon as I have some time free from school. Until then, I'd recommend people who need it to use your branch directly. |
... should've run cargo check before pushing that last commit.
No worries, take your time. I've updated the PR, it should work with the final 0.13 release now. |
lighting still needs to be adjusted, though
@vertesians thanks for having a branch ready! :) |
it seems like the lighting has broken on the dungeon example in the update.. |
Ah nevermind, just the new exposure defaults bevyengine/bevy#11868 |
The rest of the changes all look good to me! I'll merge, then bump the versioning. @vertesians thanks so much for all the work! |
AtlasSprite
got reworked in the upcoming Bevy 0.13, so here's my attempt to incorporate those changes into bevy_sprite3d. (Hopefully I'm not rushing by submitting a PR before the release is even out.) In summary:AtlasSprite3d
is gone and replaced by a method onSprite3d
,bundle_with_atlas
that takes aSprite3dParams
and anAtlasSprite
and returns a reworkedAtlasSprite3dBundle
.TextureAtlas3dData
replacesAtlasSprite3dComponent
-- the only thing it does is hold the mesh keys associated with the atlas.Sprite3d
is the presence of theTextureAtlas
andTextureAtlas3dData
components.Assets<AtlasSprite>
have been replaced withAssets<Image>
andAssets<AtlasSpriteLayout>
, including inSprite3dParams
, with variables and properties appropriately renamed.Not directly related to the PR, but the signature of
Mesh::new
got changed to require aRenderAssetPersistencePolicy
argument — I put in a safe default for now, but you might want to change that.The examples have been updated except for the ones using bevy_asset_loader — I don't know how bevy_asset_loader plans to handle the new texture atlases, so I've left them alone for now. The
dungeon
example also looks different because of lighting system changes in 0.13, but I'll leave that for another PR to fix.