import { ReelPhase } from './ReelPhase.js'; import { Reel } from '../../core/Reel.js'; import { SpeedProfile } from '../../config/types.js'; import { EventEmitter } from '../../events/EventEmitter.js'; import { ReelSetEvents } from '../../events/ReelEvents.js'; import { TumbleDropInConfig } from '../../cascade/TumbleConfig.js'; export interface CascadeDropInPhaseConfig { /** Visible rows whose old symbols were winners. drives per-row drop * geometry. Empty AND `initial: false` ⇒ no animation on this reel. */ winnerRows: number[]; /** `true` for Moment A (initial spin: every row drops from above); * `false` for Moment B (refill: only winner-displaced rows animate). */ initial: boolean; /** * Two-stage refill filter. * * - `'all'` (default). animate every mover: survivors-sliding-down AND * new-symbols-from-above. The classic single-phase refill. * - `'gravity'`. animate only survivors that slide down to fill holes * (originalRow ≥ 0 with offsetRows > 0). New-symbol movers stay * repositioned above the viewport with alpha=0. invisible, awaiting * the second stage. Emits `cascade:gravity:*` events. * - `'new'`. animate only new-symbol movers (originalRow < 0). * Survivors are already at their grid Y from the prior gravity stage, * so this phase reveals them at alpha=1 and only tweens the new * arrivals down from above. Emits `cascade:dropIn:*` events. * * Used by `mode: 'gravity-then-drop'` on `refill()` to split one refill * into two animated beats with a hold in between. */ role?: 'all' | 'gravity' | 'new'; /** Reel-set event bus, injected by SpinController. */ events: EventEmitter; } /** * Drop-in half of the tumble cascade. Animates each visible symbol from * its computed origin (above the viewport for new symbols, its old grid * row for survivors) down to its current grid position. * * Geometry comes from `computeDropOffsets`. Symbols whose `offsetRows` * resolves to zero (untouched survivors) skip the tween entirely. * * Resolves when every animated tween completes, then calls * `reel.notifyLanded()`. */ export declare class CascadeDropInPhase extends ReelPhase { readonly name = "cascade:dropIn"; readonly skippable = true; private readonly _baseDrop; /** Resolved at `onEnter` time by merging the active speed profile's * `tumble.dropIn` override (if any) over `_baseDrop`. Lives only for * the duration of a single run so a `setSpeed` between phases is * honoured on the next entry. */ private _drop; private _timeline; private _jobs; /** Captured on enter so `onSkip` can emit the paired `:end` event * without needing the config closure. */ private _events; private _endEvent; /** Per-run abort controller exposed on `cascade:dropIn:symbol` (or * `cascade:gravity:symbol`) as `signal`. Aborts on `onSkip` so * listener-scheduled tweens (landing squish, badge fade) can clean up * alongside the library's own timeline. Stays un-aborted on natural * completion. */ private _skipAbort; constructor(reel: Reel, speed: SpeedProfile, drop: Required); protected onEnter(config: CascadeDropInPhaseConfig): void; update(_deltaMs: number): void; protected onSkip(): void; } //# sourceMappingURL=CascadeDropInPhase.d.ts.map