Translate this page
Other languages:

Looks is the second category of blocks, and it carries over 15 commands (7 as stage), 6 reporters, and 1 predicate (6 as stage). In Dev Mode there's 3 more commands. These blocks are used for sprite and stage appearance.

BlockFunctionOptions
Commands (15)
switch to costume [ v]::looksTells the sprite or stage to switch its current costume/backdrop to a different one.Select a costume/backdrop to switch to. A costume (created by new costume, stretch or a list of pixels, for example) can be dropped onto the input slot.
next costumeTells the sprite or stage to advance to the next costume/backdrop. If its currently on the last one, it will switch to the first costume/backdrop.
say [Hello!] for (2) secs

say [Hello!]

think [Hmm...] for (2) secs

think [Hmm...]
Puts a speech bubble on a sprite in order to make it say something or think of something.
set [ghost v] effect to (0)

change [ghost v] effect by (25)
Changes the amount of an effect.Effects:
  • Color: Any value can be entered; values greater than 100 or less than -100 loop over.
  • Saturation: Any value can be entered; values greater than 100 or less than -100 are clipped.
  • Brightness: Any value can be entered; values less than 0 decrease brightness; values greater than 0 increase brightness; values greater than 100 or less than -100 are clipped. Note that this does not set brightness, but adds to the original value.
  • Ghost: Any value can be entered; values greater than 100 or less than 0 are clipped. Note that if you set the ghost to a number such as 200, the ghost reporter block will output 100, instead of the 200 that the ghost effect was set to.
  • Fisheye: Any value can be entered; values less than 0 reverse the effect.
  • Whirl: Any value can be entered; values less than 0 are clipped.
  • Pixelate:
  • Mosaic
  • Negative
clear graphic effectsSets all effects back to 0.
set size to (100) %

change size by (10)
Changes the sprite's size.
show

hide
Shows or hides the sprite.
go to [front v] layer::looks

go back (1) layers
Changes the sprite's layer.On the go to front layer block, you can change it to back to go to the back instead.
Reporters (6)
costume #Reports a number based on what costume/backdrop the sprite or stage is currently using.
[width v] of costume [ v]:: grey reporter looksReturns a value of properties of a costume/backdrop.
  • Name: Returns the name.
  • Width: Returns the width.
  • Height: Returns the height.
  • Pixels: Returns the list of all pixels as RGBA values 0-255.

Provide a costume/backdrop there. Select Current is read properties of the current costume/backdrop.

stretch [ v] x: (100) y: (50) %::reporter looksReturns a image of an alteration of costume/backdrop. Use this to change its size, mirror it, or distort it.Provide a costume/backdrop there. Select Current if you want to use the current costume/backdrop.
[ghost v] effect::reporter looksReturns the current value of an effect.Effects:
  • Color
  • Saturation
  • Brightness
  • Ghost
  • Fisheye
  • Whirl
  • Pixelate
  • Mosaic
  • Negative
sizeReports the sprite's size as a percentage of normal.
(new costume @list width ( v) height ( v)::looks)reports a costume based on the pixel data input as list.
Predicates (1)
shown?::boolean looksReports whenever the sprite is shown or hidden.
Dev Mode Blocks (3)
console log [] @delInput @addInput::looksLogs the inputs,connected,by,commas into the browser console.
alert [] @delInput @addInput::looksOpens a dialog saying "snap.berkeley.edu says Snap! inputs,divided,by,commas.
save [pen trails v] as costume named [screenshot]::looksSaves the selected input as a costume with the name in the second input.
  • pen trails
  • stage image