411 REFERENCE · Wikibooks
Scratch Virtual Machine/Blocks/Looks
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Looks blocks affect the size and appearance of a target. scratch3_looks.js https://github.com/scratchfoundation/scratch-editor/blob/develop/packages/scratch-vm/src/blocks/scratch3_looks.js 2026-08-03 Scratch Foundation en GitHub
say () for () seconds
say ()
think () for () seconds
think ()
switch costume to ()
next costume
switch backdrop to ()
next backdrop
change size by ()
set size to ()%
set (EFFECT) effect to (VALUE)
Sets the specified graphic EFFECT of the target to VALUE.
Casts EFFECT to a string. (EFFECT)
Converts EFFECT to lowercase. (EFFECT)
Casts VALUE to a number. (VALUE)
If EFFECT is the string color:
Sets the target's color effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string fisheye:
Sets the target's fisheye effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string whirl:
Sets the target's whirl effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string pixelate:
Sets the target's pixelate effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string mosaic:
Sets the target's mosaic effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string brightness:
Clamps VALUE to be on the interval [-100, 100]. (VALUE)
Sets the target's brightness effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, if EFFECT is the string ghost:
Clamps VALUE to be on the interval [0, 100]. (VALUE)
Sets the target's ghost effect to VALUE.
If the target is visible, requests to redraw the screen.
Otherwise, does nothing.
looks_seteffectto(EFFECT, VALUE):
EFFECT = castToString(EFFECT)
EFFECT = toLowerCase(EFFECT)
VALUE = castToNumber(VALUE)
if EFFECT is "color"
target.effects.color = VALUE
if target.visible
requestRedraw()
else if EFFECT is "fisheye"
target.effects.fisheye = VALUE
if target.visible
requestRedraw()
else if EFFECT is "whirl"
target.effects.whirl = VALUE
if target.visible
requestRedraw()
else if EFFECT is "pixelate"
target.effects.pixelate = VALUE
if target.visible
requestRedraw()
else if EFFECT is "mosaic"
target.effects.mosaic = VALUE
if target.visible
requestRedraw()
else if EFFECT is "brightness"
VALUE = min(max(VALUE, -100), 100)
target.effects.brightness = VALUE
if target.visible
requestRedraw()
else if EFFECT is "ghost"
VALUE = min(max(VALUE, 0), 100)
target.effects.ghost = VALUE
if target.visible
requestRedraw()
else
(do nothing)
change () effect by ()
Adds CHANGE to the value of the specified graphic EFFECT of the target.
TODO
clear graphic effects
Resets all the target's graphic effects to 0.
Sets the target's color effect to 0.
Sets the target's fisheye effect to 0.
Sets the target's whirl effect to 0.
Sets the target's pixelate effect to 0.
Sets the target's mosaic effect to 0.
Sets the target's brightness effect to 0.
Sets the target's ghost effect to 0.
If the target is visible, requests to redraw the screen.
looks_cleargraphiceffects():
target.effects.color = 0
target.effects.fisheye = 0
target.effects.whirl = 0
target.effects.pixelate = 0
target.effects.mosaic = 0
target.effects.brightness = 0
target.effects.ghost = 0
if target.visible:
requestRedraw()
show
Makes the sprite visible.
If the target is the stage:
Does nothing.
Otherwise:
Sets the sprite's visibility to true.
Requests to redraw the screen.
If the target is not visible or the target's speech bubble does not have text:
If the target's speech bubble is currently rendered:
Removes the target's speech bubble.
Requests to redraw the screen.
Otherwise:
Does nothing.
Otherwise, renders the target's speech bubble.
Requests to redraw the screen.
looks_show():
if target is not stage
target.visible = true
requestRedraw()
if not target.visible or target.bubble.text is ""
if bubble.rendered
removeBubble()
requestRedraw()
else
renderBubble()
requestRedraw()
hide
Makes the sprite invisible.
If the target is the stage, does nothing.
Otherwise, sets the sprite's visibility to false.
If the target is not visible or the target's speech bubble does not have text:
If the target's speech bubble is currently rendered:
Removes the target's speech bubble.
Requests to redraw the screen.
Otherwise:
Does nothing.
Otherwise:
Renders the target's speech bubble.
Requests to redraw the screen.
looks_hide():
if target is not stage
target.visible = false
if not target.visible or target.bubble.text is ""
if bubble.rendered
removeBubble()
requestRedraw()
else
renderBubble()
requestRedraw()
go to (FRONT_BACK) layer
Moves the sprite to the front or back layer as determined by FRONT_BACK.
If the target is the stage:
Does nothing.
Otherwise:
If FRONT_BACK is the string front, brings the sprite to the front layer.
Otherwise, brings the sprite to the back layer.
looks_gotofrontback(FRONT_BACK):
if target is not stage
if FRONT_BACK is "front"
goToFront()
else
goToBack()
go (FORWARD_BACKWARD) (NUM) layers
Moves the sprite forward or backward (as determined by FORWARD_BACKWARD) a certain NUMber of layers.
If the target is the stage:
Does nothing.
Otherwise:
If FORWARD_BACKWARD is the string forward:
Casts NUM to a number. (NUM)
Brings the sprite forward NUM layers.
Otherwise:
Casts NUM to a number. (NUM)
Brings the sprite back NUM layers.
looks_goforwardbackwardlayers(FORWARD_BACKWARD, NUM):
if target is not stage
if FORWARD_BACKWARD is "forward"
NUM = castToNumber(NUM)
goForwardLayers(NUM)
else
NUM = castToNumber(NUM)
goBackwardLayers(NUM)
costume (NUMBER_NAME)
Reports the target's costume number or name as determined by NUMBER_NAME.
If NUMBER_NAME is the string number, reports the target's costume number.
Otherwise, reports the target's costume name.
looks_costumenumbername(NUMBER_NAME):
if NUMBER_NAME is "number"
return target.costume.number
else
return target.costume.name
backdrop (NUMBER_NAME)
Reports the stage's costume number or name as determined by NUMBER_NAME.
If NUMBER_NAME is the string number, reports the stage's costume number.
Otherwise, reports the stage's costume name.
looks_backdropnumbername(NUMBER_NAME):
if NUMBER_NAME is "number"
return stage.costume.number
else
return stage.costume.name
size
Reports the target's size.
Reports the target's size as a percentage rounded to the nearest integer.
looks_size():
return round(target.size)
hide all sprites
Does nothing. This is a legacy block retained for backwards compatibility with previous Scratch versions and is not visible in the block palette. In said versions, it hid all sprites simultaneously.
looks_hideallsprites():
(do nothing)
change stretch by ()
Does nothing. This is a legacy block retained for backwards compatibility with previous Scratch versions and is not visible in the block palette.
looks_changestretchby():
(do nothing)
set stretch to ()%
Does nothing. This is a legacy block retained for backwards compatibility with previous Scratch versions and is not visible in the block palette.
looks_setstretchto():
(do nothing)
References