import { Reel } from '../core/Reel.js'; import { ReelViewport } from '../core/ReelViewport.js'; import { SymbolPosition, ReelSetEvents } from '../events/ReelEvents.js'; import { EventEmitter } from '../events/EventEmitter.js'; import { Disposable } from '../utils/Disposable.js'; export interface SpotlightOptions { /** Opacity of the dim overlay (0-1). Default: 0.5. */ dimAmount?: number; /** Whether to play win animation on spotlighted symbols. Default: true. */ playWinAnimation?: boolean; /** Whether to re-parent symbols above the mask. Default: true. */ promoteAboveMask?: boolean; } export interface WinLine { positions: SymbolPosition[]; } export interface CycleOptions extends SpotlightOptions { /** Milliseconds to display each win line. Default: 2000. */ displayDuration?: number; /** Milliseconds between lines. Default: 300. */ gapDuration?: number; /** Number of cycles (-1 for infinite). Default: 1. */ cycles?: number; } /** * The "we just won" visual primitive. * * The spotlight is what turns a landed grid into a celebration. Given a * list of winning cell positions, it: * * 1. Fades in the dim overlay behind everything (everything that is * not winning visually sinks into the background). * 2. Re-parents each winning `ReelSymbol` into the viewport's * spotlight layer so its animation isn't clipped by the reel mask. * 3. Calls `playWin()` on each winner (your symbol class's one-shot). * 4. When you call `hide()` or the cycle ends, it puts every symbol * back where it came from and removes the dim overlay. * * Two modes: * - `show(positions, options)`. one-shot. Cell highlight + promote + * play win. Returns when the animation fully ends. * - `cycle(lines, options)`. iterate multiple win lines with a * configurable per-line duration and gap, optionally repeating. * * Win detection is NOT part of this. pixi-reels never computes wins. * your server / game code decides which cells are winners and passes * them here. See [ADR 007](https://github.com/schmooky/pixi-reels/blob/main/docs/adr/007-scope.md). */ export declare class SymbolSpotlight implements Disposable { private _reels; private _viewport; private _promoted; private _isActive; private _isDestroyed; private _cycleAbort; private _events; constructor(reels: Reel[], viewport: ReelViewport, events: EventEmitter); get isActive(): boolean; get isDestroyed(): boolean; /** Show spotlight on specific positions. */ show(positions: SymbolPosition[], options?: SpotlightOptions): Promise; /** * Promote + play win for one set of positions. Unlike the public `show()`, * this does NOT call `hide()` first, so it never aborts a running cycle. */ private _showInternal; /** Hide the spotlight and return symbols to their original positions. */ hide(): void; /** * Return promoted symbols and remove the dim overlay, WITHOUT aborting a * running cycle. The cycle loop calls this between lines; `hide()` adds the * abort on top for the public stop-everything behaviour. */ private _teardownVisual; /** * Cycle through win lines, showing each for a duration. * Returns when all cycles complete or when hide() is called. */ cycle(winLines: WinLine[], options?: CycleOptions): Promise; destroy(): void; private _wait; } //# sourceMappingURL=SymbolSpotlight.d.ts.map