Changeset - a322fba0035c
[Not reviewed]
default
0 1 1
Drew Perttula - 6 years ago 2019-06-09 18:31:47
drewp@bigasterisk.com
tintable cyc effect
Ignore-this: 61408125389e6146f5835d56a26df07a
2 files changed with 28 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/effect/effecteval.py
Show inline comments
 
@@ -409,6 +409,28 @@ def effect_image(effectSettings, strengt
 
    for dev, y in [(L9['theater/skyline/device/strip1'], 0),
 
                   (L9['theater/skyline/device/strip2'], 1),
 
                   (L9['theater/skyline/device/strip3'], 2)]:
 
        color = sample(img, x, y, effectSettings.get(L9['repeat'], False))
 
        out[(dev, L9['color'])] = scale(rgb_to_hex(color), scl)
 
    return out
 

	
 
def effect_cyc(effectSettings, strength, songTime, noteTime):
 
    colorScale = effectSettings.get(L9['colorScale'], '#ffffff')
 
    r, g, b = map(lambda x: x / 255, hex_to_rgb(colorScale))
 

	
 
    out ={
 
        (L9['theater/skyline/device/cycRed1'], L9['brightness']): r,
 
        (L9['theater/skyline/device/cycRed2'], L9['brightness']): r,
 
        (L9['theater/skyline/device/cycRed3'], L9['brightness']): r,
 
        (L9['theater/skyline/device/cycRed4'], L9['brightness']): r,
 
        (L9['theater/skyline/device/cycGreen1'], L9['brightness']): g,
 
        (L9['theater/skyline/device/cycGreen2'], L9['brightness']): g,
 
        (L9['theater/skyline/device/cycGreen3'], L9['brightness']): g,
 
        (L9['theater/skyline/device/cycGreen4'], L9['brightness']): g,
 
        (L9['theater/skyline/device/cycBlue1'], L9['brightness']): b,
 
        (L9['theater/skyline/device/cycBlue2'], L9['brightness']): b,
 
        (L9['theater/skyline/device/cycBlue3'], L9['brightness']): b,
 
        (L9['theater/skyline/device/cycBlue4'], L9['brightness']): b,
 
         
 
        }
 

	
 
    return out
show/dance2019/effects.n3
Show inline comments
 
new file 100644
 
@prefix : <http://light9.bigasterisk.com/> .
 
@prefix e: <http://light9.bigasterisk.com/effect/> .
 
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
 
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
 

	
 
e:cyc a :Effect ; rdfs:label "cyc".
0 comments (0 inline, 0 general)