Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShapeGeometry: Handle CW boundary with CW holes #15389

Merged
merged 1 commit into from Dec 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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