From 68222f55d0b3872ba5efe63cada3ee2e0b9d68c8 Mon Sep 17 00:00:00 2001 From: makc Date: Tue, 3 Mar 2020 16:26:00 +0100 Subject: [PATCH] backport multiplayer --- public/assets/models/hero-2.png | Bin 0 -> 161 bytes public/assets/models/hero-3.png | Bin 0 -> 161 bytes public/assets/models/hero-4.png | Bin 0 -> 160 bytes public/assets/redo-alt-solid.svg | 1 + public/index.html | 167 ++++++++++++++--------------- public/js/AssetManager.js | 177 ++++++++++++++++++++++++++++--- public/js/Optimizer.js | 25 +---- public/js/SocketIO.js | 33 +++++- public/js/Utils.js | 54 ++++++++++ public/js/atlas.js | 65 +----------- public/js/charaAnim.js | 96 +++++++++++++++-- public/js/gameState.js | 11 ++ public/js/init.js | 70 +++++++++--- public/js/input.js | 3 - public/js/loop.js | 3 +- public/js/main.js | 6 +- 16 files changed, 491 insertions(+), 220 deletions(-) create mode 100644 public/assets/models/hero-2.png create mode 100644 public/assets/models/hero-3.png create mode 100644 public/assets/models/hero-4.png create mode 100644 public/assets/redo-alt-solid.svg diff --git a/public/assets/models/hero-2.png b/public/assets/models/hero-2.png new file mode 100644 index 0000000000000000000000000000000000000000..50205326586f5ae115541ab2e11257f9b5acf6d9 GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0J3?w7mbKU|exd5LK*WB~p{{Q;=_SwDv=T{zC zT(YxR^tmKQiUm-b;s5{tCAMc?09kgPE{-7{$CCq^m{XH2X2kKaFXnO+<*{Nl=44=V zv=H!aZkCiSFj$oka&SSg02jNWUV%X)BcGdSkCsFZ7elqGW%Hh>6MY~}MiUm-b;s5{t)-v9lK$e}Si(`n#@#KIe=G0`18F75 \ No newline at end of file diff --git a/public/index.html b/public/index.html index d071220..d378208 100644 --- a/public/index.html +++ b/public/index.html @@ -124,6 +124,7 @@ #title-image-container { text-align: center; + margin-top: auto; margin-bottom: 20px; } @@ -137,37 +138,59 @@ justify-content: space-evenly; } - @media screen and (max-width: 620px) { - - #menu-element { - flex-direction: column; - } + #menu-element > div { + display: flex; + flex-direction: column; + } - #menu-element>div { - left: 50%; - transform: translateX( -50% ); - } + .input { + width: 250px; + border: 1px solid #111; + border-radius: 4px; + margin-bottom: 30px; + white-space: nowrap; + } + + .input input, .input button { + border: none; + } + .input button { + height: 24px; + background-color: transparent; + background-image: url(assets/redo-alt-solid.svg); + background-size: auto 75%; + background-repeat: no-repeat; + background-position: 35% 60%; + outline: none !important; + cursor: pointer; + } + .input input { + height: 28px; + width: 200px; + font-size: 20px; + border-right: 1px solid #111; + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + margin: 0 1px; padding: 2px 0 0 5px; + } + + #credits { + text-align: center; + margin-top: auto; + display: flex; + flex-direction: row; + justify-content: space-evenly; + } - #credits { - margin-top: 20px; - } + /* show the credits as long as we can, but if we cant - just dont: */ + @media screen and ( max-height: 400px ) { + #credits { display: none; } } - .menu-subelement { - position: relative; - display: flex; - flex-direction: column; - justify-content: space-evenly; - padding: 15px 10px 15px 10px; - text-align: center; - background-color: white; - max-width: 220px; - border-radius: 4px; - border-width: 1px; - border-style: solid; - border-color: #111111 - } + #credits > div:first-child { + max-width: 250px; + } .section-title { font-size: 1.3em; @@ -197,29 +220,6 @@ width: 0; } - #creator { - text-align: center; - } - - .musician { - display: flex; - flex-direction: row; - justify-content: space-between; - margin: 2px; - } - - .about-button { - background-color: #f2f6f9; - text-decoration: none; - color: black; - padding: 3px; - margin-left: 5px; - border-style: solid; - border-width: 1px; - border-radius: 4px; - font-size: 0.7em; - } - @@ -695,10 +695,6 @@ - - - - @@ -799,11 +795,19 @@