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.
Thanks. So I should also pause the update function when background is paused, and that’s it?

  update: (time) =>
    distance = Math.sin(Math.min(Math.abs(@originY + 0.5 * @originX + 150 - (time / 2) / 5 % (Math.max(window.innerWidth, window.innerHeight) + 300)) / Math.sqrt(1.25), 200) / 200 * Math.PI / 2) * 60
    if not @duration or time > @start + @duration
      @start = time
      @duration = Math.random() * 2000 + 5000
      @deltaX = Math.random() * 8 + 5
      @deltaY = Math.random() * 20 + 5
    delta = (time - @start) / @duration
    sin = Math.sin(delta * Math.PI * 2)
    @x = @originX + sin * @deltaX + distance
    @y = @originY + sin * @deltaY + distance

On Jun 27, 2014, at 4:02 PM, Mitar <notifications@github.com> wrote:

> In client/footer.coffee:
> 
> > \ No newline at end of file
> > +  'no-index-footer' if not Template.footer.indexFooter()
> > +
> > +Session.setDefault 'backgroundPaused', false
> > +
> > +Template.backgroundPauseButton.events
> > +  'click': (e, template) ->
> > +    Session.set 'backgroundPaused', not Session.get 'backgroundPaused'
> > +    return # Make sure CoffeeScript does not return anything
> > +
> > +Template.backgroundPauseButton.backgroundPauseButtonText = ->
> so are there other files that also deal with background animation or is there something else that creates waves in the background?
> 
> It should not be elsewhere. Why?
> 
> —
> Reply to this email directly or view it on GitHub.
>