Changeset - 2946c9726485
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 8 years ago 2017-06-11 22:35:13
drewp@bigasterisk.com
reuse orange sweep
Ignore-this: 6a1cc8bb9ab3b894b0a07bec82b497f6
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval.py
Show inline comments
 
@@ -285,51 +285,51 @@ def effect_chase1(effectSettings, streng
 
        ]
 

	
 
    members = members + members[-2:0:-1]
 
    
 
    out = {}
 
    period = float(effectSettings.get(L9['period'], 2 / len(members)))
 

	
 
    for i, dev in enumerate(members):
 
        cursor = (songTime / period) % float(len(members))
 
        dist = abs(i - cursor)
 
        radius = 3
 
        if dist < radius:
 
            col = effectSettings.get(L9['colorScale'], '#ffffff')
 
            col = scale(col, effectSettings.get(L9['strength'], 1))
 
            col = scale(col, (1 - dist / radius))
 
        
 
            out.update({
 
                (dev, L9['color']): col,
 
            })
 
    return out
 

	
 
    
 
def effect_orangeSearch(effectSettings, strength, songTime, noteTime):
 
    dev = L9['device/auraStage']
 
    return {(dev, L9['color']): '#c1905d',
 
            (dev, L9['rx']): lerp(.31, .68, nsquare(songTime / 2.0)),
 
            (dev, L9['ry']): lerp(.32, .4,  nsin(songTime / 5)),
 
    return {(dev, L9['color']): '#a885ff',
 
            (dev, L9['rx']): lerp(0, .36, nsin(songTime / 2.0)),
 
            (dev, L9['ry']): lerp(.5, .6,  nsin(songTime / 5)),
 
            (dev, L9['zoom']): .88,
 
            }
 
    
 
def effect_Strobe(effectSettings, strength, songTime, noteTime):
 
    rate = 2
 
    duty = .3
 
    offset = 0
 
    f = (((songTime + offset) * rate) % 1.0)
 
    c = (f < duty) * strength
 
    col = rgb_to_hex([int(c * 255), int(c * 255), int(c * 255)])
 
    return {(L9['device/colorStrip'], L9['color']): Literal(col)}
 

	
 
def effect_lightning(effectSettings, strength, songTime, noteTime):
 
    devs = [L9['device/veryLow1'], L9['device/veryLow2'],
 
            L9['device/veryLow3'], L9['device/veryLow4'],
 
            L9['device/veryLow5'], L9['device/backlight1'],
 
            L9['device/backlight2'], L9['device/backlight3'],
 
            L9['device/backlight4'], L9['device/backlight5'],
 
            L9['device/down2'], L9['device/down3'],
 
            L9['device/down4'], L9['device/hexLow3'],
 
            L9['device/hexLow5'], L9['device/lip1 5'],
 
            L9['device/postL1'], L9['device/postR1']]
 
    out = {}
 
    col = rgb_to_hex([int(255 * strength)] * 3)
0 comments (0 inline, 0 general)