Compare commits

...

4 Commits

Author SHA1 Message Date
04f6eaf5dc fix action timout on key up 2023-12-23 03:02:47 +01:00
d56a8a6b06 stripe line clear animation 2023-12-23 03:02:17 +01:00
e1992f4c1e rgba 2023-12-23 03:02:01 +01:00
27d7a0689d rgba 2023-12-23 03:01:43 +01:00
3 changed files with 32 additions and 8 deletions

View File

@ -12,17 +12,17 @@ body {
}
.modal-content {
background-color: rgba(33, 37, 41, 30%);
background-color: #2125294d;
backdrop-filter: blur(15px);
}
}
.card {
background-color: rgb(37, 41, 45);
background-color: #25292d;
}
#matrixCard {
background: radial-gradient(#222, rgb(37, 41, 45))
background: radial-gradient(#222, #25292d)
}
.card-header {
@ -79,7 +79,7 @@ td {
@keyframes trail-animation {
from {
background-color: rgb(206, 255, 255, 25%);
background-color: #ceffff40;
filter: saturate(50%) brightness(300%);
}
to {
@ -93,7 +93,7 @@ td.trail-animation {
@keyframes cleared-line-animation {
from {
background-color: rgb(206, 255, 255, 40%);
background-color: #ceffff66;
filter: saturate(50%) brightness(300%);
box-shadow: -200px 0 5px white, 200px 0 5px white;
}
@ -124,8 +124,8 @@ tr.cleared-line-animation {
top: 5%;
left: 50%;
transform: translate(-50%, 0);
color: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px rgba(0, 0, 0, 0.8);
color: #fffc;
text-shadow: 1px 1px #000c;
font-size: 3vmin;
text-align: center;
}

View File

@ -92,4 +92,28 @@ tr.matrix td:not(.mino) {
.locked.mino {
animation: locked-animation;
animation-duration: 0.2s;
}
tr.cleared-line-animation {
animation: none;
}
tr.cleared-line-animation::after {
content: "";
width: 100%;
height: var(--cell-side);
position: fixed;
left: 50%;
transform: translateX(-50%);
display: block;
background: repeating-linear-gradient(transparent, #fffb 1px);
opacity: 0;
animation: cleared-line-animation ease-out .3s;
}
@keyframes cleared-line-animation {
25% {
width: 200%;
opacity: 100%;
}
}

View File

@ -206,7 +206,7 @@ function onkeyup(event) {
scheduler.clearTimeout(repeat)
scheduler.clearInterval(autorepeat)
if (actionsQueue.length) {
if (action == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20)
if (actionsQueue[0] == playerActions.softDrop) scheduler.setInterval(autorepeat, settings.fallPeriod/20)
else scheduler.setTimeout(repeat, settings.das)
} else {
matrix.drawPiece()