We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c4e410 commit 0e6fd5fCopy full SHA for 0e6fd5f
src/shape/shapeToPoints.js
@@ -83,8 +83,8 @@ function shapeToPointsRaw(shapeData) {
83
const { radius, segment } = shapeData.circle;
84
const points = [];
85
const circumference = 2 * radius * Math.PI;
86
- const numSegments = Math.min(circumference * 2, 64);
87
- for (let rad = 0; rad <= segment; rad += Math.PI * 2 / numSegments) {
+ const numSegments = Math.max(3, Math.min(circumference * 2, 32));
+ for (let rad = 0; rad < segment; rad += Math.PI * 2 / numSegments) {
88
const x = Math.sin(rad) * radius;
89
const y = -Math.cos(rad) * radius;
90
points.push(new Vector(x, y));
0 commit comments