Skip to content

Commit

Permalink
Fix triangulation of circular shape with radius 0 (pixijs#8311)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev7355608 committed Jun 13, 2022
1 parent 4e1ab76 commit 9284ddf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/graphics/src/utils/buildCircle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ export const buildCircle: IShapeBuildCommand = {
const verts = graphicsGeometry.points;
const indices = graphicsGeometry.indices;

if (points.length === 0)
{
return;
}

let vertPos = verts.length / 2;
const center = vertPos;

Expand Down

0 comments on commit 9284ddf

Please sign in to comment.