1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-27 07:03:14 -04:00

[egui_web] Simplify the arguments you pass to start()

This commit is contained in:
Emil Ernerfeldt
2020-12-19 21:15:07 +01:00
parent 8f034d391d
commit fb941cf618
4 changed files with 12 additions and 7 deletions

View File

@@ -13,8 +13,6 @@ use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn start(canvas_id: &str) -> Result<(), wasm_bindgen::JsValue> {
let app = example_app::ExampleApp::default();
let backend = egui_web::WebBackend::new(canvas_id)?;
let runner = egui_web::AppRunner::new(backend, Box::new(app))?;
egui_web::start(runner)?;
egui_web::start(canvas_id, Box::new(app))?;
Ok(())
}