GM engine for spritesmith
I have found it is best to install from the site rather than through a package manager (e.g.
apt-get) to get the latest as well as without transparency issues.
This module has been developed and tested against
Install the module with:
npm install gmsmith
// Load in our dependenciesvar Gmsmith = ;// Create a new enginevar gmsmith = ;// Interpret some images from diskgmsmith;
This module was built to the specification for spritesmith engines.
Specification version: 2.0.0
This is also known as
Engine constructor provides support for the following options:
createImages methods supports the following types of images:
String- Filepath to image
Object- Vinyl object with
nullfor image (uses provided filepath)
We accept but don't fully support the following types of images:
Object- Vinyl object with buffer for image (ignores contents, uses provided filepath)
Object- Vinyl object with stream for image (ignores contents, uses provided filepath)
export method provides support for the following options:
String- Output image format to callback with. Currently, png and jpeg are available.
Number- Quality of output image on a scale from 0 to 100
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint using
npm run lint and test via
Copyright (c) 2013 Todd Wolfson
Licensed under the MIT license.