main.js 682 B

1234567891011121314151617181920212223
  1. if (!window.requestAnimationFrame) {
  2. window.requestAnimationFrame = (function() {
  3. "use strict";
  4. return window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
  5. window.setTimeout(callback, 1000 / 60);
  6. };
  7. })();
  8. }
  9. $(document).on("pageinit", function() {
  10. "use strict";
  11. $(".ui-loader").hide();
  12. $("body").css("overflow", "hidden");
  13. $("body > *").css("outline", "none");
  14. JellySliceGame.initialize();
  15. });
  16. $(window).resize(function() {
  17. "use strict";
  18. JellySliceGame.resetDisplay();
  19. });
  20. $(document).on("touchmove", function(e) {
  21. "use strict";
  22. e.preventDefault();
  23. });