import * as i0 from '@angular/core'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** Options for {@link WrConfetti.fire}. */ interface WrConfettiOptions { /** Number of particles. @default 80 */ readonly count?: number; /** Spread cone in degrees. @default 60 */ readonly spread?: number; /** Launch direction in degrees — 90 is straight up, 0 fires right. @default 90 */ readonly angle?: number; /** Initial particle speed (px/frame). @default 12 */ readonly velocity?: number; /** Particle gravity (px/frame²). @default 0.35 */ readonly gravity?: number; /** Air drag coefficient. @default 0.92 */ readonly drag?: number; /** * Origin as viewport ratios — `{ x: 0.5, y: 0.5 }` = center. * Defaults to bottom-center. */ readonly origin?: { readonly x: number; readonly y: number; }; /** Color palette. @default ngwr brand colors */ readonly colors?: readonly string[]; /** Particle frame size in px. @default 8 */ readonly size?: number; /** Lifetime in frames (~60fps). @default 180 */ readonly ttl?: number; } /** * Burst of celebratory confetti particles painted onto a single shared * full-viewport canvas. The canvas is created on first call and reused. * * @example * ```ts * const confetti = inject(WrConfetti); * confetti.fire(); * confetti.fire({ count: 200, origin: { x: 0.25, y: 0.5 } }); * ``` * * @see https://ngwr.dev/animations/confetti */ declare class WrConfetti { private readonly doc; private readonly platform; private canvas; private ctx; private particles; private rafId; /** Spawn a confetti burst with the given (or default) options. */ fire(options?: WrConfettiOptions): void; private ensureCanvas; private resize; private spawn; private tick; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { WrConfetti }; export type { WrConfettiOptions };