Trying to make confetti effect after clicking an image

1 day ago 1
ARTICLE AD BOX

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)

Read Entire Article