From dfac101bfcc58349fd1786aa4862c8a8d2a269f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 18 Mar 2014 10:55:24 +0100 Subject: [PATCH] Revert previous behavior of tadpoles to get them follow their path correctly again. --- examples/Paperjs.org/Tadpoles.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Paperjs.org/Tadpoles.html b/examples/Paperjs.org/Tadpoles.html index cd26b562..5ac995b9 100644 --- a/examples/Paperjs.org/Tadpoles.html +++ b/examples/Paperjs.org/Tadpoles.html @@ -50,7 +50,7 @@ for (var i = 1; i < this.amount; i++) { var vector = segments[i].point - point; this.count += speed * 15; - var wave = Math.sin((this.count + i * 3) * 0.003); + var wave = Math.sin((this.count + i * 3) / 300); var sway = lastVector.rotate(90).normalize(wave); point += lastVector.normalize(pieceLength) + sway; segments[i].point = point; @@ -155,7 +155,7 @@ // (1 -- based on distance, 2 -- maxSpeed) if (slowdown && distance < 100) { // This damping is somewhat arbitrary: - desired.length = this.maxSpeed * (distance * 0.001); + desired.length = this.maxSpeed * (distance / 100); } else { desired.length = this.maxSpeed; }