mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-18 06:10:12 +01:00
37567
.source.1499879393800.0.5760841517536723.html
Normal file
37567
.source.1499879393800.0.5760841517536723.html
Normal file
File diff suppressed because one or more lines are too long
15
dist/image-sequencer.js
vendored
15
dist/image-sequencer.js
vendored
@@ -34803,7 +34803,8 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
var image,
|
||||
steps = [],
|
||||
modules = require('./Modules'),
|
||||
images = {};
|
||||
images = {},
|
||||
inputlog = [];
|
||||
|
||||
// if in browser, prompt for an image
|
||||
// if (options.imageSelect || options.inBrowser) addStep('image-select');
|
||||
@@ -34816,6 +34817,8 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for(arg in arguments){args.push(copy(arguments[arg]));}
|
||||
json_q = formatInput.call(this_,args,"+");
|
||||
|
||||
inputlog.push({method:"addSteps", json_q:copy(json_q)});
|
||||
|
||||
for (i in json_q)
|
||||
for (j in json_q[i])
|
||||
require("./AddStep")(this_,i,json_q[i][j].name,json_q[i][j].o);
|
||||
@@ -34837,7 +34840,9 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
|
||||
args = (this.name == "ImageSequencer")?[]:[this.images];
|
||||
for(arg in arguments) args.push(copy(arguments[arg]));
|
||||
|
||||
json_q = formatInput.call(this_,args,"-");
|
||||
inputlog.push({method:"removeSteps", json_q:copy(json_q)});
|
||||
|
||||
for (img in json_q) {
|
||||
indices = json_q[img].sort(function(a,b){return b-a});
|
||||
@@ -34856,6 +34861,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for (arg in arguments) args.push(arguments[arg]);
|
||||
|
||||
json_q = formatInput.call(this_,args,"^");
|
||||
inputlog.push({method:"insertSteps", json_q:copy(json_q)});
|
||||
|
||||
for (img in json_q) {
|
||||
var details = json_q[img];
|
||||
@@ -34873,6 +34879,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
|
||||
args = (this.name == "ImageSequencer")?[]:[this.images];
|
||||
for (var arg in arguments) args.push(copy(arguments[arg]));
|
||||
|
||||
callback = function() {};
|
||||
for (var arg in args)
|
||||
if(objTypeOf(args[arg]) == "Function")
|
||||
@@ -34890,6 +34897,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for (arg in arguments) args.push(copy(arguments[arg]));
|
||||
json_q = formatInput.call(this,args,"l");
|
||||
|
||||
inputlog.push({method:"loadImages", json_q:copy(json_q)});
|
||||
loadedimages = this.copy(json_q.loadedimages);
|
||||
|
||||
for (i in json_q.images)
|
||||
@@ -34922,6 +34930,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
insertSteps: insertSteps,
|
||||
replaceImage: replaceImage,
|
||||
run: run,
|
||||
inputlog: inputlog,
|
||||
modules: modules,
|
||||
images: images,
|
||||
ui: options.ui,
|
||||
@@ -34936,10 +34945,10 @@ module.exports = ImageSequencer;
|
||||
},{"./AddStep":114,"./FormatInput":115,"./InsertStep":117,"./LoadImage":118,"./Modules":119,"./ReplaceImage":120,"./Run":121,"jquery":44}],117:[function(require,module,exports){
|
||||
function InsertStep(ref, image, index, name, o) {
|
||||
|
||||
function insertStep(image, index, name, o) {
|
||||
function insertStep(image, index, name, o_) {
|
||||
ref.log('\x1b[36m%s\x1b[0m','inserting step \"' + name + '\" to \"' + image + '\" at \"'+index+'\".');
|
||||
|
||||
o = o || {};
|
||||
o = ref.copy(o_);
|
||||
o.id = ref.options.sequencerCounter++; //Gives a Unique ID to each step
|
||||
o.name = o.name || name;
|
||||
o.selector = o.selector || 'ismod-' + name;
|
||||
|
||||
2
index.js
2
index.js
@@ -5,7 +5,7 @@ sequencer.loadImages({images:{red:'examples/red.jpg'},callback:function(){
|
||||
sequencer.addSteps(['do-nothing-pix','ndvi-red','invert']);
|
||||
sequencer.removeSteps(1);
|
||||
sequencer.insertSteps({
|
||||
red: [{index: -1, name: 'do-nothing', o:{}}]
|
||||
red: [{index: -1, name: 'do-nothing-pix', o:{}}]
|
||||
});
|
||||
sequencer.run();
|
||||
}});
|
||||
|
||||
@@ -41,7 +41,8 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
var image,
|
||||
steps = [],
|
||||
modules = require('./Modules'),
|
||||
images = {};
|
||||
images = {},
|
||||
inputlog = [];
|
||||
|
||||
// if in browser, prompt for an image
|
||||
// if (options.imageSelect || options.inBrowser) addStep('image-select');
|
||||
@@ -54,6 +55,8 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for(arg in arguments){args.push(copy(arguments[arg]));}
|
||||
json_q = formatInput.call(this_,args,"+");
|
||||
|
||||
inputlog.push({method:"addSteps", json_q:copy(json_q)});
|
||||
|
||||
for (i in json_q)
|
||||
for (j in json_q[i])
|
||||
require("./AddStep")(this_,i,json_q[i][j].name,json_q[i][j].o);
|
||||
@@ -75,7 +78,9 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
|
||||
args = (this.name == "ImageSequencer")?[]:[this.images];
|
||||
for(arg in arguments) args.push(copy(arguments[arg]));
|
||||
|
||||
json_q = formatInput.call(this_,args,"-");
|
||||
inputlog.push({method:"removeSteps", json_q:copy(json_q)});
|
||||
|
||||
for (img in json_q) {
|
||||
indices = json_q[img].sort(function(a,b){return b-a});
|
||||
@@ -94,6 +99,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for (arg in arguments) args.push(arguments[arg]);
|
||||
|
||||
json_q = formatInput.call(this_,args,"^");
|
||||
inputlog.push({method:"insertSteps", json_q:copy(json_q)});
|
||||
|
||||
for (img in json_q) {
|
||||
var details = json_q[img];
|
||||
@@ -111,6 +117,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
const this_ = (this.name == "ImageSequencer")?this:this.sequencer;
|
||||
args = (this.name == "ImageSequencer")?[]:[this.images];
|
||||
for (var arg in arguments) args.push(copy(arguments[arg]));
|
||||
|
||||
callback = function() {};
|
||||
for (var arg in args)
|
||||
if(objTypeOf(args[arg]) == "Function")
|
||||
@@ -128,6 +135,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
for (arg in arguments) args.push(copy(arguments[arg]));
|
||||
json_q = formatInput.call(this,args,"l");
|
||||
|
||||
inputlog.push({method:"loadImages", json_q:copy(json_q)});
|
||||
loadedimages = this.copy(json_q.loadedimages);
|
||||
|
||||
for (i in json_q.images)
|
||||
@@ -160,6 +168,7 @@ ImageSequencer = function ImageSequencer(options) {
|
||||
insertSteps: insertSteps,
|
||||
replaceImage: replaceImage,
|
||||
run: run,
|
||||
inputlog: inputlog,
|
||||
modules: modules,
|
||||
images: images,
|
||||
ui: options.ui,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
function InsertStep(ref, image, index, name, o) {
|
||||
|
||||
function insertStep(image, index, name, o) {
|
||||
function insertStep(image, index, name, o_) {
|
||||
ref.log('\x1b[36m%s\x1b[0m','inserting step \"' + name + '\" to \"' + image + '\" at \"'+index+'\".');
|
||||
|
||||
o = o || {};
|
||||
o = ref.copy(o_);
|
||||
o.id = ref.options.sequencerCounter++; //Gives a Unique ID to each step
|
||||
o.name = o.name || name;
|
||||
o.selector = o.selector || 'ismod-' + name;
|
||||
|
||||
Reference in New Issue
Block a user