Phaser 3 Pixel Art VFX — Free JSON Atlas & Demos

Download a recolored PNG and JSON atlas, load it with Phaser 3, and play named frames in a pixel-art scene.

Read the walkthrough ↓

Setup and integration

Export the PNG and JSON together

Pick a representative skill effect and open its editor.

  • Set the intended palette and choose a transparent backdrop for sprites that overlay gameplay. Select the Phaser export and unzip it into a directory served by your game.
  • Use the same version of both the PNG and JSON. The JSON records rectangles and frame names such as frame_0000, so pairing it with an older image can clip or swap frames.
  • Load the files through your development server over HTTP and inspect the Network panel if either request returns a 404 or an HTML fallback.

Load an atlas and define the animation once

Call this.load.atlas in preload with a texture key, the image URL and the JSON URL.

  • In create, build an animation using this.anims.generateFrameNames with prefix frame_ and zeroPad set to four. Use the actual frame count and frame rate from the export.
  • Replace the example URLs with the names from the ZIP. Keep texture keys and animation keys unique across color variants, because the animation manager is shared across scenes.
  • The example below takes the count and FPS as arguments so you can use the same setup for different exports. Keep repeat set to zero for one-shots and use minus one only for effects that should loop until an owning object or state stops them.

Preserve crisp pixels throughout the browser pipeline

Set pixelArt: true on the Phaser game config.

  • Give the game a deliberate base resolution and check how its canvas is enlarged on different screens. Nearest filtering alone cannot prevent uneven pixels when the canvas or camera scales fractionally.
  • Test at integer zoom and compare the output on phones with different device pixel ratios. Apply roundPixels at the camera when it fits the rest of your game's movement, and check slow pans for judder.
  • For a different pivot, set the sprite origin to the normalized anchor noted by your export and keep frame bounds consistent.
Phaser 3 · JS
// Use pixelArt: true in the Phaser.Game configuration.
function preload() {
  this.load.atlas("impact", "vfx/impact.png", "vfx/impact.json");
}

// Call from create with the frame count and FPS of your export.
function registerImpact(scene, count, fps) {
  scene.anims.create({
    key: "impact-once",
    frames: scene.anims.generateFrameNames("impact", {
      prefix: "frame_", start: 0, end: count - 1, zeroPad: 4,
    }),
    frameRate: fps,
    repeat: 0,
  });
}

function spawnImpact(scene, x, y) {
  const sprite = scene.add.sprite(x, y, "impact", "frame_0000");
  sprite.once("animationcomplete", () => sprite.destroy());
  sprite.play("impact-once");
}

Spawn effects from game events and clean them up

  • On contact, position the effect at the collision point in world coordinates and keep the sprite independent of the player or projectile. Place it at the right depth so it can be read above the terrain.
  • Register an animationcomplete handler once for a one-shot, then destroy the sprite or return it to a pool. Persistent auras belong to the owning object and should stop when the state changes.
  • Drive damage, knockback or reward logic from the game event. The sprite may play at a different speed or be skipped in reduced-motion settings.

Make the preview representative of the game

  • Try the demo at your actual camera zoom, on a busy scene, with music and several simultaneous effects. Spawn a few copies of the same effect and check that no sprites are left after the animation completes.
  • Keep the files named by effect and color role to avoid replacing the wrong atlas. Use GIF for sharing a preview or design review.
  • Commit the PNG and JSON for runtime playback, plus the MIT notice for redistribution. If you edit the palette or scale, export both files again and verify the sequence from first frame to last.

Questions & answers

Should I call load.spritesheet for an exported atlas?

Use load.atlas with both PNG and JSON. Spritesheet loading uses a fixed grid and numeric frame indices instead.

How do I verify the frame names?

Inspect the exported JSON or the loaded texture's frame names and compare them with the prefix, start, end and padding in your animation.

Why does the canvas look blurry on mobile?

Check pixelArt, Phaser scale settings and CSS sizing, then compare with integer zoom on the target screen.

Does Phaser need the GIF export?

Use the PNG and JSON atlas for in-game playback. GIF is suitable for sharing the look.