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 [Component], should be inserted as a part of WebviewBundle or WebviewUIBundle

Webview bundle needed for creating a 3D webview. For UI/2D mode, see WebviewUIBundle

Read Events sent from Javascript

Send Events to webview Javascript

The webview plugin

Webview canvas size, used as a part of WebviewBundle. 2D/UI size is calculated automatically

Internal webview state, should not be edited directly

Webview bundle needed for creating an UI webview. For 3D mode, see WebviewBundle

Enums

Webview Commands for controlling a webview instance

Traits

Trait that extends a Bevy [App] for registring webview events