Feat : Beta animations
This commit is contained in:
+8
-5
@@ -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>());
|
||||
|
||||
Reference in New Issue
Block a user