diff --git a/beamshow.py b/beamshow.py index 9a04b2e..a543ed2 100644 --- a/beamshow.py +++ b/beamshow.py @@ -6,7 +6,7 @@ import sys import time from effects.bouncingspot import BouncingSpot -from effects.effect import color_fader +from effects.effect import color_wheel # pg.init() @@ -20,17 +20,17 @@ background.fill(pg.Color(0, 0, 0, 10)) effects = [ - # BouncingSpot( - # bounds=win.get_rect(), - # # color=pg.Color(255,255,255), - # color=color_fader(), - # sizes=(300, 300), - # velocity=(1, 1), - # x_factor=(1, 1), - # y_factor=(2.2, 2.2), - # ), - BouncingSpot(bounds=win.get_rect(), color=color_fader()), - BouncingSpot(bounds=win.get_rect(), color=color_fader(hue=180)) + BouncingSpot( + bounds=win.get_rect(), + color=pg.Color(255, 255, 255), + # color=color_wheel(), + sizes=(300, 300), + velocity=(1, 1), + x_factor=(1, 1), + y_factor=(2.2, 2.2), + ), + BouncingSpot(bounds=win.get_rect(), color=color_wheel()), + BouncingSpot(bounds=win.get_rect(), color=color_wheel(hue=180)), ] diff --git a/effects/effect.py b/effects/effect.py index d23fb1e..f55502e 100644 --- a/effects/effect.py +++ b/effects/effect.py @@ -2,7 +2,7 @@ import pygame as pg from abc import abstractmethod -def color_fader(hue=0, increase=1): +def color_wheel(hue=0, increase=1): color = pg.Color(255, 0, 0) h, s, l, a = color.hsla color.hsla = hue, s, l, a