diff options
Diffstat (limited to 'html/rogue/js/fow.js')
-rw-r--r-- | html/rogue/js/fow.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/html/rogue/js/fow.js b/html/rogue/js/fow.js index e3a1c15..e5852d3 100644 --- a/html/rogue/js/fow.js +++ b/html/rogue/js/fow.js @@ -72,11 +72,12 @@ const FogOfWar = { // Helper method to draw hex shape drawHexShape(ctx, x, y) { + const padding = 1; // Add 1 pixel padding to prevent gaps ctx.beginPath(); for (let i = 0; i < 6; i++) { const angle = 2 * Math.PI / 6 * i; - const xPos = Math.round(x + HexGrid.SIZE * Math.cos(angle)); - const yPos = Math.round(y + HexGrid.SIZE * Math.sin(angle)); + const xPos = Math.round(x + (HexGrid.SIZE + padding) * Math.cos(angle)); + const yPos = Math.round(y + (HexGrid.SIZE + padding) * Math.sin(angle)); if (i === 0) { ctx.moveTo(xPos, yPos); } else { |