diff --git a/editor/canvas.js b/editor/canvas.js index c089fec..b68d393 100644 --- a/editor/canvas.js +++ b/editor/canvas.js @@ -22,7 +22,10 @@ let mouse_x = 0, mouse_y = 0; let mouse_down = false; let hovered = false; +let start = performance.now(); + export function draw() { + world.set_blink_duration((performance.now() - start) / 1000.0); let zoom_factor = Math.ceil(Math.pow(2, zoom)); let tile_size = 10 * zoom_factor; ctx.fillStyle = "#202027"; diff --git a/editor/index.html b/editor/index.html index 26d8824..a99ad65 100644 --- a/editor/index.html +++ b/editor/index.html @@ -25,11 +25,63 @@