reddit_place/public/static/js/place/init.js
/**
   * Utility for kicking off an animation frame loop.
   * @function
   * @param {function} fn The function to call on each frame
   * @returns {function} A function that cancels the animation when called
   */
Utility for kicking off an animation frame loop.
@function
@param {function} fn The function to call on each frame
@returns {function} A function that cancels the animation when called
Utility for kicking off an animation frame loop . @function @param { function } fn The function to call on each frame @returns { function } A function that cancels the animation when called
function startTicking(fn) {
    var token = requestAnimationFrame(function tick() {
      fn();
      token = requestAnimationFrame(tick);
    });
    return function cancel() {
      cancelAnimationFrame(token);
    }
  }
function startTicking ( fn ) { var token = requestAnimationFrame ( function tick ( ) { fn ( ) ; token = requestAnimationFrame ( tick ) ; } ) ; return function cancel ( ) { cancelAnimationFrame ( token ) ; } }
Utility for kicking off an animation frame loop.
Utility for kicking off an animation frame loop .