This commit is contained in:
Maciej Caderek
2022-01-26 09:44:37 +01:00
parent 0c2f804021
commit 6c401d1459
13 changed files with 308 additions and 57 deletions

View File

@@ -36,7 +36,7 @@ const createAnimation = async (
// @ts-ignore
await encoder.add(getData(board, encoder), 5);
await board.frame(game.getBoardData(), header);
await board.frame(game.getBoardData(), header, null, game.materialInfo());
board.render();
// @ts-ignore
await encoder.add(getData(board, encoder), 1);
@@ -44,14 +44,16 @@ const createAnimation = async (
while (true) {
const move = game.next();
// console.log(move);
if (!move) {
break;
}
await board.frame(game.getBoardData(), header, move);
await board.frame(game.getBoardData(), header, move, game.materialInfo());
board.render();
// @ts-ignore
await encoder.add(getData(board, encoder), 1);
await encoder.add(getData(board, encoder), move.end === 0 ? 5 : 1);
}
return await encoder.render();