Get to a state where a canvas is spawned

This commit is contained in:
Ryan Goldstein 2019-03-09 21:54:29 -05:00
parent f698d451df
commit 37d354cf7f
3 changed files with 75 additions and 52 deletions

View file

@ -1,4 +1,7 @@
extern crate winit;
#[macro_use]
extern crate stdweb;
use winit::window::WindowBuilder;
use winit::event::{Event, WindowEvent};
use winit::event_loop::{EventLoop, ControlFlow};
@ -10,9 +13,10 @@ fn main() {
.with_title("A fantastic window!")
.build(&event_loop)
.unwrap();
console!(log, "Built window!");
event_loop.run(|event, _, control_flow| {
println!("{:?}", event);
console!(log, format!("{:?}", event));
match event {
Event::WindowEvent {