Home

Awesome

phaser-aseprite

Aseprite Sprite loader for Phaser

Summary

A small library for loading / parseing aseprite sprite files into Phaser.Sprite objects.

Aseprite is an open-source frame-by-frame animation tool. Phaser-CE is a javascript game engine.

Limitations

Contributions

You are open to contibute to and expand on this library.

Dependencies

Useage

The below is an example within a Phaser-CE State class.

Preload will preload the required spritesheet, and Create will build a sprite will all the animations from an aseprite file.

    public preload() {
        AsepriteSpriteFactory.preload(this.game, this.sprite);
    }
    
    public create() {
        var sprite = AsepriteSpriteFactory.create(this.game, this.sprite);
        this.game.add.existing(sprite);
        sprite.animations.play("close");
    }