Skip to content

Commit

Permalink
A bit of a kludge fix for CesiumGS#2737. If anyone can explain why th…
Browse files Browse the repository at this point in the history
…is fixes everything, I would love to know.
  • Loading branch information
dwhipps committed Oct 26, 2016
1 parent 98cfda9 commit e374b6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Core/RectangleGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,13 @@ define([
var textureMatrix = textureMatrixScratch;
var tangentRotationMatrix = tangentRotationMatrixScratch;
if (defined(stRotation)) {

// Someone down the line does not like zeros in the textureMatrix. This appears to fix the
// issue with scaling the texture inside the Rectangle, but it's not obvious why
if (stRotation === 0.0) {
stRotation = CesiumMath.EPSILON20;
}

// negate angle for a counter-clockwise rotation
Matrix2.fromRotation(-stRotation, textureMatrix);
var center = Rectangle.center(rectangle, centerScratch);
Expand Down

0 comments on commit e374b6c

Please sign in to comment.