Skip to content

Commit

Permalink
Merge 4c43d85 into 1f7b025
Browse files Browse the repository at this point in the history
  • Loading branch information
golovachruslan committed Feb 22, 2021
2 parents 1f7b025 + 4c43d85 commit f585aa5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ function createMarkerAlongPath({ path, percentage, lineLength, color, object, pr
const vCenter = vDirection.clone().multiply(new Vector2(along, along)).add(path[i]);

const vDirection2 = new Vector2(projectFlat(path[i + 1])).subtract(projectFlat(path[i]));
const angle = 180 + (vDirection2.verticalAngle() * 180) / Math.PI;

const angle = (vDirection2.verticalAngle() * 180) / Math.PI;

return { position: [vCenter.x, vCenter.y, 0], angle, color, object };
}

0 comments on commit f585aa5

Please sign in to comment.