hud-gamepad
Version:
A Heads Up Display (HUD) for Gamepads, Keyboards, and more
46 lines (40 loc) • 691 B
CSS
@import url('https://fonts.cdnfonts.com/css/superhelio');
* {
padding: 0;
margin: 0;
-webkit-touch-callout: none;
-webkit-user-select: none;
}
html {
-ms-touch-action: manipulation;
touch-action: manipulation;
}
body {
width: 100dvw;
height: 100dvh;
margin: 0px;
padding: 0px;
touch-action: none;
-ms-touch-action: none;
overflow: hidden;
}
canvas {
image-rendering: pixelated;
position: fixed;
width: 100%;
height: 100%;
touch-action: none;
}
.HudGamePadObserver {
display: flex;
position: fixed;
left: -1000rem;
top: -1000rem;
width: 10px;
height: 10px;
}
@media (any-pointer: coarse) {
.HudGamePadObserver {
display: none;
}
}