Skip to content
Snippets Groups Projects
Commit 6a516a1e authored by Bye's avatar Bye
Browse files

Fix resizing issue.

parent 93eb096f
Branches
No related tags found
No related merge requests found
...@@ -10,20 +10,3 @@ ...@@ -10,20 +10,3 @@
</style> </style>
<canvas id="c"></canvas> <canvas id="c"></canvas>
<script src="./main.js"></script> <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>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment