News for hackers. Stuff that matters.
Re:WebGL: 80.000 particles by boblemarin on Tuesday April 07, 2015 @08:47AM (#9333533)
The particles are attracted by the position of the mouse, each having a slightly different (randomized) attraction factor.

If a particle ever reaches the exact mouse coordinates, its position is randomly generated anywhere on the screen.

When rendering the particles, it simply draws a line between the previous and the new position. So when a particle is transported to a random place, it create the rays that appear around the cursor.

There's no real complexity in the maths involved, but I remember spending quite some time tweaking the random ranges to get something nice.

Re:WebGL: 80.000 particles by corysama on Tuesday April 07, 2015 @11:29AM (#9334728)
Have you seen this VR demo: http://youtu.be/fAhzW4blqvM ? It looks similar enough that I bet it's inspired by yours.

Yours is a very fun demo. I tried modifying it to move more work to the GPU. I had the CPU only update a subset of the particles each frame and the GPU would interpolate a curve to fill in the missing frame updates. It sorta worked. It was N-times faster and could do more particles. But, the interpolated curves were progressively less responsive and fun.

Re:WebGL: 80.000 particles by amelius on Tuesday April 07, 2015 @08:57AM (#9333599)
Okay, thanks for sharing. But still, I'm wondering why the orbits of the particles always end up being roughly the same size.