Expand description
Experimental webview integration for Bevy game engine for rapidly iterating and building UI’s using existing web-based technologies.
§Example
use bevy::prelude::*;
use bevy_webview::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(WebviewPlugin::new().register_engine(webview_engine::headless))
.add_startup_system(setup);
// .run();
}
fn setup(mut commands: Commands) {
commands.spawn_bundle(UiCameraBundle::default());
commands.spawn_bundle(WebviewUIBundle {
webview: Webview {
uri: Some(String::from("http://bevyengine.org/")),
..Default::default()
},
..Default::default()
});
}
Re-exports§
pub use serde;
Modules§
Structs§
- Webview
- Webview
Component
, should be inserted as a part ofWebviewBundle
orWebviewUIBundle
- Webview
Bundle - Webview bundle needed for creating a 3D webview. For UI/2D mode, see
WebviewUIBundle
- Webview
Event Reader - Read Events sent from Javascript
- Webview
Event Writer - Send Events to webview Javascript
- Webview
Plugin - The webview plugin
- Webview
Size - Webview canvas size, used as a part of
WebviewBundle
. 2D/UI size is calculated automatically - Webview
State - Internal webview state, should not be edited directly
- WebviewUI
Bundle - Webview bundle needed for creating an UI webview. For 3D mode, see
WebviewBundle
Enums§
- Webview
Command - Webview Commands for controlling a webview instance
Traits§
- Webview
App - Trait that extends a Bevy
App
for registring webview events