2048游戏的源代码
(function () { var lastTime = 0; var vendors = ['webkit', 'moz']; for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function (callback) { var currTime = new Date().getTime(); var t imeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function () { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = function (id) { clearTimeout(id); }; } }());
文件列表
2048-master.rar
(预估有个34文件)
2048-master
2048-master
.jshintrc
335B
style
main.scss
10KB
helpers.scss
2KB
fonts
ClearSans-Bold-webfont.woff
26KB
ClearSans-Regular-webfont.svg
81KB
ClearSans-Regular-webfont.woff
26KB
暂无评论