import type { GamePlugins } from './game-logic'; import type { RenderPlugins } from './game-renderer'; import type { EngineOptions, GameStats } from './types'; /** * Framework-agnostic "detection sweep" canvas engine. * A scan line crosses a dot grid; dots react as it passes; rare accent events * appear behind the sweep. Two textures share this engine, selected via `texture`. * * Performance notes: * - All dots use `fillRect` (no `arc`/`beginPath` overhead). * - Color strings are pre-computed in palettes — zero allocation in the hot loop. * - No `shadowBlur` — glow is faked with layered rects. * - Game sim folds into the existing frame() behind mode guards. * - Bounded pools (MAX_TARGETS, MAX_BULLETS). No per-frame allocation. */ export interface SweepEngine { start(): void; stop(): void; setOptions(next: Partial): void; renderStatic(t?: number): void; resize(): void; setGameActive(active: boolean): void; catchAt(x: number, y: number): boolean; setMode(mode: 'idle' | 'armed'): void; startRound(): void; exitGame(): void; setCannonDir(dir: number): void; setFiring(on: boolean): void; onStats(cb: (s: GameStats) => void): void; setExclusion(box: { width: number; height: number; } | null): void; celebrate(score: number): void; setSound(on: boolean): void; setPlugins(plugins: { game: GamePlugins; render: RenderPlugins; }): void; } export declare function createSweepEngine(canvas: HTMLCanvasElement, options: EngineOptions): SweepEngine;