72 comments

[ 2.8 ms ] story [ 103 ms ] thread
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.
Is because liveweave cancel key mapping by dfault , you need to click on "Tools" then download and open the "source.html" file manualy.
Try the number keys, 0-9, etc. It's in the onkey function.
Yes, it appears that the "any" key is missing on my keyboard.
Add "setRenderMode(1);" into the onResize function. Then change between the numbers 0 to 3 (so "setRenderMode(3);" for example) to try the different modes. You may have to resize the window a little each time to make the new mode start but I didn't have to. It's a little annoying that it won't register button presses.
This does not work for me in FF 22.0 (work specified version). Looks nice in chrome, only time it drops is when you bundle them into a large group and then cross you mouse over it and they explode everywhere.
It's working for me in FF 24.0.
Yeah works for me at home on 24 too. Just noting it in case.
Doesn't work for me in FF 24.0, Windows XP :-(

Should I enable something in about:config or something else ?

It's because requestAnimationFrame is not prefixed. So many demos not properly prefixing RAF lately.
Warning: This demo locked up my OS and I had to force-restart. Chrome 25/OSX 10.8/Mac Pro Desktop, Early 2008.
Works like an absolute champ with Fedora 18 64bit + nvdia + chrome 30
Works fine on my MBP, on latest Safari/Mavericks.
Works great on my mid-2010 iMac with OS X 10.9 and Chrome 30.
The beautiful wonder that is Javascript. All the majesty of a killer whale piloting a single-engine supercruiser via a blue-tooth repeater connected 500m gallon tank in the Sahara. Think about how flexible such a system can be!
Considering that it's WebGL, pretty sure it's that age-old spectre: graphics drivers.
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.
Worked fine on Windows Vista, on a Lenovo T61, while watching VOD in a different tab.
Oddly: worked fine on my mac pro 1.1 (2006) and 10.6 (snow leopard) and firefox.
Absolutely beautiful, lost a few minutes just playing around with it. Would be great as slow, randomised, background or screensaver.
This is why Google Music needs a visualizer.
I love this. How easy is it to turn this into a Windows / OSX / Linux screen saver?
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.
It really depends on the videocard I guess.

I just tried both Crome and FF with a million particles, and they feel roughly the same.

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
I didn't look closely at the actual equations of motion, but clicking around in a sort of periodic fashion makes patterns that remind me of chaotic advection (http://en.wikipedia.org/wiki/Chaotic_mixing). Always very cool to see interesting patterns from relatively simple dynamics.
At first in my mind it's 'Oh, another javascript particle effect' and then I try the demo and it becomes 'holy shit, this is amazing'

Amazing job!

Operates in slow motion on Metro IE11, interestingly, desktop IE11 performs well although it starts off slow. It flies in FF and Chrome though. I suppose the Metro IE11 is missing some WebGL optimizations. Very cool!
This would make a nice screensaver
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

This are a few nice demos.
I did some experimenting to make particles dance to the beat of music if anyone is interested:

http://trapcity.tv

That's pretty awesome, did you mean for it to play all the MP3's dropped on it at a time? For instance if I drop 1.mp3 and then drop 2.mp3 before 1.mp3 is finished both play at the same time with 2.mp3 starting to play at the time offset 1.mp3 is at when 2.mp3 is added
Strange, I get no particle effects.

When I check out the chrome console I find: Uncaught TypeError: Cannot set property 'innerHTML' of null

Browser info?
Stable chrome branch. Version 30.0.1599.101

In chrome canary I also get:

Invalid CSS property value: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0.33)), color-stop(100%,rgba(0,0,0,0.75)))

and the same error as found in in standard chrome.

Seems like the js is going off before the DOM has finished loading. If I add an onload function that should fix it.
You deal with the DOM before waiting for the document to load?
I've got the same problem: Version 30.0.1599.101 Chrome on Mac OS X Mavericks.

I believe the problem is your time() method on line 189 of script.js; there's no element with id "time".

Dear author:

If you refactor the object/array/Float32Array instantiation in the redraw loop out into one-off allocations you will see a remarkably improvement in performance in terms of garbage-collection.

Note to self: Next time you want to optimize your cool-looking effects, post the source as a demo to HN. :D
Nice palette (like some emacses themes) and cool effects. Thanks for work! Bookmarked.

So cools that my cayman radeon driver on linux got some errors :-)

Amazing, beautifully done. Wonderful :-)
Wow, I was not expecting that. This is fantastic. Hold down your left mouse and keep it still and it changes colour and starts getting more intense. Great job!
I'm just wondering why this is impressive. Is it partly because it's Javascript and it's in a browser? I mean, would it have been just as impressive if you had to download a C++ program and compile it to get the same thing?