/** * FrogJS - A simple framework for making games with symbols/emojis on a grid */ export type ThemeName = 'classic' | 'midnight' | 'forest' | 'ocean' | 'sunset' | 'neon' | 'retro' | 'mono' | 'cyberpunk' | 'pastel'; export interface ITheme { background: string; gridlines: string; } export declare class Sprite { symbol: string; private _x; private _y; alpha: number; z: number; angle: number; fixed: boolean; color: string; constructor(config: Partial); get x(): number; set x(value: number); get y(): number; set y(value: number); } export interface IGameConfig { container?: HTMLElement; gridWidth?: number; gridHeight?: number; theme?: ThemeName; name?: string; showGamepadOnDesktop?: boolean; showGamepadOnMobile?: boolean; } export interface ITimer { id: number; times: number; } export declare class Game { private cellSize; private gridWidth; private gridHeight; private theme; private themeName; private canvas; private ctx; private sprites; private keysPressed; private keyDownCallbacks; private keyUpCallbacks; private animationFrameId; private audioContext; private fadeAnimations; private rotationAnimations; private timeouts; private timers; private nextTimerId; private _scrollX; private _scrollY; get scrollX(): number; set scrollX(value: number); get scrollY(): number; set scrollY(value: number); onUpdate: (() => void) | null; onPointerDown: ((x: number, y: number) => void) | null; onPointerUp: ((x: number, y: number) => void) | null; private deviceContainer; private gameName; private uiColors; private showGamepad; private labelRect; private gameRect; private gamepadRect; private dpadRect; private actionRect; private dpadCells; private gridOffset; private activePointerKeys; constructor(config?: IGameConfig); private isMobileDevice; private createDeviceUI; private updateDeviceLayout; private setupMobileFullscreen; private setupGlobalErrorHandler; private showErrorOverlay; private applyFullscreenStyles; private setupInputHandlers; private pressKey; private releaseKey; private getDpadKeyAtPoint; addSprite(sprite: Sprite): Sprite; isLeftKeyDown(): boolean; isRightKeyDown(): boolean; isUpKeyDown(): boolean; isDownKeyDown(): boolean; isSpaceKeyDown(): boolean; onLeftKeyDown(cb: () => void, once?: boolean): void; offLeftKeyDown(cb: () => void): void; onLeftKeyUp(cb: () => void, once?: boolean): void; offLeftKeyUp(cb: () => void): void; onRightKeyDown(cb: () => void, once?: boolean): void; offRightKeyDown(cb: () => void): void; onRightKeyUp(cb: () => void, once?: boolean): void; offRightKeyUp(cb: () => void): void; onUpKeyDown(cb: () => void, once?: boolean): void; offUpKeyDown(cb: () => void): void; onUpKeyUp(cb: () => void, once?: boolean): void; offUpKeyUp(cb: () => void): void; onDownKeyDown(cb: () => void, once?: boolean): void; offDownKeyDown(cb: () => void): void; onDownKeyUp(cb: () => void, once?: boolean): void; offDownKeyUp(cb: () => void): void; onSpaceKeyDown(cb: () => void, once?: boolean): void; offSpaceKeyDown(cb: () => void): void; onSpaceKeyUp(cb: () => void, once?: boolean): void; offSpaceKeyUp(cb: () => void): void; private addKeyCallback; private removeKeyCallback; getSprite(x: number, y: number): Sprite | null; getAllSprites(x: number, y: number): Sprite[]; removeSprite(sprite: Sprite): void; clearSprites(): void; fadeSprite(sprite: Sprite, startAlpha: number, endAlpha: number, duration?: number, callback?: () => void): void; rotateSprite(sprite: Sprite, startAngle: number, endAngle: number, duration?: number, callback?: () => void): void; timeout(delay: number, callback: () => void): void; timer(delay: number, callback: () => void, times?: number): ITimer; stopTimer(timer: ITimer): void; private start; private updateAnimations; private updateRotationAnimations; private updateTimeouts; private updateTimers; private render; private drawGrid; private drawSprites; private drawGamepad; reset(): void; sound(frequency: number, duration: number): void; } //# sourceMappingURL=frog.d.ts.map