mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-12 19:30:00 +01:00
Minimize mod req (#289)
* remove trailing spaces from Run.js Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * minimize module requirements demonstrated with invert fixes #122 Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactored modules Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update docs Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * remove all trailing spaces from all files Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fixing crop module Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * update contributing.md Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
5132612dc2
commit
8d6b82d988
@@ -3,11 +3,8 @@
|
||||
*/
|
||||
module.exports = function Ndvi(options,UI) {
|
||||
|
||||
options = options || {};
|
||||
options.filter = options.filter || "red";
|
||||
|
||||
// Tell the UI that a step has been set up.
|
||||
UI.onSetup(options.step);
|
||||
var output;
|
||||
|
||||
// The function which is called on every draw.
|
||||
@@ -16,8 +13,6 @@ module.exports = function Ndvi(options,UI) {
|
||||
progressObj.stop(true);
|
||||
progressObj.overrideFlag = true;
|
||||
|
||||
// Tell the UI that a step is being drawn.
|
||||
UI.onDraw(options.step);
|
||||
var step = this;
|
||||
|
||||
function changePixel(r, g, b, a) {
|
||||
@@ -32,13 +27,8 @@ module.exports = function Ndvi(options,UI) {
|
||||
// This output is accessible by Image Sequencer
|
||||
step.output = {src:datauri,format:mimetype};
|
||||
|
||||
// This output is accessible by the UI.
|
||||
options.step.output = datauri;
|
||||
|
||||
// Tell the UI that step has been drawn succesfully.
|
||||
UI.onComplete(options.step);
|
||||
}
|
||||
|
||||
|
||||
return require('../_nomodule/PixelManipulation.js')(input, {
|
||||
output: output,
|
||||
changePixel: changePixel,
|
||||
|
||||
Reference in New Issue
Block a user