From 08cdc5c6e8310890b1e7102b1fcb68dd5f6009a9 Mon Sep 17 00:00:00 2001 From: natrixaeria Date: Sun, 2 Jun 2019 12:36:14 +0200 Subject: Send OffscreenCanvas to graphics worker --- WebInterface/wasm/webhogg/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'WebInterface/wasm/webhogg/src/lib.rs') 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()); -- cgit v1.2.3-54-g00ecf