ng-cw-v12
Version:
Angular UI Component Library
42 lines (41 loc) • 1.43 kB
TypeScript
import { OnDestroy, SimpleChanges, OnChanges } from '@angular/core';
import * as i0 from "@angular/core";
interface Sparkle {
id: string;
x: string;
y: string;
color: string;
delay: number;
scale: number;
lifespan: number;
opacity: number;
rotation: number;
scaleValue: number;
}
export declare class SparklesTextComponent implements OnDestroy, OnChanges {
/** 展示的文本内容 */
ncText: string;
/** 闪烁点的数量 */
ncCount: number;
/** 闪烁点的颜色数组 */
ncColors: string[];
/** 闪烁循环时间(秒) */
ncDuration: number;
/** 闪烁点的最大尺寸 */
ncSize: number;
sparkles: Sparkle[];
private intervalId?;
private animationFrameId?;
constructor();
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
private initializeSparkles;
private generateSparkle;
private startAnimation;
private cleanup;
getSparkleStyle(sparkle: Sparkle): any;
trackBySparkleId(index: number, sparkle: Sparkle): string;
static ɵfac: i0.ɵɵFactoryDeclaration<SparklesTextComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SparklesTextComponent, "nc-sparkles-text", never, { "ncText": "ncText"; "ncCount": "ncCount"; "ncColors": "ncColors"; "ncDuration": "ncDuration"; "ncSize": "ncSize"; }, {}, never, never>;
}
export {};