pixel sorting for canvas
general idea
Take a canvas. Define a filter for which pixels get sorted and which don't. Rows and columns of pixels that pass that filter will be sorted based on their color value.
basic use
var canvas = document;var butter = ;butter;
For convenience, you can sort multiple times in quick succession
butter;
By default, the mode is set to black
, but you could also set it to bright
or white
.
var butter = mode: 'bright';
You can also change the threshold for the current mode using butter.setThreshold(newThreshold)
development
$ npm install$ gulp