Skip to content

Commit 7c5671d

Browse files
authored
Merge pull request #15389 from jgg3/shape-geometry-holes
ShapeGeometry: Handle CW boundary with CW holes
2 parents 07897d9 + 61e2e06 commit 7c5671d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/geometries/ShapeGeometry.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,15 @@ function ShapeBufferGeometry( shapes, curveSegments ) {
121121

122122
shapeVertices = shapeVertices.reverse();
123123

124-
// also check if holes are in the opposite direction
125-
126-
for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {
124+
}
127125

128-
shapeHole = shapeHoles[ i ];
126+
for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {
129127

130-
if ( ShapeUtils.isClockWise( shapeHole ) === true ) {
128+
shapeHole = shapeHoles[ i ];
131129

132-
shapeHoles[ i ] = shapeHole.reverse();
130+
if ( ShapeUtils.isClockWise( shapeHole ) === true ) {
133131

134-
}
132+
shapeHoles[ i ] = shapeHole.reverse();
135133

136134
}
137135

0 commit comments

Comments
 (0)