diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-08-05 18:21:48 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2018-08-05 18:24:05 +0700 |
commit | d6dfd431588624510574c2386a563af890c4adc1 (patch) | |
tree | 32d9396364ea64a3054d4b1cd8954d1726544316 /docs/index.html | |
parent | ba2aaeb1f1255737566ebcc9061a52f01a73bcce (diff) | |
download | brutalmaze-d6dfd431588624510574c2386a563af890c4adc1.tar.gz |
Add HTML5 record player and update hit-and-run client
Diffstat (limited to 'docs/index.html')
-rw-r--r-- | docs/index.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..b7f164b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<meta charset='utf-8'> +<title>Brutal Maze record player</title> +<link rel='stylesheet' type='text/css' href='style.css'> +<script src='brutalma.js'></script> + +<body> +<div id='input'> + <input id='record' type='text' name='record' value='example.json'> + <input id='button' type='button' value='Play JSON record'> +</div> +<canvas id='canvas' width='640' height='480'></canvas> +<script> + // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL v3.0 + var canvas = document.getElementById('canvas'); + resizeCanvas(canvas); + window.onresize = function() {resizeCanvas(canvas)}; + document.getElementById('record').onkeypress = function (event) { + if (event.key == 'Enter') { + playJSON(); + } + }; + document.getElementById('button').onclick = playJSON; + // @license-end +</script> +</body> +</html> |