diff options
author | natrixaeria <janng@gmx.de> | 2019-06-02 12:36:14 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-02 12:36:14 +0200 |
commit | 08cdc5c6e8310890b1e7102b1fcb68dd5f6009a9 (patch) | |
tree | 290253b0eef54384b23dbc54d05f78163cea077f /WebInterface/wasm/webhogg/src/lib.rs | |
parent | 5ded8b3c6813268dd44afa5a782c55f8a4f5ecae (diff) |
Send OffscreenCanvas to graphics worker
Diffstat (limited to 'WebInterface/wasm/webhogg/src/lib.rs')
-rw-r--r-- | WebInterface/wasm/webhogg/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/WebInterface/wasm/webhogg/src/lib.rs b/WebInterface/wasm/webhogg/src/lib.rs index 05944a6..2ee7267 100644 --- a/WebInterface/wasm/webhogg/src/lib.rs +++ b/WebInterface/wasm/webhogg/src/lib.rs @@ -30,10 +30,11 @@ pub fn game_logic_entry(worker: web_sys::Worker) { } #[wasm_bindgen] -pub fn graphics_entry(worker: web_sys::DedicatedWorkerGlobalScope) { +pub fn graphics_entry(worker: web_sys::DedicatedWorkerGlobalScope, + canvas: web_sys::OffscreenCanvas) { client_logger::init_logger(); - info!("hello from graphics wasm"); + info!("hello from graphics wasm {:?}", canvas); let handler = wasm_bindgen::closure::Closure::once_into_js( (|e: web_sys::MessageEvent| { info!("things are getting wired: {:?}", e.data()); |