Trying to make confetti effect after clicking an image
I'm trying to use tsparticles to make some confetti go off after clicking an image, but I can't seem to work out how.
Here's my code:
(async engine => {
await loadConfettiFallingPreset(engine);
await engine.load({
options: {
preset: "confettiFalling", // or "confetti-falling"
},
});
})(tsParticles);
polaroid-top.addEventListener("click", () => {
confettiFalling(("tsparticles"))
})
(polaroid-top is the id of my image)