diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 42e9252..a1d828b 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -423,8 +423,8 @@ wt = this.worldTransform, dx, dy, - width = texture._frame.width, - height = texture._frame.height; + width = texture._frame.width * texture.resolution, + height = texture._frame.height * texture.resolution; renderer.context.globalAlpha = this.worldAlpha; diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 42e9252..a1d828b 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -423,8 +423,8 @@ wt = this.worldTransform, dx, dy, - width = texture._frame.width, - height = texture._frame.height; + width = texture._frame.width * texture.resolution, + height = texture._frame.height * texture.resolution; renderer.context.globalAlpha = this.worldAlpha; 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