mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 04:31:30 +11:00
cargo fmt
This commit is contained in:
parent
28816a027e
commit
375f71b46d
|
@ -23,10 +23,7 @@ use piet_wgsl::{util::RenderContext, Renderer};
|
||||||
use winit::{event_loop::EventLoop, window::Window};
|
use winit::{event_loop::EventLoop, window::Window};
|
||||||
|
|
||||||
async fn run() {
|
async fn run() {
|
||||||
use winit::{
|
use winit::{dpi::LogicalSize, window::WindowBuilder};
|
||||||
dpi::LogicalSize,
|
|
||||||
window::WindowBuilder,
|
|
||||||
};
|
|
||||||
let event_loop = EventLoop::new();
|
let event_loop = EventLoop::new();
|
||||||
let window = WindowBuilder::new()
|
let window = WindowBuilder::new()
|
||||||
.with_inner_size(LogicalSize::new(1044, 800))
|
.with_inner_size(LogicalSize::new(1044, 800))
|
||||||
|
@ -37,10 +34,7 @@ async fn run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn run_wasm(event_loop: EventLoop<()>, window: Window) {
|
async fn run_wasm(event_loop: EventLoop<()>, window: Window) {
|
||||||
use winit::{
|
use winit::{event::*, event_loop::ControlFlow};
|
||||||
event::*,
|
|
||||||
event_loop::ControlFlow,
|
|
||||||
};
|
|
||||||
let render_cx = RenderContext::new().await.unwrap();
|
let render_cx = RenderContext::new().await.unwrap();
|
||||||
let size = window.inner_size();
|
let size = window.inner_size();
|
||||||
let mut surface = render_cx.create_surface(&window, size.width, size.height);
|
let mut surface = render_cx.create_surface(&window, size.width, size.height);
|
||||||
|
@ -134,4 +128,4 @@ fn main() {
|
||||||
.expect("couldn't append canvas to document body");
|
.expect("couldn't append canvas to document body");
|
||||||
wasm_bindgen_futures::spawn_local(run_wasm(event_loop, window));
|
wasm_bindgen_futures::spawn_local(run_wasm(event_loop, window));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue