I’d like to create a circle ctx.arc(10, 10, 15, 0, Math.PI*2, true); and hence make it flow downwards without losing its traces..
You can see this clearly in the below image –

Here as we can see on the dark side…the circle is actually moving as time passes.. I want to control the speed by entering the time…like from top to bottom it should reach in 2 seconds (or some other way to control its speed of flow)
EDIT: Sorry for some buddies the question is: whats the most efficient and "NON-memory-hogging" method to do this, (I know there is this loop method but its very memory hogging method)
Javascript knows
setTimeout(fn, ms), which is going to call the given function after the given number of milliseconds. However, the browser will need some time to render your drawings, and when you want the 2 seconds to be exakt you will have to watch about your frames/seconds rate.Theres also a new specification draft called
requestAnimationFrame, see http://paulirish.com/2011/requestanimationframe-for-smart-animating/ for that.