Animating Sprites

So far in this book, you’ve learned how to make sprites, move them, and make them interactive. But what if you want to make a game character that can flap its wings, or move its arms and legs to walk around the game world? You have to use a technique called keyframe animation: displaying a series of slightly different images in sequence to create the illusion of motion. Pixi has some built-in tools to make keyframe animation easy, and that’s what this chapter is all about.

  • Using MovieClip sprites
  • Making animation frames using a texture atlas or tileset
  • Using a custom sprite function for full-featured control over ...

Get Learn Pixi.js: Create Great Interactive Graphics for Games and the Web now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.