diff options
author | elioat <elioat@tilde.institute> | 2024-01-05 21:23:18 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-01-05 21:23:18 -0500 |
commit | 33b312ff13f1fa41a1a5859f6f9303dd25c2a485 (patch) | |
tree | fa30c13e4bb059a0a65e9c9e757bcf4d3938518a /js | |
parent | 166a055a3df448839cc5564e20fc7e37205d875e (diff) | |
download | tour-33b312ff13f1fa41a1a5859f6f9303dd25c2a485.tar.gz |
*
Diffstat (limited to 'js')
-rw-r--r-- | js/ship-game/game.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/js/ship-game/game.js b/js/ship-game/game.js index 072561f..412288c 100644 --- a/js/ship-game/game.js +++ b/js/ship-game/game.js @@ -1,4 +1,3 @@ -// this code is terrible. it currently doesn't run at a smooth rate, the rate at which it runs seems to be linked to the mouse moving around (() => { const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); @@ -76,8 +75,14 @@ ctx.moveTo(canvas.width, canvas.height); ctx.lineTo(line.endX, line.endY); ctx.strokeStyle = 'red'; - ctx.lineWidth = 4; + ctx.lineWidth = 5; + ctx.shadowColor = 'rgba(255, 255, 0, 0.75)'; + ctx.shadowBlur = 50; + ctx.shadowOffsetX = 0; + ctx.shadowOffsetY = 0; ctx.stroke(); + ctx.shadowColor = 'transparent'; + ctx.shadowBlur = 0; } }; |