extend effect engine with qt image effects (#249)

* - effects now can use qt image effects
- rainbow swirtl is now suitable for any led layout - including matrix

* fix rainbow effect

* effect: add radialGradient

* fix some js errors

* optimize code

* try fix travis test not working as expected

* fix default config files

* fix config
This commit is contained in:
redPanther
2016-09-21 22:01:50 +02:00
committed by GitHub
parent 9340a9a7c8
commit f88cd3a230
17 changed files with 373 additions and 91 deletions

View File

@@ -23,20 +23,6 @@ $(hyperion).one("cmd-config-getschema", function(event) {
parsedConfSchemaJSON = event.response.result;
schema = parsedConfSchemaJSON.properties;
blackborderdetector = schema.blackborderdetector;
color = schema.color;
effects = schema.effects;
forwarder = schema.forwarder;
initialEffect = schema.initialEffect;
kodiVideoChecker = schema.kodiVideoChecker;
smoothing = schema.smoothing;
logger = schema.logger;
jsonServer = schema.jsonServer;
protoServer = schema.protoServer;
boblightServer = schema.boblightServer;
udpListener = schema.udpListener;
webConfig = schema.webConfig;
var element = document.getElementById('editor_container');
var general_conf_editor = new JSONEditor(element,{
@@ -50,19 +36,19 @@ $(hyperion).one("cmd-config-getschema", function(event) {
schema: {
title:'',
properties: {
blackborderdetector,
color,
effects,
forwarder,
initialEffect,
kodiVideoChecker,
smoothing,
logger,
jsonServer,
protoServer,
boblightServer,
udpListener,
webConfig
blackborderdetector: schema.blackborderdetector,
color : schema.color,
effects : schema.effects,
forwarder : schema.forwarder,
initialEffect : schema.initialEffect,
kodiVideoChecker : schema.kodiVideoChecker,
smoothing : schema.smoothing,
logger : schema.logger,
jsonServer : schema.jsonServer,
protoServer : schema.protoServer,
boblightServer : schema.boblightServer,
udpListener : schema.udpListener,
webConfig : schema.webConfig
}
}
});
@@ -80,7 +66,7 @@ $(hyperion).one("cmd-config-getschema", function(event) {
// });
//Alternative Function with submit button to get Values
$('btn_submit').off().on('click',function() {
$('#btn_submit').off().on('click',function() {
console.log(general_conf_editor.getValue());
});

View File

@@ -20,15 +20,14 @@ function removeAdvanced(obj,searchStack)
}
*/
var grabber_conf_editor = null;
$(hyperion).one("cmd-config-getschema", function(event) {
parsedConfSchemaJSON = event.response.result;
schema = parsedConfSchemaJSON.properties;
schema_framegrabber = schema.framegrabber;
schema_grabberv4l2 = schema["grabber-v4l2"];
var element = document.getElementById('editor_container');
var grabber_conf_editor = new JSONEditor(element,{
grabber_conf_editor = new JSONEditor(element,{
theme: 'bootstrap3',
iconlib: "fontawesome4",
disable_collapse: 'true',
@@ -39,8 +38,8 @@ $(hyperion).one("cmd-config-getschema", function(event) {
schema: {
title:'',
properties: {
schema_framegrabber,
schema_grabberv4l2,
framegrabber: schema.framegrabber,
grabberV4L2 : schema["grabberV4L2"]
}
}
});
@@ -59,7 +58,7 @@ $(document).ready( function() {
document.getElementById('btn_submit').addEventListener('click',function() {
// Get the value from the editor
//console.log(general_conf_editor.getValue());
console.log(grabber_conf_editor.getValue());
});
// $("[type='checkbox']").bootstrapSwitch();
});

View File

@@ -153,8 +153,8 @@ $(document).ready(function() {
schema: {
title:' ',
properties: {
generalOptions,
specificOptions,
generalOptions : generalOptions,
specificOptions : specificOptions,
}
}
});

View File

@@ -96,6 +96,7 @@ $(document).ready(function() {
$('#cp2').colorpicker().on('changeColor', function(e) {
color = e.color.toRGB();
$("#effect_select").val("__none__");
requestSetColor(color.r, color.g, color.b);
});
});
@@ -106,7 +107,10 @@ $(document).ready(function() {
efx = $(this).val();
if(efx != "__none__")
{
requestPlayEffect(efx);
requestPriorityClear();
$(hyperion).one("cmd-clear", function(event) {
setTimeout(function() {requestPlayEffect(efx)}, 100);
});
}
});