Reputation: 11
is it possible to slow down frames in
d3.timer(function(){ alert("Hello"); }, 3000);
?
Here we have delay of 3 sec and then it becomes very fast.
For example in
setInterval(function(){ alert("Hello"); }, 3000);
we are able to change 3000 milliseconds to 2000 and we will be continuously alert every 2 sec instead of 3.
Thank you very much!
Upvotes: 1
Views: 221
Reputation: 51
API reference of D3-timer says:
d3.interval(callback[, delay[, time]]) <>
Like timer, except the callback is invoked only every delay milliseconds; if delay is not specified, this is equivalent to timer. A suitable replacement for setInterval that is guaranteed to not run in the background. The callback is passed the elapsed time.
You can find it here: github
In your case:
d3.interval(function(){ alert("Hello") }, 3000);
Upvotes: 5