Changeset - c98a239e0d0b
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 11 years ago 2014-06-15 22:56:34
drewp@bigasterisk.com
new effects
Ignore-this: b5273b607b63fa8a423c2c2a223dbed5
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/Effects.py
Show inline comments
 
@@ -21,7 +21,10 @@ class Strip(object):
 
    which = 'L' # LR means both
 
    pixels = []
 
    @classmethod
 
    def solid(cls, which='L', color=(1,1,1)):
 
    def solid(cls, which='L', color=(1,1,1), hsv=None):
 
        """hsv overrides color"""
 
        if hsv is not None:
 
            color = colorsys.hsv_to_rgb(hsv[0] % 1.0, hsv[1], hsv[2])
 
        x = cls()
 
        x.which = which
 
        x.pixels = [tuple(color)] * 50
 
@@ -123,6 +126,9 @@ def configExprGlobals():
 

	
 
    ret['nsin'] = lambda x: (math.sin(x * (2 * math.pi)) + 1) / 2
 
    ret['ncos'] = lambda x: (math.cos(x * (2 * math.pi)) + 1) / 2
 
    def nsquare(t, on=.5):
 
        return (t % 1.0) < on
 
    ret['nsquare'] = nsquare
 

	
 
    _smooth_random_items = [random_mod.random() for x in range(100)]
 

	
0 comments (0 inline, 0 general)