Skip to content

Brightpixels 1.2.0 — React HDR confetti

Choose a tag to compare

@echohtp echohtp released this 07 Sep 16:02
· 16 commits to main since this release

Brightpixels 1.2 adds falling HDR confetti and an optional React component, informed by react-confetti's familiar controls.

import BrightConfetti from 'brightpixels/react-confetti';

<BrightConfetti numberOfPieces={200} recycle={false} intensity={8} />
  • Tumbling paper, sparks, dots, custom colors, wind, initial velocities, and source rectangles.
  • Recycling, pause/resume that freezes particle age, completion callbacks, and a restart ref.
  • A vanilla controller through brightpixels/confetti, with zero runtime dependencies.
  • React 18/19 as an optional peer; SSR-safe rendering and Strict Mode cleanup.
  • Automatic viewport sizing, bounded canvas fallback, and one stationary batch for reduced motion.

Try the React confetti demo. Read the API and migration differences.

This is an independent Brightpixels implementation, not a drop-in replacement for react-confetti. Custom Canvas drawing callbacks, arbitrary canvas dimensions, friction, custom tween functions, and frame-rate props are not included. Completion is based on particle lifetime.

Validation: 95 browser checks passed, with 7 intentional WebKit GPU skips; 13 unit tests and TypeScript checks passed. The package installed without React for a vanilla consumer, and the React wrapper passed server-rendering checks with React 18 and 19.

HDR uses the existing TypeGPU-generated particle layout and extended-range WebGPU renderer. Physical brightness remains dependent on browser, display, and settings.

Published on npm as brightpixels 1.2.0 with the latest tag. The registry package matches the attached archive; a fresh registry installation verified vanilla use without React and the React component's server import.

npm install brightpixels@1.2.0