# HOWTO: Export Krita animation to texture atlas

**URL:** <https://phaser.discourse.group/t/howto-export-krita-animation-to-texture-atlas/10305>\
**Category:** Phaser 3\
**Created:** [September 23, 2021, 3:03pm UTC](https://phaser.discourse.group/t/howto-export-krita-animation-to-texture-atlas/10305 "2021-09-23T15:03:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eugendueck](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@eugendueck](https://phaser.discourse.group/u/eugendueck)\
**Post date:** [September 23, 2021, 3:03pm UTC](https://phaser.discourse.group/t/howto-export-krita-animation-to-texture-atlas/10305/1 "2021-09-23T15:03:24Z")

</div>

The free Krita tool has a great animation editor, and now you can export Krita animations directly to a texture atlas that Phaser 3 can read.

## Plugin Installation instructions

- **Get the plugin** by downloading [https://github.com/EugenDueck/kritaSpritesheetManager/archive/refs/heads/master.zip](https://github.com/EugenDueck/kritaSpritesheetManager/archive/refs/heads/master.zip)
- in Krita, go to **Tools \> Scripts \> Import Python Plugin** , then select the downloaded zip file
- Restart Krita
- **Activate the plugin** by going to **Settings \> Configure Krita \> Python Plugin Manager** and checking “Spritesheet Exporter”
- Restart Krita (yes, again)
- you can now use it in **Tools \> Scripts \> Export As Spritesheet**
  - be sure to tick the **“write json texture atlas”** checkbox

## Loading the texture atlas

The filenames in the texture atlas are just the numeric indexes of the textures in the png, so it can be used something like this:

```js
preload() {
  this.load.atlas("myatlas", "atlas.png", "atlas.json");
}

create() {
  var frameNames = this.anims.generateFrameNames("myatlas", { start: 0, end: 8, zeroPad: 1 });
  this.anims.create({ key: "walk", frames: frameNames, frameRate: 10, repeat: -1 });
  var sprite = this.add.sprite(x, y, "myatlas")
  sprite.play("walk");
}

```

## Source repository

I have a PR open to get my changes merged into the repository I forked, but until then,  
[GitHub - EugenDueck/kritaSpritesheetManager: a Krita plugin to export animations as spritesheets](https://github.com/EugenDueck/kritaSpritesheetManager) is the place to go.

---

<div class="post-metadata">

**Author:** ![eugendueck](https://avatars.discourse-cdn.com/v4/letter/e/3ec8ea/32.png) [@eugendueck](https://phaser.discourse.group/u/eugendueck)\
**Post date:** [October 3, 2021, 10:35pm UTC](https://phaser.discourse.group/t/howto-export-krita-animation-to-texture-atlas/10305/2 "2021-10-03T22:35:23Z")

</div>

The texture atlas export feature PR has been merged, so the place to get this plugin now is

> **[GitHub - Falano/kritaSpritesheetManager: a Krita plugin to export animations...](https://github.com/Falano/kritaSpritesheetManager)**
>
> a Krita plugin to export animations as spritesheets - GitHub - Falano/kritaSpritesheetManager: a Krita plugin to export animations as spritesheets
