From f549c7e2fc520fff17ddfe868267c28ef91bf822 Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 7 Jul 2024 11:59:23 -0500 Subject: add sound controls and fullscreen --- render.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'render.js') diff --git a/render.js b/render.js index ce31973..66cf32c 100644 --- a/render.js +++ b/render.js @@ -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; -- cgit v1.2.1