rename to color_wheel
This commit is contained in:
parent
448999c449
commit
310f7acd89
2 changed files with 13 additions and 13 deletions
24
beamshow.py
24
beamshow.py
|
@ -6,7 +6,7 @@ import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from effects.bouncingspot import BouncingSpot
|
from effects.bouncingspot import BouncingSpot
|
||||||
from effects.effect import color_fader
|
from effects.effect import color_wheel
|
||||||
|
|
||||||
# pg.init()
|
# pg.init()
|
||||||
|
|
||||||
|
@ -20,17 +20,17 @@ background.fill(pg.Color(0, 0, 0, 10))
|
||||||
|
|
||||||
|
|
||||||
effects = [
|
effects = [
|
||||||
# BouncingSpot(
|
BouncingSpot(
|
||||||
# bounds=win.get_rect(),
|
bounds=win.get_rect(),
|
||||||
# # color=pg.Color(255,255,255),
|
color=pg.Color(255, 255, 255),
|
||||||
# color=color_fader(),
|
# color=color_wheel(),
|
||||||
# sizes=(300, 300),
|
sizes=(300, 300),
|
||||||
# velocity=(1, 1),
|
velocity=(1, 1),
|
||||||
# x_factor=(1, 1),
|
x_factor=(1, 1),
|
||||||
# y_factor=(2.2, 2.2),
|
y_factor=(2.2, 2.2),
|
||||||
# ),
|
),
|
||||||
BouncingSpot(bounds=win.get_rect(), color=color_fader()),
|
BouncingSpot(bounds=win.get_rect(), color=color_wheel()),
|
||||||
BouncingSpot(bounds=win.get_rect(), color=color_fader(hue=180))
|
BouncingSpot(bounds=win.get_rect(), color=color_wheel(hue=180)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import pygame as pg
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
|
|
||||||
|
|
||||||
def color_fader(hue=0, increase=1):
|
def color_wheel(hue=0, increase=1):
|
||||||
color = pg.Color(255, 0, 0)
|
color = pg.Color(255, 0, 0)
|
||||||
h, s, l, a = color.hsla
|
h, s, l, a = color.hsla
|
||||||
color.hsla = hue, s, l, a
|
color.hsla = hue, s, l, a
|
||||||
|
|
Loading…
Reference in a new issue