diff options
author | sanine <sanine.not@pm.me> | 2024-07-07 18:31:39 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2024-07-07 18:31:39 -0500 |
commit | 2c31a91ba27ea48c5db4a06be82476d26d642c7d (patch) | |
tree | 51442315c9d36e175a70fe1437ecc00cf82f0089 /render.js | |
parent | 95ee8172ae99c00efbfb1c8c105112f82711ae01 (diff) | |
parent | c6c473e03c7b9a993ccaf28bcff2d87fbdf9c931 (diff) |
add level intro messages & mergemain
Diffstat (limited to 'render.js')
-rw-r--r-- | render.js | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ export function render(ctx, level, index) { - ctx.fillStyle = 'white'; + ctx.fillStyle = 'orange'; const [x0, y0] = level.path[index]; const [x1, y1] = level.path[index+1] || level.path[index]; @@ -28,7 +28,7 @@ export function drawShip(ctx, pos, angle) { const [x, y] = pos; ctx.translate(x, y); ctx.rotate(angle); - ctx.fillStyle = 'white'; + ctx.fillStyle = 'orange'; const STEP = 0.4; ctx.beginPath(); ctx.moveTo(0, 0); @@ -43,8 +43,8 @@ export function drawShip(ctx, pos, angle) { export function drawGrid(ctx) { ctx.scale(1, -1); - ctx.strokeStyle = 'white'; - ctx.fillStyle = 'white'; + ctx.strokeStyle = 'orange'; + ctx.fillStyle = 'orange'; const { width, height } = ctx.canvas; ctx.font = `0.4px monospace`; ctx.lineWidth = 4 / Math.max(width, height); @@ -83,7 +83,7 @@ export function drawGrid(ctx) { export function drawPath(ctx, path) { const [ start, ...line ] = path; - ctx.strokeStyle = 'white'; + ctx.strokeStyle = 'orange'; ctx.lineWidth = 0.04; ctx.beginPath(); ctx.moveTo(start[0], start[1]); @@ -93,8 +93,8 @@ export function drawPath(ctx, path) { export function drawMark(ctx, mark, x, y) { - ctx.strokeStyle = 'white'; - ctx.fillStyle = 'white'; + ctx.strokeStyle = 'orange'; + ctx.fillStyle = 'orange'; ctx.font = `0.5px monospace`; ctx.lineWidth = 0.1; |