0.29.0 • Published 3 months ago

@excaliburjs/plugin-aseprite v0.29.0

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
3 months ago

Aseprite Plugin For Excalibur

This extension adds support for Aseprite SpriteSheets and Animations exported to json or the native .aseprite file format.

  • Supports RGBA, Grayscale, and Indexed Sprites!
  • Supports opacity on cells and layers!
  • Supports tagged animations!
> npm install @excaliburjs/plugin-aseprite
  1. Use the native .aseprite file format or using export json the aseprite cli or through the UI.
  1. Load the Aseprite resource and voila ✨
  • Use AsepriteResource.getAnimation(name) to retrieve animations by the name in aseprite
  • Use AsepriteResource.getSpriteSheet() to get the equivalent Excalibur SpriteSheet

Example:

import { AsepriteResource } from "@excaliburjs/plugin-aseprite";

const game = new Engine({
    width: 600,
    height: 400,
    displayMode: DisplayMode.FitScreen
});

// Native
const asepriteSpriteSheet = new AsepriteResource('./beetle.aseprite');
// Or JSON export
// const asepriteSpriteSheet = new AsepriteResource('./beetle.json');

const loader = new Loader([asepriteSpriteSheet]);
game.start(loader).then(() => {

    const anim = asepriteSpriteSheet.getAnimation('Loop');
    const actor = new Actor({pos: vec(100, 100)});
    actor.graphics.use(anim);
    
    game.currentScene.add(actor);
});

Example running

Example exporting JSON in the UI

Export as JSON in Aseprite

Currently unsupported in the Native format

PRs welcome to address!

  • Layer blend modes
  • Tilesets
  • User Data
  • External files
  • Color Profiles
0.29.0

3 months ago

0.28.7

3 months ago

0.28.1

8 months ago

0.28.0

9 months ago

0.27.0

2 years ago

0.26.0

2 years ago

0.25.3

2 years ago

0.25.2

2 years ago

0.25.0

3 years ago