PixiJS is fast because it batches sprites that share a texture into a single draw call. The way you unlock that is with a sprite sheet (texture atlas): one image containing all your frames, plus a JSON file describing each frame. This guide shows how to pack one with a free browser texture packer and load it in PixiJS.
Why sprite sheets matter in PixiJS
- Draw-call batching: sprites from the same base texture render together — the core of PixiJS performance.
- One load, many textures:
Assets.load()pulls the whole sheet in a single request. - Named textures: access each frame by name from
sheet.textures. - AnimatedSprite support: build animations directly from packed frames.
Step 1 — Pack the sprite sheet
Open the free EazyStudio Texture Packer, drag in your PNG frames, choose a JSON (Hash) export, add a little padding, and export. You will get sheet.png and sheet.json. Everything runs locally in your browser.
Tip: Name your frames predictably (walk-0.png … walk-7.png) so you can generate animations without hand-listing every frame.
Step 2 — Load the sheet (PixiJS v8 / v7)
Modern PixiJS uses the Assets loader. Make sure the JSON's meta.image points to your PNG (the packer sets this for you):
Step 3 — Create sprites from frames
Step 4 — Animate with AnimatedSprite
If your packer kept frames in order, PixiJS exposes them under sheet.animations by their shared prefix:
Keeping pixel art crisp
For pixel-art games, switch the scale mode to nearest-neighbour so frames stay sharp when scaled:
Troubleshooting
| Symptom | Fix |
|---|---|
| Sheet loads but textures are undefined | Check the frame name matches exactly, including the .png suffix. |
| PNG 404 after loading JSON | The JSON's meta.image path must resolve relative to the JSON file. |
| Edges bleed between frames | Re-pack with 1–2px padding/extrude. |
| Animation runs too fast/slow | Tune animationSpeed (frames advance per tick). |
Summary
Sprite sheets are how you get PixiJS to batch and fly: pack your frames into one PNG + JSON, load it with Assets.load(), then pull textures by name or animations by prefix. A free browser texture packer produces a PixiJS-ready sheet in seconds — no paid desktop tool required.
Make a PixiJS sprite sheet — free
No install, no account. Runs entirely in your browser.
Open Texture Packer