The Blockly Code Editor allows generating JS code from blocks and programming Grid Scene by blocks.
To add new variables, the toolbox must have the "variables editor" block.
Data types used in Blockly Code Editor to pass values between blocks.
Available block connection types.
The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.
Block name |
Description |
RGB color |
Creating RGB color from three numbers. |
append text |
Append text to a variable. |
arithmetic |
Simply arithmetic functions: add, divide, minus, multiply, power. |
basic functions |
Basic mathematics functions: absolute, root, abs, exp, ln, log10, neg, pow10, root. |
blend color |
Blends two colors with a given ratio. |
boolean |
Returns either true or false. |
break |
Changes loop flow. Available options: break, continue. |
change variable |
Adds a number to a variable. |
char at |
Returns char: n from start, f from end, last, first, random. |
color picker |
Chooses a color from the palette. |
compare |
Compares two values. |
constants |
Returns one of the common constants. |
constrain |
Constrains a number to be between the specified limits (inclusive). |
create list from |
Makes a list from text, list. |
create list with item |
Creates a list with any item repeated n times. |
create list |
Creates an empty list. |
for each |
For each item in a list, you can set the variable to the item, and then do some statements. |
for |
Have the start variable take on the values from the start number to the end number, count by the specified interval, and do the specified blocks. |
get list element |
Get (or get and remove): first, n from end, n from start, last, random element from list, or remove an element in the list. |
get sublist |
Get n elements from end, n elements from start of the list. |
get variable |
Returns the value of this variable. |
if |
If control statement. |
is empty list |
Returns true if the list is empty. |
is empty text |
Returns true if the provided text is empty. |
join text |
Creates a piece of text by joining together any number of items. |
list index of |
Returns the index of the first/last occurrence of the item in the list. Returns 0 if the item is not found. |
list length |
Returns the length of a list. |
logic operation |
Simple logic operation: and, or. |
logic ternary |
Checks the condition in the test. If the condition is true, returns the if true value; otherwise returns the if false value. |
math list functions |
Simple functions on lists. Available functions: average, max, median, min, mode, random, sum, standard deviation. |
modulo |
Returns the remainder from dividing the two numbers. |
negate |
Returns true if the input is false. Returns false if the input is true. |
null |
Returns null. |
number property |
Checks whether the number is negative, positive, prime, divisible by, even. |
number |
A number. |
print |
Print the specified text, number, or other value. |
prompt for |
Prompt for the user. |
random color |
Returns a random color. |
random fraction |
Returns a random fraction between 0.0 (inclusive) and 1.0 (exclusive). |
random integer |
Returns a random integer between the two specified limits, inclusive. |
repeat while/until |
Repeats while and until the loop. |
repeat |
Allows doing some statements several times. |
round |
Rounds a number up or down. |
set list element |
Sets an element in a list. |
set variable |
Sets a variable to be equal to the input. |
sort list |
Sorts a copy of a list: ascending or descending. |
substring |
Returns a specified portion of the text. |
text index of |
Returns the index of the first/last occurrence of the first text in the second text. Returns 0 if the text is not found. |
text length |
Returns text size. |
text |
Returns constant text. |
to upper/lower case |
Changes text to an upper or lower case. |
trigonometry |
Basic trigonometry functions. |
trim |
Removes white spaces from the text's start and end. |
grid scene commands |
Get commands from the grid scene. If the Scene Id is not valid, grid scene commands will be empty. |
variables editor |
Creates a category where you can add new variables. Always must have a category name in a separate category. |
custom |
Custom block created in Custom Blocks property. |