diff --git a/frontend/static/css/game.css b/frontend/static/css/game.css index daf5c35..2435b4d 100644 --- a/frontend/static/css/game.css +++ b/frontend/static/css/game.css @@ -4,4 +4,4 @@ display: block; margin-left: auto; margin-right: auto; -} \ No newline at end of file +} diff --git a/frontend/static/js/api/Matchmaking.js b/frontend/static/js/api/Matchmaking.js index fcf7fe6..e11daa7 100644 --- a/frontend/static/js/api/Matchmaking.js +++ b/frontend/static/js/api/Matchmaking.js @@ -13,7 +13,7 @@ class MatchMaking this.client = client; this.searching = false; } - + /** * * @param {CallableFunction} receive_func @@ -43,7 +43,6 @@ class MatchMaking this._socket.onclose = this.onclose.bind(this); } - onclose(event) { this.stop(); diff --git a/frontend/static/js/views/Dashboard.js b/frontend/static/js/views/Dashboard.js index 0eba692..a7c0e87 100644 --- a/frontend/static/js/views/Dashboard.js +++ b/frontend/static/js/views/Dashboard.js @@ -9,9 +9,10 @@ export default class extends AbstractView { return `

Welcome back, Dom

- Fugiat voluptate et nisi Lorem cillum anim sit do eiusmod occaecat irure do. Reprehenderit anim fugiat sint exercitation consequat. Sit anim laborum sit amet Lorem adipisicing ullamco duis. Anim in do magna ea pariatur et. + Akel is a game engine designed to be easy to use. The purpose of the project is learning about game engine development, discovering new rendering processes and learning to use new tools. It is mainly coded on and for Linux but is cross-platform and has been tested on Windows and MacOS.

+ Akel Engine. View recent posts.

`; diff --git a/frontend/static/js/views/GameView3D.js b/frontend/static/js/views/GameView3D.js index 42c3aa7..a73ee69 100644 --- a/frontend/static/js/views/GameView3D.js +++ b/frontend/static/js/views/GameView3D.js @@ -6,7 +6,6 @@ import { initBuffers } from "../3D/buffers.js" import "../3D/maths/gl-matrix-min.js" import { MyPlayer } from "../api/game/MyPlayer.js"; import { lang } from "../index.js"; -import { navigateTo } from "../index.js"; export default class extends AbstractView { @@ -26,14 +25,14 @@ export default class extends AbstractView keyReleaseHandler(event) { - const idx = this.keys_pressed.indexOf(event.key); - if (idx != -1) + let idx = this.keys_pressed.indexOf(event.key); + if(idx != -1) this.keys_pressed.splice(idx, 1); } - keyPressHandler(event) - { - if (!this.keys_pressed.includes(event.key)) + keyPressHandler(event) + { + if(!this.keys_pressed.includes(event.key)) this.keys_pressed.push(event.key); } @@ -51,28 +50,28 @@ export default class extends AbstractView this.shader_prog = initShaderProgram(this.gl); this.buffers = initBuffers(this.gl); - //this.gl.enable(this.gl.CULL_FACE); - //this.gl.cullFace(this.gl.BACK); + this.gl.enable(this.gl.CULL_FACE); + this.gl.cullFace(this.gl.BACK); } - update_goal(data) - { - document.getElementById(`goal-${data.player}`).innerText = data.nb_goal; - } + update_goal(data) + { + document.getElementById(`goal-${data.player}`).innerText = data.nb_goal; + } - register_key() - { + register_key() + { this.keyPressHandler = this.keyPressHandler.bind(this); this.keyReleaseHandler = this.keyReleaseHandler.bind(this); - document.addEventListener('keydown', this.keyPressHandler); + document.addEventListener('keydown', this.keyPressHandler); document.addEventListener('keyup', this.keyReleaseHandler); - } + } - unregister_key() - { - document.removeEventListener('keydown', this.keyPressHandler); + unregister_key() + { + document.removeEventListener('keydown', this.keyPressHandler); document.removeEventListener('keyup', this.keyReleaseHandler); - } + } async join_game() {