修复:椭圆绘制的点个数过多导致的卡顿

pull/2191/MERGE
ChenX 1 year ago
parent 3c209fe826
commit 86424ad335

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`EdgeGeometry生成 1`] = `236`; exports[`EdgeGeometry生成 1`] = `148`;
exports[`EdgeGeometry生成 2`] = `410`; exports[`EdgeGeometry生成 2`] = `410`;

@ -32,7 +32,7 @@ export class Shape2 extends Shape
let splitCount = tempArc.Radius / ARC_SplitLength; let splitCount = tempArc.Radius / ARC_SplitLength;
splitCount = clamp(Math.floor(splitCount * 0.5) * 2, Arc_MinSplitCount, ARC_MaxSplitCount); splitCount = clamp(Math.floor(splitCount * 0.5) * 2, Arc_MinSplitCount, ARC_MaxSplitCount);
resolution = Math.max(2, Math.abs(Math.ceil((tempArc.AllAngle * 0.5) / Math.PI)) * splitCount); resolution = Math.max(2, Math.ceil(Math.abs((tempArc.AllAngle * 0.5) / Math.PI) * splitCount * 0.5)) * 2;
} }
else else
resolution = divisions * 2; resolution = divisions * 2;

Loading…
Cancel
Save