little re-arranging
This commit is contained in:
@ -3,10 +3,12 @@ open Lwt.Infix
|
||||
module NVG = Graphv_webgl
|
||||
|
||||
let _ =
|
||||
Logs.set_reporter (Human.Logs_browser.console_reporter ());
|
||||
Logs.set_reporter (Human.Logs_reporter.console_reporter ());
|
||||
Logs.set_level (Some Debug);
|
||||
Logs.debug (fun m -> m "hello")
|
||||
|
||||
module Log = (val Logs.src_log Logs.default : Logs.LOG)
|
||||
|
||||
(* This scales the canvas to match the DPI of the window,
|
||||
it prevents blurriness when rendering to the canvas *)
|
||||
let scale_canvas (canvas : Dom_html.canvasElement Js.t) =
|
||||
@ -95,7 +97,9 @@ let _ =
|
||||
Human.Panel.Ui.(
|
||||
render_lwt vg Gg.P2.o
|
||||
(Human.Event_js.evt_of_jskey `Press ev))
|
||||
>>= fun () ->
|
||||
>>= fun p ->
|
||||
Logs.debug (fun m ->
|
||||
m "Drawing finished at point: %a" Gg.V2.pp p);
|
||||
NVG.end_frame vg;
|
||||
Lwt.return_unit))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user