mudança de cores nas portas
This commit is contained in:
parent
355594d3c8
commit
6e36a7cbcc
|
|
@ -10,8 +10,10 @@
|
||||||
"color": "50:150:250:150",
|
"color": "50:150:250:150",
|
||||||
"group": "GUI",
|
"group": "GUI",
|
||||||
"codes": {
|
"codes": {
|
||||||
"declaration": "\n// block_$id$ = $label$\nvar block_$id$_value = $prop[value]$;\nvar $port[click]$ = [];\n",
|
"onload":"",
|
||||||
"execution": "\nfunction click$id$(){\n value = document.getElementById(\"block_$id$\").value;\n for (var i = 0; i < $port[click]$.length ; i++){\n $port[click]$[i](value);\n }\n};\n",
|
"execution": "",
|
||||||
|
"global": "\n// block_$id$ = $label$\nvar block_$id$_value = $prop[value]$;\nvar $port[click]$ = [];\n \n",
|
||||||
|
"function": "function click$id$(){\n value = document.getElementById(\"block_$id$\").value;\n for (var i = 0; i < $port[click]$.length ; i++){\n $port[click]$[i](value);\n }\n};\n",
|
||||||
"html": "\n<button type=\"button\" value=\"$prop[value]$\" onClick=\"click$id$();\"\nid=\"block_$id$\">$prop[label]$</button><br>\n"
|
"html": "\n<button type=\"button\" value=\"$prop[value]$\" onClick=\"click$id$();\"\nid=\"block_$id$\">$prop[label]$</button><br>\n"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
"group": "GUI",
|
"group": "GUI",
|
||||||
"codes": {
|
"codes": {
|
||||||
"declaration": "\n// block_$id$ = $label$\nvar $port[value]$ = [];\n\nvar $port[invalue]$ = function(value){\n document.getElementById(\"block_$id$\").value = value;\n change_value$id$(value);\n return true;\n };\n\n",
|
"declaration": "\n// block_$id$ = $label$\nvar $port[value]$ = [];\n\nvar $port[invalue]$ = function(value){\n document.getElementById(\"block_$id$\").value = value;\n change_value$id$(value);\n return true;\n };\n\n",
|
||||||
"execution": "\nfunction change_value$id$(e){\n value = document.getElementById(\"block_$id$\").value;\n for (var i = 0; i < $port[value]$.length ; i++){\n $port[value]$[i](value);\n }\n};\n",
|
"function": "\nfunction change_value$id$(e){\n value = document.getElementById(\"block_$id$\").value;\n for (var i = 0; i < $port[value]$.length ; i++){\n $port[value]$[i](value);\n }\n};\n",
|
||||||
"html": "\n$prop[label]$ <input type=\"range\" min=\"$prop[min]$\" max=\"$prop[max]$\" onchange=\"change_value$id$(event);\" id=\"block_$id$\"><br>\n"
|
"html": "\n$prop[label]$ <input type=\"range\" min=\"$prop[min]$\" max=\"$prop[max]$\" onchange=\"change_value$id$(event);\" id=\"block_$id$\"><br>\n"
|
||||||
},
|
},
|
||||||
"properties": [
|
"properties": [
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@
|
||||||
"function",
|
"function",
|
||||||
"declaration",
|
"declaration",
|
||||||
"execution",
|
"execution",
|
||||||
"html"
|
"html",
|
||||||
|
"global"
|
||||||
],
|
],
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
|
|
@ -23,7 +24,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"codes": {
|
"codes": {
|
||||||
"index.html": "<html>\n <head>\n <meta http-equiv=\"Cache-Control\" content=\"no-store\" />\n <!-- $author$ $license$ -->\n <title>$prop[title]$</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"theme.css\">\n <script src=\"functions.js\"></script>\n <script>\nvar context;\n\n $single_code[function]$\n\nfunction doit(){\ncontext = new (window.AudioContext || window.webkitAudioContext)();\n //declaration block\n $code[declaration]$\n\n //execution\n $code[execution]$\n\n //connections\n $connections$\n $single_code[onload]$\n}\n </script>\n </head>\n\n <body>\n <button type=\"button\" value=\"1\" onClick=\"doit();loadme();\" id=\"start\">Start Sound!</button><br>\n\n $code[html]$\n </body>\n</html>\n",
|
"index.html": "<html>\n <head>\n <meta http-equiv=\"Cache-Control\" content=\"no-store\" />\n <!-- $author$ $license$ -->\n <title>$prop[title]$</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"theme.css\">\n <script src=\"functions.js\"></script>\n <script>\nvar context;\n\n $code[global]$\n\n\nfunction doit(){\ncontext = new (window.AudioContext || window.webkitAudioContext)();\n //declaration block\n $code[declaration]$\n\n //execution\n $code[execution]$\n\n //connections\n $connections$\n $single_code[onload]$\n}\n </script>\n </head>\n\n <body>\n <button type=\"button\" value=\"1\" onClick=\"doit();\" id=\"start\">Start Sound!</button><br>\n\n $code[html]$\n </body>\n</html>\n",
|
||||||
"theme.css": "/*\nDeveloped by: $author$\n*/\nhtml, body {\n background: #ffeead;\n color: #ff6f69;\n}\nh1, p {\n color: #ff6f69;\n}\n#navbar a {\n color: #ff6f69;\n}\n.item {\n background: #ffcc5c;\n}\nbutton {\n background: #ff6f69;\n color: #ffcc5c;\n}\n",
|
"theme.css": "/*\nDeveloped by: $author$\n*/\nhtml, body {\n background: #ffeead;\n color: #ff6f69;\n}\nh1, p {\n color: #ff6f69;\n}\n#navbar a {\n color: #ff6f69;\n}\n.item {\n background: #ffcc5c;\n}\nbutton {\n background: #ff6f69;\n color: #ffcc5c;\n}\n",
|
||||||
"functions.js": "/*\nDeveloped by: $author$\n*/\n$single_code[function]$\n"
|
"functions.js": "/*\nDeveloped by: $author$\n*/\n$single_code[function]$\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.char",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.char",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "CHAR",
|
"hint": "CHAR",
|
||||||
"color": "#000",
|
"color": "#0F0",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.color",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.color",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "COLOR",
|
"hint": "COLOR",
|
||||||
"color": "#000",
|
"color": "#00F",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.float",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.float",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "FLOAT",
|
"hint": "FLOAT",
|
||||||
"color": "#000",
|
"color": "#FF0",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.midi",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.midi",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "MIDI",
|
"hint": "MIDI",
|
||||||
"color": "#000",
|
"color": "#0FF",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.point",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.point",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "POINT",
|
"hint": "POINT",
|
||||||
"color": "#000",
|
"color": "#F0F",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.sound",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.sound",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "SOUND",
|
"hint": "SOUND",
|
||||||
"color": "#000",
|
"color": "#369",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.connect($input$);\n"
|
"code": "$output$.connect($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.string",
|
"type": "mosaicode_lib_javascript_webaudio.extensions.ports.string",
|
||||||
"language": "javascript",
|
"language": "javascript",
|
||||||
"hint": "STRING",
|
"hint": "STRING",
|
||||||
"color": "#000",
|
"color": "#963",
|
||||||
"multiple": true,
|
"multiple": true,
|
||||||
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
"var_name": "$block[label]$_$block[id]$_$port[name]$",
|
||||||
"code": "$output$.push($input$);\n"
|
"code": "$output$.push($input$);\n"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue