Open frazereastman opened 3 years ago
Hi,
simply put the png files of your theme in a subfolder. They must be named bB.png, bK.png,...,wB.png, wK.png and so on. Then trigger your board and set the correct folder path in the settings object.
let pieceSetup ....(some script to get the folder name)
let board = Chessboard('yourBoardID', {
pieceTheme: `[path to your themes folder]/${pieceSetup}/{piece}.png`,
// other settings...
});
Variable "pieceSetup" is the subfolder name with your png files of the pieces. As this is in a string literal you can change it with your script.
greets, hc
I am creating a chess opening trainer and want to know how I can change the piece theme after the board has been generated using the config settings? Thank you in advance.