pixel-sprite-generator-nodejs
v1.0.3
Published
A procedural pixel sprite generator for nodejs
Downloads
26
Readme
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
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);