This commit is contained in:
Maciej Caderek
2022-01-19 03:24:13 +01:00
parent 96067e8a25
commit 707d673557
7 changed files with 170 additions and 35 deletions

View File

@@ -10,7 +10,8 @@ const drawPieces = async (
flipped: boolean,
check?: "b" | "w",
mate?: "b" | "w",
shadow: boolean = false
shadow: boolean = false,
blur: boolean = false
) => {
for (let y = 0; y < 8; y++) {
for (let x = 0; x < 8; x++) {
@@ -25,6 +26,10 @@ const drawPieces = async (
const filters = [];
if (blur) {
filters.push(`blur(5px)`);
}
if (shadow) {
filters.push(
`drop-shadow(${squareSize * 0.05}px ${squareSize * 0.05}px ${