no smooth images

This commit is contained in:
Atsuyo-INSA 2023-12-08 18:36:30 +01:00
parent 8e79098a63
commit 022ee45637

View file

@ -13,10 +13,13 @@ class Render {
constructor(idCanvas) {
let canvas = document.getElementById(idCanvas);
this.ctx = canvas.getContext("2d");
this.ctx.imageSmoothingEnabled=false;
//this.ReloadAff();
}
RenderPlayer(player,client) {
if(player==null)
return;
let x=player.x
let y=player.y
if(x>=2000 && y>=2000 && this.map==1) {
@ -68,7 +71,7 @@ class Render {
ReloadAff() {
//const fond = new Image();
if(player.x >= 2000 && player.y >=2000) {
if(player!=null && player.x >= 2000 && player.y >=2000) {
this.map=1;
} else {
this.map=0;