mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-07 17:00:02 +01:00
Added slider for Brightness and Blur modules (#428)
This commit is contained in:
14673
dist/image-sequencer.js
vendored
14673
dist/image-sequencer.js
vendored
File diff suppressed because one or more lines are too long
2
dist/image-sequencer.min.js
vendored
2
dist/image-sequencer.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -75,8 +75,20 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
'" value="' +
|
||||
paramVal +
|
||||
'" placeholder ="' +
|
||||
(inputDesc.placeholder || "") +
|
||||
'">';
|
||||
(inputDesc.placeholder || "");
|
||||
|
||||
if(inputDesc.type.toLowerCase() == "range")
|
||||
{
|
||||
html+=
|
||||
'"min="'+
|
||||
inputDesc.min +
|
||||
'"max="'+
|
||||
inputDesc.max +
|
||||
'"step="' +
|
||||
inputDesc.step + '">'+'<span>'+paramVal+'</span>';
|
||||
|
||||
}
|
||||
else html+= '">';
|
||||
}
|
||||
|
||||
var div = document.createElement("div");
|
||||
@@ -133,6 +145,12 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
);
|
||||
|
||||
stepsEl.appendChild(step.ui);
|
||||
|
||||
var inputs = document.querySelectorAll('input[type="range"]')
|
||||
for(i in inputs)
|
||||
inputs[i].oninput = function(e) {
|
||||
e.target.nextSibling.innerHTML = e.target.value;
|
||||
}
|
||||
}
|
||||
|
||||
function onDraw(step) {
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
"description": "Applies a Gaussian blur given by the intensity value",
|
||||
"inputs": {
|
||||
"blur": {
|
||||
"type": "integer",
|
||||
"type": "range",
|
||||
"desc": "Amount of gaussian blur(Less blur gives more detail, typically 0-5)",
|
||||
"default": 2
|
||||
"default": "2",
|
||||
"min": "0",
|
||||
"max": "5",
|
||||
"step": "0.25"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
"description": "Change the brightness of the image by given percent value",
|
||||
"inputs": {
|
||||
"brightness": {
|
||||
"type": "number",
|
||||
"type": "range",
|
||||
"desc": "% brightness for the new image",
|
||||
"placeholder": "0",
|
||||
"default": 0
|
||||
"default": "0",
|
||||
"min": "0",
|
||||
"max": "100",
|
||||
"step": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user