Init commit

This commit is contained in:
asraelite 2018-03-01 23:38:22 +00:00
commit 0c5ad88981
8 changed files with 62 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.cache/
dist/

16
index.html Normal file
View file

@ -0,0 +1,16 @@
<!doctype html>
<html>
<head>
<script src="js/index.mjs"></script>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div id="container">
<canvas id="main"></canvas>
<canvas id="temp"></canvas>
</div>
</body>
</html>

16
js/game.mjs Normal file
View file

@ -0,0 +1,16 @@
const game = {
state: {
room: 'menu',
paused: false
}
};
export function init() {
game.state.room = 'menu';
}
function tick() {
requestAnimationFrame(tick);
}

View file

0
js/graphics/gui.mjs Normal file
View file

0
js/graphics/index.mjs Normal file
View file

3
js/index.mjs Normal file
View file

@ -0,0 +1,3 @@
import { init } from './game.mjs';
window.addEventListener('load', init);

25
styles.css Normal file
View file

@ -0,0 +1,25 @@
body {
margin: 0;
overflow: hidden;
background-color: #222;
}
#container {
height: 100vh;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#main {
width: 600px;
height: 600px;
margin: 50px auto;
border: 2px solid #111;
background-color: #fff;
}
#temp {
display: none;
}