From c4274c71534bdb8377a233c388f55919969e5090 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Tue, 29 Nov 2022 19:42:52 -0800 Subject: [PATCH] Tweak canvas aspect ratio --- piet-wgsl/examples/winit/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/piet-wgsl/examples/winit/src/main.rs b/piet-wgsl/examples/winit/src/main.rs index a47eeb9..ae102cf 100644 --- a/piet-wgsl/examples/winit/src/main.rs +++ b/piet-wgsl/examples/winit/src/main.rs @@ -112,7 +112,7 @@ async fn run_wasm(event_loop: EventLoop<()>, window: Window) { fn main() { #[cfg(not(target_arch = "wasm32"))] { - pollster::block_on(run()).unwrap(); + pollster::block_on(run()); } #[cfg(target_arch = "wasm32")] { @@ -125,8 +125,8 @@ fn main() { // On wasm, append the canvas to the document body let canvas = window.canvas(); - canvas.set_width(1024); - canvas.set_height(1024); + canvas.set_width(1044); + canvas.set_height(800); web_sys::window() .and_then(|win| win.document()) .and_then(|doc| doc.body())