Skip to content

Commit

Permalink
Update to include embedding the assets into the executable
Browse files Browse the repository at this point in the history
  • Loading branch information
MickHarrigan committed Feb 28, 2023
1 parent 8d8d039 commit 4f484da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ futures = "0.3.26"
image = "0.24.5"
nokhwa = { version = "0.10.3", features = ["input-native", "output-threaded"] }
tokio = { version = "1.25.0", features = ["full"] }
uuid = "1.3.0"
uuid = "1.3.0"
bevy_embedded_assets = "0.6.2"
22 changes: 14 additions & 8 deletions examples/uhdrtz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@
// This will also be what the final binary should be made of and deployed from.
use bevy::prelude::*;
use bevy::window::PresentMode;
use bevy_embedded_assets::EmbeddedAssetPlugin;
use uhdrtz::prelude::*;

fn main() {
App::new()
// this plugin stuff here could be set into a large Zoetrope plugin that is controlled in the library itself
// thus that the actual example is just adding in that one plugin to the bevy system and its done
.add_plugins(DefaultPlugins.set(WindowPlugin {
window: WindowDescriptor {
mode: WindowMode::BorderlessFullscreen,
present_mode: PresentMode::Fifo,
..default()
},
..default()
}))
.add_plugins(
DefaultPlugins
.build()
.add_before::<bevy::asset::AssetPlugin, _>(EmbeddedAssetPlugin)
.set(WindowPlugin {
window: WindowDescriptor {
mode: WindowMode::BorderlessFullscreen,
present_mode: PresentMode::Fifo,
..default()
},
..default()
}),
)
.add_plugin(ZoetropePlugin)
.run()
}
Expand Down

0 comments on commit 4f484da

Please sign in to comment.