Re:A Simulation in Emoji
by exizt88 on Saturday November 28, 2015 @03:03AM
(#10640428)
Amazing. Can you change the speed of the simulation?
[ Parent
| on HN ]
Re:A Simulation in Emoji
by oneeyedpigeon on Saturday November 28, 2015 @07:46PM
(#10643228)
You 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.