Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (48 sloc) 11.8 KB
{
"HIGHLIGHTSTROKECOLORS": {
"maths": "#FFCDDF"
},
"ARGPLUGINS": {
"asin": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.asin(logo.parseArg(logo, turtle, conns[1]));",
"cos": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.cos(logo.parseArg(logo, turtle, conns[1]));",
"e": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.E;",
"power": "var block = logo.blocks.blockList[blk];var conns = block.connections;var base = logo.parseArg(logo, turtle, conns[1]);var exp = logo.parseArg(logo, turtle, conns[2]);block.value = Math.pow(base, exp);",
"atan": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.atan(logo.parseArg(logo, turtle, conns[1]));",
"floor": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.floor(logo.parseArg(logo, turtle, conns[1]));",
"ceiling": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.ceil(logo.parseArg(logo, turtle, conns[1]));",
"radians": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) * (Math.PI/180);",
"degrees": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) * (180/Math.PI);",
"acos": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.acos(logo.parseArg(logo, turtle, conns[1]));",
"pi": "var block = logo.blocks.blockList[blk];var conns = block.connecti
ons;block.value = Math.PI;",
"sin": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.sin(logo.parseArg(logo, turtle, conns[1]));",
"tan": "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.tan(logo.parseArg(logo, turtle, conns[1]));"
},
"PALETTEHIGHLIGHTCOLORS": {
"maths": "#FF5293"
},
"PALETTEPLUGINS": {
"maths": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><!-- Created with Inkscape (http://www.inkscape.org/) --><svg xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:svg=\"http://www.w3.org/2000/svg\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"55\" height=\"55\" viewBox=\"0 0 55 55\" id=\"svg2\" xml:space=\"preserve\"><metadata id=\"metadata13\"><rdf:RDF><cc:Work rdf:about=\"\"><dc:format>image/svg+xml</dc:format><dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs id=\"defs11\" /><g id=\"toolbar-trigonometry\" style=\"fill:#000000;display:block\"><path d=\"m 11.852704,38.123539 31.294591,0 -31.294591,-26.247077 z\" id=\"path5\" style=\"fill:none;stroke:#FF6EA1;stroke-width:3.53326035\" /><path d=\"m 11.852704,30.047514 8.076024,0 0,8.076025\" id=\"path7\" style=\"fill:none;stroke:#FF6EA1;stroke-width:1.51425433\" /></g></svg>"
},
"BLOCKPLUGINS": {
"asin": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('asin');",
"cos": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('cos');",
"e": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};staticBlock('e', 'e');",
"atan": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('atan');",
"power": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};var block = new ProtoBlock('power');block.palette = palettes.dict['maths'];blocks.protoBlockDict['power'] = block;block.staticLabels.push(_('power'), _('base'), _('exp'));block.twoArgMathBlock();block.defaults.push(10, 2);",
"floor": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock(_('floor'));",
"ceiling": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock(_('ceiling'));",
"sin": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('sin');",
"degrees": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock(_('degrees'), _('to degrees'));",
"tan": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('tan');",
"pi": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};staticBlock('pi', '\u03c0');",
"acos": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock('acos');",
"radians": "var simpleOneArgBlock = function (name, label) { if (label === undefined) { var label = name; } var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.oneArgMathBlock(); block.defaults.push(1);};var staticBlock = function (name, label) { var block = new ProtoBlock(name); block.palette = palettes.dict['maths']; blocks.protoBlockDict[name] = block; block.staticLabels.push(label); block.adjustWidthToLabel(); block.parameterBlock();};simpleOneArgBlock(_('radians'), _('to radians'));"
},
"PALETTEFILLCOLORS": {
"maths": "#FF6EA1"
},
"PALETTESTROKECOLORS": {
"maths": "#FF2C76"
}
}