This repository contains two independent implementations of interactive fire particle simulations, both built to explore real-time flame effects:
-
3D Version β Powered by React Three Fiber (Three.js)
A full 3D scene with orbiting camera, bloom post-processing, soft particles, and a glowing fire pit. -
2D Version β Pure React + Canvas 2D
A lightweight 2D simulation using native canvas drawing, radial gradients, and trail effects β no 3D libraries required.
Both versions feature:
- Adjustable "energy" slider (10β100%) that controls flame intensity, height, spread, and color.
- Gaussian-distributed particle spawning for natural, organic flame shapes.
- Physics-based motion (buoyancy, turbulence, drag, random bursts).
- Realistic color progression from hot white/yellow to cool red/orange.
Each project is a standalone Vite + React app.
cd 3d-fire-r3f
npm install
npm run devcd 2d-fire-canvas
npm install
npm run dev