Bevy Web Asset
This is a tiny crate that that adds the ability to load assets from http and https urls.
Supports both wasm (web-sys) and native.
This is nice if you want to keep your content on a server, even when developing native games. Use cases can be:
- Tuning game balance post-launch
- Seasonal events (halloween theme etc.)
- Downloading dynamic content from 3rd party services (lospec, gltf repositories etc.)
- Sharing user-created assets/mods over some service (level editor etc.)
- Keeping initial download size small
- Testing with different online assets during development
Usage
NOTE: You need to add the plugin before AssetPlugin:
use *;
use WebAssetPlugin;
But using it is quite simple, just use http urls instead of regular asset paths.
let font: = asset_server.load;
Or:
commands.spawn;
Bevy version support
I intend to support the latest bevy release in the main branch.
| bevy | bevy_web_asset |
|---|---|
| 0.15 | 0.10, main |
| 0.14 | 0.9, |
| 0.13 | 0.8 |
| 0.12 | 0.7 |
| 0.9 | 0.5 |
| 0.8 | 0.4 |
| 0.7 | 0.3 |
| 0.6 | 0.2 |
| 0.5 | 0.1 |
License
bevy_web_asset is dual-licensed under either
- MIT License (./LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Contributions
PRs welcome!