Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ${startX} ${startY}
- let cumulativePercent = 0;
- function getCoordinatesForPercent(percent) {
- const x = Math.cos(2 * Math.PI * percent);
- const y = Math.sin(2 * Math.PI * percent);
- return [x, y];
- }
- const [startX, startY] = getCoordinatesForPercent(cumulativePercent);
- const pathData = [
- `M ${startX} ${startY}`, // Move
- `A 1 1 0 ${largeArcFlag} 1 ${endX} ${endY}`, // Arc
- `L 0 0`, // Line
- ].join(' ');
- const pathData = [
- `M` + startX + ` ` + startY,
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement