This package can extract and download images from TexturePacker spritesheets using the TexturePacker JSON data.
npm i sprites-extract
- 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.