diff options
author | sanine <sanine.not@pm.me> | 2024-07-06 20:16:48 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2024-07-06 20:16:48 -0500 |
commit | 03528a25215330d3b00cabdb1bbe7ce701e1bfeb (patch) | |
tree | caaed47028b8985137afdf5a9416f9e4c4de3db3 /render.js | |
parent | 0c6831d63cfb6b98107826524183d444eee2e4bd (diff) |
implement level loading animation
Diffstat (limited to 'render.js')
-rw-r--r-- | render.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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'; |