Looks

From Snap! Wiki, made by Snappers for Snappers
Translate this page; This page contains changes which are not marked for translation.
Other languages:
  • English

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.

Block Function Options
Commands (15)
switch to costume [ V]::looks Tells 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 costume Tells 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 effects Sets 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

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]) Returns 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) %) Returns 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) Returns the current value of an effect. Effects:
  • Color
  • Saturation
  • Brightness
  • Ghost
  • Fisheye
  • Whirl
  • Pixelate
  • Mosaic
  • Negative
(size) Reports the sprite's size as a percentage of normal.
(new costume @list width ( v) height ( v)) reports a costume based on the pixel data input as list.
Predicates (1)
<shown?> Reports whenever the sprite is shown or hidden.
Dev Mode Blocks (3)
console log [] @delInput @verticalEllipsis @addInput Logs the inputs,connected,by,commas into the browser console.
alert [] @delInput @verticalEllipsis @addInput Opens a dialog saying "snap.berkeley.edu says Snap! inputs,divided,by,commas.
save [pen trails V] as costume named [screenshot] Saves the selected input as a costume with the name in the second input.
  • pen trails
  • stage image