Live data from Hacker News

A useful front-end confetti animation library

github.com

41–50 of 125 posts

Re: A useful front-end confetti animation library

#42

[flagged]

The developer has of course provided a print stylesheet (expect no less from a pro). Just print it, frame it, hang it up on the wall and voilà! A no-JS confetti demo right there in your living room.

Sadly, the demo does require scissors and a colour printer/coloured markers to experience fully.

Re: A useful front-end confetti animation library

#43
I love this. Lovely work! I had done something similar a few years ago for an edtech company I was working at. [0] It uses threejs and tries to "bake" the particle animation before trying to play it, but I don't think it ever made a huge difference in performance. I think I'll reach out and mention they could change to your library for a nicer experience!

[0] https://github.com/graypegg/xello-confetti

Re: A useful front-end confetti animation library

#45

Earlier quoted context omitted.

The excellent performance characteristics of the natural world may indeed be the best rebuttal of the popular theory that we live in a computer simulation!

Good simulations have constant time step and may not run in real time. From inside such simulation, you would never know.

It's only meaningful to consider that our world is a simulation if it is an imperfect one, otherwise you're just using "simulation" as an awkward synonym for "reality".

Click the "snow" button enough (https://catdad.github.io/canvas-confetti/) and you'll get a horizontal line separating the pre-slowdown flakes from the post-slowdown flakes. I suppose that's the kind of simulation imperfection that we might look for.

Personally, I don't think we're hacking our way out of this one any time soon, so I'm happy to just call it reality.

Re: A useful front-end confetti animation library

#46
From the demo page:

> If you happened to get curious and changed the particle count to 400 or so, you saw something disappointing. An even "flattened cone" look to the confetti, making it look way too perfect and ruining the illusion.

I love it! This kind of attention to detail is rare in this world, and I cherish it wherever I find it - whether it's in statistical visualization, movie props, or website confetti.

(As a solution, I'd probably go for changing the random distribution directly. I'd check of course, but I'm guessing the real-life distribution approximates a gaussian.)

Re: A useful front-end confetti animation library

#47

Earlier quoted context omitted.

I was introduced to this idea by the book Permutation City. Great read.

The idea on Permutation City is way crazier than a mere computer simulation.

I agree, it's awesome. I wish more scifi authors were as ambitious as Egan.

Re: A useful front-end confetti animation library

#48
post #12
post #11

Just fyi, confetti are candies in italy. Not bits of paper.

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?

Re: A useful front-end confetti animation library

#49

Earlier quoted context omitted.

this says more about you than it does about the confetti animation

Twitter uses a similar animation on your profile when it's your birthday. That's one use case and I am sure there are more.

I think Facebook did something similar if you typed "congratulations" in a comment.

Re: A useful front-end confetti animation library

#50
Interesting optical illusion – if I focus on side of the Custom Canvas demo and repeatedly click "Run", some of the confetti in my peripheral vision appears to leave the canvas. It's as if my brain is filling in what it expects to happen.

Is that a known phenomenon?

Post reply on HN