diff options
author | natrixaeria <janng@gmx.de> | 2019-06-01 02:26:39 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-01 02:26:39 +0200 |
commit | de3d86164acaa9aeb78f28e3201ff1a40b212f04 (patch) | |
tree | 6e66e0c053e346700f3a24fc2a182d6b08329d79 /WebInterface/wasm/webhogg/src | |
parent | e052a0da267ac8594f3b896573a204a739340e54 (diff) |
Communicate from game logic to graphics
please run the 'run'-script every time before loading the page
Diffstat (limited to 'WebInterface/wasm/webhogg/src')
-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 5823e72..9d052cd 100644 --- a/WebInterface/wasm/webhogg/src/lib.rs +++ b/WebInterface/wasm/webhogg/src/lib.rs @@ -19,11 +19,12 @@ fn run_application() { } #[wasm_bindgen] -pub fn game_logic_entry(worker: Worker) { +pub fn game_logic_entry(worker: web_sys::Worker) { client_logger::init_logger(); info!("game logic initialisation"); - //worker.post_message(&wasm_bindgen::JsValue::from_str("msg frm wasm_gLe")).unwrap(); + info!("js value: {:?}", worker); + worker.post_message(&wasm_bindgen::JsValue::from_str("msg frm wasm_gLe")).unwrap(); } #[wasm_bindgen] |