Home

Awesome

GitHub package.json version David License Build Status GitHub repo size

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


npm install pixel-sprite-generator-nodejs

/!\ Follow theses instructions for the required Canvas module /!\

https://github.com/Automattic/node-canvas


Usage :

const pixelMaker = require('pixel-sprite-generator-nodejs')
const outputDirectory = './sprite/'

const sprite = pixelMaker.createCreature(outputDirectory, (name) => {
        console.log(`Random creature ${outputDirectory}${name} created`)
    });

Or

const dragon = pixelMaker.createCreature(outputDirectory, (name) => {
        console.log(`Dragon sprite created in ${outputDirectory}${name}`)
    }, pixelMaker.masks.dragon);