Allow image decoding to be switched out in bevy_gltf
- 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?
I'm working on a third-party crate which uses web APIs to decode images on the web for improved performance and bundle size. Unfortunately bevy_gltf loads images directly through bevy_image which means I had to fork bevy_gltf to add support for decoding images attached to gltf files.
Forking bevy_gltf has had several annoying knock on effects: its features aren't linked to bevy (you have to enable bevy_animation separately), its imports are separate from bevy (and I need to feature gate them behind the wasm32 target), and I don't want to imagine what its like to work with third-party crates which depend on bevy_gltf.
## What solution would you like?
bevy_gltf should load dependent assets through the asset system rather than directly.
## What alternative(s) have you considered?
I'm honestly not sure if my proposed solution is the right one. Perhaps this should be done at the bevy_image level instead? My crate still makes use of parts of bevy_image after all.
Contributor guide
Assessment
This issue has not been assessed yet.