Sprite Sheet Generator for PixiJS
PixiJS parses the TexturePacker-format JSON from the Phaser / PixiJS export on its own. Assets.load returns a Spritesheet with every texture cut and named.

Format menu
Phaser / PixiJS
JSON atlas (TexturePacker format)
PixiJS reads the same JSON as Phaser but loads it differently. You pass Assets.load the JSON only, and Pixi fetches the image named in meta.image, relative to the JSON file. The export writes spritesheet.png there, so if you rename the PNG, change that field too. What comes back is a Spritesheet whose textures map is keyed frame_000 upward, in export order.
Getting the sheet into PixiJS
- 1
Export the atlas
Click Format, choose Phaser / PixiJS, and unzip spritesheet.png and spritesheet.json into the same folder.
- 2
Load it
Await Assets.load on the JSON path. Pixi fetches the PNG named inside it and returns a Spritesheet.
- 3
Build the AnimatedSprite
Pass the textures to new AnimatedSprite. Keys run frame_000 upward, so Object.values(sheet.textures) is already in playback order.
- 4
Keep pixels crisp
In v8, set TextureSource.defaultOptions.scaleMode to "nearest" before the first load.
import { Assets, AnimatedSprite, TextureSource } from 'pixi.js';
TextureSource.defaultOptions.scaleMode = 'nearest';
const sheet = await Assets.load('spritesheet.json');
const hero = new AnimatedSprite(Object.values(sheet.textures));
hero.animationSpeed = 0.2; // 12 fps: animationSpeed is frames per 1/60 s
hero.play();
app.stage.addChild(hero);| Setting | PixiJS value |
|---|---|
| Loader | await Assets.load("spritesheet.json") |
| Frame access | sheet.textures["frame_000"] |
| Animation | new AnimatedSprite(textures) |
| Speed | animationSpeed = fps / 60 |
| Crisp pixels | scaleMode: "nearest" |
Parsed on load
Pixi recognises the TexturePacker shape and builds the Spritesheet itself. No Rectangle maths on your side.
Stable frame order
Names are zero-padded (frame_000, frame_001), so insertion order and sort order agree.
Single frames by name
Need one pose for a static Sprite? sheet.textures.frame_004 is a ready Texture, no sub-rectangle to work out.
When the sheet fights PixiJS
Assets.load returns a Texture rather than a Spritesheet
- Cause
- The PNG path was passed instead of the JSON path. Pixi decides what to build from the file it is given.
- Fix
- Load the .json. Pixi parses it, fetches the image itself, and hands back a Spritesheet.
Assets.load fails with a 404 for the image after renaming files
- Cause
- The JSON still names spritesheet.png in meta.image, and Pixi resolves that relative to the JSON.
- Fix
- Edit meta.image to the new file name, or keep the exported names.
The AnimatedSprite runs at the wrong speed
- Cause
- animationSpeed is a multiplier on the ticker delta, which is normalised to 60 frames per second. A value of 12 advances twelve frames per sixtieth of a second.
- Fix
- Divide your target rate by 60: 12 FPS is 0.2, 8 FPS is about 0.133. The result holds on 120 Hz screens too, because the delta is time based.
Textures are still smoothed after setting nearest
- Cause
- The scale mode was changed after the textures were created, so they kept the old default.
- Fix
- Set TextureSource.defaultOptions.scaleMode before the first Assets.load. For a texture that already exists, set scaleMode on its source.
Frames come out in an unexpected order
- Cause
- Object.values follows key insertion order, which matches playback only while the names keep their fixed-width padding.
- Fix
- Keep the frame_000 names. If you rename frames, sort the keys with a numeric comparator before building the AnimatedSprite.
Code from a v7 tutorial throws on v8
- Cause
- v8 changed setup: Application needs await app.init(), and scale modes moved from SCALE_MODES constants to strings on TextureSource. The atlas format did not change.
- Fix
- Update the setup calls and keep the JSON and PNG exactly as exported.
The first play stutters on a large sheet
- Cause
- The texture is uploaded to the GPU the first time it is drawn, which is the frame the animation starts.
- Fix
- Draw the sprite once behind a loading screen, or upload the texture early with the renderer prepare system.
Versions and edge cases
- PixiJS v8
- Assets.load parses the TexturePacker shape and returns a Spritesheet. TextureSource.defaultOptions.scaleMode is where nearest sampling is set globally.
- PixiJS v7
- Assets.load already existed and parses the file the same way. Nearest sampling is set with BaseTexture.defaultOptions.scaleMode = SCALE_MODES.NEAREST.
- PixiJS v6
- Loading went through the Loader: add the JSON, and read the Spritesheet from resources[name].spritesheet in the complete callback. Textures are keyed the same way.
More detail in the related guide, or compare every export format.
Export for PixiJS
Load your frames, check the loop in the Preview tab, then export. For PixiJS that means: JSON atlas (TexturePacker format).