You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: