Skip to content

Commit

Permalink
new example: loop
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanchuan committed Aug 21, 2023
1 parent 8ee4336 commit d8e4639
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,31 @@ export default {
}
}
`),

'loop': read(`
svg {
viewBox: 0 0 24 24 p 4;
stroke-width: .5;
stroke-linecap: square;
stroke: blue;
fill: none;
g*0-3 {
transform:
translate(@pn(0 0, 24 0, 24 24, 0 24))
rotate(@n(*90));
circle {
cx, cy, r: 6, 6, .2;
}
path {
d: @M0-3(
M @p.calc(12 - 6/4*@n) 12 @p 6
A @p.calc(6 - 6/4*@n) @p 0 1 0 6 @lp3
);
}
}
}
`)
}

function read(input) {
Expand Down

0 comments on commit d8e4639

Please sign in to comment.