AnimatedSprite2D¶
Plays 2D flipbook animations from a spritesheet atlas.
Inherits: Node2D → Node
Properties¶
AnimatedSprite2D¶
| Property | Type | Default | Description |
|---|---|---|---|
atlas |
str | "" |
Path to a spritesheet sidecar (.ptatlas). |
animation |
str | "" |
Named animation sequence inside the atlas. |
frame |
int | 0 |
Current frame index of the playing animation. |
speed_scale |
number | 1 |
Playback speed multiplier for the animation. |
playing |
bool | false |
Whether the animation is currently playing. |
autoplay |
str | "" |
Animation name to begin playing automatically on ready. |
modulate |
color | #ffffffff |
RGBA color multiplier applied to the sprite. |
Node2D¶
| Property | Type | Default | Description |
|---|---|---|---|
position |
vec2 | (0, 0) |
Local position in world units, relative to the parent. Global position is this plus every ancestor's. |
rotation |
number | 0 |
Rotation around the node's origin. Stored in radians; the inspector edits degrees. |
z_index |
int | 0 |
Draw order index. Nodes with higher values are drawn on top. Ties fall back to tree order. |