From 03528a25215330d3b00cabdb1bbe7ce701e1bfeb Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 6 Jul 2024 20:16:48 -0500 Subject: implement level loading animation --- render.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'render.js') diff --git a/render.js b/render.js index 5fde9d1..126d6be 100644 --- a/render.js +++ b/render.js @@ -99,7 +99,15 @@ export function drawMark(ctx, mark, x, y) { ctx.lineWidth = 0.1; ctx.beginPath(); - ctx.arc(x, y, 0.4, 0, 2*Math.PI); + if (mark === '+') { + ctx.arc(x, y, 0.4, 0, 2*Math.PI); + } else { + ctx.moveTo(x+0.4, y); + ctx.lineTo(x, y+0.4); + ctx.lineTo(x-0.4, y); + ctx.lineTo(x, y-0.4); + ctx.closePath(); + } ctx.stroke(); ctx.textAlign = 'center'; -- cgit v1.2.1