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.

108 lines
13 KiB

  1. {
  2. "HIGHLIGHTSTROKECOLORS": [
  3. [
  4. "converter",
  5. "#000000"
  6. ]
  7. ],
  8. "ARGPLUGINS": [
  9. [
  10. "from_mm",
  11. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) {\tcase 'mm':\t block.value = (arg);\t break;\tcase'cm':\t block.value = (arg*1/10);\t break;\tcase 'm': \tblock.value = (arg*1/1000); \tbreak;\tcase 'km': \tblock.value = (arg*1/1000000); \tbreak; case 'in': \tblock.value = (arg*1/25.4); \tbreak; case 'ft': \tblock.value = (arg*1/304.8); \tbreak; case 'yd': \tblock.value = (arg*1/914.4); \tbreak; case 'mi': \tblock.value = (arg*1/1609344); \tbreak; case 'nmi': \tblock.value = (arg*1/1852000); \tbreak;}"
  12. ],
  13. [
  14. "from_cm",
  15. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit){ case 'mm': \tblock.value = (arg*1/0.1); \tbreak; case 'cm':\t block.value = (arg);\t break; case 'm':\t block.value = (arg*1/100);\t break; case 'km':\t block.value = (arg*1/100000);\t break; case 'in':\t block.value = (arg*1/2.54);\t break; case 'ft':\t block.value = (arg*1/30.48);\t break; case 'yd':\t block.value = (arg*1/91.44);\t break; case 'mi':\t block.value = (arg*1/160934.4);\t break; case 'nmi':\t block.value = (arg*1/185200);\t break;}"
  16. ],
  17. [
  18. "from_m",
  19. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.001);\t break; case 'cm':\t block.value = (arg*1/0.01);\t break; case 'm':\t block.value = (arg*1/1);\t break; case 'km':\t block.value = (arg*1/1000);\t break; case 'in':\t block.value = (arg*1/0.0254);\t break; case 'ft':\t block.value = (arg*1/0.3048);\t break; case 'yd':\t block.value = (arg*1/0.9144);\t break; case 'mi':\t block.value = (arg*1/1609.344);\t break; case 'nmi':\t block.value = (arg*1/1852);\t break;}"
  20. ],
  21. [
  22. "from_km",
  23. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.000001);\t break; case 'cm':\t block.value = (arg*1/0.00001);\t break; case 'm':\t block.value = (arg*1/0.001);\t break; case 'km':\t block.value = (arg*1/1);\t break; case 'in':\t block.value = (arg*1/0.0000254);\t break; case 'ft':\t block.value = (arg*1/0.0003048);\t break; case 'yd':\t block.value = (arg*1/0.0009144);\t break; case 'mi':\t block.value = (arg*1/1.609344);\t break; case 'nmi':\t block.value = (arg*1/1.852);\t break;}"
  24. ],
  25. [
  26. "from_in",
  27. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.039370078740157);\t break; case 'cm':\t block.value = (arg*1/0.39370078740157);\t break; case 'm':\t block.value = (arg*1/39.370078740157);\t break; case 'km':\t block.value = (arg*1/39370.078740157);\t break; case 'in':\t block.value = (arg*1/1);\t break; case 'ft':\t block.value = (arg*1/12);\t break; case 'yd':\t block.value = (arg*1/36);\t break; case 'mi':\t block.value = (arg*1/63360);\t break; case 'nmi':\t block.value = (arg*1/72913.385826772);\t break;}"
  28. ],
  29. [
  30. "from_ft",
  31. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.0032808398950131);\t break; case 'cm':\t block.value = (arg*1/0.032808398950131);\t break; case 'm':\t block.value = (arg*1/3.2808398950131);\t break; case 'km':\t block.value = (arg*1/3280.8398950131 );\t break; case 'in':\t block.value = (arg*1/0.083333333333333);\t break; case 'ft':\t block.value = (arg*1/1);\t break; case 'yd':\t block.value = (arg*1/3);\t break; case 'mi':\t block.value = (arg*1/5280);\t break; case 'nmi':\t block.value = (arg*1/ 6076.1154855643);\t break;}"
  32. ],
  33. [
  34. "from_yd",
  35. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.0010936132983377);\t break; case 'cm':\t block.value = (arg*1/0.0.010936132983377);\t break; case 'm':\t block.value = (arg*1/1.0936132983377);\t break; case 'km':\t block.value = (arg*1/1093.6132983377);\t break; case 'in':\t block.value = (arg*1/0.027777777777778);\t break; case 'ft':\t block.value = (arg*1/0.33333333333333);\t break; case 'yd':\t block.value = (arg*1/1);\t break; case 'mi':\t block.value = (arg*1/1760);\t break; case 'nmi':\t block.value = (arg*1/ 2025.3718285214);\t break;}"
  36. ],
  37. [
  38. "from_mi",
  39. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.00000062137119223733);\t break; case 'cm':\t block.value = (arg*1/0.0000062137119223733);\t break; case 'm':\t block.value = (arg*1/0.00062137119223733);\t break; case 'km':\t block.value = (arg*1/0.62137119223733);\t break; case 'in':\t block.value = (arg*1/0.000015782828282828);\t break; case 'ft':\t block.value = (arg*1/0.00018939393939394);\t break; case 'yd':\t block.value = (arg*1/0.00056818181818182);\t break; case 'mi':\t block.value = (arg*1/1);\t break; case 'nmi':\t block.value = (arg*1/1.1507794480235);\t break;}"
  40. ],
  41. [
  42. "from_nmi",
  43. "var block = logo.blocks.blockList[blk];var conns = block.connections;var arg = logo.parseArg(logo, turtle, conns[1]);var unit = logo.parseArg(logo, turtle, conns[2]);switch (unit) { case 'mm':\t block.value = (arg*1/0.00000053995680345572);\t break; case 'cm':\t block.value = (arg*1/0.0000053995680345572);\t break; case 'm':\t block.value = (arg*1/0.00053995680345572);\t break; case 'km':\t block.value = (arg*1/0.53995680345572);\t break; case 'in':\t block.value = (arg*1/0.000013714902807775);\t break; case 'ft':\t block.value = (arg*1/0.0001645788336933);\t break; case 'yd':\t block.value = (arg*1/0.00049373650107991);\t break; case 'mi':\t block.value = (arg*1/0.86897624190065);\t break; case 'nmi':\t block.value = (arg*1/1);\t break;}"
  44. ]
  45. ],
  46. "PALETTEHIGHLIGHTCOLORS": [
  47. [
  48. "converter",
  49. "#FF9FFF"
  50. ]
  51. ],
  52. "PALETTEPLUGINS": [
  53. [
  54. "converter",
  55. "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"55\" height=\"55\" viewBox=\"0 0 55 55\"><g transform=\"matrix(1.25 0 0 1.25-7.5-6.25)\"><g font-family=\"Sans\" word-spacing=\"0\" line-height=\"125%\" letter-spacing=\"0\" font-size=\"20\"><text x=\"10\" y=\"10\"><tspan x=\"20\" y=\"35\" fill=\"#fff\">len</tspan></text></g></g><g fill=\"#fff\" stroke=\"#fff\"><path d=\"m10.5 14.5h35\"/><path d=\"m15.5 44.5v-35\"/></g></svg>"
  56. ]
  57. ],
  58. "BLOCKPLUGINS": [
  59. [
  60. "from_mm",
  61. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_mm', 'from mm', 1000, 'mm');"
  62. ],
  63. [
  64. "from_cm",
  65. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_cm', 'from cm', 1000, 'cm');"
  66. ],
  67. [
  68. "from_m",
  69. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_m', 'from m', 1000, 'm');"
  70. ],
  71. [
  72. "from_km",
  73. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_km', 'from km', 1000, 'km');"
  74. ],
  75. [
  76. "from_in",
  77. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_in', 'from in', 1000, 'in');"
  78. ],
  79. [
  80. "from_ft",
  81. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_ft', 'from ft', 1000, 'ft');"
  82. ],
  83. [
  84. "from_yd",
  85. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_yd', 'from yd', 1000, 'yd');"
  86. ],
  87. [
  88. "from_mi",
  89. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_mi', 'from mi', 1000, 'mi');"
  90. ],
  91. [
  92. "from_nmi",
  93. "var convertBlock = function (name, label, arg1, arg2) { var protoblock = new ProtoBlock(name); protoblock.palette = palettes.dict['converter']; blocks.protoBlockDict[name] = protoblock; protoblock.staticLabels.push(label, _('number'), _('unit to convert')); protoblock.adjustWidthToLabel(); protoblock.twoArgMathBlock(); protoblock.dockTypes[2] = 'anyin'; protoblock.defaults.push(arg1); protoblock.defaults.push(arg2);};convertBlock('from_nmi', 'from nmi', 1000, 'nmi');"
  94. ]
  95. ],
  96. "PALETTEFILLCOLORS": [
  97. [
  98. "converter",
  99. "#ff00ff"
  100. ]
  101. ],
  102. "PALETTESTROKECOLORS": [
  103. [
  104. "converter",
  105. "#C700D3"
  106. ]
  107. ]
  108. }