This repo contains an example of how to createa firework with a particles system and custom shaders.
It includes Firework class.
Learn three.js on my You Tube channel
Install the dependencies
npm install
npm run dev
npm run build
const firework = new Firework(300,3);
...
let clock = new THREE.Clock();
function tic() {
let dt = clock.getDelta();
firework.update(dt);
}