From 2c8df35ec7c199bb014dd42ca7d37accb0c8d2a1 Mon Sep 17 00:00:00 2001 From: pulsejet Date: Mon, 19 Oct 2020 06:49:10 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20built=20from=20=20@=202c082382?= =?UTF-8?q?59c15ea808e9009c73dbd18130756521=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 240 +++++++++++++++++++++++++++++++++++-------- js/drive.js | 20 ++++ manifest.webmanifest | 7 ++ mkxp.wasm | Bin 4962064 -> 4962064 bytes 4 files changed, 227 insertions(+), 40 deletions(-) create mode 100644 js/drive.js create mode 100644 manifest.webmanifest diff --git a/index.html b/index.html index 3304fce..86ebe30 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,10 @@ + + + MKXP @@ -18,22 +21,25 @@ height: 100%; width: 100%; } - + #canvas { padding: 0; margin: 0 auto; display: block; border: 0px none; background-color: black; - height: 100%; + height: 100%; + max-height: 100vh; + max-width: 100vw; } + #spinner { position: fixed; bottom: 40px; left: 20px; opacity: 0.5; } - .spinner { + .spinner { height: 25px; width: 25px; margin: 0px auto; @@ -47,49 +53,88 @@ border-top: 10px solid transparent; border-radius: 100%; background-color: transparent; - } - - @-webkit-keyframes rotation { + } + + @-webkit-keyframes rotation { from {-webkit-transform: rotate(0deg);} to {-webkit-transform: rotate(360deg);} - } - @-moz-keyframes rotation { + } + @-moz-keyframes rotation { from {-moz-transform: rotate(0deg);} to {-moz-transform: rotate(360deg);} - } - @-o-keyframes rotation { + } + @-o-keyframes rotation { from {-o-transform: rotate(0deg);} to {-o-transform: rotate(360deg);} - } - @keyframes rotation { + } + @keyframes rotation { from {transform: rotate(0deg);} to {transform: rotate(360deg);} - } + } - #fullscreen { + #fullscreen { position: fixed; bottom: 20px; right: 20px; opacity: 0.5; cursor: pointer; - } - #fullscreen:hover { + } + #fullscreen:hover { opacity: 1; - } - #fullscreen > svg { + } + #fullscreen > svg { height: 25px; width: 25px; - } + } - #progress { - background-color: white; - opacity: 0.6; - position: fixed; - bottom: 0; left: 0; - color: black; - padding: 3px 10px; - border-top-right-radius: 5px; - } + #progress { + background-color: white; + opacity: 0.6; + position: fixed; + bottom: 0; left: 0; + color: black; + padding: 3px 10px; + border-top-right-radius: 5px; + } + + #dpad, #apad { + position: fixed; + bottom: 0; left: 0; + height: 30vh; max-height: 30vw; + width: 30vh; max-width: 30vw; + transform: translate(55%, -5%); + } + + #apad { + right: 0; left: unset; + transform: unset; + width: 15vh; max-width: 15vw; + } + + #dpad *, #apad * { + position: absolute; + height: 15vh; max-height: 15vw; + width: 15vh; max-width: 15vw; + background-color: gray; + opacity: 0.3; + } + + #apad * { + border-radius: 50%; + } + + #d-up { transform: translateY(-100%); } + #d-left { transform: translateX(-100%); } + #d-down { transform: translateY(100%); } + #d-right { transform: translateX(100%); } + #ap-b { transform: translate(-130%, 90%); } + #ap-c { transform: translate(-15%, -25%); } + #ap-a { + height: 7vh; max-height: 7vw; + width: 7vh; max-width: 7vw; + top: 50%; + transform: translate(25%, 25%); + } @@ -98,19 +143,33 @@
Loading ...
- + + +
+
+
+
+
+
+
+ +
+
+
+
+
- - - - - - - - + + + + + + + +
diff --git a/js/drive.js b/js/drive.js new file mode 100644 index 0000000..54391c3 --- /dev/null +++ b/js/drive.js @@ -0,0 +1,20 @@ +// https://stackoverflow.com/a/9458996 +function _bytesToBase64(bytes) { + var binary = ''; + var len = bytes.byteLength; + for (var i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return window.btoa(binary); +} + +// https://stackoverflow.com/a/21797381 +function _base64ToBytes(base64) { + var binary_string = window.atob(base64); + var len = binary_string.length; + var bytes = new Uint8Array(len); + for (var i = 0; i < len; i++) { + bytes[i] = binary_string.charCodeAt(i); + } + return bytes; +} diff --git a/manifest.webmanifest b/manifest.webmanifest new file mode 100644 index 0000000..98cc8b5 --- /dev/null +++ b/manifest.webmanifest @@ -0,0 +1,7 @@ +{ + "name": "Knight Blade", + "short_name": "KN_E", + "description": "Sample RPG XP game", + "display": "fullscreen", + "scope": "/" +} diff --git a/mkxp.wasm b/mkxp.wasm index 1983f76638a1d4ee2ece38c743a05b1ca54baddf..a49c9289b3f756cefc9a1fe8c22d59e9ebf351c5 100755 GIT binary patch delta 357 zcmWN=xk>|37=TgkjAjxuuF)HJja%GejQbKbPG)j{+ON+Ehn?$5tIzIJV z)_zgX{(DvzT$MB_$1a=i8+{viP(SLlW=c67^RIIHDWnpw-q)o$%j;|BqM|<3dBu2l zI%?7d9r0^<{TmKiG22yPPd!$Pno)MLi{0#DFZG7r4kJE^~#eT;n>^+~6j+n4!mQ?r@iT+~)xgdBkJCT0Ds-{sENUqu2ld delta 357 zcmWN=xk>|37=TgkjAjxuuF)HJja%Fjjr$TcPG)j{+ON+Ehn?$5tIzIJV z)_ztm{(DvzT$MB_$1a=i8+{viP(SLlW=c67^RIIHDWsCG-q)o$%j;|BqM|<3dBu2l zI%?7d9r0^<{TmLdnC+^tXFXPnno)MLi{0#DFZG7r4kJE^~#eT;n>^+~6j+n4!mQ?r@iT+~)xgdBkJCT0Ds-{sENKqu2ld