-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
39 lines (34 loc) · 922 Bytes
/
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
<html>
<head>
<link rel="stylesheet" type="text/css" href="build/styles.css">
</head>
<body>
<script src="build/index.js" type="text/javascript"></script>
<script type="text/javascript">
(function () {
var SW = 160;
var SH = 144;
var PW = 4;
var PH = 4;
var canvas = document.createElement('canvas');
document.body.appendChild(canvas);
canvas.width = SW * PW;
canvas.height = SH * PH;
canvas.style.width = canvas.width + 'px';
canvas.style.height = canvas.height + 'px';
canvas.style.zIndex = 9;
canvas.style.opacity = 0.12;
// draw grid
var ctx = canvas.getContext('2d');
// ctx.fillStyle = '#E4FB95';
ctx.fillStyle = '#FFFFFF';
for (var x = 0; x < SW; x++) {
for (var y = 0; y < SH; y++) {
ctx.fillRect(x * PW, 0, 1, SH * PH);
ctx.fillRect(0, y * PH, SW * PW, 1);
}
}
})();
</script>
</body>
</html>