You can leave comments right here: comments

I spent some of mine free time to create this nice effect in pure Javascript. Actually I plan to make a whole libary for it. Just to show you what it might give you i prepared some cool example (as a promotion of great javascript blog http://ajaxian.com). You can check it:

- here -

Please don't blame me for performance :) I tried almost everything I could get to make it faster. I used and tested a few trick of optimalisation to give you some result of mine tests:

1. Hiding element, moving it then showing - does not increase performance. In fact it is faster to do:

   element.style.top="10px";
   element.style.left="10px";  

   This is what I observe in this application, but also in mine application that I currently work in my job (moving map tiles).

2. Fastest way to move object is to directly set style attribute via:

   element.setAttribute("style","left: 10px; top: 10px");

   But this does not work in IE. Instead you could use:

   element.style.cssText="top:10px; left:10px";

   But to make things strange - this is slower in IE than setting style.top, and style.left separately.


Soon I will create more detailed information about performace in diffrent browsers, and a jQuery library for particles that will move object's around scene as fast as it can! (Really!)

More soon...