Mercurial > code > home > repos > light9
changeset 1472:01296a955473
lightning effect
Ignore-this: d6d979135c5d7297b2a92b45a89792e6
author | drewp@bigasterisk.com |
---|---|
date | Sun, 12 Jun 2016 19:27:35 +0000 |
parents | ba24eeb2853a |
children | eea47b8ae21d |
files | light9/effect/effecteval.py show/dance2016/effect.n3 |
diffstat | 2 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/effect/effecteval.py Sun Jun 12 19:07:00 2016 +0000 +++ b/light9/effect/effecteval.py Sun Jun 12 19:27:35 2016 +0000 @@ -182,3 +182,20 @@ 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
--- a/show/dance2016/effect.n3 Sun Jun 12 19:07:00 2016 +0000 +++ b/show/dance2016/effect.n3 Sun Jun 12 19:27:35 2016 +0000 @@ -19,6 +19,7 @@ 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" .