Skip to content

Commit

Permalink
Fixed #6996. Updated setCropUVs crop calculation. Thanks @CrispMind
Browse files Browse the repository at this point in the history
  • Loading branch information
zekeatchan committed Jan 6, 2025
1 parent 1781487 commit bd67680
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textures/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ var Frame = new Class({
// Need to check for intersection between the cut area and the crop area
// If there is none, we set UV to be empty, otherwise set it to be the intersection area

width = Clamp(width, 0, cw - x);
height = Clamp(height, 0, ch - y);
width = Clamp(width, 0, ss.x + cw - x);
height = Clamp(height, 0, ss.y + ch - y);

var cropRight = x + width;
var cropBottom = y + height;
Expand Down

0 comments on commit bd67680

Please sign in to comment.