mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Flock example: remove red connection paths.
This commit is contained in:
parent
f261da3279
commit
ff3d5aca17
1 changed files with 0 additions and 15 deletions
|
@ -191,21 +191,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.connectionPath) {
|
|
||||||
this.connectionPath.remove();
|
|
||||||
this.connectionPath = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nearest < 50) {
|
|
||||||
var vector = closestPoint - this.loc;
|
|
||||||
var from = this.loc + vector * 0.2;
|
|
||||||
var to = this.loc + vector * 0.8;
|
|
||||||
this.connectionPath = new Path(from, to);
|
|
||||||
this.connectionPath.strokeColor = 'red';
|
|
||||||
this.connectionPath.strokeWidth = 1;
|
|
||||||
document.activeLayer.appendBottom(this.connectionPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
steer /= count;
|
steer /= count;
|
||||||
if (steer.length > 0) {
|
if (steer.length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue