Add a way to pause the background animation #220

I currently set href to "" because I don't currently know how to interface with session variables directly through html tags. "Basic View" and "Standard View" have different lengths, so the footer shifts when the button is pressed. The paused background state is different from the paused state when the user once again switches to the tab after a period of time, where the triangles are all orange and regular. The session variable can also be renamed and used elsewhere to perhaps make the page less reactive, for example in displaying search results, to reduce lag.
Yes, I was trying to call draw continuously but have it still do nothing when background is paused. I tried to keep track of the interval of time when the background is paused and subtract it from “time” when calling render so the resume point of the animation does not change, but the background just freezes. index.coffee creates a @_background object, a renderer is made, and the draw function is called somehow which calls render, which calls draw function again. This also makes me confused because I don’t see why “frame @draw” in draw function will ever be reached. Thanks for your help

On Jul 1, 2014, at 5:13 PM, Mitar <notifications@github.com> wrote:

> In client/lib/background.coffee:
> 
> > @@ -34,6 +34,7 @@ class Vector
> >      @deltaY = 0
> >  
> >    update: (time) =>
> > +    return if Session.get 'backgroundPaused'
> Do you understand how loop functions? Why is draw being called again and again? And how it is started for the first time? Why you cannot redo this again once background is resumed?
> 
> —
> Reply to this email directly or view it on GitHub.
>