change scaling to not fully use division

This commit is contained in:
biglyderv 2025-05-21 14:47:05 -04:00
parent 58779f7f86
commit e1032902ac
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5

View file

@ -33,7 +33,7 @@ function Canvas(width, height, upscale) {
that.pageY = e.touches[0].pageY;
}
function unclicker(e) {
function unclicker(e) {
that.clicked = false;
that.firstX = this.pageX;
@ -67,7 +67,7 @@ function Canvas(width, height, upscale) {
this.elem.addEventListener('mouseup', unclicker);
this.elem.addEventListener('touchend',unclicker);
this.elem.addEventListener('touchend', unclicker);
this.clicked = false;
@ -228,7 +228,7 @@ Canvas.prototype.click = function () {
this.firstY = this.pageY;
}
var canvas = new Canvas(Math.floor(window.innerWidth / 4.5), Math.floor(window.innerHeight / 7.5), 4);
var canvas = new Canvas(Math.floor(window.innerWidth / 4), Math.floor(window.innerHeight / 4) - 100, 4);
var handler = new TickHandler(canvas);
setInterval(() => {