starfield-react
Version:
A React component that draws an animated Starfield on a canvas dom element.
21 lines (20 loc) • 564 B
TypeScript
import { FC, CSSProperties } from 'react';
export declare type StarFieldProps = {
width?: number;
height?: number;
count?: number;
speed?: number;
fps?: number;
clear?: boolean;
starRatio?: number;
starSize?: number;
starStyle?: ColorFunction | string;
starShape?: 'butt' | 'round' | 'square';
bgStyle?: string;
noBackground?: boolean;
className?: string;
style?: CSSProperties;
};
declare type ColorFunction = () => string;
export declare const StarField: FC<StarFieldProps>;
export {};