I am guessing your viewGrid function is slowing your code down. This function is creating a new mesh and passing it to the GPU on every animation frame.
The solution is to make sure your WebGL.Drawable (line 465, where it says "GL.Lines gridPoints") is a constant. So extract that into its own top-level declaration, as you have done with "mesh." On Wed, Nov 2, 2016 at 1:30 PM, Gaëtan André <[email protected]> wrote: > Hello everybody, > > I am working on cloning Agar.io (https://agar.io/) using functionnal > languages. > Everything was going well except that my cell movements are not very > smooth. > I first blamed the network connection, but after hacking a standalone > front-end it seems like Elm might have something to do with it. > > From were I am, I don't know where to go to improve fluidity. > > I am subscribing to AnimationFrame.diffs to give the pace of the render > loop. > > Here is a gist of my code: > https://gist.github.com/rvlander/0b956d5d8d0a70f37f6206cb6f9af367 > > Thanks, > > -- > 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. > -- 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.
