On the advice of counsel (thanks Overmind), I moved this to a new thread.

So a long time ago, d13 shared this article
<http://gameprogrammingpatterns.com/game-loop.html> on elm-discuss. It
explains how to update your model at fixed intervals, even when the updates
are driven by, say, a subscription to AnimationFrame.diffs.

This is an important and useful pattern if you are doing physics-related
animation, because it keeps your simulation deterministic/reproducible *and*
keeps the speed independent of the frame rate.

After implementing the pattern a few times in different projects, I decided
to extract it into a library
<http://package.elm-lang.org/packages/nphollon/update-clock/latest>.

It's small, but it makes my life a little easier. Hopefully it will yours
too :-)

And if you have feedback on the API, I'd love to hear it!

~Nick

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to