Skip to content

The Sprite class

PPPDUD edited this page Apr 7, 2026 · 3 revisions

The Sprite class defines a Snap! sprite; here are its properties:

name property

The name of the sprite.

idx property

Usage unknown; some sort of internal ID.

x property

X coordinate of the sprite.

y property

Y coordinate of the sprite.

heading property

The direction of the sprite in degrees.

scale property

The scale value of the sprite.

volume property

The audio volume of the sprite.

pan property

The audio pan of the sprite.

rotation property

A number representing the sprite's rotation style.

instrument property

A value representing the sprite's current instrument; None if no such value was specified in the project.

draggable property

A boolean representing the draggability of the sprite.

hidden property

Whether or not the sprite is visible; may be None.

costume property

The costume number of the sprite.

color property

A tuple representing the pen color of the sprite in RGBA format.

pen property

Usage unknown.

id property

Usage unknown; some sort of internal ID.

sounds property

A list of Sound objects that belong to the sprite.

variables property

A list of Variable objects that belong to the sprite.

Clone this wiki locally