From 3d1f1ee587299352d031bb1d87cbb63a63212420 Mon Sep 17 00:00:00 2001 From: sergystepanov Date: Mon, 4 Nov 2019 21:44:19 +0300 Subject: [PATCH] Initial new frontend rewrite (#129) * Initial new frontend rewrite * Refactor some module deps * Fix options ref in the ajax module * Refactor * Add controller state * Refactor --- web/css/main.css | 4 + web/game.html | 28 +- web/js/controller.js | 545 ++++++++++++++++++--------------- web/js/env.js | 137 +++++++++ web/js/event/event.js | 80 +++++ web/js/gameList.js | 111 +++++++ web/js/gesture_joystick.js | 141 --------- web/js/gesture_keyboard.js | 40 --- web/js/gesture_touch.js | 286 ----------------- web/js/global.js | 68 ---- web/js/init.js | 48 +-- web/js/input/input.js | 75 +++++ web/js/input/joystick.js | 200 ++++++++++++ web/js/input/keyboard.js | 40 +++ web/js/input/keys.js | 20 ++ web/js/input/touch.js | 250 +++++++++++++++ web/js/jquery-3.3.1.min.js | 2 - web/js/lib/jquery-3.4.1.min.js | 2 + web/js/libopus.js | 31 -- web/js/log.js | 21 ++ web/js/network/ajax.js | 29 ++ web/js/network/rtcp.js | 125 ++++++++ web/js/network/socket.js | 98 ++++++ web/js/opus.js | 200 ------------ web/js/room.js | 69 +++++ web/js/utils.js | 124 -------- web/js/ws.js | 313 ------------------- 27 files changed, 1591 insertions(+), 1496 deletions(-) create mode 100644 web/js/env.js create mode 100644 web/js/event/event.js create mode 100644 web/js/gameList.js delete mode 100644 web/js/gesture_joystick.js delete mode 100644 web/js/gesture_keyboard.js delete mode 100644 web/js/gesture_touch.js delete mode 100644 web/js/global.js create mode 100644 web/js/input/input.js create mode 100644 web/js/input/joystick.js create mode 100644 web/js/input/keyboard.js create mode 100644 web/js/input/keys.js create mode 100644 web/js/input/touch.js delete mode 100644 web/js/jquery-3.3.1.min.js create mode 100644 web/js/lib/jquery-3.4.1.min.js delete mode 100644 web/js/libopus.js create mode 100644 web/js/log.js create mode 100644 web/js/network/ajax.js create mode 100644 web/js/network/rtcp.js create mode 100644 web/js/network/socket.js delete mode 100644 web/js/opus.js create mode 100644 web/js/room.js delete mode 100644 web/js/utils.js delete mode 100644 web/js/ws.js diff --git a/web/css/main.css b/web/css/main.css index 863fde0a..95e8faea 100644 --- a/web/css/main.css +++ b/web/css/main.css @@ -389,6 +389,10 @@ body { background-color: #333 !important; } +#bottom-screen { + /* popups under the screen fix */ + z-index: -1; +} #game-screen { overflow: hidden; diff --git a/web/game.html b/web/game.html index c6e8abf9..1b76b7b6 100644 --- a/web/game.html +++ b/web/game.html @@ -85,21 +85,25 @@ STUNTURN = {{.STUNTURN}}; - - + - - - + + + + + + + + + + + + + + - - - - - - + -