41 lines
1.2 KiB
JSON
41 lines
1.2 KiB
JSON
{
|
|
"source": "JSON",
|
|
"data": "BLOCK",
|
|
"version": "0.0.1",
|
|
"type": "javascript.logical operations.not",
|
|
"language": "javascript",
|
|
"extension": "webaudio",
|
|
"help": "Logical Operation NOT",
|
|
"label": "NOT",
|
|
"color": "#24C1D3",
|
|
"group": "Logical Operations",
|
|
"codes": [
|
|
{
|
|
"name": "onload",
|
|
"code": "\n"
|
|
},
|
|
{
|
|
"name": "declaration",
|
|
"code": "\nvar condition$id$ = null;\n\nvar $port[output]$ = [];\n\nfunction not$id$() {\n var ret = !condition$id$; \n for (var i = 0; i < $port[output]$.length ; i++){\n $port[output]$[i](ret);\n }\n return true;\n}\n\nvar $port[condition]$ = function(value){\n condition$id$ = value;\n not$id$();\n return true;\n};\n"
|
|
},
|
|
{
|
|
"name": "execution",
|
|
"code": "\n"
|
|
}
|
|
],
|
|
"properties": [],
|
|
"ports": [
|
|
{
|
|
"conn_type": "input",
|
|
"name": "condition",
|
|
"label": "Condition",
|
|
"type": "javascript.bool"
|
|
},
|
|
{
|
|
"conn_type": "output",
|
|
"name": "output",
|
|
"label": "Output",
|
|
"type": "javascript.bool"
|
|
}
|
|
]
|
|
} |