mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Flock: simplify grouping.
This commit is contained in:
parent
3acb954350
commit
4d6687fd8d
1 changed files with 1 additions and 7 deletions
|
@ -222,7 +222,6 @@
|
|||
mouseDown = false;
|
||||
function onFrameLoop() {
|
||||
count++;
|
||||
groupTogether = mouseDown || count % 1500 > 500;
|
||||
for(var i = 0, l = boids.length; i < l; i++) {
|
||||
if (groupTogether) {
|
||||
var point = letterPath.getLocation(((i + count / 30) % l) / l * pathLength).point;
|
||||
|
@ -232,12 +231,7 @@
|
|||
}
|
||||
}
|
||||
function onMouseDown(event) {
|
||||
mouseDown = true;
|
||||
}
|
||||
|
||||
function onMouseUp(event) {
|
||||
mouseDown = false;
|
||||
count = 0;
|
||||
groupTogether = !groupTogether;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
|
Loading…
Reference in a new issue