Live data from Hacker News

A useful front-end confetti animation library

github.com

91–100 of 125 posts

Re: A useful front-end confetti animation library

#92
post #89

This reminds me of the early Internet in the 90s and 2000s, you had falling snow and star animations everywhere. This is a Javascript library, but it couldn't have been JS back in those days. Anyone have an idea how people built stuff like this without JS? I'm curious.

tiled gifs, most likely

Re: A useful front-end confetti animation library

#93
post #57

Earlier quoted context omitted.

seriously what is up with people who believe JS should not exist on the web? We are way past that now. It's not gonna happen. Reactive apps are just required for some parts of the modern web.

> what is up with people who believe JS should not exist on the web They said it: privacy

Yep, privacy.

Those of you who work writing javascript to fingerprint browsers and collect user behavior in exchange for a paycheck, you are the worst kind of person.

There are a lot of you on here and I expect to be "punished" for this view, but my view on this will never change.

Re: A useful front-end confetti animation library

#94

You have also Party.js library: https://party.js.org/

OP's library feels a lot more performant, in my old work computer with 3 click you can notice some lag with Party.js. With canvas-confetti, it only starts to lag when I click non-stop for a few seconds, probably invoking more than 30 instances of confetti and a lot of particles.

Re: A useful front-end confetti animation library

#95
post #63
post #38

Earlier quoted context omitted.

She said no - but we went on to be great friends still to this day, so I'd say it did work. We joke about it still.

That's nice :) I'm curious though - did you use tabs or spaces?

It was definitely tabs - I'll ask her if she's a space kind of gal. Some things can't be compromised!

Re: A useful front-end confetti animation library

#96
post #87

Earlier quoted context omitted.

Add a click event listener to the body and overlay the event-coordinates on the canvas.

Will the canvas allow you to hit-test the confetti piece given the coordinate?

Canvas draws raster images, anything resembling an object in your drawing logic is already tracked separately by necessity. So regardless, you’d presumably check against whatever data model you’re using to determine what to draw.

Re: A useful front-end confetti animation library

#97
post #12

Earlier quoted context omitted.

Can someone code and make a pull request to properly handle display of those for Italian users? (see https://it.wikipedia.org/wiki/Confetto for what they look like)

Ah, so basically the same thing, but they hit much harder when they land?

I guess they also fall down much more quickly

Re: A useful front-end confetti animation library

#98

Disclaimer: I am old. I have a difficult time believing that there is any utility in a confetti animation library when that confetti is shown over a page in a web browser. What could the utility of showing confetti over a webpage possibly be?

Same utility as animations in general. Such animation as this one for example fits when a user receives something or solves a challenge and similar
Post reply on HN