summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/index.html b/index.html
index ee6d5d5..f33ed44 100644
--- a/index.html
+++ b/index.html
@@ -21,11 +21,24 @@
<script>
const game = {
+ running: true,
+ lastTimeStamp: performance.now(),
+ controls: JSON.parse(
+ localStorage.getItem("controls") || JSON.stringify({
+ left: "ArrowLeft",
+ right: "ArrowRight",
+ up: "ArrowUp",
+ down: "ArrowDown",
+ undo: "z",
+ reset: "r",
+ })
+ ),
+ level: 0,
canvas: {
width: document.getElementById('game-canvas').width,
height: document.getElementById('game-canvas').height,
context: document.getElementById('game-canvas').getContext("2d"),
- }
+ },
};
</script>