Skip to content

Instantly share code, notes, and snippets.

@acorn1010
acorn1010 / Weather.tsx
Created March 8, 2023 19:43
Weather / confetti component in React
import {cloneElement, CSSProperties} from 'react';
import {Helmet} from 'react-helmet';
import seedrandom from 'seedrandom';
/** Implements a weather system that displays particle effects on the page */
export type WeatherConfig = {
/** Vertical direction. (default 1, or "top to bottom") */
direction?: 1 | -1,
/** Minimum and maximum duration for particles to remain on screen. Determines vertical velocity. */