This repository has been archived by the owner on Nov 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (73 loc) · 3.52 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
<!DOCTYPE html>
<head>
<style>
body {
position: absolute;
display: flex;
flex-direction: column;
justify-content: flex-end;
background-color: #070707;
margin: 0;
width: 100%;
height: 100%;
}
canvas {
width: 100vw;
height: 52.5vw;
}
</style>
</head>
<body>
<canvas width="320" height="168"></canvas>
<script>
let data = new Uint8Array([
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x02, 0x60,
0x00, 0x01, 0x7c, 0x60, 0x00, 0x00, 0x02, 0x09, 0x01, 0x00, 0x04, 0x72,
0x61, 0x6e, 0x64, 0x00, 0x00, 0x03, 0x03, 0x02, 0x01, 0x01, 0x05, 0x03,
0x01, 0x00, 0x05, 0x07, 0x0d, 0x02, 0x03, 0x6d, 0x65, 0x6d, 0x02, 0x00,
0x03, 0x72, 0x75, 0x6e, 0x00, 0x02, 0x08, 0x01, 0x01, 0x0a, 0xb2, 0x01,
0x02, 0x1e, 0x01, 0x01, 0x7f, 0x41, 0xc0, 0x02, 0x21, 0x00, 0x03, 0x40,
0x20, 0x00, 0x41, 0x24, 0x3a, 0x00, 0xbf, 0xa1, 0x03, 0x20, 0x00, 0x41,
0x01, 0x6b, 0x22, 0x00, 0x0d, 0x00, 0x0b, 0x0b, 0x90, 0x01, 0x01, 0x03,
0x7f, 0x03, 0x40, 0x03, 0x40, 0x20, 0x00, 0x41, 0xc0, 0x02, 0x6a, 0x22,
0x00, 0x2d, 0x00, 0x00, 0x22, 0x01, 0x04, 0x40, 0x10, 0x00, 0x44, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0xa2, 0x9e, 0xab, 0x41, 0x03,
0x71, 0x21, 0x02, 0x20, 0x00, 0x20, 0x02, 0x6b, 0x41, 0xbf, 0x02, 0x6b,
0x20, 0x01, 0x20, 0x02, 0x41, 0x01, 0x71, 0x6b, 0x3a, 0x00, 0x00, 0x05,
0x20, 0x00, 0x41, 0xc0, 0x02, 0x6b, 0x41, 0x00, 0x3a, 0x00, 0x00, 0x0b,
0x20, 0x00, 0x41, 0xc0, 0xa1, 0x03, 0x49, 0x0d, 0x00, 0x0b, 0x20, 0x00,
0x41, 0xbf, 0xa1, 0x03, 0x6b, 0x22, 0x00, 0x41, 0xc0, 0x02, 0x47, 0x0d,
0x00, 0x0b, 0x41, 0x80, 0xa4, 0x03, 0x21, 0x00, 0x03, 0x40, 0x20, 0x00,
0x41, 0x01, 0x6b, 0x21, 0x00, 0x20, 0x00, 0x41, 0x02, 0x74, 0x20, 0x00,
0x2d, 0x00, 0x00, 0x41, 0x02, 0x74, 0x28, 0x02, 0x80, 0xb4, 0x10, 0x36,
0x02, 0x80, 0xa4, 0x03, 0x20, 0x00, 0x0d, 0x00, 0x0b, 0x0b, 0x0b, 0x9d,
0x01, 0x01, 0x00, 0x41, 0x80, 0xb4, 0x10, 0x0b, 0x94, 0x01, 0x07, 0x07,
0x07, 0xff, 0x1f, 0x07, 0x07, 0xff, 0x2f, 0x0f, 0x07, 0xff, 0x47, 0x0f,
0x07, 0xff, 0x57, 0x17, 0x07, 0xff, 0x67, 0x1f, 0x07, 0xff, 0x77, 0x1f,
0x07, 0xff, 0x8f, 0x27, 0x07, 0xff, 0x9f, 0x2f, 0x07, 0xff, 0xaf, 0x3f,
0x07, 0xff, 0xbf, 0x47, 0x07, 0xff, 0xc7, 0x47, 0x07, 0xff, 0xdf, 0x4f,
0x07, 0xff, 0xdf, 0x57, 0x07, 0xff, 0xdf, 0x57, 0x07, 0xff, 0xd7, 0x5f,
0x07, 0xff, 0xd7, 0x5f, 0x07, 0xff, 0xd7, 0x67, 0x0f, 0xff, 0xcf, 0x6f,
0x0f, 0xff, 0xcf, 0x77, 0x0f, 0xff, 0xcf, 0x7f, 0x0f, 0xff, 0xcf, 0x87,
0x17, 0xff, 0xc7, 0x87, 0x17, 0xff, 0xc7, 0x8f, 0x17, 0xff, 0xc7, 0x97,
0x1f, 0xff, 0xbf, 0x9f, 0x1f, 0xff, 0xbf, 0x9f, 0x1f, 0xff, 0xbf, 0xa7,
0x27, 0xff, 0xbf, 0xa7, 0x27, 0xff, 0xbf, 0xaf, 0x2f, 0xff, 0xb7, 0xaf,
0x2f, 0xff, 0xb7, 0xb7, 0x2f, 0xff, 0xb7, 0xb7, 0x37, 0xff, 0xcf, 0xcf,
0x6f, 0xff, 0xdf, 0xdf, 0x9f, 0xff, 0xef, 0xef, 0xc7, 0xff, 0xff, 0xff,
0xff, 0xff
]);
let imports = {'' : {rand: Math.random}};
let instance = new WebAssembly.Instance(new WebAssembly.Module(data), imports);
let canvasData = new Uint8Array(instance.exports.mem.buffer, 53760, 215040);
let canvas = document.querySelector('canvas');
let context = canvas.getContext('2d');
let imageData = context.createImageData(320, 168);
let update = function() {
requestAnimationFrame(update);
instance.exports.run();
imageData.data.set(canvasData);
context.putImageData(imageData, 0, 0);
};
update();
</script>
</body>