Merge pull request #423 from ktbee/more-circular-pen-dots

Tweak scalingVector to make dots appear to be more circular
This commit is contained in:
Chris Willis-Ford
2019-05-28 15:39:34 -07:00
committed by GitHub

View File

@@ -379,8 +379,10 @@ class PenSkin extends Skin {
translationVector[1] = avgY + (alias / 4);
const scalingVector = __modelScalingVector;
scalingVector[0] = diameter + alias;
scalingVector[1] = length + diameter - (alias / 2);
// Dots tend to be ovals that are longer on the y-axis, so we use a smaller alias
// for the y value than for the x value to make dots more circular.
scalingVector[0] = diameter + (alias / 2);
scalingVector[1] = length + diameter - (alias / 6);
const radius = diameter / 2;
const yScalar = (0.50001 - (radius / (length + diameter)));