Skip to content

Commit 341ecf4

Browse files
committed
Testing flip + atlas frame + trim cropping
1 parent 9bd8fb3 commit 341ecf4

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/renderer/webgl/pipelines/TextureTintPipeline.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,26 @@ var TextureTintPipeline = new Class({
669669
frameHeight *= -1;
670670
}
671671

672+
if (sprite.isCropped)
673+
{
674+
// Positions at the correct place, UVs also correct (when unflipped)
675+
// += (sourceSize w - frame width) / 2
676+
// tx0 += 125;
677+
// tx1 += 125;
678+
// tx2 += 125;
679+
// tx3 += 125;
680+
681+
// += (sourceSize h - frame height) / 2
682+
// ty0 += 259;
683+
// ty1 += 259;
684+
// ty2 += 259;
685+
// ty3 += 259;
686+
687+
// x += 125;
688+
// y += 259;
689+
}
690+
691+
672692
var xw = x + frameWidth;
673693
var yh = y + frameHeight;
674694

0 commit comments

Comments
 (0)