v / examples / 2048 / index.html
36 lines · 33 sloc · 1022 bytes · dad93f8fab432390bb9adb7a7f86977e49d250af
Raw
1<!doctype html>
2<html lang="en-us">
3
4<head>
5 <meta charset=utf-8>
6 <meta content="text/html; charset=utf-8" http-equiv=Content-Type>
7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 <title>v 2048</title>
9 <style>
10 body {
11 margin-left: 1rem;
12 background-color: rgb(250, 248, 239);
13 }
14 </style>
15</head>
16
17<body>
18 <h1>V 2048 demo</h1>
19 <h3>
20 Authors: <a href="http://github.com/spaceface777">@spaceface777</a>, <a href="http://github.com/spytheman">@spytheman</a> and other V contributors.
21 <br>
22 Original game by <a href="http://github.com/gabrielecirulli">@gabrielecirulli</a>.
23 </h3>
24 <h3>Click on the canvas to go into fullscreen mode</h3>
25 <canvas id=canvas oncontextmenu=event.preventDefault() tabindex=-1 width="544" height="560"></canvas>
26 <script src=index.js></script>
27 <script>
28 const m = Module()
29 const e = document.getElementById("canvas");
30 e.onclick = e.ontouchstart = () => {
31 e.requestFullscreen()
32 }
33 </script>
34</body>
35
36</html>
37