mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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());
|
||||
});
|
||||
|
||||
|
@@ -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();
|
||||
});
|
||||
|
@@ -153,8 +153,8 @@ $(document).ready(function() {
|
||||
schema: {
|
||||
title:' ',
|
||||
properties: {
|
||||
generalOptions,
|
||||
specificOptions,
|
||||
generalOptions : generalOptions,
|
||||
specificOptions : specificOptions,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user