pixel-sprite-generator
pixel-sprite-generator copied to clipboard
use module.exports to export your module for npm
I'm a little confused about this. What would you be trying to accomplish with this code running in a non-browser environment?
Without access to the DOM/Canvas context, this code is not very useful. Perhaps I'm missing something :)
I can only think of web-server that provides data to other clients, that are not JS-based. Mobile apps, Flash, etc, without porting the code to different language. Is that super useful?
Is not to use on the server side, but is to keep the window namespace clean. If I provide a module.export or define, you should export your module to that. Is kind of standard nowadays.
hey i've ported this code to a nodejs environment, it create a .png file : https://github.com/blipn/pixel-sprite-generator-nodejs