Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@excaliburjs/plugin-aseprite

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@excaliburjs/plugin-aseprite

Aseprite Resource Plugin for Excalibur

  • 0.25.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-76.92%
Maintainers
4
Weekly downloads
 
Created
Source

Aseprite Plugin For Excalibur

This extension adds support for Aseprite SpriteSheets and Animations exported to json.

> npm install @excaliburjs/plugin-aseprite
  1. Export using the aseprite cli or through the UI

Export as JSON in Aseprite

  1. Load the Aseprite resource via the json and voila ✨
  • Use AsepriteResource.getAnimation(name) to retrieve animations by the name in aseprite
  • Use AsepriteResource.getSpriteSheet() to get the equivalent Excalibur SpriteSheet
  • Use Aseprite.rawAseprite to access the raw data structure from Aseprite
  • Use Aseprite.image to access the source image for the SpriteSheet

Example:

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

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

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

FAQs

Package last updated on 05 Feb 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc