62 lines
2.3 KiB
JSON
62 lines
2.3 KiB
JSON
{
|
|
"source": "JSON",
|
|
"data": "BLOCK",
|
|
"version": "0.0.1",
|
|
"type": "print",
|
|
"language": "javascript",
|
|
"extension": "webaudio",
|
|
"help": "Print value",
|
|
"label": "Print",
|
|
"color": "50:150:250:150",
|
|
"group": "GUI",
|
|
"codes": {
|
|
"declaration": "\n// $label$\nvar $port[float_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = value;\n return true;\n };\n\nvar $port[char_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = value;\n return true;\n };\n\nvar $port[color_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = value;\n return true;\n };\n\nvar $port[string_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = value;\n return true;\n };\n\nvar $port[point_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = \"(\"+value+\")\";\n return true;\n };\n \nvar $port[bool_value]$ = function(value){\n document.getElementById(\"block_$id$\").innerHTML = \"(\"+value+\")\";\n return true;\n }; \n",
|
|
"html": "\n$prop[label]$ <span id=\"block_$id$\"></span><br>\n"
|
|
},
|
|
"properties": [
|
|
{
|
|
"name": "label",
|
|
"label": "Label",
|
|
"value": "Label",
|
|
"type": "String"
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.float",
|
|
"name": "float_value",
|
|
"conn_type": "Input",
|
|
"label": "Float Value"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.char",
|
|
"conn_type": "Input",
|
|
"name": "char_value",
|
|
"label": "Char Value"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.color",
|
|
"conn_type": "Input",
|
|
"name": "color_value",
|
|
"label": "Color Value"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.string",
|
|
"conn_type": "Input",
|
|
"name": "string_value",
|
|
"label": "String Value"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.point",
|
|
"conn_type": "Input",
|
|
"name": "point_value",
|
|
"label": "Point Value"
|
|
},
|
|
{
|
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.bool",
|
|
"conn_type": "Input",
|
|
"name": "bool_value",
|
|
"label": "Bool Value"
|
|
}
|
|
]
|
|
} |