项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen, maar niet pushen of problemen/pull-requests openen.
 
 
 
 

34 regels
1.7 KiB

  1. /** PURE_IMPORTS_START ._root PURE_IMPORTS_END */
  2. import { root } from './root';
  3. export var RequestAnimationFrameDefinition = /*@__PURE__*/ (/*@__PURE__*/ function () {
  4. function RequestAnimationFrameDefinition(root) {
  5. if (root.requestAnimationFrame) {
  6. this.cancelAnimationFrame = root.cancelAnimationFrame.bind(root);
  7. this.requestAnimationFrame = root.requestAnimationFrame.bind(root);
  8. }
  9. else if (root.mozRequestAnimationFrame) {
  10. this.cancelAnimationFrame = root.mozCancelAnimationFrame.bind(root);
  11. this.requestAnimationFrame = root.mozRequestAnimationFrame.bind(root);
  12. }
  13. else if (root.webkitRequestAnimationFrame) {
  14. this.cancelAnimationFrame = root.webkitCancelAnimationFrame.bind(root);
  15. this.requestAnimationFrame = root.webkitRequestAnimationFrame.bind(root);
  16. }
  17. else if (root.msRequestAnimationFrame) {
  18. this.cancelAnimationFrame = root.msCancelAnimationFrame.bind(root);
  19. this.requestAnimationFrame = root.msRequestAnimationFrame.bind(root);
  20. }
  21. else if (root.oRequestAnimationFrame) {
  22. this.cancelAnimationFrame = root.oCancelAnimationFrame.bind(root);
  23. this.requestAnimationFrame = root.oRequestAnimationFrame.bind(root);
  24. }
  25. else {
  26. this.cancelAnimationFrame = root.clearTimeout.bind(root);
  27. this.requestAnimationFrame = function (cb) { return root.setTimeout(cb, 1000 / 60); };
  28. }
  29. }
  30. return RequestAnimationFrameDefinition;
  31. }());
  32. export var AnimationFrame = /*@__PURE__*/ new RequestAnimationFrameDefinition(root);
  33. //# sourceMappingURL=AnimationFrame.js.map