Computed size field in the Sprite structure
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Getting sprite sizes is not ergonomic nor productive at the moment.
## What solution would you like?
Adding a `computed_size: Option` or similar to the `Sprite` struct. That field will be updated from the sprite engine whenever it knows the size and image of the Sprite.
## What alternative(s) have you considered?
The alternative is every time we need the size of a sprite (or an image associated to one), to request the asset server, the image handle, checking that the image is loaded and then accessing to its size and potentially creating a resource or a component in the entity with the size for a system or systems to access.
Contributor guide
Assessment
This issue has not been assessed yet.