Skip to content

Commit

Permalink
fix: made redbull vibrate
Browse files Browse the repository at this point in the history
  • Loading branch information
Shibi Suriya committed Oct 2, 2023
1 parent a23b5b2 commit e6d8c4e
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions packages/game-client/src/grid.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
}

.food.redbull {
-webkit-animation: vibrate 0.3s linear infinite both;
animation: vibrate 0.3s linear infinite both;
background-color: blue;
}

Expand Down Expand Up @@ -93,3 +95,56 @@
transform: scale(1);
}
}

@-webkit-keyframes vibrate {
0% {
-webkit-transform: translate(0);
transform: translate(0);
}
20% {
-webkit-transform: translate(-1px, 1px);
transform: translate(-1px, 1px);
}
40% {
-webkit-transform: translate(-1px, -1px);
transform: translate(-1px, -1px);
}
60% {
-webkit-transform: translate(1px, 1px);
transform: translate(1px, 1px);
}
80% {
-webkit-transform: translate(1px, -1px);
transform: translate(1px, -1px);
}
100% {
-webkit-transform: translate(0);
transform: translate(0);
}
}
@keyframes vibrate {
0% {
-webkit-transform: translate(0);
transform: translate(0);
}
20% {
-webkit-transform: translate(-2px, 2px);
transform: translate(-2px, 2px);
}
40% {
-webkit-transform: translate(-2px, -2px);
transform: translate(-2px, -2px);
}
60% {
-webkit-transform: translate(2px, 2px);
transform: translate(2px, 2px);
}
80% {
-webkit-transform: translate(2px, -2px);
transform: translate(2px, -2px);
}
100% {
-webkit-transform: translate(0);
transform: translate(0);
}
}

0 comments on commit e6d8c4e

Please sign in to comment.