mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
[ts][canvas] Fixed scaled atlases in Canvas renderer. Closes #956
This commit is contained in:
parent
83dffa7c64
commit
1b71da6e77
@ -6523,7 +6523,8 @@ var spine;
|
||||
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);
|
||||
var atlasScale = att.width / w;
|
||||
ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);
|
||||
ctx.translate(w / 2, h / 2);
|
||||
if (attachment.region.rotate) {
|
||||
var t = w;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6523,7 +6523,8 @@ var spine;
|
||||
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);
|
||||
var atlasScale = att.width / w;
|
||||
ctx.scale(atlasScale * attachment.scaleX, atlasScale * attachment.scaleY);
|
||||
ctx.translate(w / 2, h / 2);
|
||||
if (attachment.region.rotate) {
|
||||
var t = w;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user