sprites-extract
v2.0.3
Published
This will extract sprites from the spritesheet using the corresponding texture packer data. Use the method extract()
Downloads
12
Maintainers
Readme
This package can extract and download images from TexturePacker spritesheets using the TexturePacker JSON data.
INSTALLATION
npm i sprites-extract
USAGE
- Create a JavaScript file and require the
extract()
method. - Call the
extract()
method, passing the paths of the TexturePacker spritesheet and JSON file as parameters.
const extract = require('sprites-extract');
extract('/path/to/spritesheet.png', './path/to/spritesheet.json');
- Run the javascript file using node js command (eg: node script.js). A folder named "Output" should be generated along with all the extracted images from spritesheet.