A small pixel painter widget by Chris Malcolm. Originally I made this to facilitate a crowdsourced emoji website I was building. No pixel painter met my needs to I decided to build one myself.
FEATURES
Deadass Simple - not too much fuss, the way it should be
Customizablet - Customizable color pallete / module size of pixels
Export / Import - import + export PNGS
Adding the Library
Before starting make sure you have included jquery and the Pixelator.js library in the head of your script. If using the toolbar options make sure you include spectrum.js as a dependency.
{{addingLib}}
Basic example
Then we start an instance of documentron and parse the script using AJAX. Check Constructor for complete set of initial options and source inputs.
{{instantiate}}
Result
Now we have a editable canvas! See #export and #import for porting options.
Example with toolbar
This time we're going to include a toolbar and also import some data.
{{instantiate_toolbar}}
Result
Now we have a editable canvas! See import and .rawData for porting options.
DOWNLOAD Latest: {{github.version}}
You can download directly from github here, or check out the repository to contribute.
Below is a demo of how source code (shown immediately below here) is converted into documentation. In this case its documentation.js itself , and in the future I will likely offer other js scripts to try... change the dropdown tab to see some different parsed results (JSON/Html/Markdown/etc).