Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

All Snap! Blocks

BlockText LabelTypeCategoryLisp
move _ stepsmove _ stepscommandmotion(move 10)
turn $clockwise _ degreesturn $clockwise _ degreescommandmotion(right 15)
turn $counterclockwise _ degreesturn $counterclockwise _ degreescommandmotion(left 15)
point in direction _point in direction _commandmotion(head 90)
point towards _point towards _commandmotion(face [mouse-pointer])
go to x: _ y: _go to x: _ y: _commandmotion(go 0 0)
go to _go to _commandmotion(goto "[random position]")
glide _ secs to x: _ y: _glide _ secs to x: _ y: _commandmotion(glide 1 0 0)
change x by _change x by _commandmotion(+x 10)
set x to _set x to _commandmotion(x= 0)
change y by _change y by _commandmotion(+y 10)
set y to _set y to _commandmotion(y= 0)
if on edge, bounceif on edge, bouncecommandmotion(bounce)
positionpositionreportermotion(pos)
x positionx positionreportermotion(x)
y positiony positionreportermotion(y)
directiondirectionreportermotion(dir)
switch to costume _switch to costume _commandlooks(wear nil)
next costumenext costumecommandlooks(next)
costume #costume #reporterlooks(costume#)
say _ for _ secssay _ for _ secscommandlooks(sayFor Hello! 2)
say _say _commandlooks(say Hello!)
think _ for _ secsthink _ for _ secscommandlooks(thinkFor Hmm... 2)
think _think _commandlooks(think Hmm...)
_ of costume __ of costume _reporterlooks(costume [width] [current])
stretch _ x: _ y: _ %stretch _ x: _ y: _ %reporterlooks(stretch [current] 100 50)
skew _ to _ degrees _ %skew _ to _ degrees _ %reporterlooks(skew [current] 0 50)
new costume _ width _ height _new costume _ width _ height _reporterlooks(newCostume nil nil nil)
change _ effect by _change _ effect by _commandlooks(+effect [ghost] 25)
set _ effect to _set _ effect to _commandlooks(effect= [ghost] 0)
clear graphic effectsclear graphic effectscommandlooks(clearEffects)
_ effect_ effectreporterlooks(effect [ghost])
change size by _change size by _commandlooks(+size 10)
set size to _ %set size to _ %commandlooks(size= 100)
sizesizereporterlooks(size)
showshowcommandlooks(show)
hidehidecommandlooks(hide)
shown?shown?predicatelooks(shown)
go to _ layergo to _ layercommandlooks(layer [front])
go back _ layersgo back _ layerscommandlooks(back 1)
play sound _play sound _commandsound(play nil)
play sound _ until doneplay sound _ until donecommandsound(playAll nil)
stop all soundsstop all soundscommandsound(stopSounds)
play sound _ at _ Hzplay sound _ at _ Hzcommandsound(playAt nil 44100)
_ of sound __ of sound _reportersound(sound [duration] nil)
new sound _ rate _ Hznew sound _ rate _ Hzreportersound(newSound nil 44100)
rest for _ beatsrest for _ beatscommandsound(rest 0.2)
play note _ for _ beatsplay note _ for _ beatscommandsound(note 60 0.5)
set instrument to _set instrument to _commandsound(instrument 1)
change tempo by _change tempo by _commandsound(+tempo 20)
set tempo to _ bpmset tempo to _ bpmcommandsound(tempo= 60)
tempotemporeportersound(tempo)
change volume by _change volume by _commandsound(+vol 10)
set volume to _ %set volume to _ %commandsound(vol= 100)
volumevolumereportersound(vol)
change balance by _change balance by _commandsound(+pan 10)
set balance to _set balance to _commandsound(pan= 0)
balancebalancereportersound(pan)
play frequency _ Hzplay frequency _ Hzcommandsound(freq 440)
stop frequencystop frequencycommandsound(stopFreq)
clearclearcommandpen(clear)
pen downpen downcommandpen(down)
pen uppen upcommandpen(up)
pen down?pen down?predicatepen(down?)
set pen color to _set pen color to _commandpen(setColor "rgba(145,26,68,1)")
change pen _ by _change pen _ by _commandpen(+pen [hue] 10)
set pen _ to _set pen _ to _commandpen(pen= [hue] 50)
pen _pen _reporterpen(pen [hue])
change pen size by _change pen size by _commandpen(+penSize 1)
set pen size to _set pen size to _commandpen(penSize= 1)
stampstampcommandpen(stamp)
fillfillcommandpen(fill)
write _ size _write _ size _commandpen(write Hello! 12)
pen trailspen trailsreporterpen(trails)
paste on _paste on _commandpen(paste nil)
cut from _cut from _commandpen(cut nil)
_ on __ on _commandpen(drawOn [paint] [Stage])
color _color _reporterpen(colorFrom "rgba(145,26,68,1)")
_ of color __ of color _reporterpen(color [hue] "rgba(145,26,68,1)")
new color _new color _reporterpen(newColor 0)
when $greenflag clickedwhen $greenflag clickedhatcontrol(receiveGo)
when _ is edited _when _ is edited _hatcontrol(receiveUserEdit [anything])
when I start as a clonewhen I start as a clonehatcontrol(receiveOnClone)
when I receive _ _when I receive _ _hatcontrol(receiveMessage nil)
when _ key pressed _when _ key pressed _hatcontrol(receiveKey [space])
when _when _hatcontrol(receiveConditionEvent nil)
when I am _when I am _hatcontrol(receiveInteraction [clicked])
broadcast _ _broadcast _ _commandcontrol(send nil)
broadcast _ _ and waitbroadcast _ _ and waitcommandcontrol(sendAll nil)
request _ _request _ _reportercontrol(request nil)
wait _ secswait _ secscommandcontrol(wait 1)
wait until _wait until _commandcontrol(waitUntil nil)
forever _forever _commandcontrol(forever nil)
repeat _ _repeat _ _commandcontrol(repeat 10 nil)
repeat until _ _repeat until _ _commandcontrol(until nil nil)
for _ = _ to _ _for _ = _ to _ _commandcontrol(for i 1 10 nil)
if _ _ _if _ _ _commandcontrol(if nil nil)
if _ _ else _if _ _ else _commandcontrol(ifElse nil nil nil)
if _ then _ else _if _ then _ else _reportercontrol(ifThen nil nil nil)
report _report _commandcontrol(report nil)
stop _stop _commandcontrol(stop [all])
run _ _run _ _commandcontrol(run nil)
launch _ _launch _ _commandcontrol(fork nil)
call _ _call _ _reportercontrol(call nil)
pipe _ $arrowRight _pipe _ $arrowRight _reportercontrol(pipe nil nil)
tell _ to _ _tell _ to _ _commandcontrol(tell nil nil)
ask _ for _ _ask _ for _ _reportercontrol(ask nil nil)
create a clone of _create a clone of _commandcontrol(clone [myself])
a new clone of _a new clone of _reportercontrol(newClone [myself])
delete this clonedelete this clonecommandcontrol(removeClone)
pause all $pausepause all $pausecommandcontrol(pause)
switch to scene _ _switch to scene _ _commandcontrol(scene [next])
define _ _ _define _ _ _commandcontrol(define block nil nil)
delete block _delete block _commandcontrol(deleteBlock nil)
set _ of block _ to _set _ of block _ to _commandcontrol(setBlock [label] nil nil)
_ of block __ of block _reportercontrol(block [definition] nil)
this _this _reportercontrol(this [script])
set slot _ to _set slot _ to _commandcontrol(doSetSlot nil nil)
touching _ ?touching _ ?predicatesensing(touch [mouse-pointer])
touching _ ?touching _ ?predicatesensing(touchColor "rgba(145,26,68,1)")
color _ is touching _ ?color _ is touching _ ?predicatesensing(colorTouch "rgba(145,26,68,1)" "rgba(255,230,0,1)")
ask _ and waitask _ and waitcommandsensing(doAsk "what's your name?")
answeranswerreportersensing(answer)
mouse positionmouse positionreportersensing(mouse)
mouse xmouse xreportersensing(mouseX)
mouse ymouse yreportersensing(mouseY)
mouse down?mouse down?predicatesensing(mouseDown)
key _ pressed?key _ pressed?predicatesensing(key [space])
_ to __ to _reportersensing(relation [distance] [mouse-pointer])
_ at __ at _reportersensing(aspect [hue] [mouse-pointer])
reset timerreset timercommandsensing(resetTimer)
timertimerreportersensing(timer)
current _current _reportersensing(current [date])
_ of __ of _reportersensing(attribute "[costume #]" nil)
my _my _reportersensing(my [neighbors])
object _object _reportersensing(object [myself])
url _url _reportersensing(url snap.berkeley.edu)
microphone _microphone _reportersensing(audio [volume])
video _ on _video _ on _reportersensing(video [motion] [myself])
set video transparency to _set video transparency to _commandsensing(transparency 50)
is _ on?is _ on?predicatesensing(global "[turbo mode]")
set _ to _set _ to _commandsensing(global= "[video capture]" nil)
__reporteroperators(+ nil nil)
_ − __ − _reporteroperators(- nil nil)
__reporteroperators(* nil nil)
_ / __ / _reporteroperators(/ nil nil)
_ ^ __ ^ _reporteroperators(^ nil nil)
_ mod __ mod _reporteroperators(mod nil nil)
__reporteroperators(min nil nil)
__reporteroperators(max nil nil)
round _round _reporteroperators(round nil)
_ of __ of _reporteroperators(fn [sqrt] 10)
atan2 _ ÷ _atan2 _ ÷ _reporteroperators(atan2 nil nil)
pick random _ to _pick random _ to _reporteroperators(rand 1 10)
__predicateoperators(< nil nil)
__predicateoperators(= nil nil)
__predicateoperators(> nil nil)
__predicateoperators(and nil nil)
__predicateoperators(or nil nil)
not _not _predicateoperators(not nil)
__predicateoperators(bool t)
join _join _reporteroperators(join "hello " world)
split _ by _split _ by _reporteroperators(split "hello world" " ")
letter _ of _letter _ of _reporteroperators(letter 1 world)
_ of text __ of text _reporteroperators(text [length] world)
unicode of _unicode of _reporteroperators(unicode a)
unicode _ as letterunicode _ as letterreporteroperators(toLetter 65)
is _ a _ ?is _ a _ ?predicateoperators(is 5 [number])
is _ ?is _ ?predicateoperators(same nil nil)
set _ to _set _ to _commandvariables(set nil 0)
change _ by _change _ by _commandvariables(+= nil 1)
show variable _show variable _commandvariables(showVar nil)
hide variable _hide variable _commandvariables(hideVar nil)
inherit _inherit _commandvariables(inherit nil)
list _list _reporterlists(list nil)
numbers from _ to _numbers from _ to _reporterlists(range 1 10)
_ in front of __ in front of _reporterlists(cons nil nil)
item _ of _item _ of _reporterlists(item 1 nil)
all but first of _all but first of _reporterlists(cdr nil)
_ of __ of _reporterlists(data [length] nil)
index of _ in _index of _ in _reporterlists(# thing nil)
_ contains __ contains _predicatelists(contains nil thing)
is _ empty?is _ empty?predicatelists(empty nil)
map _ over _map _ over _reporterlists(map nil nil)
keep items _ from _keep items _ from _reporterlists(keep nil nil)
find first item _ in _find first item _ in _reporterlists(find nil nil)
combine _ using _combine _ using _reporterlists(combine nil nil)
for each _ in _ _for each _ in _ _commandlists(forEach item nil nil)
add _ to _add _ to _commandlists(add thing nil)
delete _ of _delete _ of _commandlists(del 1 nil)
insert _ at _ of _insert _ at _ of _commandlists(ins thing 1 nil)
replace item _ of _ with _replace item _ of _ with _commandlists(put 1 nil thing)
append _append _reporterlists(append nil nil)
reshape _ to _reshape _ to _reporterlists(reshape nil 4 3)
combinations _combinations _reporterlists(combinations nil nil)