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

spritesheet-js-monkiki-fork

v0.7.1-b

Published

Spritesheet generator

Readme

spritesheet.js

Spritesheet.js is command-line spritesheet (a.k.a. Texture Atlas) generator written in node.js.

==============

Fork objective

This version rectifies the problem with its use in PIXI.js where packing assets together and sub-pixel rendering creates artefacts around the assets, especially in tiled textures.

Avoiding this issue with the following:

  • create 2px (or otherwise specified) gap between each image
  • recalculate the coordinate with the extra 2px at top, bottom, left, right

============== ###Supported spritesheet formats###

  • Starling / Sparrow
  • JSON (i.e. PIXI.js)
  • Easel.js
  • cocos2d (experimental)

###Usage###

  1. Command Line
    $ spritesheet-js assets/*.png
    Options:
    $ spritesheet-js
    Usage: spritesheet-js [options] <files>
    
    Options:
      -f, --format  format of spritesheet (starling, sparrow, json, pixi.js, easel.js, cocos2d)                                                      [default: "json"]
      -n, --name    name of generated spritesheet                                                                                                    [default: "spritesheet"]
      -p, --path    path to export directory                                                                                                         [default: "."]
      --trim        removes transparent whitespaces around images                                                                                    [default: false]
      --square      texture should be s square                                                                                                       [default: false]
      --powerOfTwo  texture width and height should be power of two                                                                                  [default: false]
      --algorithm   packing algorithm: growing-binpacking (default), binpacking (requires passing width and height options), vertical or horizontal  [default: "growing-binpacking"]
      --gap2px      add 2 px gap around each texture and readjust the coordinates, so each texture are not touching eachother.                       [default: false]
    
  2. Node.js
    var spritesheet = require('spritesheet-js');
       
    spritesheet('assets/*.png', {format: 'json'}, function (err) {
      if (err) throw err;
    
      console.log('spritesheet successfully generated');
    });

###Trimming / Cropping###
Spritesheet.js can remove transparent whitespace around images. Thanks to that you can pack more assets into one spritesheet and it makes rendering a little bit faster.

*NOTE: Some libraries such as Easel.js or PIXI.js dont't support this feature.*
![Trimming / Cropping](http://i.imgur.com/76OokJU.png)

###Installation###
1. Install [ImageMagick](http://www.imagemagick.org/)
2. ```npm install spritesheet-js -g```

###Test###

mocha test


--------------
Thanks [Przemysław Piekarski](http://www.behance.net/piekarski) for logo design and assets in examples.