2 releases
0.1.1 | Aug 30, 2023 |
---|---|
0.1.0 | Aug 29, 2023 |
#46 in #wasm-plugin
25KB
64 lines
bevy_remote_asset
A Bevy plugin to load asset from web. It is based on the ehttp
Example
use bevy::prelude::*;
use bevy_remote_asset::RemoteAssetPlugin;
fn main() {
App::new()
.add_plugins(RemoteAssetPlugin)
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.run()
}
fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands.spawn(Camera2dBundle::default());
commands.spawn(SpriteBundle {
texture: asset_server
.load("https://seeklogo.com/images/B/bevy-engine-logo-25F6DD58BF-seeklogo.com.png"),
..default()
});
}
Dependencies
~28–62MB
~1M SLoC