Permalink
Browse files

[ts][canvas] Fixed scaled atlases in Canvas renderer. Closes #956

  • Loading branch information...
badlogic committed Aug 2, 2017
1 parent 83dffa7 commit 1b71da6e77fad62530faa3586a352efdfa7a029b

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -88,7 +88,8 @@ module spine.canvas {
ctx.transform(bone.a, bone.c, bone.b, bone.d, bone.worldX, bone.worldY);
ctx.translate(attachment.offset[0], attachment.offset[1]);
ctx.rotate(attachment.rotation * Math.PI / 180);
ctx.scale(attachment.scaleX, attachment.scaleY);
let atlasScale = att.width / w;
ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);
ctx.translate(w / 2, h / 2);
if (attachment.region.rotate) {
let t = w;

0 comments on commit 1b71da6

Please sign in to comment.