diff --git a/public_html/js/input.js b/public_html/js/input.js index e841198..1c7297b 100644 --- a/public_html/js/input.js +++ b/public_html/js/input.js @@ -21,24 +21,6 @@ class Input { let mouseX = (e.clientX - bounds.x)*this.canvas.width/bounds.width; let mouseY = (e.clientY - bounds.y)*this.canvas.height/bounds.height; - //console.log(Math.round(mouseX),",",Math.round(mouseY)); //for debug - - //if(this.parity){ ////// to create collisions for a map - // this.dmx=Math.round(mouseX); - // this.dmy=Math.round(mouseY); - // this.parity=!this.parity; - //}else{ - // let mx = Math.round((e.clientX - bounds.x)*this.canvas.width/bounds.width); - // let my = Math.round((e.clientY - bounds.y)*this.canvas.height/bounds.height); - // let x = Math.min(mx,this.dmx); - // let y = Math.min(my,this.dmy); - // let w = Math.abs(mx-this.dmx); - // let h = Math.abs(my-this.dmy); - // this.toPrint+="new Square("+x.toString()+","+y.toString()+","+player.z.toString()+","+w.toString()+","+h.toString()+"),"; - // navigator.clipboard.writeText(this.toPrint); - // maps[player.z].squares.push(new Square(x,y,player.z,w,h)); - // this.parity=!this.parity; - //} let dx = mouseX-player.x; let dy = mouseY-player.y;