Closed elliottslaughter closed 15 years ago
Never mind, I just did another read through your code and found where you put the update function.
Still, it might be nice to keep seperate draw and update loop timings. (Not a high priority though.)
It's a good idea, so I did it. See a demo at http://gist.github.com/188865
Hi,
I've been looking at the code in window.clj and I'm wondering if you might be able to add a simple update loop. The only function you currently provide which gets called on a frequent basis is draw, and it would be nice if update could get called independently of the refresh rate (e.g. update at 60 fps but draw at 30 fps). And since you hide the state ref itself, it is difficult for me to set up my own independent update loop without modifying your code.
The following patch is an example of what I'm thinking of. Feel free to use it.