You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like, when using the Path.getPositionAtLength function the incorrect position is returned for some lengths. This seems to be happening around curvatures.
Example: Take this SVG Path
m 1633.8176,1077.4212 c 0,0 18.4277,-511.56464 -14.7423,-535.31585 -32.2488,-23.0917 -318.7995,-9.13506 -318.7995,-9.13506 H 830.3691 c 0,0 -182.43438,-54.81052 -189.80546,-129.7182 -3.97298,-40.37463 -16.58496,-164.43147 -16.58496,-164.43147 0,0 -60.81148,-89.5238 -180.59162,-95.00485 C 323.6069,138.33472 -4.4064367,134.68069 -4.4064367,134.68069")
And now following positions
let p0 = p.getPointAtLength(87.9549) //black
let p1 = p.getPointAtLength(91.9549) //red - incorrect
let p2 = p.getPointAtLength(94.8549) //green
let p3 = p.getPointAtLength(97.7549) //blue
When drawing circles at these points (using the annotated colours) I get the following picture
As you can see, the Red dot is above the green dot whereas the order should be in the same order as the Length along the path, i.e.:
black, red, green, blue
The text was updated successfully, but these errors were encountered:
It looks like, when using the
Path.getPositionAtLength
function the incorrect position is returned for some lengths. This seems to be happening around curvatures.Example: Take this SVG Path
And now following positions
When drawing circles at these points (using the annotated colours) I get the following picture
As you can see, the Red dot is above the green dot whereas the order should be in the same order as the Length along the path, i.e.:
black, red, green, blue
The text was updated successfully, but these errors were encountered: