Separate Image asset from its metadata
Open
A-Assets
C-Feature
D-Modest
S-Ready-For-Implementation
- 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?
Using texture size can be a common operation in 2d. For instance, it is used by 9-slicing, dynamically placing sprites of arbitrary size or calculating Y-sorting (since it uses the anchor point which uses relative coordinates). Unfortunately, this forces RenderAssetUsages to be in main world even if you don't use the rest of the data.
## What solution would you like?
Image metadata to stay accessible in main world.
Image data uses RenderAssetUsages like now.
Something like:
```rs
struct Image {
data: Handle,
// metadata and render asset usages fields
}
```
Contributor guide
Assessment
This issue has not been assessed yet.