forked from devyumao/super-ginger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (95 loc) · 2.95 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>超能姜饼人</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
body {
padding: 0px;
margin: 0px;
background: #000;
}
canvas {
padding-bottom: 50px;
}
.ad {
position: fixed;
bottom: 0;
background: #fff;
}
.ad img {
width: 100%;
height: 100%;
}
.close {
position: absolute;
background: url(src/img/close.png) no-repeat;
background-size: cover;
}
</style>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="dep/esl.js"></script>
<script src="dep/phaser-no-physics.min.js"></script>
<script src="dep/phaser-screen-shake.min.js"></script>
<script>
require.config({
baseUrl: 'src'
});
</script>
</head>
<body>
<!-- <a id="ad" class="ad" href="http://www.cashlai.com/index.jsp?inviteCode=5577977">
<img src="src/img/ad-1.png">
</a>
<span id="close" class="close"></span> -->
<script>
require(['main'], function (main) {
var global = require('common/global');
global.setMode('dev');
global.setNickname('蝴蝶酥T5w');
main.init();
});
// (function () {
// var gameWidth = 480;
// var gameHeight = 800;
// var winWidth = window.innerWidth;
// var winHeight = window.innerHeight;
// var normalHeight = 50;
// var ratio;
// var D = document;
// var adEl = D.getElementById('ad');
// var adStyle = adEl.style;
// if (winWidth / winHeight > gameWidth / gameHeight) {
// ratio = winHeight / gameHeight;
// adStyle.height = normalHeight * ratio + 'px';
// adStyle.width = gameWidth * ratio + 'px';
// adStyle.left = (winWidth - gameWidth * ratio) / 2 + 'px';
// }
// else {
// ratio = winWidth / gameWidth;
// adStyle.height = normalHeight * ratio + 'px';
// adStyle.width = winWidth + 'px';
// }
// var closeEl = D.getElementById('close');
// var closeStyle = closeEl.style;
// var closeRatio = adEl.clientHeight / normalHeight;
// var closeSize = closeRatio * 34;
// closeStyle.width = closeSize + 'px';
// closeStyle.height = closeSize + 'px';
// closeStyle.bottom = closeRatio * 8 + 'px';
// closeStyle.right = closeRatio * 10 + (adStyle.left ? +adStyle.left.slice(0, -2) : 0) + 'px';
// closeEl.addEventListener(
// 'touchstart',
// function () {
// adStyle.display = 'none';
// closeStyle.display = 'none';
// },
// false
// );
// })();
</script>
</body>
</html>