diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 42e9252..1b79373 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -495,8 +495,8 @@ this.tintedTexture, 0, 0, - width, - height, + width * resolution, + height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, @@ -507,10 +507,10 @@ { renderer.context.drawImage( texture.baseTexture.source, - texture.frame.x, - texture.frame.y, - width, - height, + texture.frame.x * resolution, + texture.frame.y * resolution, + width * resolution, + height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 42e9252..1b79373 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -495,8 +495,8 @@ this.tintedTexture, 0, 0, - width, - height, + width * resolution, + height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, @@ -507,10 +507,10 @@ { renderer.context.drawImage( texture.baseTexture.source, - texture.frame.x, - texture.frame.y, - width, - height, + texture.frame.x * resolution, + texture.frame.y * resolution, + width * resolution, + height * resolution, dx * renderer.resolution, dy * renderer.resolution, width * renderer.resolution, diff --git a/src/loaders/spritesheetParser.js b/src/loaders/spritesheetParser.js index 0706f95..fbd1ea5 100644 --- a/src/loaders/spritesheetParser.js +++ b/src/loaders/spritesheetParser.js @@ -40,10 +40,10 @@ var crop = new core.Rectangle(0, 0, frames[i].sourceSize.w / resolution, frames[i].sourceSize.h / resolution); if (frames[i].rotated) { - frame = new core.Rectangle(rect.x, rect.y, rect.h, rect.w); + frame = new core.Rectangle(rect.x / resolution, rect.y / resolution, rect.h / resolution, rect.w / resolution); } else { - frame = new core.Rectangle(rect.x, rect.y, rect.w, rect.h); + frame = new core.Rectangle(rect.x / resolution, rect.y / resolution, rect.w / resolution, rect.h / resolution); } // Check to see if the sprite is trimmed