# AddSpriteAnimationFrame

## Description

Adds an image to the sprite as a new animation frame. Frame indices start at 1 and increase incrementally. This image may be shared by multiple sprites either as single images or as animation frames, the image may also be a part of an atlas texture.
Alternatively if you have all your animation frames on a single image you can use the faster SetSpriteAnimation that avoids image changes during rendering by modifying the UV coordinates to change frame instead.

## Definition

AddSpriteAnimationFrame( iSpriteIndex, iImageIndex )

void agk::AddSpriteAnimationFrame( UINT iSpriteIndex, UINT iImageIndex )

## Parameters

- iSpriteIndex - The ID of the sprite to set for animation.
- iImageIndex - The ID of the image to add.