custom interval loop in client.js

All things HTML5 or text based engines, or really any web based engines.
Post Reply
dnasello
Posts: 11
Joined: Wed Oct 09, 2013 3:13 pm

custom interval loop in client.js

Post 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?
User avatar
coolbloke1324
Posts: 181
Joined: Mon Jan 23, 2012 5:20 pm

Re: custom interval loop in client.js

Post 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.
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
dnasello
Posts: 11
Joined: Wed Oct 09, 2013 3:13 pm

Re: custom interval loop in client.js

Post by dnasello »

that is exactly what i had done. Great, thank you
Post Reply

Return to “HTML5/Web Engines”