diff options
author | elioat <elioat@tilde.institute> | 2024-12-28 10:05:27 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-28 10:05:27 -0500 |
commit | 17f514449e90f321b967ef770d16032577749e36 (patch) | |
tree | cce4d71bd23b594d9c2a8af1cefda4a6b131b0b3 /html/rogue/js/fow.js | |
parent | b1e55b1d524fba2e13e5b0f2c349546b43fe8341 (diff) | |
download | tour-17f514449e90f321b967ef770d16032577749e36.tar.gz |
*
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(); + } } }); } |