Fix small gaps in the background

bus-progress-ui
ElementalAlchemist 2 weeks ago
parent f6f42fbb45
commit aedd51e5f8

@ -84,6 +84,9 @@ function drawBackground(context, timeOfDay, leftX, width) {
const groundColor = COLORS[timeOfDay].ground; const groundColor = COLORS[timeOfDay].ground;
const surfaceColor = COLORS[timeOfDay].surface; const surfaceColor = COLORS[timeOfDay].surface;
width = Math.ceil(width);
leftX = Math.floor(leftX);
context.fillStyle = COLORS[timeOfDay].sky; context.fillStyle = COLORS[timeOfDay].sky;
context.fillRect(leftX, 0, width, 56); context.fillRect(leftX, 0, width, 56);
context.fillStyle = COLORS[timeOfDay].surface; context.fillStyle = COLORS[timeOfDay].surface;

Loading…
Cancel
Save