2048游戏的源代码

时间:2017-08-09 16:31:44
【文件属性】:

文件名称:2048游戏的源代码

文件大小:319KB

文件格式:RAR

更新时间:2017-08-09 16:31:44

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 timeToCall = 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
----2048-master()
--------.jshintrc(335B)
--------style()
--------index.html(4KB)
--------LICENSE.txt(1KB)
--------favicon.ico(4KB)
--------js()
--------Rakefile(300B)
--------meta()
--------CONTRIBUTING.md(2KB)
--------README.md(2KB)
--------.gitignore(13B)

网友评论