Changeset - 01296a955473
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 9 years ago 2016-06-12 19:27:35
drewp@bigasterisk.com
lightning effect
Ignore-this: d6d979135c5d7297b2a92b45a89792e6
2 files changed with 18 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval.py
Show inline comments
 
@@ -182,3 +182,20 @@ def effect_Strobe(effectSettings, streng
 
    col = rgb_to_hex([c * 255, c * 255, c * 255])
 
    return {(L9['device/colorStrip'], L9['color']): Literal(col)}
 

	
 
def effect_lightning(effectSettings, strength, songTime):
 
    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([255 * strength] * 3)
 
    for i, dev in enumerate(devs):
 
        n = noise((songTime * 8 + i * 6.543) % 100.0)
 
        if n > .4:
 
            out[(dev, L9['color'])] = col
 
    return out
show/dance2016/effect.n3
Show inline comments
 
@@ -19,6 +19,7 @@ effect:Strobe a :Effect; rdfs:label "str
 
effect:animRainbow a :Effect; rdfs:label "animRainbow"; :publishAttr :strength, :rate ; :group "anim".
 

	
 
effect:orangeSearch a :Effect; :publishAttr :strength ; :group "anim".
 
effect:lightning a :Effect; :publishAttr :strength ; :group "anim".
 

	
 
effect:house :group "main" .
 
effect:cyc :group "main" .
0 comments (0 inline, 0 general)