diff options
Diffstat (limited to 'webhogg/wasm/src/graphics.rs')
-rw-r--r-- | webhogg/wasm/src/graphics.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/webhogg/wasm/src/graphics.rs b/webhogg/wasm/src/graphics.rs new file mode 100644 index 0000000..8169a3c --- /dev/null +++ b/webhogg/wasm/src/graphics.rs @@ -0,0 +1,19 @@ +use wasm_bindgen::prelude::*; +use log::*; +use crate::*; + +#[wasm_bindgen] +pub fn start_graphics() { + logger::init_logger(); + info!("graphics: wasm entry-point reached"); + + match context::graphics::GraphicsContext::from_canvas() { + Ok(ctx) => context::set_graphics(ctx), + Err(e) => error!("graphics {}", e) + } +} + +#[wasm_bindgen] +pub fn loop_graphics() { + debug!("graphics: loopin'"); +} |