a zip code crypto-currency system good for red ONLY

animationFrame.js 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. import { AnimationFrameAction } from './AnimationFrameAction';
  2. import { AnimationFrameScheduler } from './AnimationFrameScheduler';
  3. /**
  4. *
  5. * Animation Frame Scheduler
  6. *
  7. * <span class="informal">Perform task when `window.requestAnimationFrame` would fire</span>
  8. *
  9. * When `animationFrame` scheduler is used with delay, it will fall back to {@link async} scheduler
  10. * behaviour.
  11. *
  12. * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
  13. * It makes sure scheduled task will happen just before next browser content repaint,
  14. * thus performing animations as efficiently as possible.
  15. *
  16. * @example <caption>Schedule div height animation</caption>
  17. * const div = document.querySelector('.some-div');
  18. *
  19. * Rx.Scheduler.schedule(function(height) {
  20. * div.style.height = height + "px";
  21. *
  22. * this.schedule(height + 1); // `this` references currently executing Action,
  23. * // which we reschedule with new state
  24. * }, 0, 0);
  25. *
  26. * // You will see .some-div element growing in height
  27. *
  28. *
  29. * @static true
  30. * @name animationFrame
  31. * @owner Scheduler
  32. */
  33. export const animationFrame = new AnimationFrameScheduler(AnimationFrameAction);
  34. //# sourceMappingURL=animationFrame.js.map