Live data from Hacker News

A useful front-end confetti animation library

github.com

111–120 of 125 posts

Re: A useful front-end confetti animation library

#111
post #19

I wish they would have called the reset function confetti.resetti()

This being Javascript, you can at least fix this locally with a simple "confetti.resetti = confetti.reset". There are some software engineering costs to this approach, but, as is transparently obvious to all thoughtful observers, the benefits massively outweigh them, so I say go for it.

omw to "consologgi = console.log"

Re: A useful front-end confetti animation library

#112
post #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

Those don’t have utility, either.

I don’t know why web devs feel like they need to tell users when they’ve succeeded at something like clicking a button.

People understand when they’ve accomplished something. We don’t need rituals around this, even simple ones like this.

Re: A useful front-end confetti animation library

#113
post #104

Earlier quoted context omitted.

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.

By what time the user clicks, there's no reason for the program to need to remember what they drew where.

If that’s the case, what other object with coordinates would you reference on a canvas to determine whether it was clicked?

Re: A useful front-end confetti animation library

#114

Earlier quoted context omitted.

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…

What would it even mean for a simulation to be imperfect, though, from the perspective within the simulation? You can only observe the simulated phenomena. So it would be perfectly normal, say, if things become non-deterministic at the hardest to observe small scales, or if there were minor inconsistencies between the smallest scale behaviors and the largest. You'd just call it "physics".

See that's hard because I do call it physics, and I do not call it a simulation. I am here in this world, and from where I stand it's as real as anything will ever be for me.

My point is that I don't think there's any sense in entertaining counterfactuals that, if true, will be impossible to come up with evidence for, and I think the assertion that our world is a simulation is one such counterfactual.

That is, unless the physics gets so absolutely insane that "it's just physics" fails to scratch the itch. One example would be if we discover an artifact that lets us see each particle's corresponding unique ID such that, once we have that ID, we can then type it into a console and arbitrarily set properties like its mass.

If simulated entities gain control over the parameters that govern the simulation itself... well is it really a simulation anymore?

Re: A useful front-end confetti animation library

#116

Earlier quoted context omitted.

What would it even mean for a simulation to be imperfect, though, from the perspective within the simulation? You can only observe the simulated phenomena. So it would be perfectly normal, say, if things become non-deterministic at the hardest to observe small scales, or if there were minor inconsistencies between the smallest scale behaviors and the largest. You'd just call it "physics".

See that's hard because I do call it physics, and I do not call it a simulation. I am here in this world, and from where I stand it's as real as anything will ever be for me. My point is that I don't think there's any sense in entertaining counterfactuals that, if true, will be impossible to come up with evidence for, and I think the assertion that our world is a simulation is one such counterfactual. That is, unless…

How to detect imperfect simulation: some unexplainable missing wavelength bands, or quantisation of results where it should be continuous would hint at "cutting corners" in simulation, like steps in energy levels from very distant xray sources perhaps?

As far as we know, our "physics" does not show any possible imperfections, or we didn't thought of all imperfections which could arise in simulation.

Re: A useful front-end confetti animation library

#117
post #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?

"on one side"...

Re: A useful front-end confetti animation library

#119
to turn it into a bookmarklet, do this:

1. grab the minified js from the CDM, i.e. https://cdn.jsdelivr.net/npm/canvas-confetti@1.9.2/dist/conf...

2. remove the comments at the start and end

3. paste it into the template below

    javascript: (async () => { /* paste minified JS here */   ; confetti();})();

4. (optional) customize the confetti()-call

5. copy the result and paste it into bookmark

This works on most pages (tested on some tabs I have open), but it does not seem to work on hackernews itself. Here it gives me ContentSecurityPolicy-Error when creating the worker. (at least it does in edge)

Re: A useful front-end confetti animation library

#120

Earlier quoted context omitted.

> 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.

The push-back is not from the tiny number of JavaScript developers writing finger-printing scripts, but rather the huge number of JavaScript developers (including me) who are offended that you’re unwilling to run JS because you’re afraid that it’s going to finger-print you.

You have a right to take steps that make you comfortable that your privacy is being protected. But don’t complain about websites not working if you’ve decided you don’t trust them to run JavaScript.

Post reply on HN