Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

SpriteFrames

Inherits: Resource < RefCounted < Object

Sprite frame library for AnimatedSprite2D and AnimatedSprite3D.

Description

Sprite frame library for an AnimatedSprite2D or AnimatedSprite3D node. Contains frames and animation data for playback.

Methods

void

add_animation ( StringName anim )

void

add_frame ( StringName anim, Texture2D texture, float duration=1.0, int at_position=-1 )

void

clear ( StringName anim )

void

clear_all ( )

bool

get_animation_loop ( StringName anim ) const

PackedStringArray

get_animation_names ( ) const

float

get_animation_speed ( StringName anim ) const

int

get_frame_count ( StringName anim ) const

float

get_frame_duration ( StringName anim, int idx ) const

Texture2D

get_frame_texture ( StringName anim, int idx ) const

bool

has_animati