Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blipn/pixel-sprite-generator-nodejs
Create procedural 2D creatures in .png files.
https://github.com/blipn/pixel-sprite-generator-nodejs
Last synced: 3 days ago
JSON representation
Create procedural 2D creatures in .png files.
- Host: GitHub
- URL: https://github.com/blipn/pixel-sprite-generator-nodejs
- Owner: blipn
- License: mit
- Created: 2017-07-30T13:31:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T19:17:49.000Z (almost 2 years ago)
- Last Synced: 2024-09-20T01:40:29.717Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 398 KB
- Stars: 22
- Watchers: 3
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![GitHub package.json version](https://img.shields.io/github/package-json/v/blipn/pixel-sprite-generator-nodejs)
![David](https://img.shields.io/david/blipn/pixel-sprite-generator-nodejs)
[![License](https://img.shields.io/github/license/blipn/pixel-sprite-generator-nodejs)](https://raw.githubusercontent.com/blipn/pixel-sprite-generator-nodejs/master/LICENSE)
[![Build Status](https://travis-ci.org/blipn/pixel-sprite-generator-nodejs.svg?branch=master)](https://travis-ci.org/blipn/pixel-sprite-generator-nodejs)
![GitHub repo size](https://img.shields.io/github/repo-size/blipn/pixel-sprite-generator-nodejs)# pixel-sprite-generator-nodejs
Create procedural 2D creatures in .png files.Adaptation of this front javascript app for nodejs : https://github.com/zfedoran/pixel-sprite-generator
![alt text](https://raw.githubusercontent.com/blipn/pixel-sprite-generator-nodejs/master/doc/exemple.png)
---
```bash
npm install pixel-sprite-generator-nodejs
```
### /!\ Follow [theses instructions](https://github.com/Automattic/node-canvas) for the required Canvas module /!\
https://github.com/Automattic/node-canvas---
Usage :```javascript
const pixelMaker = require('pixel-sprite-generator-nodejs')
const outputDirectory = './sprite/'const sprite = pixelMaker.createCreature(outputDirectory, (name) => {
console.log(`Random creature ${outputDirectory}${name} created`)
});```
Or```javascript
const dragon = pixelMaker.createCreature(outputDirectory, (name) => {
console.log(`Dragon sprite created in ${outputDirectory}${name}`)
}, pixelMaker.masks.dragon);```