This commit is contained in:
Maciej Caderek
2022-01-16 05:20:19 +01:00
parent e1767fd48c
commit 7052c74171
7 changed files with 168 additions and 40 deletions

View File

@@ -19,7 +19,7 @@ const drawPieces = async (
type: PieceType;
color: PieceColor;
};
const img = await ImagesCache.get("tatiana", type, color);
const img = await ImagesCache.get("cburnett", type, color);
const rank = flipped ? tiles - 1 - y : y;
const file = flipped ? tiles - 1 - x : x;
@@ -34,9 +34,11 @@ const drawPieces = async (
}
if (color === check && type === "k") {
filters.push(`drop-shadow(0 0 ${squareSize * 0.1}px orange)`);
filters.push(`drop-shadow(0 0 ${squareSize * 0.07}px #ffa600)`);
filters.push(`drop-shadow(0 0 ${squareSize * 0.07}px #ffa600)`);
} else if (color === mate && type === "k") {
filters.push(`drop-shadow(0 0 ${squareSize * 0.1}px red)`);
filters.push(`drop-shadow(0 0 ${squareSize * 0.07}px #ff002f)`);
filters.push(`drop-shadow(0 0 ${squareSize * 0.07}px #ff002f)`);
}
ctx.filter = filters.length > 0 ? filters.join(" ") : "none";

View File

@@ -3,6 +3,7 @@ import calm from "./calm";
import standard from "./standard";
import glass from "./glass";
// import kittens from "./kittens";
import lichess from "./lichess";
import lila from "./lila";
import mono from "./mono";
import peach from "./peach";
@@ -12,6 +13,7 @@ export default {
calm,
glass,
// kittens,
lichess,
lila,
mono,
peach,

View File

@@ -0,0 +1,42 @@
import { Style } from "../../types";
const style: Style = {
name: "Lichess",
background: {
type: "solid",
data: {
color: "transparent",
},
},
dark: {
type: "solid",
data: {
color: "#b58863",
},
},
light: {
type: "solid",
data: {
color: "#f0d9b5",
},
},
moveIndicator: {
type: "solid",
data: {
color: "rgba(155,199,0,0.41)",
},
},
border: null,
// border: {
// type: "solid",
// data: {
// color: "#896d56",
// },
// },
coords: {
lightColor: "#f0d9b5",
darkColor: "#b58863",
},
};
export default style;