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 35dfd1f commit 4ea4f95Copy full SHA for 4ea4f95
src/gameobjects/shape/rectangle/Rectangle.js
@@ -215,8 +215,8 @@ var Rectangle = new Class({
215
var x = halfWidth;
216
var y = halfHeight;
217
218
- // The number of segments is based on radius (more segments = larger radius)
219
- var segments = Math.max(1, Math.floor(radius / 5));
+ // Ensure minimum smoothness for small radii while preventing excessive tessellation
+ var segments = Math.max(4, Math.min(16, Math.ceil(radius / 2)));
220
221
// Create points going clockwise from top-left
222
0 commit comments