Skip to content

Commit

Permalink
CylinderGeometry: Don't add degenerate triangles (#29460)
Browse files Browse the repository at this point in the history
* CylinderGeometry: Don't add degenerate triangles

* Change comparison
  • Loading branch information
gkjohnson authored Sep 21, 2024
1 parent ffe877f commit ae67bfd
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/geometries/CylinderGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,19 @@ class CylinderGeometry extends BufferGeometry {

// faces

indices.push( a, b, d );
indices.push( b, c, d );
if ( radiusTop > 0 ) {

// update group counter
indices.push( a, b, d );
groupCount += 3;

groupCount += 6;
}

if ( radiusBottom > 0 ) {

indices.push( b, c, d );
groupCount += 3;

}

}

Expand Down

0 comments on commit ae67bfd

Please sign in to comment.