Skip to content

Commit

Permalink
Merge pull request #15389 from jgg3/shape-geometry-holes
Browse files Browse the repository at this point in the history
ShapeGeometry: Handle CW boundary with CW holes
  • Loading branch information
mrdoob committed Dec 7, 2018
2 parents 07897d9 + 61e2e06 commit 7c5671d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/geometries/ShapeGeometry.js
Expand Up @@ -121,17 +121,15 @@ function ShapeBufferGeometry( shapes, curveSegments ) {

shapeVertices = shapeVertices.reverse();

// also check if holes are in the opposite direction

for ( i = 0, l = shapeHoles.length; i < l; i ++ ) {
}

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

if ( ShapeUtils.isClockWise( shapeHole ) === true ) {
shapeHole = shapeHoles[ i ];

shapeHoles[ i ] = shapeHole.reverse();
if ( ShapeUtils.isClockWise( shapeHole ) === true ) {

}
shapeHoles[ i ] = shapeHole.reverse();

}

Expand Down

0 comments on commit 7c5671d

Please sign in to comment.