/** * BackgroundController - Singleton controller for canvas background rendering * * This controller manages all canvas-based background rendering outside of * Svelte's reactive system. It survives HMR via import.meta.hot.data persistence. */ import type { IBackgroundController, BackgroundOptions } from "../contracts/IBackgroundController.js"; import { BackgroundType } from "../domain/enums.js"; import type { QualityLevel } from "../domain/types.js"; /** * BackgroundController implementation */ export declare class BackgroundController implements IBackgroundController { private canvasA; private canvasB; private container; private systemA; private systemB; private animationIdA; private animationIdB; private activeCanvas; private currentType; private currentOptions; private quality; private isTransitioning; private pendingType; private pendingOptions; private mounted; private initialized; private initializationInProgress; private resizeObserver; private adaptiveQualityManager; private onEventCallback; /** * Mount the controller to a container element. * Creates canvas elements and sets up observers. */ mount(container: HTMLElement): void; /** * Unmount the controller. * Stops animations, cleans up systems, removes canvases. */ unmount(): void; /** * Set the background type. */ setBackground(type: BackgroundType, options?: BackgroundOptions): Promise; /** * Set quality level. */ setQuality(quality: QualityLevel): void; setPointer(x: number, y: number, active: boolean, pointerType?: string): void; pokeAt(x: number, y: number): { hit: boolean; pitch01: number; pan: number; } | void; /** * Get current background type. */ getCurrentType(): BackgroundType | null; /** * Check if ready. */ isReady(): boolean; /** * Force a refresh. */ forceRefresh(): void; /** * Enable or disable adaptive quality. * When enabled, quality adjusts automatically based on FPS. * When disabled, quality stays at whatever level was last set. */ setAdaptiveQuality(enabled: boolean): void; /** * Register a callback for background events (qualityChanged, etc.). */ onEvent(callback: (event: import("../domain/types.js").BackgroundEvent) => void): void; private createCanvases; private verifyCanvases; private setupResizeObserver; private updateCanvasDimensions; private handleResize; private updateActiveCanvasClass; private setupAdaptiveQuality; private initializeBackground; private performCrossfade; private startAnimation; private stopAnimation; private waitForFrame; private delay; } /** * Get the singleton BackgroundController instance. * * The instance persists across HMR module reloads via import.meta.hot.data. * This ensures the canvas state survives code changes during development. */ export declare function getBackgroundController(): BackgroundController; //# sourceMappingURL=BackgroundController.d.ts.map