From 9284ddf58699fbc7fc94c08b3b6c102a718adf3d Mon Sep 17 00:00:00 2001 From: dev7355608 Date: Mon, 13 Jun 2022 21:06:36 +0200 Subject: [PATCH] Fix triangulation of circular shape with radius 0 (#8311) --- packages/graphics/src/utils/buildCircle.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/graphics/src/utils/buildCircle.ts b/packages/graphics/src/utils/buildCircle.ts index 4da1376ea4..7771b57d83 100644 --- a/packages/graphics/src/utils/buildCircle.ts +++ b/packages/graphics/src/utils/buildCircle.ts @@ -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;