code: function updateAnimation () {
      if (!animationActive && shouldAnimate()) {
        animationStartTime = Date.now()
        lastFrameNumber = 0
        window.requestAnimationFrame(frame)
        animationActive = true
      }
    }
docs: Ensure that animation frame is requested (if an animation is needed).