Live data from Hacker News

Particle effects in JavaScript

liveweave.com

31–40 of 73 posts

Re: Particle effects in JavaScript

#31
post #24

You can increase the number of particles by changing this line: totalLines = 60000, My PC starts getting slower after 150K, but it works, though slowly, even with 1 million.

Interestingly I can take it to 1,000,000 with Firefox (Nightly) without too many problems. Chrome (Canary) becomes unusable around 200,000.

Re: Particle effects in JavaScript

#32
post #24

You can increase the number of particles by changing this line: totalLines = 60000, My PC starts getting slower after 150K, but it works, though slowly, even with 1 million.

Performance for this kind of particle effect will be even better once Webgl2 is widely available. Transform feedback (or other hacks) let you manipulate the particle positions on the videocard itself. There's a great article about them here: http://prideout.net/blog/?p=67

Re: Particle effects in JavaScript

#35
This is really impressive. It makes me wonder how particle effects in Javascript running in a web browser can run so well, while a native desktop application like After Effects takes ages to render something similar?

Here's another mesmerising javascript experiment http://brunoimbrizi.com/experiments/#/01

Re: Particle effects in JavaScript

#38

I did some experimenting to make particles dance to the beat of music if anyone is interested: http://trapcity.tv

Really dig this. Any way I could check out the source?

Here you go: https://github.com/jacksonGariety/trapcity

Re: Particle effects in JavaScript

#39

What are the different rendering modes referenced by the help text? I couldn't detect any difference after hitting the space bar. Very cool effect!

Same question here. I hit all kinds of keys and didn't see any difference.

Yes, it appears that the "any" key is missing on my keyboard.

Re: Particle effects in JavaScript

#40
post #29

Earlier quoted context omitted.

Oh, Definitely! It couldn't be the layers of parsers, spaghetti Javascript libraries, web protocols, the DOM, WebGL itself which is a part of Javascript, or a million other crufty web things, it has to be the microsecond latency introduced by hardware-level API abstraction...

User-level libraries can't lock up your OS unless they can trigger kernel / driver bugs or make your hardware malfunction. In this case, graphics drivers are the most likely cause.

In theory they can't in practice, you just saw it happen. malfunction is a human concept, perhaps the hardware is behaving exactly as intended.
Post reply on HN