So I was working on this little javascript experiment and I needed a widget to track the FPS of it. I ported a widget I\'ve been using with Actionscript 3 to Javascript and
I was having similar problem with drawImage(), when attempted to draw a tile on a canvas of the same size in this manner:
var image = new Image();
image.onload = function() {
context.drawImage(image, 0, 0, this.tileSize, this.tileSize);
}
image.src = this.baseURL + tileId;
The problem disappeared, when I removed height and width parameters from the call and used this:
context.drawImage(image, 0, 0);