Blocks are pieces of puzzle-shapes to code in Snap!. They connect vertically. Each block type (Commands, Reporters, Predicates, Hats, Caps) has its own shapes. There are block categories as well, namely Motion, Looks, Sound, Pen, Control, Sensing, Operators, Variables, Lists, and Others.
point towards [mouse-pointer V]
glide (1) secs to x: (0) y: (0)
([width V] of costume [current V])
(stretch [current V] x: (100) y: (50) %)
(new costume @list width ( v) height ( v))
change [ghost V] effect by (25)
play sound [ V] at (44100 v) Hz
(new sound @list rate (44100 v) Hz)
play note (60 v) for (0.5) beats
broadcast [ V] @addInput and wait
run ({} @addInput) @verticalEllipsis @addInput
launch ({} @addInput) @verticalEllipsis @addInput
(call (() @addInput) @verticalEllipsis @addInput
(pipe [] @arrowRight (() @addInput) @delInput @verticalEllipsis @addInput)
tell [ V] to ({} @addInput) @verticalEllipsis @addInput
(ask [ V] for (() @addInput) @verticalEllipsis @addInput
create a clone of [myself V] :: control
switch to scene [ V] @addInput
define ((block)) [] (() @addInput)
set [label V] of block (() @addInput) to []
([definition V] of block (() @addInput))
<touching [mouse-pointer V] ?>
<color [#911a44] is touching [#911a44] ?>
ask [what’s your name?] and wait
([distance V] to [mouse-pointer V])
([hue V] at [mouse-pointer V])
(video [motion V] on [myself V])
set video transparency to (50)
({} @addInput)
(() @addInput)
(<> @addInput)
(() + () @delInput @verticalEllipsis @addInput)
(() x () @delInput @verticalEllipsis @addInput)
(() min () @delInput @verticalEllipsis @addInput)
(() max () @delInput @verticalEllipsis @addInput)
<[] < [] @delInput @verticalEllipsis @addInput>
<[] = [] @delInput @verticalEllipsis @addInput>
<[] > [] @delInput @verticalEllipsis @addInput>
<<> and <> @delInput @verticalEllipsis @addInput>
<<> or <> @delInput @verticalEllipsis @addInput>
<<true (:: grey) :: operators> :: operators >
(join [hello ][world] @delInput @verticalEllipsis @addInput)
([length V] of text [hello world])
<is [] identical to [] @delInput @verticalEllipsis @addInput ?>
(Javascript function \( [] @delInput @verticalEllipsis @addInput \) \{ [] \})
script variables ((a)) @addInput
(map (() @addInput) over @list)
(keep items (<> @addInput) from @list)
(find first item (<> @addInput) in @list)
(combine @list using (() @addInput)
for each ((item)) in @list { }
insert [thing] at (1 v) of @list
replace item (1 v) of @list with [thing]
(append @list @list @delInput @verticalEllipsis @addInput)
(reshape [] to (4) (3) @delInput @addInput)
(combinations @list @list @delInput @verticalEllipsis @addInput)