Crate bevy_webview

Source
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§

prelude

Structs§

Webview
Webview Component, should be inserted as a part of WebviewBundle or WebviewUIBundle
WebviewBundle
Webview bundle needed for creating a 3D webview. For UI/2D mode, see WebviewUIBundle
WebviewEventReader
Read Events sent from Javascript
WebviewEventWriter
Send Events to webview Javascript
WebviewPlugin
The webview plugin
WebviewSize
Webview canvas size, used as a part of WebviewBundle. 2D/UI size is calculated automatically
WebviewState
Internal webview state, should not be edited directly
WebviewUIBundle
Webview bundle needed for creating an UI webview. For 3D mode, see WebviewBundle

Enums§

WebviewCommand
Webview Commands for controlling a webview instance

Traits§

WebviewApp
Trait that extends a Bevy App for registring webview events