Skip to content

bigasdev/webpack-aseprite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š About

πŸš€ Lightweight and easy to use importer to work on webpack using aseprite assets.

πŸ’Ύ Installation

Simply add the asset file to your source folder and import it on your webpack index.

πŸ”Ž Features

  • Its just one file
  • Can load and handle multiple atlas files
  • Edit all your sprites names directly on aseprite

πŸ’» Usage

Use the export feature on aseprite (Ctrl+E) to export your atlas.png with the json in your project folder

//Import the assets.js

import { asepriteConfig } from './assets.js';

//Import the files in your index

import atlasImg from '../assets/img/testAtlas.png';
import atlasJson from '../assets/atlas-sources/atlas.json';

//Then simply use the asepriteConfig to initialize all your atlas data

asepriteConfig([atlasImg], [atlasJson]);

//You can then start calling the createAsset function in any script you want

import { createAsset } from './assets';

createAsset({atlas:"Atlas Number", name:"Sprite Name", size:"Sprite Size", x:"X Position", y:"Y Position"}, "Your canvas context", Callback(Info, Image));

πŸ“Œ License

This project is under the GPL-3.0 License. Take a look at the LICENSE file for more details.

Releases

No releases published

Packages

No packages published