Added resolution parameter to config.

This commit is contained in:
Rezmason
2020-11-22 23:53:16 -08:00
parent e214dc2e44
commit d094f7e0b7
3 changed files with 7 additions and 3 deletions

View File

@@ -33,11 +33,12 @@ const effects = {
};
const config = makeConfig(window.location.search);
const resolution = config.resolution;
const effect = config.effect in effects ? config.effect : "plain";
const resize = () => {
canvas.width = canvas.clientWidth;
canvas.height = canvas.clientHeight;
canvas.width = Math.ceil(canvas.clientWidth * resolution);
canvas.height = Math.ceil(canvas.clientHeight * resolution);
};
window.onresize = resize;
resize();