33 lines
1.0 KiB
JSON
33 lines
1.0 KiB
JSON
{
|
|
"source": "JSON",
|
|
"data": "BLOCK",
|
|
"version": "0.0.1",
|
|
"type": "not",
|
|
"language": "javascript",
|
|
"extension": "webaudio",
|
|
"help": "Logical Operation NOT",
|
|
"label": "NOT",
|
|
"color": "249:229:4:150",
|
|
"group": "Arithmetics",
|
|
"codes": {
|
|
"onload": "\n\n",
|
|
"declaration": "\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",
|
|
"execution": "\n\n"
|
|
},
|
|
"properties": [],
|
|
"ports": [
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.bool",
|
|
"name": "condition",
|
|
"label": "Condition",
|
|
"conn_type": "Input"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.bool",
|
|
"name": "output",
|
|
"label": "Output",
|
|
"conn_type": "Output"
|
|
}
|
|
]
|
|
}
|