npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

texture-unpacker

v1.0.0

Published

TextureUnpacker Node.js TypeScript tool

Readme

Node.js, split TexturePacker, and TypeScript logos

🗃️ TextureUnpacker

Overview

TextureUnpacker is a Node.js tool written in TypeScript which can be used to unpack .png sprite sheets packed with TexturePacker into separate sprites if provided with corresponding .json or .plist data file.

Supported data formats:

  • JSON (Array)
  • JSON (Hash)
  • Phaser (JSONArray)
  • Phaser (JSONHash)
  • Phaser 3
  • PixiJS
  • Cocos2d-x
  • Cocos2d
  • Cocos2d v2 (old, CocoStudio)

Installation

# install globally (optional, requires npm permissions)
npm install -g texture-unpacker

# or add to a project and run the tool locally
npm install texture-unpacker

Usage

Command-line

# Display the built‑in help

texture-unpacker --help

# Usage: texture-unpacker [options]
#
# Options:
#   -s, --sheet    Directory or sprite sheet path/name      [string] [default: ""]
#   -f, --format   Data format type ('json' or 'plist')     [string] [default: ""]
#   -d, --data     Custom data file path                    [string] [default: ""]
#   -o, --output   Custom output directory path             [string] [default: ""]
#   -c, --clean    Clean the output directory before unpacking
#                                                       [boolean] [default: false]
#   -v, --version  Show version number                                   [boolean]
#   -h, --help     Show help                                             [boolean]

Programmatic API

Use the package from JavaScript or TypeScript:

// CommonJS
const { unpack } = require('texture-unpacker');

// ES module
import { unpack } from 'texture-unpacker';

// TypeScript will pick up the included declarations automatically
// and exposes the `UnpackOptions` interface:
import type { UnpackOptions } from 'texture-unpacker';

// example call showing all options
unpack('assets/Sprite.png', {   // Directory or sprite sheet path/name
    format: 'json',             // Data format type ('json' or 'plist')
    data: 'assets/Sprite.json', // Custom data file path
    output: 'assets/sprites',   // Custom output directory path
    clean: true                 // Clean the output directory before unpacking
} as UnpackOptions
).then(() => {
    console.log('Texture unpacked.');
});

Example

A comprehensive usage example has been moved to a dedicated repository. Visit texture-unpacker-example for detailed instructions, sample assets, and step‑by‑step walkthroughs.

The example repo contains the same sprite sheets and data files previously included here, along with additional notes and demonstrations.

Contributing

If you have noticed a bug or would like us to support additional data formats, feel free to open an issue describing said bug or requested format (and provide matching sprite sheet and data files), or even better open a pull request with code changes which fixes the bug or adds support for new data format.

Dependencies


Originally ported from onepill/texture_unpacker_scirpt archive written in python.