From 4d6687fd8d19cc575bcf80576c7ff4b16e65a3c5 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Tue, 19 Apr 2011 21:38:06 +0200 Subject: [PATCH] Flock: simplify grouping. --- examples/Animated/Flock.html | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/examples/Animated/Flock.html b/examples/Animated/Flock.html index 6ce5015f..a5e03779 100644 --- a/examples/Animated/Flock.html +++ b/examples/Animated/Flock.html @@ -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; }