I don't understand what is happening here. I'm using HTML canvas to draw a rectangle and I'm moving the rectangle at 1fps. I'm noticing a 1 pixel trail at the top and bottom of the shape. Anyone have any idea what's happening here?
This moves the shape
// Move drop along x axis
moveX(vel) {
this.ctx.clearRect(this.x, this.y, this.w, this.h);
this.x += this.vel;
this.render();
}This calls the moves shape function every second
setInterval(() => {
console.log("????")
const coords = randomCoords()
const color = "green";
drop.moveX(10);
// drop.moveY(10);
}, 1000);#webdevelopment #question #html5canvas


