Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/geometries/ExtrudeGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,27 @@ class ExtrudeGeometry extends BufferGeometry {

}

//When bevelSegments == 0, the modified vert arrays will not have been populated. We do this here.
{

if ( contractedContourVertices.length == 0 ) {

contractedContourVertices.push( ...vertices );

}

if ( expandedHoleVertices.length == 0 ) {

for ( let h = 0, hl = numHoles; h < hl; h ++ ) {

expandedHoleVertices.push( holes[ h ] ); //triangulateShape expects a Vec2[][], ie. an array of holes, with each hole being a Vec2[]

}

}

}

const faces = ShapeUtils.triangulateShape( contractedContourVertices, expandedHoleVertices );

const flen = faces.length;
Expand Down