Skip to content

Commit 8b54df1

Browse files
authored
Merge pull request #423 from ktbee/more-circular-pen-dots
Tweak scalingVector to make dots appear to be more circular
2 parents e98fb37 + 9fc82a8 commit 8b54df1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/PenSkin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,10 @@ class PenSkin extends Skin {
379379
translationVector[1] = avgY + (alias / 4);
380380

381381
const scalingVector = __modelScalingVector;
382-
scalingVector[0] = diameter + alias;
383-
scalingVector[1] = length + diameter - (alias / 2);
382+
// Dots tend to be ovals that are longer on the y-axis, so we use a smaller alias
383+
// for the y value than for the x value to make dots more circular.
384+
scalingVector[0] = diameter + (alias / 2);
385+
scalingVector[1] = length + diameter - (alias / 6);
384386

385387
const radius = diameter / 2;
386388
const yScalar = (0.50001 - (radius / (length + diameter)));

0 commit comments

Comments
 (0)