mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Improve Chain example.
This commit is contained in:
parent
7a266a50dd
commit
bae5589409
1 changed files with 1 additions and 2 deletions
|
@ -20,14 +20,13 @@
|
|||
strokeWidth: 20,
|
||||
strokeCap: 'round'
|
||||
});
|
||||
var segments = path.segments;
|
||||
|
||||
var start = view.center / [10, 1];
|
||||
for (var i = 0; i < points; i++)
|
||||
path.add(start + new Point(i * length, 0));
|
||||
|
||||
function onMouseMove(event) {
|
||||
segments[0].point = event.point;
|
||||
path.firstSegment.point = event.point;
|
||||
for (var i = 0; i < points - 1; i++) {
|
||||
var segment = path.segments[i];
|
||||
var nextSegment = segment.next;
|
||||
|
|
Loading…
Reference in a new issue