styles and stuff

This commit is contained in:
Reppard 2022-02-08 21:03:10 -05:00
parent 72767c1ca5
commit c6aab77f3e

View File

@ -3,7 +3,10 @@
<div class="simeon-wrapper"> <div class="simeon-wrapper">
<div class="overlay"> <div class="overlay">
<div class="start"> <div class="start">
<div class="score"> <div class="score" :style="{
color: colors[score % 4],
'text-shadow': '2px 2px 8px '+ colors[score % 4]
}">
{{score}} {{score}}
</div> </div>
@ -13,7 +16,7 @@
</div> </div>
<div class="reset"> <div class="reset">
<button @click="reset()"> <button :disabled="!started" @click="reset()">
RESET RESET
</button> </button>
</div> </div>
@ -77,6 +80,7 @@ export default {
data() { data() {
return { return {
colors: ["green", "red", "blue", "yellow"],
started: false, started: false,
audioContext: null, audioContext: null,
oscMain: null, oscMain: null,
@ -93,22 +97,22 @@ export default {
spaces: [ spaces: [
{ {
key: "Q", key: "Q",
tone: 196.00, tone: 220.00,
klass: 'piece-t-l' klass: 'piece-t-l'
}, },
{ {
key: "W", key: "W",
tone: 220.00, tone: 261.63,
klass: 'piece-t-r' klass: 'piece-t-r'
}, },
{ {
key: "A", key: "A",
tone: 261.63, tone: 293.66,
klass: 'piece-b-l' klass: 'piece-b-l'
}, },
{ {
key: "S", key: "S",
tone: 293.66, tone: 329.63,
klass: 'piece-b-r' klass: 'piece-b-r'
}, },
] ]
@ -164,6 +168,7 @@ export default {
checkInput(i) { checkInput(i) {
if(!this.playing) { if(!this.playing) {
this.blink = i
if(this.check.length < this.pattern.length) { if(this.check.length < this.pattern.length) {
this.playOSC(this.spaces[i].tone) this.playOSC(this.spaces[i].tone)
this.check.push(i) this.check.push(i)
@ -171,6 +176,7 @@ export default {
for(let i = 0; i < this.check.length; i++) { for(let i = 0; i < this.check.length; i++) {
if(this.check[i] != this.pattern[i]) { if(this.check[i] != this.pattern[i]) {
this.blink = null
this.fail = true this.fail = true
} }
} }
@ -187,11 +193,13 @@ export default {
this.fail = false this.fail = false
},200) },200)
this.blink = null
this.check = [] this.check = []
this.addToPattern() this.addToPattern()
this.playPattern() this.playPattern()
},200) },200)
} }
} }
}, },
@ -243,19 +251,30 @@ export default {
</script> </script>
<style> <style>
@font-face {
font-family: 'digital';
src: url('~@/assets/font/DIGITALDREAM.ttf');
}
html, body{ html, body{
overflow: hidden;
font-family: 'digital';
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0; padding: 0;
margin: 0; margin: 0;
background: black; background: black;
} }
body {
position: relative;
}
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
text-align: center; text-align: center;
color: #2c3e50;
} }
.simeon-wrapper { .simeon-wrapper {
@ -284,10 +303,13 @@ html, body{
grid-template-columns: 50% 50%; grid-template-columns: 50% 50%;
width: 75%; width: 75%;
height: 75%; height: 75%;
padding: 12px;
background: linear-gradient(to bottom, #3f3f3f, #0f0f0f);
border-radius: 100%;
} }
.overlay { .overlay {
background: #585858; background: linear-gradient(to bottom, #5b5b5b, #191919);
border-radius: 100%; border-radius: 100%;
width: 30%; width: 30%;
height: 30%; height: 30%;
@ -295,23 +317,25 @@ html, body{
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
border: 16px solid black; padding: 6px;
box-shadow: 1px 1px 6px 0px black;
transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
} }
.score { .score {
background: black; background: black;
border-radius: 6px; border-radius: 6px;
color: #fd0010; border-top: 2px solid #262626;
/*color: #fd0010;*/
width: 50%; width: 50%;
height: 32px; height: 32px;
font-size: 18px; font-size: 22px;
font-family: Courier New;
line-height: 32px; line-height: 32px;
margin: 0; margin: 0;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
/*text-shadow: 2px 2px 8px #fd0010;*/
transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
} }
@ -323,8 +347,7 @@ html, body{
display: grid; display: grid;
width: 100%; width: 100%;
height: 100%; height: 100%;
border: 8px solid black; box-shadow: 1px -1px 11px -1px black, inset -12px -9px 20px 2px #000000a6;
box-shadow: inset -12px -9px 20px 2px #000000a6; /*inset 9px 4px 6px 2px white*/
} }
@ -371,27 +394,33 @@ html, body{
} }
.start button, .reset button { .start button, .reset button {
font-family: 'digital';
outline: none; outline: none;
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
font-family: monospace;
height: 100%; height: 100%;
background: linear-gradient(45deg, black, transparent); background: linear-gradient(45deg, black, transparent);
text-shadow: 0px 0px 12px black; text-shadow: -1px -1px 0px #838383;
color: silver; color: black;
width: 100%; width: 100%;
} }
.start button { .start button {
border-radius: 100px 100px 0 0; border-radius: 100px 100px 0 0;
border: 2px solid #262626;
border-bottom: 1px solid #262626;
} }
.start button:disabled { .start button:disabled {
color: black; color: #838383;
font-weight: normal;
text-shadow: -1px -1px 0px black;
} }
.reset button { .reset button {
border-radius: 0 0 100px 100px; border-radius: 0 0 100px 100px;
border: 2px solid #262626;
border-top: 1px solid #262626;
} }
.fail { .fail {
@ -400,31 +429,20 @@ html, body{
.success { .success {
/*background: #12cb56;*/ /*background: #12cb56;*/
background: White; background: #ffffffba;
} }
.level { .key {
font-size: 32px; text-shadow: 0 0 5px black;
font-family: Courier;
font-weight: bold;
width: 100%;
color: #f1c200;
box-sizing: border-box;
text-align: center;
position: absolute;
bottom: 0;
left: 0;
padding: 16px;
} }
@media (max-width:640px) { @media (max-width:640px) {
.simeon-wrapper { .simeon-wrapper {
max-width: 100%; max-width: 100%;
} }
.simeon-game-board { .simeon-game-board {
width: 100%; width: 90%;
height: 100%; height: 90%;
} }
.start button, .reset button { .start button, .reset button {
font-size: 14px; font-size: 14px;