diff options
Diffstat (limited to 'html/rogue/js/fow.js')
-rw-r--r-- | html/rogue/js/fow.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/html/rogue/js/fow.js b/html/rogue/js/fow.js index 7a2914e..291c862 100644 --- a/html/rogue/js/fow.js +++ b/html/rogue/js/fow.js @@ -65,11 +65,20 @@ const FogOfWar = { const fogState = this.getFogState(hex); if (fogState.alpha > 0) { const screen = HexGrid.toScreenCoordinates(hex, Camera); + + // Draw fog fill ctx.fillStyle = fogState === Config.fog.states.HIDDEN ? Config.colors.FOG.HIDDEN : Config.colors.FOG.REVEALED; HexGrid.drawHexPath(ctx, screen.x, screen.y, HexGrid.SIZE, 1); ctx.fill(); + + // Draw grid lines only for revealed but not visible hexes + if (fogState === Config.fog.states.REVEALED) { + ctx.strokeStyle = Config.colors.FOG.GRID_DIM; + ctx.lineWidth = 1; + ctx.stroke(); + } } }); } |