Back to Tldraw

Fog of war

apps/examples/src/examples/use-cases/fog-of-war/README.md

5.0.0313 B
Original Source

Create a fog of war effect by keeping an HTML canvas in sync with canvas content.


This example shows how you might keep an HTML canvas in sync with canvas content. It implements a simple "fog of war" effect, where the canvas is covered by a black overlay that can be cleared by drawing shapes on the canvas.