mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 11:03:48 +01:00
use less points in circle
This commit is contained in:
parent
03e3780a6f
commit
2973f9b9b2
@ -83,7 +83,7 @@ function shapeToPointsRaw(shapeData) {
|
||||
const { radius, segment } = shapeData.circle;
|
||||
const points = [];
|
||||
const circumference = 2 * radius * Math.PI;
|
||||
const numSegments = circumference;
|
||||
const numSegments = Math.max(circumference * 2, 32);
|
||||
for (let rad = 0; rad <= segment; rad += Math.PI * 2 / numSegments) {
|
||||
const x = Math.sin(rad) * radius;
|
||||
const y = -Math.cos(rad) * radius;
|
||||
|
Loading…
Reference in New Issue
Block a user