From 10b89e784f192c9482a1a048dd4ed57c9f6041a9 Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Mon, 16 Dec 2024 17:50:30 +0100 Subject: [PATCH] Rotation only for now --- animation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/animation.py b/animation.py index 28abb32..0844503 100644 --- a/animation.py +++ b/animation.py @@ -238,7 +238,7 @@ class Hackertours(Steady): """ Base color yellow, with green wandering back and forth """ - def __init__(self, color, base=(255,255,0), looptime=2.0): + def __init__(self, color, base=(255,255,0), looptime=4.0): super(Hackertours, self).__init__(color) self.looptime = looptime self.base = base @@ -246,8 +246,6 @@ class Hackertours(Steady): def update(self, index, count): # angle is the position of the highlight on a circle, range [0, 1] angle = (time() / self.looptime + (index + 0.0) / count) % 1.0 - # map 0->1, 0.5->0, 1->1 to convert from circle to cylon - angle = abs(angle * 2 - 1) l = 1 - min(abs(angle - 1 / count) * .9, 1.0 / count) * count return ( int(self.r * l + self.base[0] * (1-l)),