Add basic background rendering
This commit is contained in:
parent
0c5ad88981
commit
fc8d282509
10 changed files with 156 additions and 8 deletions
21
js/game.mjs
21
js/game.mjs
|
@ -1,16 +1,21 @@
|
|||
import * as graphics from './graphics/index.mjs';
|
||||
|
||||
|
||||
const game = {
|
||||
state: {
|
||||
room: 'menu',
|
||||
paused: false
|
||||
}
|
||||
};
|
||||
export let game;
|
||||
|
||||
export function init() {
|
||||
game.state.room = 'menu';
|
||||
game = {
|
||||
state: {
|
||||
room: 'menu',
|
||||
paused: false
|
||||
}
|
||||
};
|
||||
|
||||
graphics.init();
|
||||
|
||||
tick();
|
||||
}
|
||||
|
||||
function tick() {
|
||||
graphics.render();
|
||||
requestAnimationFrame(tick);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue