Apply bone scale (images must still be aligned to bones).

This commit is contained in:
NathanSweet 2015-08-12 13:21:47 +02:00
parent 56bee5ccd2
commit 7259586ba1

View File

@ -87,7 +87,7 @@ spine.SkeletonRenderer.prototype = {
var x = bone.worldX + attachment.x * bone.m00 + attachment.y * bone.m01;
var y = bone.worldY + attachment.x * bone.m10 + attachment.y * bone.m11;
var rotation = -(bone.worldRotation + attachment.rotation) * Math.PI / 180;
var w = attachment.width, h = attachment.height;
var w = attachment.width * bone.worldScaleX, h = attachment.height * bone.worldScaleY;
context.translate(x, y);
context.rotate(rotation);
context.drawImage(attachment.rendererObject, -w / 2, -h / 2, w, h);