From dd7dd93d9e1ee2e0095f0fa403a499b69aa289a8 Mon Sep 17 00:00:00 2001 From: Raymond Hogenson Date: Tue, 27 Sep 2016 23:50:53 -0400 Subject: Scale the amount to change by the distance This way it doesn't take too long to get to where we're trying to go, but this might actually make it look worse. The best thing to do here is to experiment with the bridge directly. --- fish_render.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fish_render.py') diff --git a/fish_render.py b/fish_render.py index 6d24167..4924016 100644 --- a/fish_render.py +++ b/fish_render.py @@ -34,8 +34,9 @@ class Light(object): def update(self, fish): """Change color depending on where the fish is.""" if abs(self.transitioning_to - self.color) < self.step: - self.step = random_change() self.transitioning_to = pick_HSV().to_RGB() + self.step = (random_change() + * abs(self.color - self.transitioning_to)) new_background = transition( self.color, self.transitioning_to, self.step ) -- cgit v1.3.1