Register a named sprite animation on an entity.
The entity ID
Animation name (e.g. "idle", "walk", "attack")
Animation configuration (frame indices, fps, loop)
sg.addAnimation(player, 'walk', { frames: [0, 1, 2, 3], fps: 8, loop: true }); Copy
sg.addAnimation(player, 'walk', { frames: [0, 1, 2, 3], fps: 8, loop: true });
Register a named sprite animation on an entity.