mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Simplify code.
This commit is contained in:
parent
a3da96e8be
commit
8f7deef61c
1 changed files with 1 additions and 2 deletions
|
@ -24,8 +24,7 @@
|
||||||
var l = offset.length;
|
var l = offset.length;
|
||||||
for (var j = 0; j < values.points * 2; j++) {
|
for (var j = 0; j < values.points * 2; j++) {
|
||||||
offset.angle += 360 / values.points;
|
offset.angle += 360 / values.points;
|
||||||
var vector = offset.clone();
|
var vector = offset.normalize(l * (j % 2 ? 0.1 : -0.1));
|
||||||
vector.length = l * (j % 2 ? 0.1 : -0.1);
|
|
||||||
path.add(offset + vector);
|
path.add(offset + vector);
|
||||||
}
|
}
|
||||||
path.smooth();
|
path.smooth();
|
||||||
|
|
Loading…
Reference in a new issue