mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
Tweak canvas aspect ratio
This commit is contained in:
parent
340ac1d69c
commit
c4274c7153
|
@ -112,7 +112,7 @@ async fn run_wasm(event_loop: EventLoop<()>, window: Window) {
|
||||||
fn main() {
|
fn main() {
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
{
|
{
|
||||||
pollster::block_on(run()).unwrap();
|
pollster::block_on(run());
|
||||||
}
|
}
|
||||||
#[cfg(target_arch = "wasm32")]
|
#[cfg(target_arch = "wasm32")]
|
||||||
{
|
{
|
||||||
|
@ -125,8 +125,8 @@ fn main() {
|
||||||
|
|
||||||
// On wasm, append the canvas to the document body
|
// On wasm, append the canvas to the document body
|
||||||
let canvas = window.canvas();
|
let canvas = window.canvas();
|
||||||
canvas.set_width(1024);
|
canvas.set_width(1044);
|
||||||
canvas.set_height(1024);
|
canvas.set_height(800);
|
||||||
web_sys::window()
|
web_sys::window()
|
||||||
.and_then(|win| win.document())
|
.and_then(|win| win.document())
|
||||||
.and_then(|doc| doc.body())
|
.and_then(|doc| doc.body())
|
||||||
|
|
Loading…
Reference in a new issue