UNPKG

@hiddentao/clockwork-engine

Version:

A TypeScript/PIXI.js game engine for deterministic, replayable games with built-in rendering

36 lines 961 B
/** * Input Layer Interface * * Platform-agnostic input abstraction that wraps input systems * like DOM events or provides recording-based implementations. */ /** * Pointer/Mouse input event */ export interface InputEvent { x: number; y: number; button?: number; timestamp: number; } /** * Keyboard input event */ export interface KeyboardInputEvent { key: string; code: string; timestamp: number; } /** * Main input layer interface */ export interface InputLayer { onPointerDown(callback: (event: InputEvent) => void): void; onPointerUp(callback: (event: InputEvent) => void): void; onPointerMove(callback: (event: InputEvent) => void): void; onClick(callback: (event: InputEvent) => void): void; onKeyDown(callback: (event: KeyboardInputEvent) => void): void; onKeyUp(callback: (event: KeyboardInputEvent) => void): void; removeAllListeners(): void; } //# sourceMappingURL=InputLayer.d.ts.map