diff --git a/src/extras/TilingSprite.js b/src/extras/TilingSprite.js index 774cafb..91a2c25 100644 --- a/src/extras/TilingSprite.js +++ b/src/extras/TilingSprite.js @@ -253,7 +253,7 @@ } else { - tempCanvas.context.drawImage(baseTexture.source, -texture._frame.x, -texture._frame.y); + tempCanvas.context.drawImage(baseTexture.source, -texture._frame.x * resolution, -texture._frame.y * resolution); } this._canvasPattern = tempCanvas.context.createPattern( tempCanvas.canvas, 'repeat' ); } @@ -268,7 +268,7 @@ transform.ty * resolution); // TODO - this should be rolled into the setTransform above.. - context.scale(this.tileScale.x,this.tileScale.y); + context.scale(this.tileScale.x / resolution, this.tileScale.y / resolution); context.translate(modX + (this.anchor.x * -this._width ), modY + (this.anchor.y * -this._height)); @@ -284,8 +284,8 @@ context.fillStyle = this._canvasPattern; context.fillRect(-modX, -modY, - this._width / this.tileScale.x, - this._height / this.tileScale.y); + this._width * resolution / this.tileScale.x, + this._height * resolution / this.tileScale.y); //TODO - pretty sure this can be deleted...