Select Git revision
index.html 663 B
<style>
body{
margin:0;
background: #1a1a1a;
}
#c {
position:fixed;top:50%;left:50%;translate:-50% -50%;
image-rendering: pixelated;
}
</style>
<canvas id="c"></canvas>
<script src="./main.js"></script>
<script>
fl = Math.floor;
a = c.getContext`2d`;
u = _=>{
w = innerWidth;
h = innerHeight;
wS = fl(w/256);
hS = fl(h/256);
s=Math.min(wS,hS);
c.width = 256*s;
c.height= 240*s;
canvas.pixelRatio = s;
canvas.setScale(canvas.scale);
a.imageSmoothingEnabled = false;
}
u();addEventListener('resize', u, !0);
</script>