fix flash algorithm to smoothly transition from bgcolor
This commit is contained in:
parent
d00614d2cd
commit
812c342bcb
@ -120,7 +120,7 @@ class Window(object):
|
||||
delta = datetime.now() - self.flash_start_dt
|
||||
delta_msec = delta.seconds * 1000 + delta.microseconds / 1000
|
||||
period = delta_msec / float(self.conf['flash_rate'])
|
||||
mix = (math.sin(math.pi * 2 * period) + 1.0) / 2.0
|
||||
mix = (1.0 - math.cos(math.pi * 2 * period)) / 2.0
|
||||
else:
|
||||
mix = 0
|
||||
linear_combination = lambda (x, y): x + (y - x) * mix
|
||||
|
Loading…
x
Reference in New Issue
Block a user