mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -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;
|
||||
for (var j = 0; j < values.points * 2; j++) {
|
||||
offset.angle += 360 / values.points;
|
||||
var vector = offset.clone();
|
||||
vector.length = l * (j % 2 ? 0.1 : -0.1);
|
||||
var vector = offset.normalize(l * (j % 2 ? 0.1 : -0.1));
|
||||
path.add(offset + vector);
|
||||
}
|
||||
path.smooth();
|
||||
|
|
Loading…
Reference in a new issue