Skip to content

Commit

Permalink
fix: game aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
Selvio committed Nov 26, 2024
1 parent 5bc2a45 commit 2a87992
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/DoomCanvas/DoomCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ const DoomCanvas: React.FC = () => {

return (
<>
<Card className="h-[40rem] relative">
<Card className="relative">
<canvas
id="canvas"
ref={canvasRef}
className={cx("w-full h-full", { "opacity-0": isLoading || isError })}
className={cx("w-full", { "opacity-0": isLoading || isError })}
style={{ aspectRatio: "1028/805" }}
/>
{(isLoading || isError) && (
<div className="absolute inset-0 flex items-center justify-center text-yellow-400 text-4xl text-center px-4 w-4/5 mx-auto">
Expand Down
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
height: 19px;
transform-origin: right center;
transform: rotate(0deg);
transition: 0.3s;
}

.speedometer-tick::before {
Expand Down

0 comments on commit 2a87992

Please sign in to comment.