Skip to content

Commit 8e278bb

Browse files
Patch
1 parent f01075c commit 8e278bb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

web/src/js/FogOfWar.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export const FogOfWar = L.Layer.extend({
99
this._canvas.style.top = "0";
1010
this._canvas.style.left = "0";
1111
this._canvas.style.pointerEvents = "none";
12-
this._canvas.style.zIndex = "400";
12+
this._canvas.style.zIndex = "300";
1313

14-
const pane = map.getPane("overlayPane");
15-
pane.appendChild(this._canvas);
14+
const container = map.getContainer();
15+
container.appendChild(this._canvas);
1616

1717
this._ctx = this._canvas.getContext("2d");
1818

@@ -38,8 +38,8 @@ export const FogOfWar = L.Layer.extend({
3838

3939
this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height);
4040

41-
// Fill entire canvas with dark overlay
42-
this._ctx.fillStyle = "rgba(0, 0, 0, 0.85)";
41+
// Fill entire canvas with fully black overlay
42+
this._ctx.fillStyle = "rgba(0, 0, 0, 1)";
4343
this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height);
4444

4545
// Clear circles around each player (flashlight effect)

0 commit comments

Comments
 (0)