diff --git a/index.html b/index.html index f189e98e..7c32e04e 100644 --- a/index.html +++ b/index.html @@ -87,9 +87,9 @@

Scheme Playground

-

Minecraft Playground

- -

To hack live minecraft at home please follow the installation instructions

+

Node JS Playground

+ +

Especially useful for programming on Raspberry Pi and hacking the free Minecraft Pi Edition as well as playing with buttons and gadgets at home, please follow the installation instructions

diff --git a/landing/images/node.png b/landing/images/node.png new file mode 100644 index 00000000..0af79cef Binary files /dev/null and b/landing/images/node.png differ diff --git a/languages/node/blocks/array_blockmenu.js b/languages/node/blocks/array_blockmenu.js index c32de984..4ef41d03 100644 --- a/languages/node/blocks/array_blockmenu.js +++ b/languages/node/blocks/array_blockmenu.js @@ -120,10 +120,8 @@ { "name": "array", "type": "array", - "value": null - }, - { - "name": "length" + "value": null, + "suffix": "length" } ] }, @@ -156,10 +154,8 @@ { "name": "array", "type": "array", - "value": null - }, - { - "name": "pop" + "value": null, + "suffix": "pop" } ] }, @@ -173,10 +169,8 @@ { "name": "array", "type": "array", - "value": null - }, - { - "name": "shift" + "value": null, + "suffix": "shift" } ] }, @@ -190,10 +184,8 @@ { "name": "array", "type": "array", - "value": null - }, - { - "name": "reversed" + "value": null, + "suffix": "reversed" } ] }, @@ -249,10 +241,8 @@ { "name": "array", "type": "array", - "value": null - }, - { - "name": "for each" + "value": null, + "suffix": "for each" } ] } diff --git a/languages/node/blocks/control_blockmenu.js b/languages/node/blocks/control_blockmenu.js index c34e027e..5b044c05 100644 --- a/languages/node/blocks/control_blockmenu.js +++ b/languages/node/blocks/control_blockmenu.js @@ -77,10 +77,8 @@ { "name": "Repeat", "type": "number", - "value": "2" - }, - { - "name": "times a second" + "value": "2", + "suffix": "times a second" } ] }, @@ -108,10 +106,8 @@ { "name": "Repeat every", "type": "number", - "value": "10" - }, - { - "name": "seconds" + "value": "10", + "suffix": "seconds" } ] }, @@ -167,10 +163,8 @@ { "name": "Wait", "type": "number", - "value": "1" - }, - { - "name": "secs" + "value": "1", + "suffix": "secs" } ] }, diff --git a/languages/node/blocks/math_blockmenu.js b/languages/node/blocks/math_blockmenu.js index 7d9a3562..91af4295 100644 --- a/languages/node/blocks/math_blockmenu.js +++ b/languages/node/blocks/math_blockmenu.js @@ -310,10 +310,8 @@ { "name": "cosine of", "type": "number", - "value": "10" - }, - { - "name": "degrees" + "value": "10", + "suffix": "degrees" } ] }, @@ -327,10 +325,8 @@ { "name": "sine of", "type": "number", - "value": "10" - }, - { - "name": "degrees" + "value": "10", + "suffix": "degrees" } ] }, @@ -344,10 +340,8 @@ { "name": "tangent of", "type": "number", - "value": "10" - }, - { - "name": "degrees" + "value": "10", + "suffix": "degrees" } ] }, diff --git a/languages/node/blocks/mc_blocks.css b/languages/node/blocks/mc_blocks.css index 7d1c54d2..02dc7540 100644 --- a/languages/node/blocks/mc_blocks.css +++ b/languages/node/blocks/mc_blocks.css @@ -1,4 +1,4 @@ -.blocks, .blocks .holder{ +.mcblocks, .mcblocks .holder{ border-color: hsl(195, 65%, 79%); background-color: hsl(195, 62%, 89%); } diff --git a/languages/node/blocks/mc_blocks_blockmenu.js b/languages/node/blocks/mc_blocks_blockmenu.js index 932a0779..425673c2 100644 --- a/languages/node/blocks/mc_blocks_blockmenu.js +++ b/languages/node/blocks/mc_blocks_blockmenu.js @@ -3,7 +3,7 @@ wb.menu( { "sectionkey": "mcblocks", - "name": "Blocks", + "name": "Minecraft Blocks", "help": "Find and set Minecraft Blocks", "blocks": [ { diff --git a/languages/node/blocks/mc_camera.css b/languages/node/blocks/mc_camera.css index 1c9f5abe..b9996114 100644 --- a/languages/node/blocks/mc_camera.css +++ b/languages/node/blocks/mc_camera.css @@ -1,4 +1,4 @@ -.camera, .camera .holder{ +.mccamera, .mccamera .holder{ border-color: hsl(164,65%,83%); background-color: hsl(164, 65%, 93%); } diff --git a/languages/node/blocks/mc_camera_blockmenu.js b/languages/node/blocks/mc_camera_blockmenu.js index d75c485b..1836a70a 100644 --- a/languages/node/blocks/mc_camera_blockmenu.js +++ b/languages/node/blocks/mc_camera_blockmenu.js @@ -3,7 +3,7 @@ wb.menu( { "sectionkey": "mccamera", - "name": "Camera", + "name": "Minecraft Camera", "help": "Manipulating the Minecraft Camera", "blocks": [ diff --git a/languages/node/blocks/mc_game.css b/languages/node/blocks/mc_game.css index eae62f7d..e5b3c66a 100644 --- a/languages/node/blocks/mc_game.css +++ b/languages/node/blocks/mc_game.css @@ -1,4 +1,4 @@ -.minecraftgame, .minecraftgame .holder{ +.mcgame, .mcgame .holder{ border-color: hsl(156, 90%, 66%); background-color: hsl(156, 85%, 70%); } diff --git a/languages/node/blocks/mc_game_blockmenu.js b/languages/node/blocks/mc_game_blockmenu.js index f8be5677..3c45abde 100644 --- a/languages/node/blocks/mc_game_blockmenu.js +++ b/languages/node/blocks/mc_game_blockmenu.js @@ -2,7 +2,7 @@ 'use strict'; wb.menu( { - "sectionkey": "minecraft", + "sectionkey": "mcgame", "name": "Minecraft Game", "help": "Blocks which connect to and manipulate Minecraft Pi Edition", "blocks": [ @@ -18,24 +18,32 @@ "script": "var client = new Minecraft('localhost', 4711, function() {[[1]]});", "help": "All Minecraft things in here" }, - - { "blocktype": "step", "id": "9161dad6-2d90-4d70-b447-5cc61130350c", "sockets": [ { "name": "Say", - "type": "any", - "value": "hi" - }, + "type": "string", + "value": "hi", + "suffix": "in chat" + } + ], + "script": "client.chat({{1}});", + "help": "Send a message as chat" + }, + { + "blocktype": "step", + "id": "aded8d3e-9815-41f2-8988-dec3cca30c72", + "sockets": [ { - "name": "in chat" + "name": "Send data to chat", + "type": "any", + "value": "0" } - ], "script": "client.chat({{1}}.toString());", - "help": "Send a message as chat" + "help": "Send data to chat (will try to convert it to text first)" }, { diff --git a/languages/node/blocks/mc_game_ide.js b/languages/node/blocks/mc_game_ide.js index 160205be..13ee32d1 100644 --- a/languages/node/blocks/mc_game_ide.js +++ b/languages/node/blocks/mc_game_ide.js @@ -1,8 +1,8 @@ -wb.requiredjs.before.minecraftgame = "var Minecraft = require('minecraft-pi-vec3');\nvar v= require('vec3');"; +wb.requiredjs.before.mcgame = "var Minecraft = require('minecraft-pi-vec3');\nvar v= require('vec3');"; -wb.requiredjs.after.minecraftgame = "\nprocess.on('exit',function(){console.log(\"Caught exit\");client.end();});"; +wb.requiredjs.after.mcgame = "\nprocess.on('exit',function(){console.log(\"Caught exit\");client.end();});"; // TODO : fix blocktypes to number or text not both diff --git a/languages/node/blocks/mc_player.css b/languages/node/blocks/mc_player.css index f18bf30c..8a2f7738 100644 --- a/languages/node/blocks/mc_player.css +++ b/languages/node/blocks/mc_player.css @@ -1,4 +1,4 @@ -.player, .player .holder{ +.mcplayer, .mcplayer .holder{ border-color: hsl(264,62%,79%); background-color: hsl(264,62%,89%); } diff --git a/languages/node/blocks/mc_player_blockmenu.js b/languages/node/blocks/mc_player_blockmenu.js index b7c0b499..3a3b0ed0 100644 --- a/languages/node/blocks/mc_player_blockmenu.js +++ b/languages/node/blocks/mc_player_blockmenu.js @@ -3,7 +3,7 @@ wb.menu( { "sectionkey": "mcplayer", - "name": "Player", + "name": "Minecraft Player", "help": "Find and move Steve the Minecraft player", "blocks": [ { diff --git a/languages/node/blocks/mc_position.css b/languages/node/blocks/mc_position.css index 5f1f317f..3adb2250 100644 --- a/languages/node/blocks/mc_position.css +++ b/languages/node/blocks/mc_position.css @@ -1,4 +1,4 @@ -.position, .position .holder{ +.mcposition, .mcposition .holder{ border-color: hsl(115, 65%, 79%); background-color: hsl(115, 62%, 89%); } diff --git a/languages/node/blocks/mc_position_blockmenu.js b/languages/node/blocks/mc_position_blockmenu.js index ff62ee64..6ded9ef3 100644 --- a/languages/node/blocks/mc_position_blockmenu.js +++ b/languages/node/blocks/mc_position_blockmenu.js @@ -3,7 +3,7 @@ wb.menu( { "sectionkey": "mcposition", - "name": "Position", + "name": "Minecraft Position", "help": "Find and change Minecraft Positions", "blocks": [ { @@ -190,10 +190,8 @@ { "name": "position", "type": "position", - "block": "8bb6aab6-273d-4671-8caa-9c15b5c486a7" - }, - { - "name": "as text" + "block": "8bb6aab6-273d-4671-8caa-9c15b5c486a7", + "suffix": "as text" } ], "script": "{{1}}.toString()", @@ -249,10 +247,8 @@ { "name": "by", "type": "number", - "value": "1" - }, - { - "name": "block(s)" + "value": "1", + "suffix": "block(s)" } ], "script": "client.directions.forEach(function(dir, idx){var position##=client.directioncalcs[dir]({{1}},{{2}});[[1]]});", diff --git a/languages/node/blocks/string_blockmenu.js b/languages/node/blocks/string_blockmenu.js index 74d4fa2d..e05bc009 100644 --- a/languages/node/blocks/string_blockmenu.js +++ b/languages/node/blocks/string_blockmenu.js @@ -73,10 +73,8 @@ { "name": "string", "type": "string", - "value": null - }, - { - "name": "length" + "value": null, + "suffix": "length" } ] },