Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.11 KB | None | 0 0
  1. this.state = { toolboxCategories: [
  2. {
  3. "name": "Logic",
  4. "colour": "#5C81A6",
  5. "blocks": [
  6. {
  7. "type": "controls_if"
  8. },
  9. {
  10. "fields": {
  11. "OP": "EQ"
  12. },
  13. "type": "logic_compare"
  14. },
  15. {
  16. "fields": {
  17. "OP": "AND"
  18. },
  19. "type": "logic_operation"
  20. },
  21. {
  22. "type": "logic_negate"
  23. },
  24. {
  25. "fields": {
  26. "BOOL": "TRUE"
  27. },
  28. "type": "logic_boolean"
  29. },
  30. {
  31. "type": "logic_null"
  32. },
  33. {
  34. "type": "logic_ternary"
  35. }
  36. ]
  37. },
  38. {
  39. "name": "Loops",
  40. "colour": "#5CA65C",
  41. "blocks": [
  42. {
  43. "values": {
  44. "TIMES": {
  45. "fields": {
  46. "NUM": "10"
  47. },
  48. "type": "math_number",
  49. "shadow": true
  50. }
  51. },
  52. "type": "controls_repeat_ext"
  53. },
  54. {
  55. "fields": {
  56. "MODE": "WHILE"
  57. },
  58. "type": "controls_whileUntil"
  59. },
  60. {
  61. "fields": {
  62. "VAR": "i"
  63. },
  64. "values": {
  65. "FROM": {
  66. "fields": {
  67. "NUM": "1"
  68. },
  69. "type": "math_number",
  70. "shadow": true
  71. },
  72. "TO": {
  73. "fields": {
  74. "NUM": "10"
  75. },
  76. "type": "math_number",
  77. "shadow": true
  78. },
  79. "BY": {
  80. "fields": {
  81. "NUM": "1"
  82. },
  83. "type": "math_number",
  84. "shadow": true
  85. }
  86. },
  87. "type": "controls_for"
  88. },
  89. {
  90. "fields": {
  91. "VAR": "j"
  92. },
  93. "type": "controls_forEach"
  94. },
  95. {
  96. "fields": {
  97. "FLOW": "BREAK"
  98. },
  99. "type": "controls_flow_statements"
  100. }
  101. ]
  102. },
  103. {
  104. "name": "Math",
  105. "colour": "#5C68A6",
  106. "blocks": [
  107. {
  108. "fields": {
  109. "OP": "ROUND"
  110. },
  111. "values": {
  112. "NUM": {
  113. "fields": {
  114. "NUM": "3.1"
  115. },
  116. "type": "math_number",
  117. "shadow": true
  118. }
  119. },
  120. "type": "math_round"
  121. },
  122. {
  123. "fields": {
  124. "NUM": "0"
  125. },
  126. "type": "math_number"
  127. },
  128. {
  129. "fields": {
  130. "OP": "ROOT"
  131. },
  132. "values": {
  133. "NUM": {
  134. "fields": {
  135. "NUM": "9"
  136. },
  137. "type": "math_number",
  138. "shadow": true
  139. }
  140. },
  141. "type": "math_single"
  142. },
  143. {
  144. "fields": {
  145. "OP": "SIN"
  146. },
  147. "values": {
  148. "NUM": {
  149. "fields": {
  150. "NUM": "45"
  151. },
  152. "type": "math_number",
  153. "shadow": true
  154. }
  155. },
  156. "type": "math_trig"
  157. },
  158. {
  159. "fields": {
  160. "CONSTANT": "PI"
  161. },
  162. "type": "math_constant"
  163. },
  164. {
  165. "mutation": {
  166. "attributes": {
  167. "divisor_input": "false"
  168. }
  169. },
  170. "fields": {
  171. "PROPERTY": "EVEN"
  172. },
  173. "values": {
  174. "NUMBER_TO_CHECK": {
  175. "fields": {
  176. "NUM": "0"
  177. },
  178. "type": "math_number",
  179. "shadow": true
  180. }
  181. },
  182. "type": "math_number_property"
  183. },
  184. {
  185. "fields": {
  186. "OP": "ADD"
  187. },
  188. "values": {
  189. "A": {
  190. "fields": {
  191. "NUM": "1"
  192. },
  193. "type": "math_number",
  194. "shadow": true
  195. },
  196. "B": {
  197. "fields": {
  198. "NUM": "1"
  199. },
  200. "type": "math_number",
  201. "shadow": true
  202. }
  203. },
  204. "type": "math_arithmetic"
  205. },
  206. {
  207. "mutation": {
  208. "attributes": {
  209. "op": "SUM"
  210. }
  211. },
  212. "fields": {
  213. "OP": "SUM"
  214. },
  215. "type": "math_on_list"
  216. },
  217. {
  218. "values": {
  219. "DIVIDEND": {
  220. "fields": {
  221. "NUM": "64"
  222. },
  223. "type": "math_number",
  224. "shadow": true
  225. },
  226. "DIVISOR": {
  227. "fields": {
  228. "NUM": "10"
  229. },
  230. "type": "math_number",
  231. "shadow": true
  232. }
  233. },
  234. "type": "math_modulo"
  235. },
  236. {
  237. "values": {
  238. "VALUE": {
  239. "fields": {
  240. "NUM": "50"
  241. },
  242. "type": "math_number",
  243. "shadow": true
  244. },
  245. "LOW": {
  246. "fields": {
  247. "NUM": "1"
  248. },
  249. "type": "math_number",
  250. "shadow": true
  251. },
  252. "HIGH": {
  253. "fields": {
  254. "NUM": "100"
  255. },
  256. "type": "math_number",
  257. "shadow": true
  258. }
  259. },
  260. "type": "math_constrain"
  261. },
  262. {
  263. "values": {
  264. "FROM": {
  265. "fields": {
  266. "NUM": "1"
  267. },
  268. "type": "math_number",
  269. "shadow": true
  270. },
  271. "TO": {
  272. "fields": {
  273. "NUM": "100"
  274. },
  275. "type": "math_number",
  276. "shadow": true
  277. }
  278. },
  279. "type": "math_random_int"
  280. },
  281. {
  282. "type": "math_random_float"
  283. }
  284. ]
  285. },
  286. {
  287. "name": "Text",
  288. "colour": "#5CA68D",
  289. "blocks": [
  290. {
  291. "mutation": {
  292. "attributes": {
  293. "at": "true"
  294. }
  295. },
  296. "fields": {
  297. "WHERE": "FROM_START"
  298. },
  299. "values": {
  300. "VALUE": {
  301. "fields": {
  302. "VAR": "text"
  303. },
  304. "type": "variables_get",
  305. "shadow": false
  306. }
  307. },
  308. "type": "text_charAt"
  309. },
  310. {
  311. "fields": {},
  312. "type": "text"
  313. },
  314. {
  315. "fields": {
  316. "VAR": "item"
  317. },
  318. "values": {
  319. "TEXT": {
  320. "fields": {},
  321. "type": "text",
  322. "shadow": true
  323. }
  324. },
  325. "type": "text_append"
  326. },
  327. {
  328. "values": {
  329. "VALUE": {
  330. "fields": {
  331. "TEXT": "abc"
  332. },
  333. "type": "text",
  334. "shadow": true
  335. }
  336. },
  337. "type": "text_length"
  338. },
  339. {
  340. "values": {
  341. "VALUE": {
  342. "fields": {},
  343. "type": "text",
  344. "shadow": true
  345. }
  346. },
  347. "type": "text_isEmpty"
  348. },
  349. {
  350. "fields": {
  351. "END": "FIRST"
  352. },
  353. "values": {
  354. "VALUE": {
  355. "fields": {
  356. "VAR": "text"
  357. },
  358. "type": "variables_get",
  359. "shadow": false
  360. },
  361. "FIND": {
  362. "fields": {
  363. "TEXT": "abc"
  364. },
  365. "type": "text",
  366. "shadow": true
  367. }
  368. },
  369. "type": "text_indexOf"
  370. },
  371. {
  372. "mutation": {
  373. "attributes": {
  374. "items": "2"
  375. }
  376. },
  377. "type": "text_join"
  378. },
  379. {
  380. "mutation": {
  381. "attributes": {
  382. "at1": "true",
  383. "at2": "true"
  384. }
  385. },
  386. "fields": {
  387. "WHERE1": "FROM_START",
  388. "WHERE2": "FROM_START"
  389. },
  390. "values": {
  391. "STRING": {
  392. "fields": {
  393. "VAR": "text"
  394. },
  395. "type": "variables_get",
  396. "shadow": false
  397. }
  398. },
  399. "type": "text_getSubstring"
  400. },
  401. {
  402. "fields": {
  403. "CASE": "UPPERCASE"
  404. },
  405. "values": {
  406. "TEXT": {
  407. "fields": {
  408. "TEXT": "abc"
  409. },
  410. "type": "text",
  411. "shadow": true
  412. }
  413. },
  414. "type": "text_changeCase"
  415. },
  416. {
  417. "fields": {
  418. "MODE": "BOTH"
  419. },
  420. "values": {
  421. "TEXT": {
  422. "fields": {
  423. "TEXT": "abc"
  424. },
  425. "type": "text",
  426. "shadow": true
  427. }
  428. },
  429. "type": "text_trim"
  430. },
  431. {
  432. "values": {
  433. "TEXT": {
  434. "fields": {
  435. "TEXT": "abc"
  436. },
  437. "type": "text",
  438. "shadow": true
  439. }
  440. },
  441. "type": "text_print"
  442. },
  443. {
  444. "mutation": {
  445. "attributes": {
  446. "type": "TEXT"
  447. }
  448. },
  449. "fields": {
  450. "TYPE": "TEXT"
  451. },
  452. "values": {
  453. "TEXT": {
  454. "fields": {
  455. "TEXT": "abc"
  456. },
  457. "type": "text",
  458. "shadow": true
  459. }
  460. },
  461. "type": "text_prompt_ext"
  462. }
  463. ]
  464. },
  465. {
  466. "name": "Lists",
  467. "colour": "#745CA6",
  468. "blocks": [
  469. {
  470. "fields": {
  471. "END": "FIRST"
  472. },
  473. "values": {
  474. "VALUE": {
  475. "fields": {
  476. "VAR": "list"
  477. },
  478. "type": "variables_get",
  479. "shadow": false
  480. }
  481. },
  482. "type": "lists_indexOf"
  483. },
  484. {
  485. "mutation": {
  486. "attributes": {
  487. "items": "0"
  488. }
  489. },
  490. "type": "lists_create_with"
  491. },
  492. {
  493. "values": {
  494. "NUM": {
  495. "fields": {
  496. "NUM": "5"
  497. },
  498. "type": "math_number",
  499. "shadow": true
  500. }
  501. },
  502. "type": "lists_repeat"
  503. },
  504. {
  505. "type": "lists_length"
  506. },
  507. {
  508. "type": "lists_isEmpty"
  509. },
  510. {
  511. "mutation": {
  512. "attributes": {
  513. "items": "3"
  514. }
  515. },
  516. "type": "lists_create_with"
  517. },
  518. {
  519. "mutation": {
  520. "attributes": {
  521. "statement": "false",
  522. "at": "true"
  523. }
  524. },
  525. "fields": {
  526. "MODE": "GET",
  527. "WHERE": "FROM_START"
  528. },
  529. "values": {
  530. "VALUE": {
  531. "fields": {
  532. "VAR": "list"
  533. },
  534. "type": "variables_get",
  535. "shadow": false
  536. }
  537. },
  538. "type": "lists_getIndex"
  539. },
  540. {
  541. "mutation": {
  542. "attributes": {
  543. "at": "true"
  544. }
  545. },
  546. "fields": {
  547. "MODE": "SET",
  548. "WHERE": "FROM_START"
  549. },
  550. "values": {
  551. "LIST": {
  552. "fields": {
  553. "VAR": "list"
  554. },
  555. "type": "variables_get",
  556. "shadow": false
  557. }
  558. },
  559. "type": "lists_setIndex"
  560. },
  561. {
  562. "mutation": {
  563. "attributes": {
  564. "at1": "true",
  565. "at2": "true"
  566. }
  567. },
  568. "fields": {
  569. "WHERE1": "FROM_START",
  570. "WHERE2": "FROM_START"
  571. },
  572. "values": {
  573. "LIST": {
  574. "fields": {
  575. "VAR": "list"
  576. },
  577. "type": "variables_get",
  578. "shadow": false
  579. }
  580. },
  581. "type": "lists_getSublist"
  582. },
  583. {
  584. "mutation": {
  585. "attributes": {
  586. "mode": "SPLIT"
  587. }
  588. },
  589. "fields": {
  590. "MODE": "SPLIT"
  591. },
  592. "values": {
  593. "DELIM": {
  594. "fields": {
  595. "TEXT": ","
  596. },
  597. "type": "text",
  598. "shadow": true
  599. }
  600. },
  601. "type": "lists_split"
  602. },
  603. {
  604. "fields": {
  605. "TYPE": "NUMERIC",
  606. "DIRECTION": "1"
  607. },
  608. "type": "lists_sort"
  609. }
  610. ]
  611. },
  612. {
  613. "name": "Colour",
  614. "colour": "#A6745C",
  615. "blocks": [
  616. {
  617. "fields": {
  618. "COLOUR": "#ff0000"
  619. },
  620. "type": "colour_picker"
  621. },
  622. {
  623. "type": "colour_random"
  624. },
  625. {
  626. "values": {
  627. "RED": {
  628. "fields": {
  629. "NUM": "100"
  630. },
  631. "type": "math_number",
  632. "shadow": true
  633. },
  634. "GREEN": {
  635. "fields": {
  636. "NUM": "50"
  637. },
  638. "type": "math_number",
  639. "shadow": true
  640. },
  641. "BLUE": {
  642. "fields": {
  643. "NUM": "0"
  644. },
  645. "type": "math_number",
  646. "shadow": true
  647. }
  648. },
  649. "type": "colour_rgb"
  650. },
  651. {
  652. "values": {
  653. "COLOUR1": {
  654. "fields": {
  655. "COLOUR": "#ff0000"
  656. },
  657. "type": "colour_picker",
  658. "shadow": true
  659. },
  660. "COLOUR2": {
  661. "fields": {
  662. "COLOUR": "#3333ff"
  663. },
  664. "type": "colour_picker",
  665. "shadow": true
  666. },
  667. "RATIO": {
  668. "fields": {
  669. "NUM": "0.5"
  670. },
  671. "type": "math_number",
  672. "shadow": true
  673. }
  674. },
  675. "type": "colour_blend"
  676. }
  677. ]
  678. },
  679. {
  680. "name": "Variables",
  681. "colour": "#A65C81",
  682. "custom": "VARIABLE"
  683. },
  684. {
  685. "name": "Functions",
  686. "colour": "#9A5CA6",
  687. "custom": "PROCEDURE"
  688. }
  689. ] };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement