bevyengine / bevyengine/bevy

Separate Image asset from its metadata

Open
#16,355 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.