3D working

This commit is contained in:
Kbz-8
2024-02-22 06:01:56 +01:00
committed by AdrienLSH
parent b6936751b1
commit 668ab9ff2e
13 changed files with 106 additions and 52 deletions

View File

@ -145,6 +145,11 @@ export default class extends AbstractView
});
}
toggle3D()
{
window.location.replace(location.href.substring(0, location.href.lastIndexOf('/')) + "/1");
}
async postInit()
{
let error_code = await this.game.init();
@ -154,6 +159,7 @@ export default class extends AbstractView
await this.update_game_state();
this.display_players_list();
document.getElementById("game-mode").onclick = this.toggle3D;
}
async leavePage()
@ -171,6 +177,7 @@ export default class extends AbstractView
return /* HTML */ `
<link rel="stylesheet" href="/static/css/game.css">
<h2 id="game-state"></h2>
<input type="button" value="3D" id="game-mode">
<table>
<thead>