/** * Slot Machine Component specific types */ export type SymbolData = { id: number; name: string; spritesheet: string; scale: number; } export type SymbolsConfig = { [ key: number ]: SymbolData; } export type ReelProps = { stepY: number; symbolCount: number; posY: number; } export type GridProps = { symbolsConfig: SymbolsConfig; offsetX: number; reelProps: ReelProps[]; } export enum MaskingMode { None = "none", Simplified = "simplified", Unified = "unified", Unique = "unique", } export type AnticipationAnimationConfig = { spritesheet: string; x: number; y: number; scaleX: number; scaleY: number; animSpeed: number; } export type AnticipationConfig = { delayTime: number; triggeringAmounts: Record; // symbol id => amount required to trigger anticipation animationsConfig: AnticipationAnimationConfig[]; } export type SlotMachineProps = { spinningDuration?: number; startingSpeed?: number; stoppingDelay?: number; normalMinSpinTime?: number; turboMinSpinTime?: number; jerkDistance?: number; maskingMode?: MaskingMode; anticipationConfig?: AnticipationConfig; } export enum ColumnState { Ready, Spinning, Stopping } export enum SlotMachineState { Ready, Starting, Spinning, Stopping } export type ReelTweenAnimation = { timeline: gsap.core.Timeline, columnIndex: number, finished: boolean, } export type SoundData = { name: string, url: string }; export type SoundProps = { spinningSound: SoundData, reelStopSound: SoundData, anticipationSound?: SoundData, }