# spritesheet-creator

> Spritesheet Creator

Latest version **2.0.1** (published 2019-11-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install spritesheet-creator
pnpm add spritesheet-creator
yarn add spritesheet-creator
bun add spritesheet-creator
```

Provides the command `spritesheet-creator`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2019-11-16 |
| First published | 2018-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 30 |
| Unpacked size | 53.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Hedin |
| Maintainers | hedin_hiervard |
| Keywords | spritesheet, texture, starling, sparrow, pixi.js, json, cocos2d, easel.js, generator |

## Links

- npm: https://www.npmjs.com/package/spritesheet-creator
- Repository: https://github.com/hedin-hiervard/spritesheet-creator
- Issues: https://github.com/hedin-hiervard/spritesheet-creator/issues
- npm.io page: https://npm.io/package/spritesheet-creator

## Dependencies (30)

- [ual](https://npm.io/package/ual.md) ^1.0.0
- [jimp](https://npm.io/package/jimp.md) ^0.5.4
- [husky](https://npm.io/package/husky.md) ^1.1.2
- [youch](https://npm.io/package/youch.md) ^2.0.9
- [eslint](https://npm.io/package/eslint.md) ^5.3.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [moment](https://npm.io/package/moment.md) ^2.22.2
- [flow-bin](https://npm.io/package/flow-bin.md) ^0.79.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^1.0.0
- [mustache](https://npm.io/package/mustache.md) ^3.0.0
- [commander](https://npm.io/package/commander.md) ^2.17.1
- [binpacking](https://npm.io/package/binpacking.md) ~0.0.1
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.7.2
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.0.3
- [glob-promise](https://npm.io/package/glob-promise.md) ^3.4.0
- [pretty-format](https://npm.io/package/pretty-format.md) ^23.6.0
- [youch-terminal](https://npm.io/package/youch-terminal.md) ^1.0.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.7.1
- [@babel/preset-flow](https://npm.io/package/@babel/preset-flow.md) ^7.0.0
- [eslint-plugin-jest](https://npm.io/package/eslint-plugin-jest.md) ^21.20.2
- [eslint-plugin-json](https://npm.io/package/eslint-plugin-json.md) ^1.2.1
- [eslint-plugin-node](https://npm.io/package/eslint-plugin-node.md) ^7.0.1
- [eslint-plugin-babel](https://npm.io/package/eslint-plugin-babel.md) ^5.1.0
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.13.0
- [eslint-plugin-promise](https://npm.io/package/eslint-plugin-promise.md) ^3.8.0
- [eslint-config-standard](https://npm.io/package/eslint-config-standard.md) ^11.0.0
- [eslint-plugin-flowtype](https://npm.io/package/eslint-plugin-flowtype.md) ^2.50.0
- [eslint-plugin-standard](https://npm.io/package/eslint-plugin-standard.md) ^3.1.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.6.2
- [@babel/plugin-proposal-object-rest-spread](https://npm.io/package/@babel/plugin-proposal-object-rest-spread.md) ^7.6.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.1 (latest) — 2019-11-16
- 2.0.0 — 2018-12-19
- 1.1.1 — 2018-12-18
- 1.1.0 — 2018-12-18
- 1.0.3 — 2018-12-11
- 1.0.2 — 2018-12-03
- 1.0.1 — 2018-10-20
- 1.0.0 — 2018-10-20
- 0.1.9 — 2018-10-17
- 0.1.8 — 2018-10-17
- 0.1.7 — 2018-10-17
- 0.1.6 — 2018-10-17
- 0.1.5 — 2018-10-17
- 0.1.4 — 2018-10-17
- 0.1.3 — 2018-10-17
- … 3 more at https://npm.io/package/spritesheet-creator/versions

## README

# Spritesheet Creator

**Please note this is an alpha software. Use in production at your own risk!**

The purpose of this package is to give robust, solid and production-ready way to create spritesheets from a bunch of bitmap images. It is written in pure Javascript and has **no native dependencies**.

It can be used as a standalone command-line tool (which is useful for development and CI environments) and as a Node.js module (in case your building toolchain includes some JS code).

This package is intended as a replacement for some commercial packages and is meant to be easy to use, pluggable and open-source.

# What It Does, In Short?

It takes a bunch of image files, packs them into a single texture (called a spritesheet) and provides the metadata for the game engine of choice.

# Support Input and Output formats

Basically `spritesheet-creator` supports every image format supported by `jimp` library. For the metadata currently the following output formats are supported:
- Godot 3 

Work in progress:
- cocos2d-x
- Unity

# Usage

To install as a CLI tool:

`yarn global add spritesheet-creator`

Then you can generate some spritesheets for Godot! Just do:

`spritesheet-creator generate_spritesheet godot3 <target_texture> <target_meta_folder> <paths to source files>... --project-root <godot_project_root>`

Please note, that target paths must be inside `<godot_project_root>` for the tool to properly generate Godot-specific `res://` paths.

In a few seconds you will (hopefully) get a large texture and a bunch of `.tres` files. You can use them right out of the box as a replacement for the stand-alone sprites. 

This will dramatically increase the performance of the large scenes due to the batch draw call optimisation and zero texture switching.

Options:

`--sort-method [height,width,area,maxside]`

Before packing sprites are sorted by of these algorithms.

--pack-algorithm [binpacking,growing-binpacking,horizontal,vertical]

The algorithm to pack sprites. Highly recommended to use the default `growing-binpacking` one.

`--width <width>                   
--height <height>`

The width and height of the texture for `binpacking` algorithm.

---
_Source: https://npm.io/package/spritesheet-creator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
