not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
26 KiB

  1. {
  2. "HIGHLIGHTSTROKECOLORS": [
  3. [
  4. "maths",
  5. "#000000"
  6. ]
  7. ],
  8. "ARGPLUGINS": [
  9. [
  10. "power",
  11. "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);"
  12. ],
  13. [
  14. "sin",
  15. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.sin(logo.parseArg(logo, turtle, conns[1]));"
  16. ],
  17. [
  18. "cos",
  19. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.cos(logo.parseArg(logo, turtle, conns[1]));"
  20. ],
  21. [
  22. "sin",
  23. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.tan(logo.parseArg(logo, turtle, conns[1]));"
  24. ],
  25. [
  26. "asin",
  27. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.asin(logo.parseArg(logo, turtle, conns[1]));"
  28. ],
  29. [
  30. "acos",
  31. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.acos(logo.parseArg(logo, turtle, conns[1]));"
  32. ],
  33. [
  34. "atan",
  35. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.atan(logo.parseArg(logo, turtle, conns[1]));"
  36. ],
  37. [
  38. "floor",
  39. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.floor(logo.parseArg(logo, turtle, conns[1]));"
  40. ],
  41. [
  42. "ceiling",
  43. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.ceil(logo.parseArg(logo, turtle, conns[1]));"
  44. ],
  45. [
  46. "degrees",
  47. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) * (180/Math.PI);"
  48. ],
  49. [
  50. "radians",
  51. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = logo.parseArg(logo, turtle, conns[1]) * (Math.PI/180);"
  52. ],
  53. [
  54. "pi",
  55. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.PI;"
  56. ],
  57. [
  58. "e",
  59. "var block = logo.blocks.blockList[blk];var conns = block.connections;block.value = Math.E;"
  60. ]
  61. ],
  62. "PALETTEHIGHLIGHTCOLORS": [
  63. [
  64. "maths",
  65. "#ffb1b3"
  66. ]
  67. ],
  68. "PALETTEPLUGINS": [
  69. [
  70. "maths",
  71. "<?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:#ffffff;stroke-width:3.53326035\" /><path d=\"m 11.852704,30.047514 8.076024,0 0,8.076025\" id=\"path7\" style=\"fill:none;stroke:#ffffff;stroke-width:1.51425433\" /></g></svg>"
  72. ]
  73. ],
  74. "BLOCKPLUGINS": [
  75. [
  76. "power",
  77. "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);"
  78. ],
  79. [
  80. "sin",
  81. "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');"
  82. ],
  83. [
  84. "cos",
  85. "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');"
  86. ],
  87. [
  88. "tan",
  89. "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');"
  90. ],
  91. [
  92. "asin",
  93. "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');"
  94. ],
  95. [
  96. "acos",
  97. "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');"
  98. ],
  99. [
  100. "atan",
  101. "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');"
  102. ],
  103. [
  104. "floor",
  105. "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'));"
  106. ],
  107. [
  108. "ceiling",
  109. "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'));"
  110. ],
  111. [
  112. "degrees",
  113. "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'));"
  114. ],
  115. [
  116. "radians",
  117. "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'));"
  118. ],
  119. [
  120. "pi",
  121. "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');"
  122. ],
  123. [
  124. "e",
  125. "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');"
  126. ]
  127. ],
  128. "PALETTEFILLCOLORS": [
  129. [
  130. "maths",
  131. "#ff0066"
  132. ]
  133. ],
  134. "PALETTESTROKECOLORS": [
  135. [
  136. "maths",
  137. "#ef003e"
  138. ]
  139. ]
  140. }