game/2048/data/flappy2048.js
(开头部分) 42KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var disable_mouse = false;
var cndSrc = "http://gtg.y3.cn/html5/single/2048/";
document.body.style.margin = '0px';
document.body.style.overflow = 'hidden';
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var orient = false; //横屏
var raf = function(x) {
alert('Sorry,本游戏暂不支持您的浏览器!');
}
if (window.requestAnimationFrame) raf = window.requestAnimationFrame; // Firefox 23 / IE 10 / Chrome / Safari 7 (incl. iOS)
else if (window.mozRequestAnimationFrame) raf = window.mozRequestAnimationFrame; // Firefox < 23
else if (window.webkitRequestAnimationFrame) raf = window.webkitRequestAnimationFrame; // Older versions of Safari / Chrome
var gameLocal = new LocalStorageManager();
if(gameLocal.getUserInfoKey() == ""){
gameLocal.creatUserInfo(gameLocal.getUserOS(),gameLocal,function(){});
}
var game = {};
game.ended = false;
game.div = document.createElement('div');
game.div.style.cursor = 'pointer';
game.div.style.overflow = 'hidden';
game.div.style.position = 'relative';
game.div.style.width = '100%';
game.div.style.height = '100%';
document.body.appendChild(game.div);
var deathflash = document.createElement('div');
deathflash.style.background = '#FF0000';
deathflash.style.zIndex = 9999999;
deathflash.style.width = '100%';
deathflash.style.height = '100%';
deathflash.style.left = '0px';
deathflash.style.top = '0px';
deathflash.style.position = 'absolute';
deathflash.style.display = 'none';
deathflash.innerHTML = ' ';
game.div.appendChild(deathflash);
var cell_size = 88;
var resize = function() {
ww = Math.ceil(window.innerWidth);
hh = Math.ceil(window.innerHeight);
game.div.style.width = ww + 'px';
game.div.style.height = hh + 'px';
后面还有 1242 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
