Page 1 of 1
custom interval loop in client.js
Posted: Mon Oct 14, 2013 1:30 pm
by dnasello
Is it possible (or I should say built in) to create custom interval loops? for instance i want to "randomly" add objects to the graph all at different times ie some at 5s some at 30 etc etc. So can I run that via client js or would i Have to make a custom class to do this?
Re: custom interval loop in client.js
Posted: Mon Oct 14, 2013 3:40 pm
by coolbloke1324
dnasello wrote:Is it possible (or I should say built in) to create custom interval loops? for instance i want to "randomly" add objects to the graph all at different times ie some at 5s some at 30 etc etc. So can I run that via client js or would i Have to make a custom class to do this?
You can either create a custom class or just use a JavaScript setTimeout call. The method it calls can then schedule another call at a different timeout giving the illusion of random events.
Re: custom interval loop in client.js
Posted: Mon Oct 14, 2013 5:05 pm
by dnasello
that is exactly what i had done. Great, thank you