Get to a state where a canvas is spawned
This commit is contained in:
parent
f698d451df
commit
37d354cf7f
3 changed files with 75 additions and 52 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue