This commit is contained in:
Maciej Caderek
2022-01-23 06:24:13 +01:00
parent 9fde6dd70b
commit 327d4b722c

View File

@@ -46,7 +46,7 @@ const play = async (board: Board, pgn: string | null, interval: number) => {
}; };
const createDownloadLink = async (pgn: string, style: Style) => { const createDownloadLink = async (pgn: string, style: Style) => {
const file = await createAnimation(pgn, style, 720, "GIF"); const file = await createAnimation(pgn, style, 720, "WebM");
const link = document.createElement("a"); const link = document.createElement("a");
link.innerText = "DOWNLOAD"; link.innerText = "DOWNLOAD";
link.setAttribute("href", URL.createObjectURL(file)); link.setAttribute("href", URL.createObjectURL(file));
@@ -72,9 +72,9 @@ const main = async () => {
const interval = 1000; const interval = 1000;
play(board, pgn, interval); play(board, pgn, interval);
// createDownloadLink(pgns[2], style).then((link) => { createDownloadLink(pgns[2], style).then((link) => {
// document.body.appendChild(link); document.body.appendChild(link);
// }); });
}; };
WebFont.load({ WebFont.load({