Skip to content

Commit 6483cda

Browse files
committed
Added canvas crop data
1 parent 901a75d commit 6483cda

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/textures/Frame.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,14 @@ var Frame = new Class({
572572
crop.u1 = Math.min(1, (ox + ow) / tw);
573573
crop.v1 = Math.min(1, (oy + oh) / th);
574574

575-
crop.cx = cx + x;
576-
crop.cy = cy + y;
577-
578575
crop.x = x;
579576
crop.y = y;
580577

578+
crop.cx = ox;
579+
crop.cy = oy;
580+
crop.cw = ow;
581+
crop.ch = oh;
582+
581583
crop.width = width;
582584
crop.height = height;
583585

0 commit comments

Comments
 (0)