mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
},
|
||||
"minItems": 3,
|
||||
"maxItems": 3,
|
||||
"options": {
|
||||
"dependencies": {
|
||||
"random-color": false
|
||||
}
|
||||
},
|
||||
"propertyOrder" : 1
|
||||
},
|
||||
"rotation-time": {
|
||||
@@ -34,34 +39,30 @@
|
||||
"propertyOrder" : 3
|
||||
},
|
||||
"brightness": {
|
||||
"type": "number",
|
||||
"type": "integer",
|
||||
"title":"edt_eff_brightness",
|
||||
"default": 100,
|
||||
"minimum" : 1,
|
||||
"minimum" : 0,
|
||||
"maximum" : 100,
|
||||
"step" : 10,
|
||||
"append" : "edt_append_percent",
|
||||
"propertyOrder" : 4
|
||||
},
|
||||
"saturation": {
|
||||
"type": "number",
|
||||
"type": "integer",
|
||||
"title":"edt_eff_saturation",
|
||||
"default": 100,
|
||||
"minimum" : 1,
|
||||
"minimum" : 0,
|
||||
"maximum" : 100,
|
||||
"step" : 10,
|
||||
"append" : "edt_append_percent",
|
||||
"propertyOrder" : 5
|
||||
},
|
||||
"reverse": {
|
||||
"type": "boolean",
|
||||
"title":"edt_eff_reversedirection",
|
||||
"default": false,
|
||||
"propertyOrder" : 6
|
||||
},
|
||||
"random-color": {
|
||||
"type": "boolean",
|
||||
"title":"edt_eff_colorrandom",
|
||||
"default": false,
|
||||
"propertyOrder" : 7
|
||||
"propertyOrder" : 6
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name" : "Sparks Color",
|
||||
"script" : "sparks.py",
|
||||
"args" :
|
||||
{
|
||||
"rotation-time" : 3.0,
|
||||
"sleep-time" : 0.05,
|
||||
"brightness" : 1.0,
|
||||
"saturation" : 1.0,
|
||||
"reverse" : false,
|
||||
"color" : [255,255,255],
|
||||
"random-color" : true
|
||||
}
|
||||
}
|
@@ -7,7 +7,6 @@
|
||||
"sleep-time" : 0.05,
|
||||
"brightness" : 100,
|
||||
"saturation" : 100,
|
||||
"reverse" : false,
|
||||
"color" : [255,255,255],
|
||||
"random-color" : false
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@ rotationTime = float(hyperion.args.get('rotation-time', 3.0))
|
||||
sleepTime = float(hyperion.args.get('sleep-time', 0.05))
|
||||
brightness = float(hyperion.args.get('brightness', 100))/100.0
|
||||
saturation = float(hyperion.args.get('saturation', 100))/100.0
|
||||
reverse = bool(hyperion.args.get('reverse', False))
|
||||
color = list(hyperion.args.get('color', (255,255,255)))
|
||||
randomColor = bool(hyperion.args.get('random-color', False))
|
||||
|
||||
@@ -24,7 +23,7 @@ while not hyperion.abort():
|
||||
if random.random() < 0.005:
|
||||
|
||||
if randomColor:
|
||||
rgb = colorsys.hsv_to_rgb(random.random(), 1, 1)
|
||||
rgb = colorsys.hsv_to_rgb(random.random(), saturation, brightness)
|
||||
for n in range(3):
|
||||
color[n] = int(rgb[n]*255)
|
||||
|
||||
|
Reference in New Issue
Block a user