Block
Blocks are objects in abilities and the
datum
property of parameters, with
one minor difference between these contexts.
Common Properties
block_class
Type | string |
---|
Represents the block's class type.
Possible values include:[needs elaboration]
"method"
: for loopless blocks, such as Move Forward, Set Variable, Comment, etc."conditionalControl"
: for Check Once and Check If Else loops."control"
: for Draw a Trail and other loop blocks.[needs verification]"conditionalOperator"
: for conditional operators, including=
,≠
,<
and>
."operator"
: for math and string operators, such as+
,-
,×
,÷
, Random, and HSB.
Unused.[needs research]
"block_class": "conditionalControl"
description
Type | string |
---|
The label of the block type.
Unused.[needs research]
"description": "Draw a Trail"
keyboardName
Type | string |
---|
Not always used. Only seems to exist in certain operator blocks. The extended name of a block, as one might type in a search for the block.[needs research]
"keyboardName": "Add"
type
Type | number |
---|
A magic number that corresponds to the block's type and behavior.[needs verification]
For a full list of possible values, see Viewing Types.
"type": 41
parameters
/ params
Type | array |
---|
Contains the block's parameter objects.
Nuances
- If the block is inside of an ability, the key is called
parameters
. - If the block is inside of a parameter's
datum
property, the key is instead calledparams
.
Loops
The following properties only exist in blocks with inner loops, such as Check Once If and Draw a Trail:
controlScript
Type | object |
---|
Contains an abilityID
property, referencing the
ability with the loop's contents.
"controlScript": {
"abilityID": "F4911EE3-010E-F139-55C3-9B5D7F4B140B"
}
controlFalseScript
Type | object |
---|
Only present on Check If Else blocks.
Contains an abilityID
property, referencing the
ability with the loop's Else
contents.
"controlFalseScript": {
"abilityID": "F4911EE3-010E-F139-55C3-9B5D7F4B140B"
}