egui/examples/custom_3d_three-d/src/lib.rs
Asger Nyman Christiansen eeeb4b7de2
Improve custom_3d_three-d example (#1923)
* Use correct FBO to output

* custom_3d_three-d web

* Update .gitignore

* Do not free the FBO

* Use three-d 0.13

* ThreeDApp

* Only construct model and camera once

* Clean-up and docs

* Web build instructions

* Remove unused dependencies

* Update Cargo.lock

* Fix build

* More fixes

* omg
2022-08-17 21:33:34 +02:00

19 lines
453 B
Rust

mod main;
// Entry point for wasm
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen(start)]
pub async fn start() -> Result<(), JsValue> {
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
let web_options = eframe::WebOptions::default();
eframe::start_web(
"my",
web_options,
Box::new(|cc| Box::new(main::MyApp::new(cc))),
)?;
Ok(())
}