From 9a3d1fd164762b519663a5adc4394980b4afa7e2 Mon Sep 17 00:00:00 2001 From: Ryan Hamamura <58859899+ryanhamamura@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:04:27 -1000 Subject: [PATCH] refactor: reduce snake animation delays for snappier gameplay Remove transitions and simplify head-pop animation to feel more responsive at higher speed settings. --- assets/css/input.css | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/assets/css/input.css b/assets/css/input.css index 04fc90b..af7d9e7 100644 --- a/assets/css/input.css +++ b/assets/css/input.css @@ -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; }