Feat : Beta animations

This commit is contained in:
2024-06-30 14:51:06 +02:00
parent 1fbe9a57ee
commit 28bc888cb1
9 changed files with 173 additions and 77 deletions
+8 -5
View File
@@ -1,12 +1,15 @@
import type { Container } from "./interfaces";
import type { CardParser } from "./interfaces/cards";
export function delay(delay: number) {
return new Promise((resolve) => {
setTimeout(resolve, delay);
});
}
export type ContainerHandler = {
populateContainer: () => void;
shuffleContainer: () => void;
getCardsPosition: (cards: string) => any;
hideCards: (cards: CardParser[]) => void;
showCards: (cards: CardParser[]) => void;
startAnimation: () => void;
endAnimation: () => void;
};
export const containerEvents = new Map<string, ContainerHandler>();
export const containerEvents = reactive(new Map<string, ContainerHandler>());