5 ms·
Amazing. Can you change the speed of the simulation?
by exizt88 11y ago
Amazing. Can you change the speed of the simulation?
- oneeyedpigeon 11y agoYou could if the javascript didn't throw away the return value from setInterval(). If: setInterval(Model.tick,1000/30); were: Model.id = setInterval(Model.tick,1000/30); I think you could then clearInterval() and inject your own ‘tick’ method with whatever frequency you wanted. It's a shame there's no actual direct way to vary the frequency, given how brilliantly put-together the rest of the UI is.