diff options
author | sanine <sanine.not@pm.me> | 2024-07-07 11:59:23 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2024-07-07 11:59:23 -0500 |
commit | f549c7e2fc520fff17ddfe868267c28ef91bf822 (patch) | |
tree | c38634aa0b5d3fff4a181684cca07d7fc0adb1ee /render.js | |
parent | a4d923659f49ccd44e1d6bd09804ba658ca34ac4 (diff) |
add sound controls and fullscreen
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; |