I think I messed up the git again...

This commit is contained in:
tamat
2019-08-16 21:09:51 +02:00
parent 35773309fb
commit ea2a44ed97
10 changed files with 11727 additions and 9272 deletions

View File

@@ -494,6 +494,25 @@
LiteGraph.registerNodeType("math/scale", MathScale);
//Gate
function Gate() {
this.addInput("v","boolean");
this.addInput("A");
this.addInput("B");
this.addOutput("out");
}
Gate.title = "Gate";
Gate.desc = "if v is true, then outputs A, otherwise B";
Gate.prototype.onExecute = function() {
var v = this.getInputData(0);
this.setOutputData(0, this.getInputData( v ? 1 : 2 ));
};
LiteGraph.registerNodeType("math/gate", Gate);
//Math Average
function MathAverageFilter() {
this.addInput("in", "number");
@@ -784,7 +803,8 @@
function MathCondition() {
this.addInput("A", "number");
this.addInput("B", "number");
this.addOutput("out", "boolean");
this.addOutput("true", "boolean");
this.addOutput("false", "boolean");
this.addProperty("A", 1);
this.addProperty("B", 1);
this.addProperty("OP", ">", "enum", { values: MathCondition.values });
@@ -850,6 +870,7 @@
}
this.setOutputData(0, result);
this.setOutputData(1, !result);
};
LiteGraph.registerNodeType("math/condition", MathCondition);