ebiten-anim
Create a SpriteSheet to easily select parts of an image and create animations from them.
Usage
📖 Docs
Look at the example to see how to use the library.
SpriteSheet = anim.NewSpriteSheet(sprites, 8, 10, anim.SpriteSheetOptions{
Scale: 16,
})
frames := make([]anim.Frame, 5)
for x := 0; x <= 4; x++ {
frames[x] = anim.NewFrame(SpriteSheet.GetSprite(x, 0), time.Second / 20)
}
Animation := anim.NewAnimation(frames)
Animation.Update()
Animation.Pause()
Animation.Play()
Animation.Draw(screen, &ebiten.DrawImageOptions{})
screen.DrawImage(SpriteSheet.GetSprite(0, 0), &ebiten.DrawImageOptions{})