Socket
Socket
Sign inDemoInstall

@excaliburjs/plugin-aseprite

Package Overview
Dependencies
3
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @excaliburjs/plugin-aseprite

Aseprite Resource Plugin for Excalibur


Version published
Weekly downloads
18
decreased by-76.32%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

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.

  2. 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

FAQs

Last updated on 20 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc