react-gradient-animation
Version:
A highly customizable, animated gradient background component for React applications.
19 lines (18 loc) • 597 B
TypeScript
import { OpacityConfig, ParticleOptions, RGB, ShapeType } from "./index";
export declare class Particle {
color: RGB;
shape: ShapeType;
options: ParticleOptions;
rgba: string;
rgbaEdge: string;
size: number;
direction: number;
vx: number;
vy: number;
x: number;
y: number;
pulseDirection: number;
constructor(color: RGB, shape: ShapeType, options: ParticleOptions, opacity: OpacityConfig);
update(canvasWidth: number, canvasHeight: number): void;
draw(ctx: CanvasRenderingContext2D, blending: GlobalCompositeOperation | "none"): void;
}