refactor: reduce snake animation delays for snappier gameplay

Remove transitions and simplify head-pop animation to feel more
responsive at higher speed settings.
This commit is contained in:
Ryan Hamamura
2026-02-04 10:04:27 -10:00
parent e239e948ae
commit 9a3d1fd164

View File

@@ -75,15 +75,13 @@
.snake-cell {
background: #16213e;
border: 1px solid rgba(255,255,255,0.03);
transition: background 130ms ease-in-out, box-shadow 130ms ease-out;
}
.snake-cell.snake-head {
border-radius: 4px;
animation: head-pop 130ms ease-out;
animation: head-pop 50ms ease-out;
}
@keyframes head-pop {
0% { transform: scale(0.6); }
50% { transform: scale(1.08); }
0% { transform: scale(0.85); }
100% { transform: scale(1); }
}
.snake-cell.snake-food {
@@ -99,6 +97,6 @@
.snake-cell.snake-dead {
opacity: 0.35;
filter: grayscale(0.5);
transition: opacity 400ms ease-out, background 130ms ease-in-out;
transition: opacity 400ms ease-out;
}
.snake-wrapper:focus { outline: none; }