From 92bd1193cc0749be5e05e7072a38a9636bbcedbf Mon Sep 17 00:00:00 2001 From: William Toohey Date: Mon, 25 May 2015 23:21:37 +1000 Subject: [PATCH] Canvas is the way to go - rename to main index --- index.html | 394 ++++++++++++++++++---------------------------- index_canvas.html | 346 ---------------------------------------- style.css | 95 +++++++---- style_canvas.css | 103 ------------ 4 files changed, 215 insertions(+), 723 deletions(-) delete mode 100644 index_canvas.html delete mode 100644 style_canvas.css diff --git a/index.html b/index.html index 73e240f..1e77106 100644 --- a/index.html +++ b/index.html @@ -4,15 +4,12 @@ TODO: Clean up the damn code if you're not mon, don't read any further, it's pretty bad JS - - Performance in chrome - Loading screen + Volume controls Prettier ui Song shuffle - Image pause - Fine tune blur - Keyboard shortcuts + Image pause / manual advance + Keep arraybuffer in mem, load AudioBuffer as needed? Different colour palettes External respacks Change short blackout to beat length / 1.7 @@ -23,93 +20,77 @@ 0x40 - - - - - - - - - - + + - +
+ 0x00 +
+
.xoxoxoxoxoxo
+
stop play @@ -419,14 +339,8 @@
B=0x0000
T=0x0000
-
-
+
white
- -
- -
-
\ No newline at end of file diff --git a/index_canvas.html b/index_canvas.html deleted file mode 100644 index 170ee89..0000000 --- a/index_canvas.html +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - 0x40 - - - - - - - - -
- 0x00 -
-
.xoxoxoxoxoxo
- -
- stop - play - prev - next -
B=0x0000
-
T=0x0000
-
-
-
white
-
- - \ No newline at end of file diff --git a/style.css b/style.css index 66ba8c3..678a699 100644 --- a/style.css +++ b/style.css @@ -1,41 +1,49 @@ +html, body { + height: 100%; + margin: 0; padding: 0; +} + body { background-color:#ffffff; } -#waifu { - width: 100%; - height: 100%; +#controls { + font-family: monospace; + background-color:#ffffff; position: absolute; - top: 0; - left: 0; - z-index: -10; - - opacity: 0; - - #-webkit-transform: scale(3); - #transform: scale(3); - #-webkit-transform-origin: top left; - #transform-origin: top left; + bottom: 0px; + left: 50%; + transform: translate(-50%, 0); + z-index: 3; } -#waifu.loaded { - animation-name: fadein; - animation-duration: 1s; - opacity: 1; +#beets { + font-family: monospace; + background-color:#ffffff; + position: absolute; + top: 0px; + left: 50%; + transform: translate(-50%, 0); + z-index: 3; } -.waifuImg { - background-repeat: no-repeat; - background-position: center center; - -webkit-background-size: cover; - background-size: cover; - width: 100%; +#waifu { + display: block; height: 100%; - display: none; + #margin-left: auto; + #margin-right: auto; + padding: 0; + + z-index: -10; + opacity: 0; } -.waifuImg.active { - display: block; +#waifu.loaded { + opacity: 1; + animation-name: fadein; + animation-duration: 0.5s; + -webkit-animation-name: fadein; + -webkit-animation-duration: 0.5s; } #waifuColour { @@ -46,31 +54,50 @@ body { position: absolute; top: 0; left: 0; - z-index: -5; + z-index: 1; } #blackout { background-color: #000; display: none; + pointer-events:none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; - z-index: 1; + z-index: 2; } -#controls { +#preloader { + background-color: #FFF; + width: 100%; + height: 100%; + display:flex; + justify-content:center; + align-items:center; font-family: monospace; - background-color:#ffffff; - width:800px; + font-size: 30pt; + position: absolute; - top: 10px; - left: 10px; - z-index: 2; + top: 0; + left: 0; + z-index: 10; +} + +#preloader.loaded { + opacity: 0; + animation-name: fadeout; + animation-duration: 3s; + -webkit-animation-name: fadeout; + -webkit-animation-duration: 3s; } @keyframes fadein { from {opacity: 0;} to {opacity: 1;} +} +@keyframes fadeout { + from {opacity: 1;} + to {opacity: 0;} } \ No newline at end of file diff --git a/style_canvas.css b/style_canvas.css deleted file mode 100644 index 678a699..0000000 --- a/style_canvas.css +++ /dev/null @@ -1,103 +0,0 @@ -html, body { - height: 100%; - margin: 0; padding: 0; -} - -body { - background-color:#ffffff; -} - -#controls { - font-family: monospace; - background-color:#ffffff; - position: absolute; - bottom: 0px; - left: 50%; - transform: translate(-50%, 0); - z-index: 3; -} - -#beets { - font-family: monospace; - background-color:#ffffff; - position: absolute; - top: 0px; - left: 50%; - transform: translate(-50%, 0); - z-index: 3; -} - -#waifu { - display: block; - height: 100%; - #margin-left: auto; - #margin-right: auto; - padding: 0; - - z-index: -10; - opacity: 0; -} - -#waifu.loaded { - opacity: 1; - animation-name: fadein; - animation-duration: 0.5s; - -webkit-animation-name: fadein; - -webkit-animation-duration: 0.5s; -} - -#waifuColour { - opacity: 0.7; - mix-blend-mode: hard-light; - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 1; -} - -#blackout { - background-color: #000; - display: none; - pointer-events:none; - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; - z-index: 2; -} - -#preloader { - background-color: #FFF; - width: 100%; - height: 100%; - display:flex; - justify-content:center; - align-items:center; - font-family: monospace; - font-size: 30pt; - - position: absolute; - top: 0; - left: 0; - z-index: 10; -} - -#preloader.loaded { - opacity: 0; - animation-name: fadeout; - animation-duration: 3s; - -webkit-animation-name: fadeout; - -webkit-animation-duration: 3s; -} - -@keyframes fadein { - from {opacity: 0;} - to {opacity: 1;} -} -@keyframes fadeout { - from {opacity: 1;} - to {opacity: 0;} -} \ No newline at end of file