title: Right usage of requestAnimationFrame / cancelAnimationFrame
body: <p>While working with the <strong>requestAnimationFrame API</strong>, I encountered a problem.
  It might be because the <strong>structure</strong> I use is wrong, but it seems logical to me.</p>
  
  <p>What I basically do is a very easy background-position manipulation for an infinite falling effect:</p>
  
  <p>( This version is simplified, but demonstrative )</p>
  
  <pre><code>cache.mechanism.snowFall = function(){
  
      cache.snow.position.y ++;
      if( cache.snow.position.y &gt; cache.viewport.height ){ 
          cache.snow.position.y -= cache.viewport.height; 
      }
      cache.snow.elem.style.backgroundPosition = "0px " + cache.snow.position.y + "px";
  
      requestAnimationFrame( cache.mechanism.snowFall );
  
  };
  </code></pre>
  
  <p>Actually, it moves the background position 1px lower with every animation frame. 
  ( Resets when neccessary, to avoid high paint times, and FPS loss )</p>
  
  <p>I initialize it by calling:</p>
  
  <pre><code>cache.mechanism.snowFall();
  </code></pre>
  
  <p>So, it runs fine, with a very high FPS, but it is not possible to stop it.</p>
  
  <pre><code>cancelAnimationFrame( cache.mechanism.snowFall );
  </code></pre>
  
  <p>-does nothing, and returns undefined.</p>