title: AnimationFrame Misunderstanding
body: <p>So I'm trying to build a multiplayer web game and I'm almost finished however I was adding in some extra features like splash screens and whatnot when I noticed something weird. If I comment out section 01 entirely then this code still works however if I comment out the second line in section 02, regardless of whether or not section 01 is commented out, then it will NOT work. I probably have a misunderstanding of what the animationFrame is doing or/and how it works. Can someone explain this to me or provide a link to an explanation. Thank You!</p>
  
  <pre><code>//----------START SECTION 01----------
  window.requestAnimationFrame = (function() {
      return window.requestAnimationFrame ||
      window.webkitRequestAnimationFrame  ||
      window.mozRequestAnimationFrame     ||
      function(callback) {
        window.setTimeout(callback, 1000 / 60);
      };
  })();
  //----------END SECTION 01----------
  
  //----------START SECTION 02----------
  (function animationLoop() {
      requestAnimationFrame(animationLoop);
      gameLoop();
  })();
  //----------END SECTION 02----------
  </code></pre>