added set array and set object nodes

This commit is contained in:
tamat
2020-12-28 10:35:10 +01:00
parent 49d34fd5b3
commit f682b3e42a
4 changed files with 922 additions and 768 deletions

View File

@@ -3,10 +3,21 @@
var LiteGraph = global.LiteGraph;
function toString(a) {
if(a && a.constructor === Object)
{
try
{
return JSON.stringify(a);
}
catch (err)
{
return String(a);
}
}
return String(a);
}
LiteGraph.wrapFunctionAsNode("string/toString", compare, [""], "String");
LiteGraph.wrapFunctionAsNode("string/toString", toString, [""], "String");
function compare(a, b) {
return a == b;